monkeyswrench
To The Rescue!
- Joined
- Sep 7, 2018
- Messages
- 29,129
- Reaction score
- 82,767
Two things:Tonight’s project. As some of you know who watch our YouTube channel we control our lights with a micro controller called an “Arduino.” It’s an inexpensive yet powerful and open source method of having a programmable way to control things. We divided our lighting in our bus into six sections. Front, kitchen, bath, bunk, bedroom, and center row. Why do we need a center row to be it’s own section? Well those who have a bus know when you need to walk from the front to any section back you need to turn on the lights. But what if you’re going all the way to the back bedroom to sleep? You don’t want to have to turn on every section along the way. Each section has two simple push buttons mounted on the wall. The top button when pressed will turn that sections lights on and off. The bottom button will turn on and off the center row of the entire bus. Each section has six 12v lights and three center row lights for a total of 45 led lights. That’s a lot to control with just switches. There is a 5v positive signal from our Arduino to each button. When pressed a circuit is made and that signal is sent back to the arduino’s specific pin. The code sees a “high” signal and it’s action is to send a “high” signal on another pin to a relay which applies 12v current to that sections led lights.
However 9 lights in each section is pretty bright. Currently we only have on/off with a relay board. That’s where this comes into play. To properly dim a led light you need to do something called “pulse width modulation.” Think of it as an extremely fast blinking of the light. The higher the frequency, the more it blinks the more light is emitted from the bulb, the brighter it is. With all the lights they require a decent amount of amps to run which the arduino itself cannot support. So I built this “hat” for our arduino which will remove the relays and replace with these “mosfets” which will allow us to dim our 45 “high current” lights efficiently. So once installed a press will turn them on/off and then a long press will do a dimming cycle, releasing will keep it at that setting.
Having a controller can at some point allow us to set a timer, or control the lights remotely using our phones/Bluetooth.
Stay tuned for a video demonstrating this process. I understand a lot of this seems extremely complicated to most.
View attachment 1075683 View attachment 1075684 View attachment 1075685
One, this view of your coach is very cool! Like the dealer listing of the million dollar rigs, but you built it
Two...holy crap! Looking at that pic of the arduino stuff looks like parts I've seen in amps after I let the magic smoke out