More TTL level converter questions...

Status
Not open for further replies.

KurtE

Senior Member+
Sort of a follow on question to Frank's questions about level converters.

I am probably going to make a new version of one of the boards I play around with to support a different manufactures Servos XYZ, which has full duplex TTL servos. There spec shows 5v TTL, so thought I would add TTL level translations... But while I was at it wondered if I should update some of my other converters on the board...

Some of it can be seen (maybe) in the extract from schematic... Please pardon the mess...
Teensy-TTL-Level_converters.jpg

Also please pardon some of my questions as I am a Software Developer and not an EE... Many things I have done on the boards were simply using stuff I saw on other boards. So some of these questions may be obvious. The n) numbers below refer to the arrows in the picture above.

1) I am using an BSS138CT to do level translations for output to a Neopixel (maybe more than one). I am using same setup like the sparkfun board where two PU resistors. With this setup I notice that if I don't initialize and use the Neopixel it usually starts up lit with some color... Wondering if it would work that on the 3.3v side to instead of use the 10K PU change it to a PD?

2) I added two more BSS138CT with PU resistors to handle RX/TX on Serial3 for the XYZ servos. They appear to have a max of 115200 baud rate. Could probably go with Unidirectional, but thought if I use this board without these servos maybe nice to have those pins available at 5v? Reasonable?

3) Goes to Serial1 Half duplex at typically 1MBS (could maybe 2MBS) This is for Dynamixel servos. Currently using two units the direction pins, to direct either RX or TX to Serial pin on the Dynamixel connectors... What is nice with this is I can use the Teensy Serial code to handle the switching of RX/TX. Before I did this with only one level converter like an BSS138CT and used the half duplex support of the Teensy. But this required me to do things like Serial1.flush, then change the hardware registers to change pin direction... Wish I could add support to use the duplex support of the Teensy... Maybe could setup to use unused IO pin of Teensy, plus register a pinChange interrupt that would do it? Not sure if this would be better or not...
Thoughts?

4) Use two transistors, a BSS138CT plus a power transistor to allow me turn Servo power on and off. Currently the VSS here is from a 3S lipo but if some day I go to MX or like servos could maybe be 4S batteries... Other suggestions on how to do this?

Wondering if it would make sense to combine some of these above to something like a TXB1004 (probably wrong number)... I know that these have issues with things like I2C...

Thanks in advance for any input.

Kurt
 
1) I'd measure that before you make the board - do you have one of these i2C levelshifter boards ? If not, I can measure - i have removed the resitors on one board
2) why not ?
4) the TXB don't like pullups < 50k

You have one of my boards.. perhaps you can test the 5V "IEC" Pins .. the nice thing is, through-hole parts only (3 resistors + 1 transistor) per bi-directional line - but a little slower than BSS138.
The BSS - solution is faster with pullups like 1k (but more power-consumption)
 
Last edited:
Thanks Frank, I probably have a few of those level shifter boards sitting around somewhere in my piles of things.

I probably need to learn a little more about how these transistors work... That is with the transistors with the configuration like in 1) and 2) are like the sparkfun with the two PULL-Ups, so my guess would be when first powered up, the IO pins are mode 0 and as such the PU will pull up the 3.3v side and as such the 5v side... So wondering if I should use a PD so that at init the 3.3v side would be Pulled down and as such the 5V side would be low...

But my gut tells me in this case I probably need PU and PD. That is probably the PU still goes to Gate pin, and the PD goes to the Source pin which then goes to the IO pin...

In 3) the BSS138 is configured completely different Not sure when configured this way if it does what I wanted with 1) and 2) in that the Gate goes to the IO pin with a PD resistor and the Source pin going to GND and the Drain going to the high voltage side with PU...

Sorry again if these are obvious, my last electronics class was probably in the 70s...

I need to look closer at your board to figure out which are the IEC pins

Thanks again

Update: again still WIP - but the board 3d output currently looks something like:
T3.2-RPI-XYZ-3d.jpg
 
Last edited:
Status
Not open for further replies.
Back
Top