Programming Accelerometer

I'm doing a project involving an Arduino Nano, LED's and small speakers. I'm trying to design a brake light system for my bike that will light up, and make a speaker "beep" noise repeatedly. My previous version was simply with wires that upon braking, complete a circuit and light the LED's( Have not designed speaker part of it yet and this version does not use Arduino nano either sadly). I was wondering if I could use an accelerometer to make it self-contained and portable( I would 3D print casing for entire circuit) and then it could be easily placed on any bike. My thought was that is the accelerometer can detect acceleration and deceleration, can I code it so that if it decelerates at a certain rate(would be relatively high so no bumps effected it), it lights the LED's and speakers. I'm completely new to this but I have a month to make this.

I am sure it will work, but be sure not to ride over bumps or go up hill or down hill.

Paul

Palgrave6:
I'm trying to design a brake light system for my bike that will light up,

In the old days we would take this part of the logic and do something simple.
Accelerometer...?? way over the top.

Probably easier to watch the wheel speed and turn on the brake light if the speed was falling above a certain rate, like 0.5 meters per second per second.

if it decelerates at a certain rate(would be relatively high so no bumps effected it

Bumps are noticeable precisely because they cause high accelerations.

I would love to make it simple as possible however this is for a school project so we need to make it over-complicated like this :frowning: .... I thin just using a regular circuit with lights would be too simple for the project so what if, instead of using the accelerometer to make it more advanced, I use a Bluetooth transmittor and receiver so when a button is pressed at the front of the bike by pressing the brakes, it would trigger the lights and sound. I'm not familiar with this technology but do you think it would be too hard due to coding.

A bluetooth brake light should not be too difficult. Very helpful if you want to put it on the back of your helmet and you don't want wires.

Palgrave6:
upon braking, complete a circuit and light the LED's

Run with this idea as I previously pointed towards but seems you missed it.

You can still do your bluetooth or whatever but this keeps the input simple and trouble free allowing you to concentrate on the other issues.

Thanks for the reply!!! :slight_smile:

The only thing that I don't like about the "completing the circuit" version of this product is that it would require wires to go all along the bike which makes my product less feasible as it need to be completely portable. I'm now leaning to a Bluetooth version of this to keeps things "simpler" in the portability sense.