-
• #2
If the parts require 5v logic, you'll need to use a level shifter (these are readily available, and cheap).
That said - I don't know where you're finding these 5v-requiring "cheap" modules for arduino. Most of the cheap sensors I found were all 3.3v, and most would not take 5v. What kind of sensors were you looking for?
I went on a buying spree when i first got the Espruino, getting cheap sensors that ran on 3.3v, and I don't think I ever looked at one and rejected it because it was 5v.
A lot of vendors charge horrifying markups (vs component costs) for arduino shields, and even simple breakout boards *cough*sparkfuncough
-
• #3
Thanks DrAzzy.
Then I guess I was looking in the wrong places. Probably I should have started by saying that I already got them when I was experimenting with Arduino, and now I just want to re-use these things with Espruino. I'm always getting them on ebay and they come from Asia.
So I have this PIR motion sensor, relay module, IR obstacle detector and in auction description they said it is 5V so I'm a bit scared to plug them in and experiment :)
-
• #4
The relay modules I think do require 5v to drive them.
The PIR motion sensors and IR obstacle detectors, you're all set on. You can run them off 5v (ie, VBat) and read with 5v tolerant pin. They may well run on 3.3v - most of this stuff does - there's no harm in trying them on 3.3 to see if they work; it won't damage anything to try them on 3.3 (there are not many things that can be damaged by running them at a /lower/ voltage)
-
• #5
There's a difference between the voltage required for the power supply and the voltage required for actual data signals.
@DrAzzy - a lot of '5v' inputs will run off 3.3v signals just fine. Have a look at: http://en.wikipedia.org/wiki/Logic_level
Note that CMOS is a bit fiddly (it's too near the limit), but for most things you won't have a problem.
For receiving data, Espruino can take 5v signals in just fine (as long as you don't connect them to any of the pins mentioned here which have a '3.3v' marker by them - those ones won't take 5v input)
@graf: you should be fine with all of those. All the relay modules I have here work fine. The trick is to power the relay module from 5v (just connect it to the
Bat
connection which has the 5v from USB), but to just connect the signal input to Espruino as normal. -
• #6
Thanks for your explanations, I will give it a try then.
Hello,
There is plenty of really cool (and cheap!) sensors and modules for Arduino but most of them require 5V. As a complete novice I don't really know how to approach this stuff and I imagine that I'm not the only one.
So do you guys have some good resources/tutorials about interfacing 5V devices with Espruino? Could you share?