I should have known this project was doomed from the start. When I laser cut a piece of paper to test the fit of the components, I somehow managed to flip around the holes for the LED displays, so I ended up building it flipped from what I designed. If that was the only issue, things might have been okay…
Hey, things fit! This was all good (though as mentioned, flipped) and as a front panel it looks fine. Let’s move on to the back of things…
Still good! A few laser cut spacers to get the LED panels flush. The rotary encoders and the outlet are all good. Of course we still need to add wires to get it all connected.
Wires in place. Not bad. I added an Arduino Nano with one of my breakout boards and screw terminals, and there’s a relay module to be controlled by the Arduino. All good.
The idea was that the first encoder would control how many seconds/minutes the outlet was on and receiving power, while the second encoder would control how long the outlet was off or not receiving power. This would allow me to control a 120 VAC device turning it on and off for set amounts of time. (I know, I probably could have used a timer relay, but I wanted to build something.)
Somehow, I never quite got the code to work. Maybe there were some weird issues with the encoder library, or using two encoders, along with the LED panels, I don’t know… but I tried for a few hours to get it to do what I wanted, and it never did. Typically with code issues I bang at it until it works, but for this I just sort of gave up.
In the end it didn’t matter much because I ended up using a variac to lower the voltage instead of togging the full 120 VAC on and off. I also ended up stealing the LED panels and the Nano for another project that had to be done in a hurry. I’ve still got the other parts in place, so who knows? Maybe I’ll return to it in the future…