user

Pete's Log: Emerging from the fog

Entry #1981, Sat, August 14, 2021, 22:36 CDT (Coding, Hacking, & CS stuff, Life in General, Smokepacking)
(posted when I was 43 years old.)

Today is the first day in more than a week that my head doesn't feel stuffy and my brain doesn't feel foggy. JB went to Jamie's parents house after daycare yesterday and is staying there until tomorrow so that Jamie and I can recover a bit. This will be our first time without JB for two nights in a row. Feels weird. JB seems to have gotten over this cold much quicker than Jamie and I were able to.

Other than some soldering on Monday night, the past week and a half hasn't consisted of much more than work, taking care of JB and sleeping. The itch to work on personal projects has still been there, but between the brain fog and the need for sleep, it just hasn't happened. So today I'm making up for lost time. And being pulled in way too many directions.

For one, Home Assistant is still being dumb. I've swapped out SD cards and gone back a month now in terms of restoring backups, but it's still not quite stable. I've gone back far enough that the uptime sensor can be ruled out as a culprit and I am currently maybe blaming the Nest integration, which isn't working. Storage just seems to fill up faster than it should and after some time it becomes unresponsive. I am considering starting over. And also maybe switching to running the HA docker image because the HA supervisor is starting to feel like too much of a black box. But right now that feels like work, so I'm mostly ignoring it.

What does sound like fun is continuing my experiments with debouncing. Before getting sick and after discovering how many 74HC165 ICs I had laying around, I was testing wiring up several of them in series, but ran into some issues that I'm pretty sure were caused by a bouncing button (I was trying to use a push button for my clock signal). And so I wanted to learn how to do debouncing in hardware instead of in software. And then I got sick. So today I finally got to work on that. Every resource on debouncing I've come across in the past shows the details of the problem by pulling the signal up on an oscilloscope. So to let my brain feed on a different way of looking at it, I decided to see what sort of hammer I had in my toolchest. And what I found is a 74HC393, a.k.a. a dual 4-bit binary ripple counter. Some quick playing with a few different buttons found that I wasn't really seeing more than a few triggers per button press, so 4 bits should be enough to play with. And since it's a dual counter and each counter has its own clock, I wired up both counters such that I could read their output into an Arduino and display it on an LCD shield. Then both clocks were hooked up to the buttons.

No alt text found for this picture. Please email prijks@esgeroth.org to complain.

My next step was going to be adding debouncing circuitry to one of the counters but not the other, so I could compare the performance. But, somehow I decided it was time I finally clean out the little "recycling" glass on my desk. It's a little jar that I think originally held jelly. Once it was empty, I claimed it for my desk since it seemed a good size for storing little bits. Ever since, I've tossed snipped leads into it as well as components I'm done using and need to "re-catalog."

No alt text found for this picture. Please email prijks@esgeroth.org to complain.

It was just about full, so I finally did so. While putting resistors away, I realized that I should finally write some good code for the component tester I raved about. As excited as I was about it, it's just been running the most basic resistor tester since I put it together. I decided it was OK to allow myself to be distracted and started working on resistor measuring. I had to draw myself a picture.

No alt text found for this picture. Please email prijks@esgeroth.org to complain.

One problem I encountered that I couldn't find mentioned in the HackerBoxes instructions is that Vcc of the circuit is not going to be exactly 5V, and Vcc figures into the voltage divider equation. The 2.5V reference they included helps to calibrate the ADC, so you can get a more accurate measurement of the voltage at the test point. But it won't give you Vcc. Luckily I found instructions for reading Vcc on Arduino, so that was quite helpful. I think I still have some work to do, but it feels more advanced than it was. Still looking forward to also making it measure capacitors and transistors someday.

No alt text found for this picture. Please email prijks@esgeroth.org to complain.

On top of all that, Jamie and I played some Magic today. I did not win a single game. "Adventures in the Forgotten Realms" came out recently. Also known as D&D meets MtG. It's the first set in a while we've been excited for, so we had to make sure to get some games in while JB was away. Jamie played red/green and I tried building a blue/black deck based on the "venture into the dungeon" mechanic. And dragons. Had to have dragons. Despite my losses, it was quite fun. I found it pretty entertaining how they captured the feel of D&D in Magic cards.

Anyway, there's still a pile of components on my desk I was planning to sort into their homes and my debouncing test doesn't have any debouncing circuitry yet, and my resistor tester could probably be more accurate still. But I did stuff. It was a good day.


Nobody has rated this entry.