I'm building a (LED) blinker circuit for my motorcycle. It will have the basic on/off blinking for left and right (J1 & J2) and an "emergency" mode (J3) for more "aggressive" LED blinking, which will increase the visibility when driving between lanes during traffic jams.
J1, J2 and J3 are the inputs for the switches (L, R, both). J5 and J6 are the outputs to the LED blinkers. J4 and J7 are GND and +12V from the motorcycle.
There's a ATTiny45(http://www.kynix.com/Parts/160190/ATTINY45-15MT.html) which reads the inputs L or R. If both are high, it will go into emergency blinking mode. It uses two output pins with pulses that will blink the LEDs. (if anyone is interested in the code, I'd be happy to share it).
Now, the circuit works on my breadboard (and I hope I correctly transferred it into Fritzing). But since this is my first project in electronics I have a ton of questions and doubts. Now, I'm not asking you guys to review my project (however, would be appreciated), but want to focus on my biggest question for this circuit, the isolation between the "dirty" 11-14V inputs and the "delicate" ATTiny micro controller.
On the input side I've used an opto coupler. But I'm actually wondering if this de-couples anything, since there's a common ground.
On the output side I've used transistors + MOSFETS. I couldn't drive the MOSFETS directly, although I forgot why. I'm wondering if it's not safer to use an opto coupler here in stead of the transistors.
All parts used are in the diagram.
Not sure if it matters much, but the environment on a motorcycle is relatively hostile, vibrations, voltage spikes, etc.
I hope I didn't make too many stupid mistakes! Many thanks for your input!
Thanks
Build an LED blinker circuit for my motorcycle
Re: Build an LED blinker circuit for my motorcycle
Hmm, a bit of a strange first post. You may be better off finding an electronics enthusiast forum on the internet.
I am a retired heavy industry electrical and marine engineer, not electronics per se. But many years experience with systems using optical isolators and transistor switched control and alarm systems. I cannot see much basically wrong with your circuit, although a bit confused by the label under R1 and R4 concerning the LED? Also, do not have your concerns about the common ground. The 5 volt regulator should keep the electronics isolated.
I would be more concerned about the environment than any "spikes" on the raw 12 volt supply. All of the components need to be in a sealed plastic box with just input and output terminals externally. Good luck.
I am a retired heavy industry electrical and marine engineer, not electronics per se. But many years experience with systems using optical isolators and transistor switched control and alarm systems. I cannot see much basically wrong with your circuit, although a bit confused by the label under R1 and R4 concerning the LED? Also, do not have your concerns about the common ground. The 5 volt regulator should keep the electronics isolated.
I would be more concerned about the environment than any "spikes" on the raw 12 volt supply. All of the components need to be in a sealed plastic box with just input and output terminals externally. Good luck.
May you be in heaven half an hour before the devil know`s you`re dead!
Re: Build an LED blinker circuit for my motorcycle
I applaud the industry, I nearly melted in the heat just fitting an LED system to my moped. I fitted a pre-made system that I’d imported from the US via the UK.
More details here https://admorelighting.com/photo-gallery/
If you see a PCX with a Givi box on the back with plenty of LEDs, it’s probably me. Or someone’s stolen my ride.
More details here https://admorelighting.com/photo-gallery/
If you see a PCX with a Givi box on the back with plenty of LEDs, it’s probably me. Or someone’s stolen my ride.
"A man who does not think for himself, does not think at all."
Wilde
Wilde
Re: Build an LED blinker circuit for my motorcycle
So was it you riding slowly down Soi 94 just after El Toro Loco just before lunchtime today?
I was trying to determine if the lights on the Givi were indicating right or left as they were both/all flashing as you appeared to be looking for somewhere.
'If you didn't have a wasted youth you wasted your youth'
Man in pub circa 1987.
Man in pub circa 1987.
Re: Build an LED blinker circuit for my motorcycle
Is it a pink colour?If you see a PCX with a Givi box on the back with plenty of LEDs, it’s probably me.
May you be in heaven half an hour before the devil know`s you`re dead!
Re: Build an LED blinker circuit for my motorcycle
Interesting as a project but in practice would advise getting a commercially available one, they are typically designed to directly replace whatever was there in the first place and be compliant with the law.
There are certain shades of amber and red suitable for traffic; not all would comply. Also note that failure of a LED in a typical array would mean a whole missing string aka 'black hole'. Also commercially available LEDs are not the top grade (we did try conversion of incandescent non-critical wayside signals to LEDs and the LEDs were special order).
The other thing I hate about retrofitted LED signals (especially those brake lights that go through a flashing sequence before turning full on) is that even a touch on the brake pedal sets off the sequence, and this doesn't stop till it completes the cycle. Very annoying.
Good luck with it and have fun, I know I did way back when with 12V circuits and discrete components, though I think MOSFETs aren't the best things to use in a fairly hostile environment that a motorcycle would be exposed to.
There are certain shades of amber and red suitable for traffic; not all would comply. Also note that failure of a LED in a typical array would mean a whole missing string aka 'black hole'. Also commercially available LEDs are not the top grade (we did try conversion of incandescent non-critical wayside signals to LEDs and the LEDs were special order).
The other thing I hate about retrofitted LED signals (especially those brake lights that go through a flashing sequence before turning full on) is that even a touch on the brake pedal sets off the sequence, and this doesn't stop till it completes the cycle. Very annoying.
Good luck with it and have fun, I know I did way back when with 12V circuits and discrete components, though I think MOSFETs aren't the best things to use in a fairly hostile environment that a motorcycle would be exposed to.
วินเชนท์
Re: Build an LED blinker circuit for my motorcycle
Not me as I’m in Blighty but could be my friend who keeps the bike in his garage and uses it from time-to-time in order to keep it running. Not sure what he’s doing on Soi 94 and even more surprised about him being up before lunchtime so maybe someone has stolen my ride!
"A man who does not think for himself, does not think at all."
Wilde
Wilde