So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By madbilly
#79249 Hi everyone,
I'm definitely a newbie so this is the place for me!

I'm planning to make some controllers for each of the electrical heaters in my house. The heaters use a pilot wire to control their mode of operation:
Image
Pilot wire modes I'm following this project to control the pilot wire: https://web.archive.org/web/20180607082 ... l-heaters/

I decided to use a Wemos D1 Mini instead of an Arduino because of size and ease of communicating. Here's my circuit diagram from Fritzing:
Image

Because the ESP8266 has 3.3V DIO instead of 5V I changed the triacs to MOC3042-M and the resistors to 330 ohms, based on my understanding of their datasheet: https://www.onsemi.com/pub/Collateral/MOC3043M-D.pdf. This isn't the main reason I'm posting, but have I correctly understood this?

My heaters don't have convenient power sockets next to them to be able to power these controllers from a 5V micro-USB charger so I would like to add a 230AC to 3.3VDC converter to the controller which will receive AC power in parallel to the heater. For your info, the heaters only have live and neutral connections, no earth connection. For the AC/DC converter I intend to use a Mean Well IRM-01-3.3 (https://www.meanwell.com/Upload/PDF/IRM ... 1-SPEC.PDF), Hi-Link HLK-PM03 (http://www.hlktech.net/product_detail.php?ProId=59) or similar - does anyone have any recommendations?

I've read that the ESP8266 can be happily powered directly on the 3.3V pin but I don't know if additional components are needed on the AC or DC side to compensate for noise, surge, etc. I've added a 1A fuse on the live line but I don't know if this is too large or too small. I've read that a varistor should be added to cope with inrush current but I've no idea about size. I read that the Hi-Link converter (actually the 5V version) is very noisy and found a circuit diagram with lots of capacitors and inductors on the AC side to bring the noise down to tolerable levels (https://skippy.org.uk/revisiting-the-hlk-pm01/) is this a suitable/necessary filter for any AC/DC converter I could use?

On the DC side, I've assumed I don't need anything, is this okay? Since you're the experts on the ESP8266 I'm sure you can tell me!

I will install all the components in a suitable box, probably IP66. These controllers need to be reliable (run for at least two weeks without intervention) and safe (I'm primarily concerned about fire but I also want to preserve what I've made). If anyone spots something I can improve in this regard please tell me.

You can see I've also added a temperature and humidity sensor but that's not relevant to the topic AFAIK. (and FYI it will be mounted outside the box, not inside).

Thanks in advance for your help :)

PS - to give you the full picture, I plan to run Mozilla's webthing-arduino (https://github.com/mozilla-iot/webthing-arduino) on the ESP8266 and have Raspberry Pi running Mozilla's Things Gateway so I can control the heating when I'm out of the house, e.g. turn it on in advance of me returning.
User avatar
By rudy
#79250 I suggest you go with the Meanwell supply. It has real electrical approvals. Not just a claim to be able to meet them. It also specifies that it meets line noise requirements so you won't have to worry about additional filter components. I know it is more expensive but if you are considering it then the cost isn't the major concern.

The led side for the optocoupler is ok.

I plan to run Mozilla's webthing-arduino (https://github.com/mozilla-iot/webthing-arduino) on the ESP8266 and have Raspberry Pi running Mozilla's Things Gateway

Thanks for the additional note. I'm going to look into this. When you are done you could post something in the user projects section.
User avatar
By Bonzo
#79251 It will be interesting to see how you get on with the Raspberry Pi. I used one to receive data from a Nodemcu, run some Python code and display a webpage. All started well but after a couple of month I started having WiFi problems and the Pi hanging.

I have a side project at work and am just recording data from some sensors and am using the Adafruit cloud to record the data which has been working well for a week. I am not intending on adding any other control functions so do not know how good that side of the software is.

It is crazy that due to our IT security policy I have to connect the sensor to the guest network but I can not have my PC logged onto the guest network. So the sensor is currently on my desk and the data has to go all the way to America to be displayed on my screen about 6" away from the sensor!
User avatar
By madbilly
#79253 @rudy thanks for the confirmation about the power supply. Yes, the Mean Well is more expensive than the Hi-Link and you've pointed out that it's for obvious reasons! I'm still not sure about the AC side fuse and if I need a varistor.

I did also ask on stackexchange and someone there told me I'd got the optocoupler side wrong, that I should use the MOC3043M with a 270 ohm resistor as my current design wouldn't achieve the required trigger current. https://electronics.stackexchange.com/q ... 66-project

The Mozilla IoT thing isn't really stable yet, so although I followed a worked example the API has changed since the example was written, so I'm having to work out what I need to change. When I get it working I'll try to remember to post back.

@Bonzo I'm also concerned about the RPi stability, but I've had it running for ~2 weeks now without problems, albeit not talking to the ESP8266. In fact I'm using a model 1B so it doesn't have wifi and instead it will communicate with the ESP8266 via the ADSL modem/wifi/router.