Bus Buddy

Made by Lillie Widmayer, Jonathan Fortis and Maya Pandurangan · UNLISTED (SHOWN IN POOLS)

Created: September 27th, 2019

0

Overview: Imagine you’re at a coffee shop. You’ve finished your cappuccino and are ready to head home for the night. But, alas! You miss the bus by a minute and have to wait another 45 minutes (and end up spending another $5 on coffee). Our ambient object solves this inconvenience through a real-time, responsive display that reminds people when a bus is fifteen, ten, or five minutes away. The display shows a miniature bus moving towards a bus stop and reminds people when they should be headed on their way to their bus stop.

0

Conceptual Design:

Context it operates in: 

It is a casual display meant to be housed in public spaces like coffee shops, libraries, restaurants, etc

What it does: 

A miniature bus “drives” to represent a real bus approaching a nearby stop

How/Why someone interacts with it:

People can casually glance up at the display whenever they want to. These interactions should be completely unobtrusive to their experience at a coffee shop or public space - it simply provides people with relevant and easily digestible information


Brainstorming ideas for project

0
  • Bill of Materials:

  • Bipolar Stepper motor

  • Bus Cutout

  • A4988 Stepper motor driver

  • Particle Argon

  • Timing Belt and TB pulley

  • Metal rod w/ same diam as TB pulley

  • 2 L-brackets

  • 4 Bearings

  • Wooden planks

  • Super Glue

  • Screws

0

Design Process:

 Laser cut a bus out of acrylic

• Get timing belt, motor, gears, and plywood to build apparatus bus will move on

• One side of the timing belt is attached to a gear that is attached to a stepper motor

• Other side of timing belt is attached to another gear on a free axis; this is to guide the belt while the other side is being controlled by the motor


0
//Prev Version (continuously shuttles bus back and forth):
#include "AccelStepper.h"

//Continuously moves bus back and forth. To move forward takes 5 minutes, to move back takes 1 minute

// Remember to set all MS pins high for 16th-microstepping
// defines pins
const int step = D2;
const int dir = D1;
AccelStepper Stepper(1, step, dir);
void setup() {
  Stepper.setMaxSpeed(1000);
  Stepper.moveTo(5000);
  Stepper.setSpeed(200);
  Stepper.setAcceleration(0);
}
void loop() {
   int time = Time.minute();
   transmit("time", Time.minute());
   //moves forward 1 step / 2.5 sec for 1200 steps => 5 min to span display
   Stepper.setSpeed(25);
   while (Stepper.currentPosition() < 1200){
       Stepper.runSpeed();
       delay(2500);
       transmit("position",Stepper.currentPosition());
   }
   Stepper.setSpeed(-200);
   while(Stepper.currentPosition() > 0){
       Stepper.runSpeed();
       delay(10);
       transmit("position",Stepper.currentPosition());
   }
   Stepper.setSpeed(200);
}
void transmit(char message[],int value){
  char valtext[1];
  sprintf(valtext,"%i", value);
  Particle.publish(message,valtext,PRIVATE);
}
Click to Expand
0
/*Final Code
send time for next bus through particle function. 
This will move the bus if it is at or below threshold
Resources:
https://www.robotshop.com/media/files/pdf/datasheet-1182.pdf
Accelstepper library: https://www.airspayce.com/mikem/arduino/AccelStepper/classAccelStepper.html#affbee789b5c19165846cf0409860ae79
*/

#include "AccelStepper.h"
const int tracklength = 1200; // # clicks to cover whole track
const int threshold = 5; // [minutes] consider this as whole track threshold for next bus




// defines pins
const int step = D2;
const int dir = D1;
// Define Stepper Motor
AccelStepper Stepper(1, step, dir);
void setup() {
    Stepper.setMaxSpeed(1000);
    pinMode(D7,OUTPUT);
    digitalWrite(D7, HIGH);
    Particle.function("next", bustime);
}
void loop() {
    //waiting to receive next bus time 
}
// Receives next bus time [min]
int bustime(String nextbustime){
    digitalWrite(D7, LOW);
    int bus_time = atoi(nextbustime);
    if (bus_time > threshold){
        transmit("bus is too far",bus_time);
    }
    if (bus_time == 0){
        transmit("waiting for next bus",1);
    }
    if (bus_time > 0 && bus_time <= threshold){
        transmit("next bus [min]: ",bus_time);
        // Calculate motor speed
        int speed = tracklength/(bus_time*60);
        transmit("speed [clk/sec]: ",speed);
        Stepper.setSpeed(speed); 
        // Run to end of track
        while (Stepper.currentPosition() < tracklength){ 
            Stepper.runSpeed();
        }
        transmit("Bus Arrived",1);
        // Run back to start zero time in 6 sec = 1200/(-200)
        Stepper.setSpeed(-200);
        while(Stepper.currentPosition() > 0){
            Stepper.runSpeed();
        }
        return 1;
    }
    else {
        return -1;
    }
}
void transmit(char message[],int value){
   char valtext[1];
   sprintf(valtext,"%i", value);
   Particle.publish(message,valtext,PRIVATE);
}
Click to Expand
0
Overhead view of setup
Img 6912.thumb
0
Side view of setup
Img 6913.thumb
0
Storyboard
Img 6915.thumb
0
Circuit Diagram
Screen shot 2019 09 27 at 5.00.45 pm.thumb
0
Process Photo of us choosing our components for the project
59078681432  300b9bd3 7a4b 4817 b489 c08c219a72cc.jpg.thumb
0
Bus Schedule IoT
Jonathan Fortis Rivera - https://youtu.be/iUoZvq6TBBI
x
Share this Project

This project is only listed in this pool. Be considerate and think twice before sharing.


Courses

49313 Designing for the Internet of Things

· 11 members

Thermostats, locks, power sockets, and lights are all being imbued with smarts making them increasingly aware and responsive to their environment and users. This course will chart the emergence of ...more


About

~