Go Down

Topic: Problem powering up 2 NodeMCU´s and 8 * 12vRelays (Read 354 times) previous topic - next topic

Samsara_Exit

Apr 16, 2019, 01:36 pm Last Edit: Apr 16, 2019, 01:57 pm by Samsara_Exit
Hi,

I have a quite strange powering problem here.

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.

Thanks. 

Paul__B

Anyone know anything about this kind of behaviour? This is weird cause sometimes it works, but usually not.
Not really, but having no idea about what parts you are using or how they are wired means you would not expect me to, would you?  :smiley-roll:

Samsara_Exit

#2
Apr 16, 2019, 03:04 pm Last Edit: Apr 16, 2019, 03:04 pm by Samsara_Exit
I use :

NodeMCU 1.0


Relays (4 channel):

https://www.ebay.com/itm/12V-1-2-4-8-16-Channel-Relay-Module-With-optocoupler-For-PIC-AVR-DSP-ARM-Arduino/202278048002?hash=item2f18b61102:m:mj6XveIMWvK-DCmbU84ZwXA


Power step down controller:

https://www.ebay.com/itm/5A-XL4005-75W-USB-Voltmeter-Case-LED-Drive-Lithium-charger-Power-Step-down-Board/323494845076?hash=item4b51cb9a94:m:mD1j0btLg64MSlDdHlC5qQw

5A XL4005 75W USB Voltmeter+Case LED Drive Lithium charger Power Step-down Board

Power supply (12V 3A):

https://www.ebay.com/itm/AC-100-240V-To-12V-1A-2A-3A-5A-6A-7A-8A-10A-LED-Power-Supply-Adapter-Transformer/122586871489?ssPageName=STRK%3AMEBIDX%3AIT&var=423003795598&_trksid=p2057872.m2749.l2649

Paul__B

Whoah!

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.

You really need to show us your wiring - clearly.

Samsara_Exit

I use :

NodeMCU 1.0


Relays (4 channel):


Power step down controller:

5A XL4005 75W

Power supply (12V 3A):

I actually said what parts there. But thanks for this capacitor idea. I will show the wiring bit later.

Samsara_Exit

#5
Apr 17, 2019, 03:36 pm Last Edit: Apr 17, 2019, 09:45 pm by Samsara_Exit
Ok. This is the setup I´m trying to power up. There is no logic (at least for me) that why this sometimes works, but usually not.

Should i try that capacitor maybe?

Anyone?

Thanks.

Right click the photo or open this link to see the wiring larger:

https://imgur.com/FbJuCFO


Samsara_Exit

#6
Apr 17, 2019, 11:42 pm Last Edit: Apr 17, 2019, 11:47 pm by Samsara_Exit
I´ll try to explain this a bit better.

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?

Paul__B

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?

Samsara_Exit

#8
Apr 18, 2019, 10:44 am Last Edit: Apr 18, 2019, 01:53 pm by Samsara_Exit
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.

I appreciate.


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.

Paul__B

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!  :smiley-eek:   Can anyone else?

Have you seen a schematic of the V 3.0 somewhere?

Samsara_Exit

#10
Apr 18, 2019, 02:32 pm Last Edit: Apr 18, 2019, 02:46 pm by Samsara_Exit
Seems to be quite hard to find. Heres some info:

https://www.theengineeringprojects.com/2018/10/introduction-to-nodemcu-v3.html

https://www.aliexpress.com/item/5A-CC-CV-XL4005-Step-down-Buck-Power-Supply-Module-Lithium-Charger-for-arduino/2031894979.html


I try to explain bit shorter that usb-cable thing. If i connect that 5V USB-cable to the NodeMCU´s USB-port, NodeMCU will take power in only from that USB-port.

If I dont connect that USB-cable to the NodeMCU, it will take power in from those (G-, VIN-pins) only.

It wont take power in from both (pins and USB-port) at the same time. At least this is how I´ve understood this.


Paul__B

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.  :smiley-eek:   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.

Samsara_Exit

#12
Apr 18, 2019, 05:02 pm Last Edit: Apr 18, 2019, 07:50 pm by Samsara_Exit
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.

Paul__B

Have you explained - and I cannot see where - what voltage you actually measure on the 5 V supply?

Samsara_Exit

#14
Apr 21, 2019, 07:28 am Last Edit: Apr 21, 2019, 07:41 am by Samsara_Exit
Have you explained - and I cannot see where - what voltage you actually measure on the 5 V supply?
Sorry, but I´m not sure what you meant by this question now? I get 5.1V out of the power regulator now but hmm.. can you explain a bit what you actually meant by this question?

Thanks.

Go Up