in , , ,

Make your bike smart with Raspberry Pi

- Werbung -
Reading Time: 3 minutes

Maker keanuDav was always forgetting to turn on his bike lights when riding out in the dark. He also never knew how fast he was going, or how long his rides were. So he created a shareable smart bike that automatically turns the lights on or off and keeps track of where you’ve ridden. The project uses a RFID scanner so somebody else can use the bike without messing with Keanu’s personal ride data.

Here in Cambridge, if you forget to take your clip-on lights off your bike when you lock it up, chances are they won’t be there when you go back. We reckon this Raspberry Pi-powered solution could work for us here in the UK’s leading cycling city too, since there’s nothing to easily unclip and walk away with.

Hardware

  • Raspberry Pi 3
  • GPS NEO 6M (to track speed and location)
  • Portable power battery
  • RFID RC522 (so guest data and Keanu’s data can be separated)
  • LCD screen (so you can see the IP address and display when a user scans in or out)
  • Elegoo Uno R3 Board

Keanu totted up the total price of the build, including wood and the light, at around €145.

How does it all fit together?

We’re not going to lie: the smart bike looks tricky to recreate. I mean, that is a lot of wires. And several bits of hardware. But it does perform multiple functions for the rider, so we can put up with a little fiddliness.

smart bike electrical parts wired up
So many wires. *Rocks back and forth* So many wires.

And don’t worry, Keanu is a hero and shared this Fritzing diagram on his instructable, which is handily set out in a twelve-step format so you can follow along easily.

smart bike fritzing diagram
See, it’s all simple once you know how

How do you collect all the data?

Keanu explains:

“The RFID scanner is used with the arduino. I read out the data from the scanner with the arduino and send it to the Raspberry Pi with Serial USB.

The GPS module is also using serial communication. The data the GPS sends to the Raspberry Pi is not that well formatted, so I used a library to parse the data and make it a lot easier to use.

- Werbung -

The analog values from the LDR are converted using the mcp3008 (an adc), then I transform the value to a percentage.”

smart bike data loop

Keanu stores the data in a relational database in mySQL. Then the database and a python script run together on the Raspberry Pi. Here’s everything you need on GitHub.

Take a ride

On top of the impressive coding and electrical skills, Keanu is a dab hand at woodwork. You could use a pre-made box in another material if that’s not your thing. It just needs a hole for the LCD screen to show through.

smart bike parts wired together in the box mount

Make sure to check out maker Keanu’s step-by-step tutorial explaining how he made the smart bike.

Website: LINK

- Werbung -

Report

- Werbung -

What do you think?

Written by Maria Richter

Schreibe einen Kommentar