Monday, May 25, 2020

Day 109, 110 - Still in Pendleton

Sunday (109) - This morning, I redid the last D1 Mini board onto a breadboard. The D1 Mini is on top, the buck converter is the middle, and the relay board is on the bottom. The 12VDC bus is on the left and 5VDC is on the right. The red and white wires on the lower left are to 12VDC power. I’m waiting for the Anderson PowerPole connectors to get here before installing the board into the compartment next to the passenger seat.

Later - We’ll, it turned out that I couldn’t wait. I pulled the panel and wired the relay across the step light switch so the switch still works as it originally did. But now, Home Assistant can override the switch. And the indicator light built into the switch still works! Not shown in the picture, but I added a wire from the Common relay terminal to the 12VDC bus and I added a zip-tie to keep the relay from moving.

We tried out to-go Thai food and it was wonderful. I think the one thing I have missed the most is being able to occasionally go out to eat. Silly…

Monday (110) - I don’t think there is anything planned for today. It is supposed to be pretty nice today with a high of 75°F and nice blue skies. The park filled up with a number of people here for the weekend. A young family from Seattle is next to us with their late-80s VW camper van. They said that it was challenging to find anywhere to go for the holiday weekend.

The automation of the step worked just fine. I still haven’t re-done the refrigerator board with a regular breadboard but I do have the D1 Mini configured for a 3rd temperature sensor for the rear coils and a relay board to turn on the cooling fan. There is a temptation to use PWM for the cooling fan to vary the fan speed depending on the temperature. I also wanted the screw terminals for the board for the temperature sensors and the relay connections. Also the PowerPole connectors for 12VDC power. It’ll make it easier to service the board.

The minor project for today is to just start playing around with the EPS-32S microprocessor. This is sort of the next generation of the EPS-8266 microprocessor used on the D1 Mini. It has a dual-core processor, integrated b/g/n WiFi, LE Bluetooth, more than twice as many ports, etc. But the two features that I’m interested in for my next project is hardware PWM and touchpad input. The one thing I need to be careful of is it runs on 3.3VDC instead of 5VDC. The buck converter has no problem with either. Fortunately, the USB port is still 5VDC.

Later - The weather forecast didn't hold. Rain is now in the forecast and the blue skies have turned into overcast with a high of 70°F. I flashed the ESP-32S and connected a bare wire to GPIO-27 to act as a touchpad. The built-in LED is GPIO-02. I then set up an automation to look for a touch transition and toggle the state of that led. And it worked right out of the box. And, the state of the light including the dimmer setting is retained through a reboot. For a touchpad, I was thinking of simply using the metal bezel of the light but for this test, it was just a bare wire. In order to move on, I need one of the MOSFET modules and they are being shipped to our home. So this project is on temporary hold.

Just because, I added a DHT11 temperature/humidity sensor. BTW, did I mention that all this stuff is incredibly cheap?

It looks life the precision of the DHT11 is only 1.8°F. Not really very useful. The DHT22 is 0.1°C which is ten times better. 

Saturday, May 23, 2020

Day 107, 108 - A Few More Boards

Friday (107) - It really does take an RV freezer a long time to get cold. Ignore the steep curve as that was moving the sensor from room temperature to being zip-tied to a shelf (though not touching the shelf). The little blips are from opening the freezer door. Each door opening was just to take something in/out. Maybe 10sec or so.

Saturday (108) - I built up a board for the wet bay. This is the location for the freshwater fill as well as dumping the holding tanks. I added two temperature sensors and placed one on the holding tank outlet and the second one on the freshwater tank about 5" from the bottom. It is taped up for now since I am testing the location to see if I get reliable WiFi down here since it is under the tile floor in the hallway. The signal strength is -62db which is actually better than the other one mounted in the refrigerator plastic facia. Not what I expected. I soldered this board and plan on finding some sort of plastic box. For testing, I'm just powering it through the micro-USB port but next week I'll install a buck convertor and power it from the 12VDC light.

So, the Gorilla tape is back for a couple of days. Arriving from Amazon are some PC board screw connectors for heavier gauge wiring and some more Anderson Powerpole connectors. I've sort of "standardized" on them for my 12VDC additions and used up most of my supply.

And just to see if/how it works, I built up another D1 Mini which drives a relay through an opto-isolator.  Once I could simply turn the relay on and off, I am trying out automation within Home Assistant. At sunset, it turns on the relay and turns it off at sunset plus 90 minutes (for the test, I’m doing 30 minutes). Local sunset is determined by your location within the software. The Raspberry Pi does not have a GPS so the location needs to be manually set. Another option instead of a relay is a FET but these were back-ordered. They should be delivered at home by the time I get there. The advantage of the FET is the brightness can be controlled using PWM (pulse width modulation). But for now, I'll try simply on/off. If it works, I’m going to set it up on the step light.

This really is fun (for me)!

Update - Both parts of the automation worked!

Thursday, May 21, 2020

Day 106 - More D1 Mini

A little bit better installation. At least there isn't any duct tape involved. I'm still using the breadboard as I'm thinking of adding another sensor and possibly a relay to this board. There is a thermostatically controlled fan installed above the refrigerator coils and a small switch to turn it off completely. I'm thinking of using a relay to turn it on if the outside temperature is warm in case the manual switch is still turned off. Also, if the refrigerator is off, the fan circuit will also be off. (That's not the way it's powered now)

This circuit board is powered by 12VDC from the control board so when the refrigerator is powered off, so is the monitoring board.

I have been using this small OLED display on the DMR hotspot but thought about using one like it with this project. It is 128x64 pixels and I'm thinking of just mounting the tiny display into a cutout on the refrigerator control panel. The display only uses two of the digital I/O pins on the D1 Mini and you have full control of font, size, and location of the text. It is a blue monochrome display and the upper 16 rows are yellow. I'm displaying the time on the top row which it retrieves from the Home Assistant server. Note that this D1 Mini is retrieving the temperatures from the network as it is not the same one that is collecting the data.

Obviously, we aren't really doing much else. This is giving me something to do besides watching YouTube videos.

Wednesday, May 20, 2020

Day 104, 105 - Wemos D1 Mini

Tuesday (104) - More of the same overcast w/occasional showers. At 56°F, the temperature is the same as Fairbanks right now.

The Wemos D1 Mini microprocessors arrived today so I can start playing with them for my "SmartRV" project. I first connected one to the Raspberry Pi using one of the USB ports. This allowed me to upload a minimal configuration which included WiFi info and static IP address along with other network info. After that, it no longer needs to be plugged into the Raspberry Pi. Right now it is plugged into a phone charger and I can access the device using WiFi through the web server on the Pi.

Since I don’t have any sensors or relays yet (they should arrive tomorrow, Friday, or Saturday) I just played around with the built-in LED. From my phone connected to the Home Assistant website on the Pi, I can turn the LED on/off and vary the brightness using PWM. This whole process took about 20 minutes which included soldering the header pins to the D1 Mini.

Power for the boards will be from some tiny buck converters that are rated at 3amps at 5VDC with a 12VDC input. And they are really tiny. 0.5” x 0.7” and can be mounted directly to the circuit board. The first project will be temperature monitoring for the freezer and refrigerator. And an almost identical one will be monitoring the temperature in the wet bay.

Wednesday (105) - The temperature sensors I decided to use are DS18B20 digital sensors mounted in waterproof SS probes. The specs say that they are accurate to 0.5°C. Kind of overkill for my application but they were only $12 for 5 sensors. The sensors are designed to work on a buss so multiple sensors can share a single data line. Each sensor has a unique 64-bit address. The other option was the popular DHT sensors but they weren’t in the waterproof probes.

The disadvantage to the DS18B20 sensors is that I needed a 4.7KΩ pull-up resister. I don’t happen to have any lying around here (I do have a package at home!) so another Amazon order for 1,350 assorted resistors for $12. This is one of those times when I miss places like Radio Shack. Since I didn't have any resistors right now, I went ahead and tried out plugging the sensors in. The board has ~100KΩ pull-up resistors built-in but the spec sheet for the sensors said to use a 4.7KΩ resistor. And it looks like they work without the pull-up resistor. The next step is to "package" this so it fits behind the plastic panel on the refrigerator including the buck converter. For now, I'll just run the wires past the gasket. I may also run a temperature probe behind the refrigerator so I can monitor the temperature of the ammonia coils.

Of course, I had to see if it was going to work. The breadboard is taped to the door and the sensors are draped on the shelves. This is starting to get fun!

I have made airline reservations to head back home on June 4th. I also was able to schedule doctor and dentist visits for then. This is shortly after the expected end of the Alaska 14-day quarantine for out of state travelers. Hopefully, it won’t get extended again!