Wiring the Bits. And the Bytes

Since the last post (what, two weeks? Three?), most of my van-related activity has been in pursuit of the electrical system. I figured out a significant portion of it (ahem, the vehicle alternators will charge the house batteries, not through a DC-DC battery-to-battery charger, but rather using a DC-AC-DC system with an additional inverter. Aren’t you glad you asked?), and that decision let many other details fall into place. But the niftiest advance involves the inclusion of computer technology in the van.

I’m a software developer; you were expecting fine woodwork?

In all likelihood, you’ve heard the term “Arduino” bandied about. You might even have an idea what they are. If not, fret not. Arduino is the specification for a family of processor chips. The word also refers to the chips themselves, the concrete manifestations of that standard. Other examples of processor families are the Intel chips found in most PCs, the Apple M-series chips now appearing in new Macintoshes, or the ARM chips powering most cell phones.

One particular configuration of an Arduino chip is the ESP32 board. This is a little circuit board, about 1” x 2”, with an Arduino processor, some memory, a few other chips, and a bunch of pins to which to connect wires. Besides these wired connections (using any of several industry-standard protocols), the boards support WiFi and two flavors of Bluetooth, regular and low-power. They can take inputs from a wide variety of sensors and detectors (temperature, humidity, movement, light, and so on), and drive outputs like relays, little-bitty screens, and speakers. And they cost around $10 apiece.

ESP32 Card

My first thought about using ESP32 boards was the flexibility they offer. In the van, there are going to be lights and fans and other devices to control, as well as switches and buttons to control them. And a whole bunch of wires crisscrossing the van to connect the controllers with the controlled. So what happens when, two months down the road, we decide that it would be much more convenient to have the switch that controls the galley lighting right here instead of over there? Or two switches, one here and one there. If everything is hard-wired together, making those changes would involve tearing out a lot of stuff and redoing it.

On the other hand, if all of the switches and buttons were just connected to a central computer, which was also connected—through relays and other electronics—to all the lights and fans and such, we could change the behavior of any switch with a simple programming change: five minutes work. With this in mind, I started my research.

Itty-Bitty Screen

Since then, a few more applications have suggested themselves. The house batteries are of a variety (LiFePO4) that should not be charged when cold. They work just fine in the cold, powering all the appliances and devices, but trying to recharge them when they’re near freezing can damage them considerably. What if we had a little stand-alone computer, hooked up to temperature sensors and controlling a little heating pad under the batteries? That would keep them from getting too cold to charge.

Temperature Sensor and Cable

Another application would be level detectors for the fresh-water supply and grey-water output tank. With a couple of these, we could always know how much water was left to drink, and how close we are to needing to empty the grey-water tank.

Water-Level Sensor

Y’know how a smart phone knows which way it’s pointed, and which direction it’s moving, and how fast? There’s a device inside, a gyroscope/accelerometer, which supplies all that information. It’s tiny. You can get them on Amazon, three for $10. They’re so small, they had to stick them on 1” x 1” cards, just to be big enough to attach the appropriate wires. The ESP32 card can talk to those, as well. I’m still trying to figure out a good application for an accelerometer, but I know there’s one out there. Probably won’t need an alarm to tell us the van is tipping over, but we should be able to think of something.

Gyroscope / Accelerometer

This entry was posted in Gear, Preparation, Research. Bookmark the permalink.

One Response to Wiring the Bits. And the Bytes

  1. Pat+McCune says:

    I don’t know what this is about (details) but I love your writing!

Leave a Reply