As a former arduino Uno user, I'm not very comfortable in using 3.3v arduino compliant devices, specifically the Wemos d1 mini and nodemcu.
Almost all my modules are 5v compliant, so I realized that I could power then with usb 5v/3.3v (i guess it's the same)- I used the VV/5v usb passthrough from the wemos.
What I should have taken care of is the feedback from the modules to the nodemcu. I believe that max supported voltage is 3.6 v- I measured 5.5v (might I have fried something?
My relays didn't work well- while my arduino Uno is driving them perfectly in same configuration
Is there a way to test the board?
Second question: 2)I found some AMS1117 modules for stepdown purposes. Do I need 1 voltage variator
per module (only feedback- source shall be 5v passthrough) or one is enough for say.. 3 modules with input mode?
NodeMCU can not accept 5V on its pins as far as I'm aware.
So you may have to either power your sensors at 3.3V, or add logic level shifters for those that use 5V for both power and logic level.
Ok you need more info, here you go.
This is a little project I buit where a button controls a relay
I can make the relay switch on and off with a 2sec blink project, but I cannot control it with a button.
here's a simple project with voltage divider as logic level
and this is my code
#define RELAY1 D8
int button=D3;
int staterelay;
void setup()
{
Serial.begin(74880);
pinMode(RELAY1, OUTPUT);
pinMode(button, INPUT);
}
void loop()
{
int readbutton=digitalRead(button);
if (readbutton == 0)
{
if (staterelay == LOW)
{
staterelay=HIGH;
digitalWrite(RELAY1,0);
delay(1000);
} else {
staterelay=LOW;
digitalWrite(RELAY1,1);
delay(1000);
}
}
}
I really can't ascertain whether my wemos d1 is 100% working or not.
What I have observed is that if I power my relay from 5v passthrough I have no control, while if I power it from 3.3v wemos I can control it.
But in this mode, sometimes I notice that the relay led is struggling to keep on (I added digitalWrite(door, LOW) in the setup, sometimes the led goes off and on (logic ok) but the relay does not activate (doesn't go HIGH). So, if I connect 5v, (no switching) remove 5v+ wire , then connect 3.3v, wire, it works for a while.
(I guess I'm missing some electronics theory here- would love to read some explanation.)
So I decided to add a step down on the passthrough- tuned at 3.4 and worked perfectly.
I'm using 2 single Tongling 5vdc JDC-3FF-S-Z interfaced with a wemos D1 Mini
This is most frustrating!
As best I can find on Google, "JDC-3FF-S-Z" refers to a relay on its own, not a relay module, and you cannot connect that relay directly to a WeMOS D1 Mini because it requires 70 mA to actuate with at least 3.8 V.
So I simply do not believe that you are using just two relays directly connected to the WeMOS.
As best I can find on Google, "JDC-3FF-S-Z" refers to a relay on its own, not a relay module, and you cannot connect that relay directly to a WeMOS D1 Mini because it requires 70 mA to actuate with at least 3.8 V.
So I simply do not believe that you are using just two relays directly connected to the WeMOS.
Correct, relays are connected to wemos by passthrough, receiving 3.4V via stepdown
This explains why the 2 modules would never work directly connected to wemos. I believe max pin current is less than 20 mA