Is it safe to use 0-5V UART on April?

I’m looking to attach an April directly to the Roomba SCI (Serial Command Interface), ideally with as little extra components as possible. 


The April documentation says the board can handle up to 17V of VIN which should be ok since the Roomba battery is around 16V. However, I can’t find any information regarding tolerated voltage levels for the IO pins. Would it be safe to connect UART57 from the imp directly to Romba’s 0-5V serial interface? I’m a bit cautious since both April and the imp runs on 3.3V.

Thanks,
Jonathan

Yeah, we really need to add a lot more information to the hardware section of the wiki!


Hugo will give the definitive answer, but since the STM32 pins that can be assigned as analog inputs are not 5V tolerant (they’re the only ones that aren’t) and any imp pin can be set as an analog input, then I would expect that none of them can tolerate 5V.

In any case even if they were 5V tolerant the Tx would still drive to 3.3V which probably wouldn’t be good enough for a TTL serial port. I would buffer it.

Rob
Fen Consultants, UK

TX at 3.3V should be good enough for a 5V TTL device, but if imp is not 5V tolerant, I guess it doesn’t matter.

The easy/cheap way of doing it is to use a series resistor (say, 1k) and a 3.3v zener diode to clamp the input to 3.3v.


A suitable zener is the NXP BZX84-C3V3,215

Thanks guys, 


I’m going to look into Hugo’s suggestion or alternatively try one of these together with a 5V regulator: https://www.sparkfun.com/products/8745

I’m hoping to fit everything somewhere inside the Roomba and perhaps make a nice slot for the imp.

Yep, that sparkfun board will work. There should be 5v somewhere inside the roomba if it’s sending you 5v signals; the level shifter will take essentially zero current so you should be able to tap it off.


Just to make it very clear, this is what you are talking about, right?
Only RX needs zener, right?

This is exactly what I mean, yes. Only needed on RX. An Atmega has a 3.0v Vih(min) so you can drive it directly from the imp.


Hi j[a]petterson, did you get anywhere with this? I’m also intending to hook up an Imp to my Roomba, though I’m waiting for an old Roomba 400 motherboard to turn up with modern enough firmware to run the serial interface. Any tips on Roomba to Imp communication would be welcome.

You could just use a voltage divider for the rx side, this is exactly how the Sparkfun level converter does it. Two 10k resistors one to the Arduino pin and one to ground. http://www.sparkfun.com/datasheets/BreakoutBoards/Level-Converter-v10.pdf

The reason we say 3.3v max is that though the current part has some level of 5v tolerance, future imps may not be.

It gets harder with more modern silicon to get 5v tolerance (90nm ok. 65nm: just about ok. 45nm: not without jumping through hoops. 32nm absolutely not).

We very strongly recommend you use a zener. A voltage divider can work too, but a divider that doesn’t burn too much power can get slow due to pin capacitance on the imp socket side.

Thanks for all the comments here. I did a little more research and found that the same issue is elsewhere when people are trying to hookup their Arduinos to Xbees directly. So, I found a really simple solution with off the shelf components:

5V TX is hooked through a 10k series resistor to a Schottky diode pulled on the 3.3 volt side. It works like a charm.

Here is the reference: http://www.faludi.com/bwsn/xbee-level-shifting/

Yeah, though this will clamp to about 3.6-3.7v (0.3-0.4v above the rail) vs the zener one which will clamp closer. In effect, you’re clamping like an ESD protection diode within the soc would do.

Summary: good enough for prototyping :slight_smile:

voltage divider: 2,4K +3,6K. 3,6K one pin to GND, middle point to April input, 2,4K other pin to +5V
See similar here: http://www.instructables.com/id/Wireless-electrical-power-consumption-monitoring-a/

Zener is OK but require at least 1,5-2 mA to be fast. Usually all Zener data, including timing, are against 5mA current. Resistor divider is about 1mA.
Choice mainly are determined by switching speed, from my point of view.

Or use one of these?