Pages

Wednesday, May 6, 2026

A Real Use for the Cheap Yellow Display

 So. a friend told me about the CYD (Cheap Yellow Display). Basically a nice little color display that has a processor on the same board with some inputs and an ESP32 complete with wifi. At first, I kind of shrugged because ... well wifi. For me, in a rural area prone to power outages, wifi has been pretty much a pain in the bottom. Internet in general has sucked over the years because a WAN connection had to be by wire. Dial up, DSL and such were the rule because that was all that was available. 

But, over time, that changed. The power company FINALLY decided to actually supply (mostly) reliable power. Then the various internet providers started showing up. Wifi mesh networking systems became cheap enough to actually use in the home. We caught up (almost) with the 21st century. 

Heck, I think I'll get one of these things and see how they work.Wow! these little things are really great!!


Notice I got the 4 inch model? I wanted something I could actually see and interact with. It has a resistive touch screen, and a nice color display. 


Since I didn't want to scratch up the screen playing with it, I immediately made a faceplate for it and noticed a small annoyance: the screen is off center.


Notice how the left side is wider than the right? No, that isn't because I printed the faceplate that way, it really is off center to allow for the wifi antenna that the processor has.


Never mind, that's good enough to begin; I can adjust for that when I have something real developed. For now, let's play with this thing.....

Since this was my very first ESP32 journey into code, I loaded up the latest Arduino IDE, an installed the esp32 board support and tried it. I got "blink" to work, then advanced to "Hello World;" they both worked, but it was painful. The native code was full of various calls that I really didn't understand and just seemed way to complex for something that would have to maintain for years and years. 

I looked around, even sent an AI out to find a way to simplify developing something for this board that actually did something. My answer was right there in Home Assistant, ESPHome Device Builder. They tout it as "No Code," and to some people it might be, but not for anything that I want to actually do something; more on that later.

I created my first ESPBuilder device, "Hello World," and I was impressed. I mean really impressed. I managed to get a string on the display, in any color I wanted, and actually be able to read it without squinting. I spent some time playing with the backlight, fonts, various items from home assistant like drop down menus and circular gauges. It was totally fun watching things come up on the CYD that had been limited to laptops and phone in the past. 

What to do with this? MY THERMOSTATS !!

For a decade I had used the "Super Thermostat" <link> that I created many years back. Now was a good time to replace them with new hardware. They were already ethernet devices, and a wifi device like the CYD would be a good experiment to try out. Plus, I could put that dusty 3D printer to work for a custom enclosure. 

This was a bittersweet decision. I created those thermostats back in the medieval times of home automation, and they were quite a project. At first they were wifi, but wifi didn't work too well with the Arduino platform in those days, so I switched them to wired which was a lot of work. Then, I modified them to use remote temperature sensors <link> so I could sense the temperature right where the people were; that was also a big project because they were battery powered end devices on a Digi XBee network. Plus, there was a lot of custom changes to the combination of devices over the years that I would have to reproduce under the new digital environment. Did I really want to take this on???

This is what one looks like finished, running, and controlling the AC unit on the south side of the house.


Yes, it's green. There were two main reasons I used green filament to print it. 1, I already had a spool of green filament, and 2, the wall behind it was green. No, it was not to draw attention to them so people would ask about them; nope, not at all. The two patches cover up the holes from previous thermostat work that I absolutely will cover up and paint ... someday. 

It all works, The code has provisions for my power company "Peak Demand Period;" where the price of power goes through the roof. It's animated; the little fan is black and stationary for idle, red and turning for heating, and blue and turning for cooling. It even has drop down (or in this case up) menus for selections. 


If you use your imagination, you can see the fan spinning

I can change the mode with the simple press of a fingernail or a pen on the screen (remember, it's a RESISTIVE touch screen). Same thing with the fan. The temperature is displayed as both a circular gauge and numbers in fahrenheit. The temperature setting is controlled by both a slider and two buttons.Yes, I was showing off a bit, but I couldn't control myself. 

"But, wait, how did this thing control the air handler? It doesn't have any wires going into it?," you say. Well, I cheated. The old real thermostat was still running, catching commands from Home Assistant and feeding them through the wires to the air handler. Basically, this was just a fancy display that had bells and whistles that actually worked to send commands to Home Assistant which sent them on to the old thermostat that fed the wires. The idea was to stage my conversion to new hardware one bit at a time. First the CYD because it was cool and pretty, then something to replace the old thermostat that would actually control the air handler, then a remote temperature sensor that I could place appropriately. 

Yes, this was going to turn into a huge job with parts all over the house, but any one of the pieces could be updated independently as desired. There's buzz words for this like, "distributed processing", "isolated failure tolerance," or maybe "extendable architecture," but what it really was was staging the changes while I kept the AC working. That thing is my heating and cooling, and in my unpredictable climate ---necessary. So, While this screen looks like a thermostat, it's actually just the face of a much larger system—the real work happens in the old thermostat that is ancient. For now,but that is going to change.

Power comes in the back through a USB C connector hooked to a wall wart on the opposite side of the wall. That way there are no wires visible and only a small round hole in the actual wall. Why? Well, I had a lot of trouble with heat generated by various devices when I tried taking the 24vac down to 5vdc. Those little converters are cool, but run hot and that's not a good idea over time. I thought of this going into the project, and the device is upside down compared to other projects. 

The lid is actually the mounting point of the new thermostat and is held on by screws into wall anchors, then the CYD is mounted to the case with a hole in the bottom for the display and a friction fit to the wall mounted lid. The USB C cord comes through the lid, like this:


So, if I want to work on it, I just pull it off the wall, unplug the USB C connector, and walk off with it. Slick, and I wish I had thought of that technique much sooner. It makes taking pictures of the other half easy, like this:


See how I used a commonly available right angle adapter for the USB C connector? I try to keep projects as cheap and easy to find parts for as possible. Also, notice the dead space to the right? That's because the CYD display is off center as I mentioned earlier. It makes for a larger thermostat device, but it would drive me nuts over time looking at a screen that was off center every time I walked down the hall.

Which reminds me, How does this control the actual AC units? Well, ESPhome and Home Assistant thought of that for me. Each operation like changing mode: heat, cool, off, are handled by Home assistant. The thermostat is a "device", with "entities" that can be put in a dashboard. That way, I have menus on the laptop and cell phone as well as the thermostats on the wall. I basically stole the controls I already had for the old thermostat that was routed from old code and hooked this to that. This mess of stuff made for a cool display on Home Assistant:


If you've read any of the other posts on this blog, you already know I'm a sucker for graphs. They tell me at a glance if something is wrong, and I get a feel for the behavior of the various things around the house easily. I will eventually make that menu simpler for 'normal' people to use, but for now, it's my baby, I'll show it the way I want to.

So, after building two of them and working out how to share the common code between them, I had two new thermostat devices. That was really great for a few days, but then I thought to myself, "Self, why don't you move all that logic over to another device that is right on the AC air handler? That way you can get rid of the requirement of hooking into a wire that runs through the wall to control the AC. I could put all the control logic in there, and when necessary, adapt it to a different air handler. Plus I could do things at the air handler that are not as easy with a wired system. I could measure the air flow, temperature of the incoming air vs the outgoing air, maybe use the lower speed of the fan ,,,

I'll write about that project in the future, it was a bit harder, but fun.