Brake Light, auto canceling Turn Signal Project. Will pay.

Hey Everyone. I have been trying to create code for this for some time but I just can't seem to get it all to work how I'd like it. It would be for my scooter which lacks any real advanced electronics :slight_smile:

I know I can't use delay since I want multiple functions and although I've had minor success getting somethings to work the moment I try to add cancelling abilities everything breaks and that's with just one of the 3 buttons so I know I'm over my head. So I'm hoping someone can take on this project for me.

Here is the basic scope of what I would like to do:

Scope. Emulate turn signals and brakes (with additional features) using momentary buttons.
3 Buttons
1: Left Turn Signal
2: Right Turn Signal
3: Brake Switch

Basic Turn Signal Functions:

Short press makes the light blink a pre-set amount of times. i.e. 5 times, press duration less than 500 ms

Middle length press turns on signals for pre-set number of flashes i.e. 20 times, press duration greater than 500 ms less than 1500 ms

Long hold flashes both left and right lights flash until cancelled. Press duration greater than 1500 ms

If left side is active for any function and left button is pressed again for any duration it should cancel current function and not trigger a new one for that side.

If one side is active and the opposite side button is pushed, cancel current side and do the function of the new side based on the press length.

Advanced Turn Signal:
If brake is pressed or being held while the middle length is active/activated (20 flashes) the flashes reset and not count down until the brake is released.

Brake Button:
When pressed the light should flash rapidly for pre-set amount of time i.e 5 seconds then go solid until released.

Of course the number of flashes, the trigger times and the duration of the flash and timing will all be subject to adjustment during real world testing.

The basic setup should work on an UNO but I may use something smaller once I figure out the all the electronics such as flasher or relays. That part I'm not worried about and have a ton of 12 volt electronics experience. If I can get LED's on the Arduino working I can make them work on a scooter.

Analog input I think would be best since it will be triggered by scooter turn signal and brake switch. Both switches are 12 volt output. All lights will be converted to 12 volt LED. But I don't know what works best for Arduino so open to expert suggestions.

This is a personal project so please be kind on quoting costs :slight_smile:

Hi VagGuy,

Here's a few things to consider as you design your circuitry. Since you're familiar with 12V, these shouldn't be too challenging for you.

  1. Analog or digital, either way -- you'll need to reduce the 12V down to 5V or less. I suggest you use a resistor divider circuit.

  2. As far as driving the 12V LEDs, you'll need to use either relays, MOSFETs, or the like. The Uno will only generate a 5V output signal.

Pat.

As I mentioned the 12 volt side isn't an issue. I have opto-isolator relay boards if that's the route I decide to go. Since a lot of those boards allow different reference voltage to relay voltage it can be fed by 5 volt for the opto side and 12 volt for relay.

I have actually designed and had produced a few pcb boards in the past so if I get real ambitious with this I can create my own arduino with the required parts built in. In fact I think Eagle actually includes an Arduino file as a demo in their software.

VagGuy,

Excellent! See my PM.