I wrote about a concept for replacing my old LED
dimmer a while back (original post here
), but with all the recent learnings and achievements I had to do a little brush-up on the original design (and I had a lot of fun doing so, since this brought even more improvements to the concept).
The first thing I did was to redesign the circuit. The original design was meant to be attached to a Raspberry Pi directly via I2C, which would then be receiving commands from the main controller via Ethernet. The recent discovery of the RS485 bus and the ability to integrate that directly into my circuits allowed me to completely dismiss the Raspberry Pi for this purpose, and I was even able to integrate the complete RS485 decoder circuit onto the board directly.
The finished eagle design looks like this:
|New dimmer design including AVR|
I then set out to build this, and I almost quit while making the PCB: It took me five attempts to get the toner for the top layer transferred to the raw copper. That, and the outlook that I had to do the same with the bottom layer almost drove me crazy. Luckily, things went way better after that: The bottom layer worked on the first attempt, and even the registration between the two layers was immediately perfect.
Here's a few pictures of the assembly:
|Etched and drilled board with the first SMD components to be assembled|
|Microcontroller, crystal, RS485 decoder and PWM chips in place|
|It's alive! (Testing with the Arduino "blink" sketch)|
|More testing, this time with RS485 data|
|All amplifiers in place|
|Testing with actual LEDs|
|More testing and debugging|
At that point I noticed a few communication glitches, and I ended up introducing some checksums to my self-devised serial protocol to fix them. In the picture above you can see the Arduino I used to download the firmware to the dimmer during this process.
I also ended up integrating a channel map to fix the channel sequence problems introduced by the board design right into the firmware.
|Finished dimmer insides with the secondary output board on top|
|Finished dimmer with LED connections (Some are still available).|
Here's a few things I learned from this project, too:
- The ISP header is too close to a mounting hole. This was no big deal as long as I was working with the base board only, but with the stacked output board mounted on top the ISP header is pretty much inaccessible.
- The overall power consumption appears to be pretty high. I only know that from the temperature the 7805 reached when multiple LEDs were on. Since the 7805 only supplies the microcontroller and the two PCAs, I suppose that it's the PCAs' outputs that run much more current than necessary to trigger the ULN2064s. The Adafruit PWM board that I previously used had 10K resistors in its output lines, and I should have included those, too. On the other hand however: Who would like to solder 32 individual 0805 SMD resistors? As a solution I replaced the 7805 with a step-down regulator that is more efficient and does not produce that much heat.
- Drilling the front plate was a bad idea. It literally crumbled in my fingers. But since I don't own a proper milling machine, I don't have many options. (You can see the damages in the last picture if you look closely.)
Where to go from here? Well, the device itself is not complete yet: It still lacks a back plate and some proper connectors for the RS485 bus (right now, the cables go right into the housing and are plugged into the main board). I'm currently thinking about RJ10 connectors for that purpose. And I might need to replace the front plate due to damages, but that would only be cosmetics. Other than that I'm pretty contempt with the result.
Post a Comment