Ping Sensor 3.3v Compatible
corke2013
Posts: 5
Hi all.
I have an arduino due board which only supports maximum 3.3v digital input and output and I am worried that the Ping signal pin might deliver more than 3.3v to the digital input of my board, which would damage the input.
Is the Ping sensor compatible with a 3.3v input, output or do I need to add a resistor, if so what resistance would you suggest?
Thanks!
I have an arduino due board which only supports maximum 3.3v digital input and output and I am worried that the Ping signal pin might deliver more than 3.3v to the digital input of my board, which would damage the input.
Is the Ping sensor compatible with a 3.3v input, output or do I need to add a resistor, if so what resistance would you suggest?
Thanks!
Comments
http://www.savagecircuits.com/mixedvoltage
I think the Bi-Directional MOSFET Voltage Level Converter 3.3V to 5V is my best choice for what I need.
In the event that this is unusable, I would recommend the series-resistor approach.
-Phil
Thanks for the response and help!
-Phil
While there are a number of 3.3V Arduinos, official and unofficial, most of the examples using an Arduino with a Ping assume a 5V part, so that's what the wiring diagrams all show.
On whether the series resistor will work, your best bet is to ask on the Arduino forums, where members have more experience interfacing a Due with a 5V sensor. My understanding is that the Arm chips are not 5V tolerant.
While we're on the subject of NON-Due 3.3V Arduinos keep in mind that with most (all?) of these its reference clock runs at half speed (8 MHz rather than 16 MHz). This doesn't affect most things, and I think now all the standard functions and libraries are written to accommodate crystal speed variations. But there are some third-party sketches and class libraries that will not behave correctly when used on an 8 MHz clock. This isn't an issue with the Due, which is a completely different class of microcontroller used. But I thought I'd throw this out for anyone else interested in doing this, but not using a Due.
I've shown a Schottky diode. It's possible that the Ping)))'s SX is configured for TTL input thresholds, in which case a regular diode (e.g. 1N4148) would work fine.
-Phil
Addendum: Come to think of it, I think you can combine both pins into one:
-Phil
Both the initiate pulse and the return pulse at the Prop pin are about 3.3V. At the Ping))) pin, the initiate pulse is about 2.8V; the return pulse, 5V. I see no reason that this circuit would not work with the Due board.
-Phil
Thanks a bunch, this was very helpful.
I was just attempting in interface a Ping))) with a Raspberry Pi running RISC OS, and apparently wasn't paying attention to details so I saw something like Phil's cyan display on my scope. Oops. I was a little confused by the Ping))) document since it mentions 3.3V CMOS microcontrollers, but the "SIG pin" diagram makes it clear that Ping))) is going to drive 5V. Anyways came here to do a sanity check, and then immediately tried Phil's one pin circuit and it works for me. I don't have a variety of resistors handy, so just used three 2.2 kohm resistors to convert 5V down to 3.3V.