Smartcycle, a New Way to Drive Your Bike

by Gilles_Be in Circuits > Raspberry Pi

128 Views, 0 Favorites, 0 Comments

Smartcycle, a New Way to Drive Your Bike

IMG_0686.jpg

Hi, my name is Gilles, and I'm studying MCT at Howest. At the end of the first year, we were tasked with creating a project. I've always wondered if I could make my bicycle smarter, so I took up the challenge and decided to enhance it using the knowledge I gained during the first year. With my smart bicycle, you can enjoy features such as turn-by-turn navigation, automatic bike lights, a dead zone sensor, speed measurement, and temperature tracking.

You might be wondering, why would you need this? Well, while you might not notice the issue, others certainly do.

Numerous cyclists find themselves distracted by their phones, neglect to switch on their lights, or change direction abruptly without signaling. My solution addresses these concerns, aiming to enhance safety on the road.

By incorporating smart features into your bicycle, my project offers a way for you to stay more secure while navigating traffic. Whether it's automating lights, providing clear signals, or offering turn-by-turn guidance, this innovation aims to make cycling a safer and more enjoyable experience for everyone involved.


github

Supplies

Enable Bluetooth Communication

First we need to get into the Bluetooth interface to use specific commands:

bluetoothctl

Then enable the agent and the scan:

agent on
scan on

Now connect your device with Bluetooth

pair "mac address"

and connect it:

connect "mac address"

Connection

IMG_0673.jpg

First of all try to connect it to a breadboard to ensure that everything works.

The photo above has a lot of wires so if you want connect it correctly follow the following fritzing schemes below

Coding

If the circuit is complete, you can use my github code for all the classes of all components.

Please note that these classes are written with static GPIO pins. So, if the program isn't functioning correctly, consider changing the GPIO pins.

If you intend to use the speaker, it's important to follow the step-by-step guide for the amplifier speaker from Adafruit to ensure proper functionality.

If you find any problems with enabing the sound try using sudo privleges


The Case

IMG_0661.jpg
IMG_0684.jpg
IMG_0686.jpg

For the deadzone sensor in the back, you could drill some holes into a pepper disclosure to connect all the wires.

For the main case, you could use wood to build a minibox where could enter all the components.

This part is the hardest if you want to make it compact. (Do note that you need a saw and wood planks for it) You could design a case using 3d software


Step one: secure the pi with some screw into the case

Step two:: connect your pi header to your raspberry pi

Step three:: connect all the remaining cables and components to mini breadboards just like the circuit

Step four: attach the cover to the case


Consider designing a custom PCB as an alternative. This approach can effectively decrease the size of the system and ensure the reliability of all connections. This is especially important while riding a bike, as it prevents the risk of a single wire coming loose and disrupting the circuit.