Knob and brightness
Maybe one day I'll go back and come up with more clever titles for these posts.
I took a little break from the project while I waited for a few parts to come in which I would need to assemble a final perfboard. For one, I needed some screw-down terminal blocks to properly rig up the ribbon cable which I destroyed in order to interface with the Kello display module. The cable used incredibly thin stranded lines, so there wasn't much hope of soldering them effectively with my skills.
I also ordered a nice shiny aluminum knob for the rotary encoder. Originally I had a mind to try to mill my own knob out of wood, but I think trying to learn woodworking in addition to the rest of the challenges would have put my perseverance on this project to the test. The last 20% is always 80% of the effort, as a rule of thumb, and I don't need to add any more hurdles to that. Plus, the aluminum is a pretty nice accent and looks professional. It might actually be the nicest looking part of the final product.
Before I started soldering, though, I wanted to make sure I had gotten everything I wanted out of the hardware. The final thing I'd been ignoring was display brightness.
Making sure the display isn't obnoxiously bright is important enough to spend some time on. This thing will be sitting right next to my face while I'm trying to sleep, after all. I want to make sure I can control it through software so that I can tweak the settings as needed without opening up the casing or having to make modifications to the wiring.
The biggest question I needed to solve revolved around the 4th pin on the display cable. I'd noticed when testing that if I run power to that line, the display becomes brighter. 3v is suitably bright, 5v is bright enough to be clearly readable in full light. But I didn't really have a software method to control the voltage I'm supplying to that pin, and I wasn't even really sure that was the right way to do this.
For a while I mulled over purchasing some step-up level shifters and attempting to adjust the power on that pin by creating a 5v PWM signal. But that seemed pretty complicated for something which should, in theory, be simple - Kello was able to finely tune the brightness on the display, and surely they weren't resorting to this kind of hack. I figured I was missing something.
So I took a trip back to the datasheet for the HT1632C. And what do you know, turns out the chip has a built-in PWM for brightness! Reading the instructions a little more closely, I saw that all I need to do is send a specific command for the brightness level, 1-16. Which means the 4th pin must simply be a second 5v power line that I can wire up permanently. I had found my fix.
With that, I feel pretty confident to begin assembling the final board.