I'm pretty new in developing Arduino and stuff like that. I'm busy developing my own smart thermostat system and it goes really well, but…
The system consist of two parts: the thermostat (NodeMCU esp8266 based) and a unit (Arduino Nano) that is able to switch the central heating (CH) system on/off (with relay).
I would like to power the thermostat by connecting it to the CH unit, so that is it not required to power the thermostat with batteries.
So, It would be nice to have some power adapter that is able to power the CH unit. I don’t want to have one adapter for the Arduino Nano and for the NodeMCU as well.
When reading information about powering Arduinos etc. I figured out that there are some power supply options:
USB power
5v regulated power to 5v pin
7-12v using Vin
For the NodeMCU:
USB power
3.3v regulated power to 3.3v pin
Using Vin
So my plan is to have some central wall outlet power that powers the Nano and the NodeMCU as well, but I don’t know how to do that due to the different voltages/ways to dot that etc. and the requirement of powering two devices with one wall outlet power source.
Would be nice if somebody can provide me with info about this.
What about the current? Is the current shared between the NodeMCU and the Nano? Is it also possible to connect an 5V regulated power suppy directly to 5v pin of Nano en the Vin of the NodeMCU (via the regulator to get 3.3V)?
"Is the current shared between the NodeMCU and the Nano?"
In a sense, "yes".
"Is it also possible to connect an 5V regulated power suppy directly to 5v pin of Nano en the Vin of the NodeMCU (via the regulator to get 3.3V)?"
Yes, but by jumping a level of complexity as you propose and your being "pretty new in developing Arduino and stuff like that" - your devices are compromised, exposed, unprotected (shall we say).
Use a 5V phone charger. Connect it to the Vin of the NodeMCU and the 5V of the Arduino.
But why even using both a NodeMCU and an Arduino? It sounds like all the Arduino is doing is switching a relay - the NodeMCU is perfectly capable of such a job as well. It saves you the complexity of trying to have the two communicate with one another.
You are absolutely right. For know the only feature of the receiver is switching the heat on or off, but in near feature I would like to extend the receiver by using the OpenTherm protocol, what means that switching the heat on and off is not a physical switch anymore, but an command that is sent by the receiver. Also additional circuits are needed etc.
Anyway, I've tried to power an Arduino Uno by plugging in any 5V/1A phone charger. That looks fine, but the only thing is that the chargers generate some sound... Is that normal?
The valuable part which will be going to get the part which is having the most of it where it may have the power nodeMCU and the Nano having Lenovo customer support the power supply to it for the workable part to ensure it
cornestrijkert:
Anyway, I've tried to power an Arduino Uno by plugging in any 5V/1A phone charger. That looks fine, but the only thing is that the chargers generate some sound... Is that normal?
I think so, these phone chargers are powersupplies based on a big capacitor you should be able to hear the AC buzz (as you can with most things that convert AC to DC) Evem if you have bigger plans the nano can hardly expand on the nodeMCU capabilties in my experience other then having a 250kbps serial port, it has PWM and any extra pins you may want you could create using a bit-shifter, still getting them to communicate is fairly straight forward (specially on the nano hwSerial ) and the extra lifespan of the EEPROM may come in handy.
Also I still see the added Uno as unnecessary complication. If you run out of pins, just add a port expander. Much easier to deal with than a second MCU.
wvmarle:
The chargers I am using here don't make noise.
I have tried a Samsung Galaxy phone charger. Connected to the phone it doesn't make any sounds, but connected to an Arduino Uno (without any connected components) it generates some sound, but as @Deva_Rishi said, it seems to be normal.
wvmarle:
Also I still see the added Uno as unnecessary complication. If you run out of pins, just add a port expander. Much easier to deal with than a second MCU.
Interesting, maybe I can revise the plan. The reason was not run out of pins. I would like to add some circuit in future like this: Arduino Opentherm Controller
Maybe the thermostat then have to much responsibilities/requirements:
Control TFT screen
Measurements of the temp.
Connectivity to the internet (logging, API that have temp schema's that I can change with mobile app, etc.)
Control OpenTherm CH unit
Smooth design, i don't like big DIY boxes, so there is not much space available
When you have a look at commercial products, they often consist of having the thermostat and CH unit. I don't know exactly why and what both consist.
I don't know how well you can connect the TFT- (touch ?) connects to a nodeMCU, but there should not be to much of an issue space or speed wise. Just keeping the uno as an adapter for the TFT makes sense if the shield for it fits right on it. And let the nodeMCU take care of everything else. and let them communicate via hwSerial.
Usually those screens connect over SPI so no problem doing that with NodeMCU.
In fact it'd be better to use a NodeMCU as the ESP8266 has lots more memory than the ATmega328 (4 MB total flash - of which up to 3 MB can be used as SPIFFS to store files such as images, and some 80 kB of RAM).