In preparation for a road trip, I wanted to add some flair to my camper shell. I used this as an excuse to order my first PCBs. Not that it couldn't be done on protoboard, but I wanted to make it tiny and have sturdy input devices (The guide pins on the pots and switch). I'm proud of the fact the top and bottom enclosures snap together.
Troubleshooting PCB Design Errors
I designed the PCB as a general breakout board, so I had to make some modifications for this specific build. I had to reroute the switch connections to make it an analog input instead of a power switch (2 jumpers and 1 cut trace). It is important to note that in this configuration, one can only program the ATtiny if the analog pin can be disconnected from the switch (It cannot be connected to 5V or GND). My solution was a 2-pin header and shorting jumper that connects the GND trace. In other words - every time I wanted to upload a sketch, I'd flip the switch "up" and remove the header.
Aux cable supplies power and NeoPixel data to H3.
Trouble Shoots Back
I learned a lot about electronics during this project.
- You need to use a dummy load for a power bank to remain on for a low current device. I soldered two 1/4 watt 100 ohm resistors across the power lines of the USB connector. They are well hidden inside the plastic housing. There are less power hungry ways to do this, but I'm not planning on using these lights for more than an hour or so a day.
- I have ditched entire projects because of bricked NeoPixels. Not this time! I wish I could go back and let myself know the secret... re-burn the bootloader. I had to do this about 3 times during the development of the code.
- Sometimes, methods don't work in switch/case scenarios. I have no idea why, but the 3 more complicated modes would not run properly unless I split the code into individual if() statements.
OKAY! I lied. I didn't have 100 ohm resistors and I didn't want to leave the house - so I used a 10K and 56R, ALRIGHT!
"Expect problems and eat them for breakfast."
I made it through troubleshooting to reach the step of making my own NeoPixel ribbon. Pretty much just wire and clear heat shrink here. The only fancy bit is the power/aux bonanza. I measured the rails in the truck bed and decided to use 7 on each side. Throw it in a nice enclosure and add some adhesive Velcro to the loose goods, and it's done! I could have gone to the makerspace (Shoutout to the Bozeman makerspace) and made cleaner prints, but hey, I still have bare PCBs. Now I can enjoy a solid color, fading colors, rainbows and twinkles - how nice.
-20 deg F outside. Turns out adhesives don't like the cold. Also, the aux cord became inflexible.
A cool and unexpected feature is that one can unplug the controller and the lights will freeze and remain on. Handy little trick... if I ever need that.