So.. I´m trying to power up 8 * 12V relays and 2 NodeMCU´s. I have an 12v external power supply which says INPUT = 1A and OUTPUT = 3A. I take power to 8* 12V relays (2*4relays sets) from that and for some reason I´ve needed to add an 12V to 5V power converter to give power straight via USB port to that NodeMCU which controls those 8 relays. If I try to give power from those G- and VIN-pins which i use with the other NodeMCU, it doesnt power up the relays at all.
I´ve only been possible to start these 2 NodeMCU´s and 8 relays same time by giving 5V power straight to the USB-port of the one NodeMCU which controls those relays. And even that happens only sometimes.
So something is seriously wrong. Have I connected wires somehow wrong? But still, looks like those just doesnt get enough power for some reason. 3A isnt enough? But both NodeMcu´s power up just fine (with relays) if i give them power for ex. from laptops USB port individually and it gives only 1A out right? What does that INPUT = 1A on that power supply actually means?
I have 3 screws on that 12V to 5V power converter. What does those CC- and LED-screws means? CV i´ve used to set the 5V output. Is it possible that this power converter limits the ampers somehow?
Anyone know anything about this kind of behaviour? This is weird cause sometimes it works, but usually not.
All that is a bit mind-bending, and you have posted the eBay links without removing the "?' and all the crap following.
It's a bit unfortunate that each of your eBay links points to a listing which has multiple options, and the regulator you have which is presumably without the voltmeter has multiple images all of which are pretty useless!
OK, "CC" would be the current limit control. It can be used to work as a constant current LED driver and if set to the wrong end will restrict the current. Basically, you set it by connecting the output directly to a 20 A multimeter and tweaking. I don't know what the other thing is as I can't see it.
The relay board is a bit tricky. It requires 70 mA each for the relays (or is that 90 mA? haven't looked closely enough). For ESP8266s you do need to feed Vcc with 5 V, not 3.3, so you probably are using it with the "JD-VCC" link in place and Gnd and Vcc connected to the WeMOS 5 V connections where you also connect the 5 V power.
There may be some tendency for the relay switching to interfere with the WeMOS operations. A large electrolytic capacitor (1 mF or so) connected directly to Gnd and JD-VCC would help. I don't know - you have not properly explained in what way exactly and under what provocations it fails to work.
When i power these (the "normal way") without that 5V USB cable connected to the NodeMCU (A), it starts both NodeMCU´s just like it should, but without powering the relays.
But instead if I connect 5V power cable to the USB-port of the NodeMCU (A) controlling the relays, it usually only starts only relays and maybe the other NodeMCU (B), which doesnt control relays. It shows some led blinking on both NodeMCU´s though and really rarely it might even start up the whole setup.
And one more scenario. If i give external USB 5V power (from laptop for. ex.) to the NodeMCU (A) and let all the other devices use the normal powering, it starts everything every time just right.
Why doesnt those relays power up, if I start this setup the normal way without that USB 5V power cable connected to NodeMCU´s (A) USB-port?
And yes I tried that capacitor tip. 1000uf capacitors connected directly to Gnd and JD-VCC for the both relay sets (A and B) didnt help.
Does anybody know anything about this kind of behaviour?
OK, given your schematic I see two problems to start with.
One is that the ground from the relay board is shown as connected to the ground from the logic circuits. While it should logically be the same ground as the input ground to the 5 V regulator, it needs to be connected to the 12 V ground at the input of the 5 V regulator. In fact, that ground and the 12 V to the "JD-VCC" must always travel as a pair from your 12 V source to the regulator and on to the relay boards. The ground on the relay board has nothing whatsoever to do with the logic boards.
Similarly, I am quite unable to locate an actual schematic of the version 3.0 NodeMCU. Diagrams of the 0.9, but not this one. I do not know what is the distinction between the "Vin" and the "VUSB" but I suspect that you should be connecting the regulated 5 V to one or the other, but not through the module. I note you describe connecting 5 V to both the USB socket itself and "Vin" on the upper module. Why?
Hi and thanks again for your help. I connected the 12V ground as you descriped. But still it didnt power up devices immeaditely. I played a little while with those "LED" and "CC" screws in 5V regulator. And surprise.. Its started work at some point. Would have been better if ive also learned something new from this but just patience.
So it works now, but I dont actually trust this yet. Hopefully it stays on.
UPDATE: It still acts weird. sometimes power goes on and sometimes not. Feels like something to do with this regulator. Cant be sure though.
But hey big thanks to you Paul__B for giving me good ideas to try.
And that question of yours that why i´ve connected both (G and VIN) and NodeMCU´s USB-port for power. As I´ve understood it cuts the power in from the one input youre not using.
So When I connect the 5V USB-cable to NodeMCU´s USB-port, NodeMCU takes power in only from that USB-port then, at the same time forgotting those (G- and VIN-pins). And other way round. If I take the 5V USB-cable off from that NodeMCU, it starts to take power in from those (G- and VIN-pins).
So those are not feeding power to two different places at the same time.. connected USB-cable overrides the pins (G- and VIN).
For me this has been one of the weirdest issues with Arduino stuff so far.
I played a little while with those "LED" and "CC" screws in 5V regulator. And surprise.. Its started work at some point.
If we had a decent picture of that regulator board, we might be able to figure out exactly what those controls do and how to set them up. ("CC" almost certainly sets the current limiting or Constant Current value.)
And that question of yours that why I've connected both (G and VIN) and NodeMCU´s USB-port for power. As I've understood it cuts the power in from the one input you're not using.
So When I connect the 5V USB-cable to NodeMCU´s USB-port, NodeMCU takes power in only from that USB-port then, at the same time forgetting those (G- and VIN-pins). And other way round. If I take the 5V USB-cable off from that NodeMCU, it starts to take power in from those (G- and VIN-pins).
So those are not feeding power from two different places at the same time.. Its the pins or the connected USB-cable overrides those pins.
I can't make any sense of that at all! Can anyone else?
Yes, I found that first article a while back. Unfortunately, it does not give a schematic and its description is confused.
As best I can figure it from the version 0.9 schematic,
the "VUSB" is directly the 5 V Vcc pin of the USB connector. This connects through a diode - which should be a Schottky but might not be - to the input of the 3 V regulator which is also the Vcc for the USB interface chip and "Vin". This means that feeding 5 V to "VUSB" will (obviously) power the regulator - and thus the 3.3 V ESP chip - if connected to 5 V. You will lose a little in the diode, so taking power from "Vin" will see a lower voltage.
If on the other hand, you power it through "Vin", this will not feed back to "VUSB" and you might be able to feed more than 5 V - they say 7 to 12 - except that the earlier schematic shows the USB interface chip fed from what is in fact "Vin" and this chip is not rated fro more than 6 V.
So I don't get that and I now recall going through this conundrum previously. In any case, you power it through "Vin" and given the diode, there should be no problem connecting the USB connection for programming while it is powered through "Vin". The lack of a proper schematic does make this somewhat dodgy.
Yes that is true what you said. As I said both NodeMCU´s power up just fine when I use those "VIN"-pins to feed the 5V power. And yes you can connect USB-cable into it "on the fly" for programming.
Actually, if I first start up the NodeMCU´s via "VIN"-pins and after that insert that extra 5V USB-cable to the one NodeMCU (on the fly) everything works fine. Relays start up.
So why those Relays does not start up, if I use only those "VIN"-pins for feeding power? Why it needs that USB-cable for relays? What I´m doing wrong I just dont get it. Ground is now connected as you said.
5.14V when nothing connected and 5.12V with relays etc. connected.
I´m starting to think that could there be some faulty part here maybe? I doubt, cause still everything works when I use an external 5V for that one NodeMCU. This is so weird. I think I will try another power regulator for this. Just in case.