Please see my other video for a live kid-tested demonstration!

These LED lights are controlled by an Atmel AVR ATMega328P micro controller on a custom-designed PCB. The PCB includes switching regulators for both logic supply and LED power, along with MOSFETs to drive the LEDs and a collection of support components.

The ATMega328P is the same microcontroller used in the Arduino Uno, and my pin utilization was chosen to be full Arduino-compatible. In fact, I wrote all the control software in the Arduino IDE, and programmed the controller board using through 6-pin ICSP header that I included on the board. The microcontroller chip is also socketed “just in case”.

The software is all written in properly object-oriented C++, and can be field-upgraded directly from a laptop using an inexpensive USBasp programmer.

LED brightness is controlled by the AVR PWM timers, using standard Arduino analogWrite() method calls.

When not in use, power conservation is accomplished by disconnecting the entire circuit from the 12V battery by turning off p-channel power MOSFET. (During normal operation, a signal from the mcu keeps this MOSFET on.)

The power-on procedure is initiated by a separate board mounted to one of the 12V electric drive motors. On this board, a pair of optoisolators detects power going to the motor (i.e. the tractor is being driven), pulling an open-collector output low and activating the p-channel power MOSFET on the main controller board. I think it’s pretty clever.

As long as the accelerator pedal is activated at least once every 5 minutes, the microcontroller continues to run and keep the lights on. If there is no activity for 5 minutes, the mcu kills the power to itself.

Since I’m using high-efficiency switching regulators, not only is the entire circuit relatively immune to power fluctuations, but the current draw is minimal and efficient. I have not yet run an experiment to see how long a fully-charged batter will last with all the LEDs on, but I suspect it to be well in excess of 4 hours. Maybe a LOT longer…

, https://i.ytimg.com/vi/pD-InblYDlk/hqdefault.jpg

source

30 Comments

  1. I know that this is an old posting but wondering if you by chance would sell the programming and parts list for duplication for my kid nephew?

  2. Very interested in replicating your build. Please let me know if you're able to point me in the right direction.

  3. How did you get the LED headlights bulbs in far enough that they don't hit the lens? My bulb has a double like shoulder on it that makes it protruded too far out

  4. Hello Kevin can you send me more Information about this project, or did you sell this kitt?

  5. Hello ! This is so awesome ??
    I sooo want to so this on my son’s JD ground force tractor! He got one this Christmas !
    I would be so thankful if you could send me some details for this project! I’m not an expert my self at this but got some friends with good electric skills that could help me! ??

  6. Hi Kevin, What did you use to control the individual LED voltages as I am trying to develop some ideas for my grandson's tractor. Very impressive results.!!

  7. Outstanding, Kevin! Sitting here admiring your work. Of course, now we gotta have it for our Ground Force tractor. 🙂
    Is there any way we could chat in private? Please, contact me (I was trying to find a way from here to send you a PM). Thanks!!!

  8. I would love to have this for my son's tractor. do you build these kits to sell? thanks

  9. Kevin, I just wanna make 2 working headlights on a switch. What 1 watt LED's did you use and where can I get them?

  10. Great job very nice! Might try this as I'm getting ready to order my two year old this tractor or the case version of it. Schematic would be nice if you have one handy and where to pickup some of the parts as in controller. I've made a simple system for under our countertops with different modes but think this is a little different. That was plug and play type of thing.

  11. Outstanding Work!  Kevin do you think you could give me some guidance on how do this with just with front full beam and tail lights on a simple on/off switch?  I'm not electrically capable enough to do anything more advanced.

  12. Just put switch and led lights will last long time with minimal draw anyway. It's rechargeable anyway

  13. I figured it out, thanks! I was trying to figure out which LED's I needed in another project. Thanks for the reply!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.