I have a HC-SR04 sensor that works with 5V and I want to use it with the imp which works with 3.3V, I’m using a 5v power supply (iphone charger type). I was planning on using this level shifter https://www.sparkfun.com/products/12009, do you think this should do the job?
Yes - that’s a quick easy way to get started with 5V sensors!
Great, I will give it a try.
Alternatively, you could use a 5V supply and connect it to the VIN port on the imp and also use it for your sensor, thereby avoiding the need for the level shifter. I’m doing this with a few devices without issue. Just be sure the power supply is adequate for the total load.
Clarification – via an April-like or P3V3-like board. Duh.
If you’re using a logic level translator, you’ll still need to power your imp with 5V.
Hooking a 5v sensor directly up to an imp’s IO pin (as opposed to stepping the voltage down) may result in the sensor not working properly with the imp, and possibly damaging the imp as the imp’s IO pins are only rated to 3.6V (page 6 of the imp001 datasheet).
I stand corrected. Not having looked at the spec sheet for the subject sensor, I was merely generalizing (bad idea!) that some devices are powered with 5v and yet signal well at 3.3v. My haste to provide feedback was a bit reckless here.