Hi all.
I tried to make work the nodemcu board with an 5v relay shield
It doesn't work.
Must i stepup the voltage on digital pin ?
Many thanks in advance.
What has this got to do with an Arduino?
Must i stepup the voltage on digital pin ?
Who knows you have provided so little information.
Please read this:-
How to use this forum
If you don't know , nodemcu board can be programmed with arduino ide.I know arduino from few years , i'm a developer not an electrician man.So i tried simplify my projects with an nodemcu board an a simple 5 v 1 relay shield for arduino , but it not respond on a simple command as digital.write(high) or (low)
I think it is a voltage problem on digital pin of nodemcu.
Did you not read that link?
board an a simple 5 v 1 relay shield
Please provide a link to it.
nodemcu board can be programmed with arduino ide
No I didn't know, and I am this forum a lot.
but it not respond on a simple command as digital.write(high) or (low)
Then I would suggest you are not doing things right. Will it light an LED if you put one ( with a resistor ) on the pin?
Otherwise we need to see your code ( that link told you how to post it ) and we need to see your wiring schematic ( that link also told you that )
So what Mike is telling you is that if you want any sense in reply, you have to provide actual details of what you are doing, and the way to do that is (per the forum instructions) to post proper links to a full description description of the nodeMCU hardware (rather difficult, as the nodeMCU webpage is something of a rambling and disjointed disaster) as well as the relay board you are attempting to use and the code (again, as per the instructions, using the "code" tags) you are using.
An LED as Mike suggests, will give you an idea of whether the code is correct, but the problem likely is as you gather, the logic level. You need however to post the link to the relay module, in order for us to suggest a solution.
[hr And it looks as if I will want to go and buy a nodeMCU now.
I may even have to learn whatever Lua is.
Hi again and thanks for your time
-this is relay shield what i want to use (on an arduino board works ok)
http://www.ebay.com/itm/1x-1-Channel-12V-Relay-Expansion-Board-Module-High-Level-Triger-for-Arduino-Y5RP-/371381775119?pt=LH_DefaultDomain_0&hash=item5678142b0f
-this is nodemcu board
-this is a simple code for relay open and close
ledpin is used for relay digital pin , for the moment i don't have a led to try it
const int ledPin = 2; (nudt be gipo 4 , but i tried with all pind from nodemcu)
void setup()
{
pinMode(ledPin, OUTPUT);
}
void loop()
{
if (ledState == LOW)
ledState = HIGH;
else
ledState = LOW;
digitalWrite(ledPin, ledState);
delay (2000);
}
}
Thanks again
tao13:
ledpin is used for relay digital pin, for the moment I don't have a led to try it
Sounds as if you need to wait until you acquire some LEDs then.
And a multimeter if you do not have that.
I'm serious! Unless you have the essential parts to do electronic work, it's just a waste of time!
led works
relay not work , remaining on the first state after reset the board (from setup)
Note that the maximum output current for your ESP8266 is 12mA. !
You need a relay driver, for example like this:
ESP8266 works with 3.3V, Arduino with 5V. You replay probably needs 5V and ESP do not provide enough.Best is to use a relay that works with 3.3V.
You don't need a driver circuit. This is why it already works with your arduino. What you need is to shift your logic level from 3.3V to 5V. Dedicated level shifters are available, but since your are only stepping up one connection in one direction, i prescribe the following circuit using a BJT as a switch. (This is what I have been using personally with the NODEMCU board.
Cheers,
Dylan