Bike Motivator

by REARLab in Circuits > Assistive Tech

1614 Views, 10 Favorites, 0 Comments

Bike Motivator

bike.jpg
Screen Shot 2017-01-13 at 11.34.53 AM.png
Bicycle Motivator
BikeMotivator_schem-copy-1.png

Children with developmental disabilities are not typically motivated to exercise, but can be motivated to participate in activities using music, sounds, lights, and other visual or auditory stimuli. Cycling provides children that have developmental disabilities the opportunity to increase muscular and cardiovascular endurance as well as develop reciprocal motor programs, which may be transferred to gait later on in development. Using a modified predicate bike technology as well as new design features, a “retro-fit kit” solution could provide these incentives to help motivate children with a variety of developmental disabilities to exercise.

Adding motivational factors to cycling activities can encourage children with developmental disabilities to engage in such activities, improving cardiovascular endurance, development of motor programs, and social/environmental interaction.The retro-fit kit we have designed will sense pedal motion and trigger motivation factors like lights, music, TV soundbites, and bubbles.

Tools and Supplies

  • Heat Shrink tubing
  • JST Jumpers
  • Soldering Iron
  • Solder
  • Wire cutters
  • Wire strippers
  • Breadboard
  • drill

Prepare MP3 Shield and ProtoShield

20161019_112927.jpg
582200824fbadef14a00008d.jpeg
582200c44fbade3f21000bd6.jpeg
  • ProtoShield
  • MP3 Shield
  • Stackable header kit
  • Breakaway straight headers

The protoshield and MP3 shield need to be assembled before stacking onto the microcontroller. Follow the instructions on Sparkfun to solder the MP3 shield with the stackable headers. Solder the straight header pins onto the ProtoShield to the Digital I/O, Analog In, and Power. Stack the MP3 on top of the Arduino then the ProtoShield on top of that.

Solder Wires to Components

20161024_120548.jpg
20161118_112455.jpg
TSJack (1).jpg
20161025_121946 (1).jpg
20161027_123738.jpg
20161108_120224.jpg
20161209_140414.jpg
20161209_135630.jpg
  • DotStar Digital LED Strip
  • Magnetic Switch
  • LED Switch
  • Potentiometer
  • (2) 3.5mm Female Mono Jacks
  • 3.5mm Female Audio Jack
  • 4-Pin JST SM Connector
  • Heat Shrink tubing

Solder wires to the LED switch, potentiometer, Mono Jack, Audio Jack, and Magnetic Switch. Using the same colored wires on each will help identify ground, power, and data when we connect them to the boards. The magnetic switch, LED strip, speakers, and toy will all be mounted outside the case, so we're using a JST connector and surface mounted jacks to connect them to the case.

The LED strip should already have a JST connector attached, if not solder one of the 4 pin JST SM connectors to the corresponding wires. The mono jacks are for the toy and magnetic switch. The audio jack is an extension from the one already on the MP3. You may need to lengthen the wires for them to have enough room to mount to the bike.

Protect all solder joints with heat shrink tubing.

Solder Components to the MP3 and Proto Shields

BikeMotivator_schem-copy-1.png
20161025_125353.jpg
relay wiring.PNG
20161209_130108.jpg
20161108_120151.jpg
20161209_140719.jpg
  • ProtoShield
  • MP3 Shield
  • DotStar Digital LED Strip
  • Relay
  • Potentiometer
  • (2) 3.5mm Female Mono Jack
  • 3.5mm Female Audio Jack
  • 4 pin JST SM Connector

Use the diagrams in the photo to connect ground, power, and input pins of the components to the ProtoShield.

D13 - LED Strip Clock

D11 - LED Strip Data

Ground, Power - LED Strip

A0, Ground, Power - Potentiometer

Speaker pins (-, R, L) - Audio Jack for Speakers

Ground, Power - Relay

Relay - Mono Jack for Toy

D3, Ground - Mono Jack for Magnetic Switch

The relay we used has 5 pins, but we only need 4. If it does not fit on the ProtoShield, you can break the 5th pin off that’s indicated in the photo.

Modify Toy Battery

20170113_104645.jpg
5878fff165d2217da1000b56.jpeg
  • Adhesive backed copper foil sheet.
  • Business card or small piece of poster board
  • 3.5mm mono cable with male jack (we cut one up and stripped the wires)
  • Battery operated toy (we used a bubble blower)

In order to control the toy from the Arduino, you put a battery interrupter in between one of the batteries. This is done by attaching a male jack's 2 wires to either side of a copper circle. Here is a good tutorial on how to do this (but using a female jack): https://www.instructables.com/id/No-Solder-Battery-Interrupter/

We placed it in the existing battery compartment of a bubble-blower and drilled out a small crevice for the wire to go through.

Battery Booster, Charger, On/Off Switch

20161118_112455.jpg
20161118_120658.jpg
20161118_120722.jpg
  • 3.7v Lipo Battery
  • Lipo Booster/Charger
  • LED Switch
  • 10k resistor
  • USB to Mini USB cable

The booster/charger boosts the 3.7v Lipo battery to 5.2v in order to supply enough power the project. First, solder the USB jack onto the board following the instructions on Adafruit. The USB connects to the mini USB on the microcontroller and the mini usb on the booster connects to a power source to charge. The battery plugs into the JST on the side. It also has a red LED to indicate when the voltage drops below 3.7v.

To turn the device on and off, place a LED switch on the booster/charger. Because the EN pin is pulled high (your switch will be in the "off" position when the power is on), we have to pull it low. Connect a 10k resistor between the PowerBoost's EN pin and GND, then connect the switch between VBAT (outside silver pin of switch) and EN (middle silver pin of switch). The 10k resistor will hold the EN pin low when the switch is open, and closing the switch will pull EN high. Connect the switch's third pin (gold, for the LED) to GND. That will light the LED when the PowerBoost is turned on

You can also add a regular switch (not LED) using the instructions in the same Adafruit tutorial.

Assemble Components

hole-diameters.png
20170112_120233.jpg
20170112_131032.jpg
587900698ae43b312500002e.jpeg
20170113_104130.jpg
20170112_175711.jpg
20170112_175752.jpg
  • Assembled Protoshield and Components
  • MP3 Shield
  • Redboard
  • Battery and Charger
  • Project Case

To assemble the components in the case, first drill the holes (see diagram for diameters) for all of the surface mounted switch, potentiometer, and jacks. Be aware of the space each component needs, any ridges inside the component case, and getting too close to an edge. Feel free to put the holes wherever works for your bike. We ended up putting the LED strip hole on the back of the box and the rest on the front.

Next, place the assembled board and battery inside the box to line up with the correct holes, double sided foam tape can be useful for keeping it in place. Put the jacks, potentiometer and switch through the holes and secure them with the included nuts. The wires for the LED strip were covered in plastic to keep them untangled and put through the hole. We added a zip tie and hot glue to prevent it from pulling through the hole and damaging the connections.

The switch turns the microcontroller on/off. The potentiometer controls the difficulty of the motivator, or the time the child has to pedal again. The jacks will connect to the outside components: the toy, speakers, and magnetic switch. We added labels to these with a label maker.

Assemble Components Cont.

fullbike.gif
back.gif
box.jpg
magswitch.gif

The toy, LED strip, speakers and Magnetic switch all are outside the container, so the wires will need to be adjusted depending on the bike. The side of the magnetic switch without wires is placed on the pedal and lines up with the other side placed on the bike. The speakers can be placed anywhere with zip ties, glue, or tape. The toy is mounted in the front and the LED strip is wrapped around the handle bars, then trimmed to length at the dashed line between the copper pads.

Code

Provided is the code and libraries that can be uploaded to the microcontroller. It tracks how many times the magnetic switch has been passed by the pedal and turns on the lights, toy, and music accordingly. Remember to install the libraries in order to run it.

The micro SD card in the MP3 player must have songs on it named as "track001.mp3", "track002.mp3", etc.