Maker Pro
Maker Pro

Fog light circuit with atmega328 microcontroller

stspringer

May 10, 2019
116
Joined
May 10, 2019
Messages
116
Hello All,

"Ok, I have "two" physical fog lights for my Harley Davidson, the fog lights are 12v LED's they each have a low beam and a high beam, just like an incandescent "dual filament bulb" in a car. The high beams draw 1.6a "each a total of 3.2a. The low beam fog lights will "always be on" by "default", when the Harley Davison is started up, just like headlights "running lights" on a car.

I have an atmega328 standalone microcontroller with my Arduino script installed into the microcontroller, that blinks the fog lights, and turns on the high beams, both buttons have 12v LED "indicators" built-in. The first momentary-on button, its only job is to blink the fog lights, when pressed, it will blink the low beam fog lights at "100ms" since they are always on by default, and also its LED indicator will also blink in sync with the low beam fog lights.

The second momentary-on button, "which acts like a latched switch in code", will turn on the "high beam fog" lights, and keep them on, until it is pressed again. Even though this second button is a physical momentary-on button, it acts as a "latched switch" in code. Press to turn on high beam fog lights, they "stay on" until the button is pressed again. It acts like a "latched switch".

Now if the "high beam" fog lights are "ON" pressing the "first" momentary-on button will blink the high beam fog lights, and the low beam fog lights, since they are always on, both at 100ms.

Also a "long press", (2.5 seconds), on the "second button" the one that turns on the high beam fog lights, the long press will turn "OFF" all the fog lights, this feature I added so that I have an option to turn off all my fog lights if I wish to do so.

I can turn the fog lights back on with another "long press" on "the "second button" the one that turns on the high beam fog lights," and when the fog lights do come back on just the two "low beams" will be on, since that is the "default", the high beams will be off.

Here is my current schematic.
Harley_fog_light_fix_11.jpg

Problem:

It works "partially" what I mean is "sometimes" when I power on the circuit with my bench power supply at 12v, "sometimes" when I turn on the "high beams", the voltage drops to 8v, other times it is just fine and stays at 12v.

The low beams are always at 12v and are ok. If I remove the high beam connection from 1 of the fog lights "either one" it is good all the time. The fog lights are 20w 3.2a total, 1.6a each. When the circuit is happy my PS reads 12v 3.20a on high beam, on low beam 130ma, 12v.


Does anyone see anything that may cause this to happen?

Thank you for any help
 

stspringer

May 10, 2019
116
Joined
May 10, 2019
Messages
116
Hey All,
I found out what was wrong. I had my Bench PS set to 3.2a, I then set it to 5a and my high beams are happy and working! So the circuit design is good. I am happy. Hope this helps someone out there.
 
Top