Teensy 3.1 3.2 power and communication with raspberry

Status
Not open for further replies.

clash90

Member
Hi all,
A little of background first on my project. I want to use the teensy to read the value of some sensors and then send the values to the raspberry. I was wondering which way would be the easiest to implement. Is using the microusb(teensy) to USB(raspi) cable a good idea?
Otherwise, Uart? Spi? I can't use I2C since on the raspi side is used for something else.
Now, let's say I can achieve that using the microusb cable, in order to power the teensy I was thinking to connect 3.3V at the 3.3V input, and cut the line on the back of the teensy between VIN and VUSB. In this way I can still program the teensy, and use the microusb for the communication with the raspi safely. Or I can power the Teensy with the 5V coming from the raspi without any need of the 3.3V?
Thanks.
Claudio
 
The simple method is serial via USB, but with a bit more wiring going via UART and Pi power may be better. Idea is to cut the USB power track, connect the UART to the Pi UART and use either 5V or 3.3V to power the Teensy. This leaves the USB port free for programing and debug, which depending on how many goes it takes to get things right may be a great time saving.

Going this route, make sure the Pi is grounded to your programing PC case BEFORE plugging in the USB cable. Many Power packs sold to power PIs can have half mains voltage present, at least at low currents which will upset your USB port if not careful when plugging it in.
 
Thanks for the reply,
The thing is I have a very little space in the board ( i would need to add a level shifter becuase the serial pins of the teensy are on 5V and on the raspi 3.3V) so the ideal thing would be using the serial USB. So if that's possible I would like to go this way. So I can still power the teensy via USB from the raspi without 3.3V (in this case I guess I should not cut the trace)? And switch the cable everytime I need to upload a new version of the code in the teensy. Or do I still need the 3.3 V to power the teensy?
 
Thanks for the reply,
The thing is I have a very little space in the board ( i would need to add a level shifter becuase the serial pins of the teensy are on 5V and on the raspi 3.3V) so the ideal thing would be using the serial USB. So if that's possible I would like to go this way. So I can still power the teensy via USB from the raspi without 3.3V (in this case I guess I should not cut the trace)? And switch the cable everytime I need to upload a new version of the code in the teensy. Or do I still need the 3.3 V to power the teensy?

Umm, unless you have added level shifters, the serial pins for the UART on the Teensy 3.x/LC are 3.3v, not 5v. The Teensy and Pi both handle the necessary level shifting in the USB connection.

Providing the Raspberry Pi has enough power through its own USB power port (or 5v/ground rails), you can draw up to 500ma (on Pi A/B/2) or 1.2ma (on Pi 3). The big if is whether the Pi has enough power for itself and the Teensy.
 
Why would Teensy 3.2 serial be 5V? If you didn't add level shifter, it's 3.3V.

I would just power the Teensy via USB, no need for additional 3.3V power. You could just program Teensy from the PI. There is Teensy Loader CLI and you might be able to get TyTools working on the PI.
 
Thanks,
I dont know why I was 100% sure that the the TX and RX pin on the teenst were TTL levels (5V) and I needed a level shifter. This way it's much easier and I can just use UART communication between raspi and teensy leaving the usb free just for debugging.
 
Last edited:
On the Teensy 3.2, most of the IO pins are 5v tolerant, but they output 3.3v. The analog only pins are not 5v tolerant.

On Saturday a version of an RPI hat I am playing with arrived from OSHPark, which I hopefully soon will assemble one soon. I did a 2nd version right after I completed this one that changed a few things....)

I mention this as I have these hats setup to connect up the UART from the RPI (or Odroid or UP) to in my case Serial2. If you are sending a reasonable amount of data, it is best to use Serial1 or Serial2 as the hardware has built in FIFO queues for RX and TX...

Powering - Depends - How are you wanting to power your RPI?

In my case these boards may go onto a Robot that is powered by a 3S lipo and maybe 4s lipo if I ever go up to MX servos... So on my case I need to convert lets say
12v to 5v... In my case I decided to add a DC/DC converter on my HAT which powers the T3.2 and it feeds power to the RPI through the +5v pins.

But with earlier boards, I powered both by external BEC. You can do this either by connecting up the Teensy by USB or connecting up VIN to the +5v of RPI...
And likewise you can simply use a wall wart with enough output to run both.
 
Status
Not open for further replies.
Back
Top