Pages: [1]   Go Down
Author Topic: How to connect a 5v TTL board to Due  (Read 1398 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am sorry if this has been answered before, but my searches are not showing up any thing...

I would like to connect one of the USARTS of the DUE to an SSC-32 (servo driver board), whose TTL is at 5v.

What is the preferred way to connect them.  I figure the TX is fine as the SSC-32 will probably handle the lower voltage just fine.  But about the RX where the SSC-32 may return data.

Limiting Resistor? if so how big

Resister Divider?

Other?

Thanks
Kurt
« Last Edit: February 09, 2013, 09:04:15 pm by KurtE » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am sorry if this has been answered before, but my searches are not showing up any thing...

I would like to connect one of the USARTS of the DUE to an SSC-32 (servo driver board), whose TTL is at 5v.

What is the preferred way to connect them.  I figure the TX is fine as the SSC-32 will probably handle the lower voltage just fine.  But about the RX where the SSC-32 may return data.

Limiting Resistor? if so how big

Resister Bridge?

Other?

Thanks
Kurt

A simple two series connected resistor voltage divider is probably the easiest solution if you just need it for one or few Due input pins. There are many 'voltage translator' ICs available also.

Lefty
Logged

Offline Offline
Jr. Member
**
Karma: 5
Posts: 75
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am sorry if this has been answered before, but my searches are not showing up any thing...

I would like to connect one of the USARTS of the DUE to an SSC-32 (servo driver board), whose TTL is at 5v.

What is the preferred way to connect them.  I figure the TX is fine as the SSC-32 will probably handle the lower voltage just fine.  But about the RX where the SSC-32 may return data.

Limiting Resistor? if so how big

Resister Divider?

Other?

If you are planning to connect to the DB9 connector you need to handle voltages -12 to +12. TX might possible work at 3.3V, but it is pretty borderline. I would use something like MAX3223 to provide proper translation levels.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, the SSC-32 can be hooked up through RS232 signals, which I would then use a Max232 or the like to hook it up.  However it is also set up to use TTL level inputs/outputs, which I normally use when connecting up to a micro-controller.

I have dealt a little with the 3.3v to 5v issue a few times now, with a few different platforms especially with connecting up XBee's to controllers.  I am a software persons, so please pardon if I get a few terms slightly off...  Some approaches I have used in the past include:

a-) Pic32. - Just wired them up.  Most of their IOs are 5v tolerant.

a) Current limiting resistor.  I believe that this was all that was necessary hooking up a propeller to the SSC-32.  I believe they have clamping diodes or the like protecting the propeller...

a+) Diode(s)? Never used this approach

b) Resistor Divider from the TX of the SSC-32 to the RX of controller. Assume that the 3.3 output from DUE will be high enough for a high on SSC-32... Note: I have run into issues with XBees on Sparkfun XBee converter...

c) like b) but with mosfet transister and 2 resister level shifter circuit - What I have used for XBees on the shield...
(http://husstechlabs.com/support/tutorials/bi-directional-level-shifter/)

d) Use a level shifter IC like: TXB0108 there is also a 4 channel version s well.  I believe this is what Parallax uses on their XBee interface boards which have always worked well for me.  Also Adafruit sells a simple breakout board for them: http://www.adafruit.com/products/395

I am thinking I probably should do c) or d), but was wondering what others have done.

Thanks again
Kurt

« Last Edit: February 10, 2013, 10:14:47 am by KurtE » Logged

Offline Offline
Jr. Member
**
Karma: 5
Posts: 75
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I think there is no general answer. Even in this specific case, it depends on what drivers the SSC-32 has. I suspect you know more about that than we do, but you haven't told us what chip it uses; looking at it's schematic is the only way to find out what will work. An answer also depends on what switching rate, how many channels, is it bidirectional, open drain, TTL/CMOS, TH/SMT etc. Just too many unknowns which only you can decide.

There are dozens of ICs available depending on requirements, I would try to use one of those, particularly if unidirectional.

I think you are aware of the possible solutions, but only you can decide what is best for your application.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, I should have mentioned that the SSC-32 is an Atmega168... The board has a standard 9 pin serial plug, that connects up to a MAX232 equivalent and then has jumpers from it to the TTL inputs, which I normally remove and then can connect your micro controller directly to the TTL level inputs to the processor. 

But again my shield has the 4 USARTS split off with connectors for RX/TX/GND.   In this case I may go the same route that Parallax did with their XBee adapter and use something like an 74LVC244a, but need to see what happens if I plug the shield into a 5V processor like Arduino Mega...

But I am also trying to be General Purpose as sometimes I may want to plug an serial LCD in, or maybe some other serial devices.  But may want to be able to select if I need the conversion or not on a per USART bases as for example some of my LCDs are now 3.3v.

I am also interested in what others are doing about more general 3.3 to 5v issues.  Like I believe most servos probably operate OK with 3.3v signals, but I am now starting to use some servos by Orion Robotics which provide feedback.  I need to find out who is driving the voltage when the servo responds, but if it is a high value of 5v's obviously that is an issue.  One approach may be to use some chip like an TXB0108 to do voltage conversions.  I believe a few Propeller boards used this approach.  But I got the impression there were issues with this approach.

So that is why I was curious what approaches others have taken.

Thanks again
Kurt

Logged

Pages: [1]   Go Up
Jump to: