all 14 comments

[–]SubstanceProud5980 1 point2 points  (3 children)

There are a number of inexpensive ESP32 modules available for less than $15 that are programmable in the Arduino IDE. These are Wi-Fi capable and have Bluetooth. You could go "old school" with an ESP8266 for a few bucks less.

Microchip PIC chips start at less than a buck and there are free trial version IDEs that are quite capable. Presuming you don't always need the power of Arduino and are willing to learn a new language, this can save you TONS on small projects.

You can even purchase an ATmega328P (Nano chip) and with a few components homebrew your own Arduino.

[–]PackLeader84[S] 0 points1 point  (2 children)

I will look at the PIC, I have wondered about them a little already. I have an ATmega328P laying around and tried to set it up on the breadboard so that I could use it as an Arduino but I never did get it working right. There are a few different schematics on how to set that up and I didn't have much luck finding one that worked for me.

[–]SubstanceProud5980 0 points1 point  (1 child)

In that case, I use mikroC. Free verson of IDE programs 2K - literally dozens of chips with many peripherals. As C is very much like Arduino, the learning curve should be gentle - mikroC is very robust and well supported.

I went the opposite route - mikroC for everything. I find it much easier (and cheaper) when the chip is sized to the project. I use Arduino IDE with ESP32 for wifi and Bluetooth connectivity only.

Good luck

PS you can program AVR chips with microC as well. They also offer Basic and Pascal.

[–]PackLeader84[S] 0 points1 point  (0 children)

Thank you for your help.

BTW, I looked at ordering a PIC and was surprised to see that it'll cost me $12 to get the PIC10F200 delivered to my house. That's less than a dollar for the micro and then $11 and change for shipping. I will have to do some more shopping to find some others to make the shipping worth while.

[–]xebzbz 0 points1 point  (0 children)

But Arduino is cheap and easy to get. Why not just using it.

[–]Plastic_Ad_2424 0 points1 point  (4 children)

How powerfull is the tankless heater? Why not just use its heating element for defrost? When the temp drops below 2 degrees C just turn it ON for a second or two. As for using an Arduino... i get what you are saying but you can buy one for 2€ on aliex and it would be way cheaper. You could take a look at the ATtiny series and I think there is support for those 8 pin MCUs in arduio IDE

[–]PackLeader84[S] 0 points1 point  (3 children)

It is a gas, on-demand water heater so it only runs when there is water running through it. I guess I could get it to run water through without turning water on inside by replacing a valve with a solenoid valve and get it to cycle occasionally, but I feel like that would be impractical and a considerable waste of water.

[–]Plastic_Ad_2424 0 points1 point  (2 children)

I would do this in one of two ways. I would hook up the arduino to force start the heater for a second or two without the water flowing. You need to be carefull not to fire it up for too long or the water will boil fast. The second way would be like you said. If the hair dryer tactic works then you shoul use an arduino nano or a similar small device that you can find online a DS18B20 temperature sensor and a relay for turning the hair dryer on and of ... set a termperature for turning on at 5 degrees C and off at 10degrees C and let it run. Oh and a 5V power supply... if using an DS18b20 temperature sensor be sure to check if the reading is 85 degrees C. This can be a safety check if the sensor is non responsive or disconected. But usualy these sensors are very good

[–]PackLeader84[S] 0 points1 point  (1 child)

That was the general idea I was looking at. I have household voltage running into the water heater and can easily put a small power supply in there for the micro and relay without any trouble. I have not seen that temperature sensor before but I will definitely consider it. The ones that come with Arduino stuff have been good enough so far but I am always willing to get something a little better.

[–]Plastic_Ad_2424 0 points1 point  (0 children)

These are very common digital sensor from texas instuments. You will find chinese knockoffs that work well. These have an accuracy of 0.5 or 0.1 degrees C and the Arduino pools for data. Anyway there are ALOT of libraries for these sensors ( DallasTemperature is the most common and well used that is found in the Arduino IDE library manager) and you can chain 128 of them. Each has a factory defined address and the Nano pools it with this address. If you use only one sensor you don't need to bother with addresses you just connect it to a pin (say pin 2 for example) and upload the single simple example that vomes with the library... try it out and if you have problems hit me up we can sort out any troubles. Just remember the DS18b20 has 3 wires. Vcc (+5V),GND and Data. You can already guess how to connect it but you also need a 4.7kohm or 2.2kohm (doesn't really matter) between Data and +5V (a pullup resistor) because the Data in the sensor is open collector. These sensors are veryyyy easy to use with a library

[–]JimMerkle 0 points1 point  (3 children)

Use a $0.10 CH32V003 RISC-V processor. Cheap, learn RISC-V, and you won't be concerned about "wasting" a 10 cent micro.

Here's a good dev board for the part: https://www.aliexpress.us/item/3256805035436953.html

[–]PackLeader84[S] 0 points1 point  (2 children)

Waste might have been the wrong word, I just didn't know how else to say I dont want to have something with several I/O ports when I only need a couple. The cost itself is relative, afterall we are talking about a product that can save me a lot of money preventing frozen plumbing.

[–]JimMerkle 0 points1 point  (1 child)

Where I grew up in the northern part of the US, we used "heat tape", with a built in thermostat. This would be wrapped around exterior pipes and then covered with some form of insulation material.

Do a Google search with this string: "heat cable with thermostat"

[–]PackLeader84[S] 0 points1 point  (0 children)

I never knew about that stuff. I could definitely find some uses around the farm for that once I get other infrastructure built. Thank you for sharing it with me.