Making Teensy 4.1 carrier board 5V tolerant

Status
Not open for further replies.

jpswensen

Member
I have been looking at making a carrier board for the Teensy 4.1 for the Mechatronics course that I teach that has some DC motor drivers, connectors for DC motors and encoder, stepper motors, etc. However, knowing that these are Mechanical Engineering students and often wire things up wrong (which I am OK with from an experiential learning standpoint), I desperately need the inputs to be 5V tolerant.

So, I have been looking at the best ways to do this. I found this great article (https://next-hack.com/index.php/2017/09/15/how-to-interface-a-5v-output-to-a-3-3v-input/) that talked about a whole bunch of ways of doing it. I have also seen discussions on here about the series resistance approach or the series resistance plus a schottky or zener diode. I also saw a different website that recommended using a bonafide level shifter like the LSF0108 (https://www.mouser.com/datasheet/2/916/LSF0108-1664472.pdf).

So, I guess my question is for people who know more about the Teensy 4.1 design than me (and electronics in general), with this LSF0108 work well for both input and output level shifting?

Also, what about protection for the analog inputs. I could easily use a voltage divider, but then when used for 3.3V instead of 5V (some sensors the students may hook up are 3.3V and some could go as high as 5V), then I would lose precision. So, could I use the series resistance and diode approach on these? Also, I would like to make the analog pins able to act as digital pins also when configured that way.

I guess in the long run, I am just asking which of the many approaches to making inputs 5V tolerant, thinking of both the digital and analog cases, would be best to implement on my carrier board?
 
The LSF0108 plus transil clamping diodes on the 5V side to both power rails and a current-limiting resistor facing the outside world would make it almost fool proof.

Still, I can not understand how engineering students should be relieved from taking care of specs. They should embed this into their routine, instead of relying on an idiot-proof signal interface. The world is not idot-proof... letting out the built-in smoke is an expensive lesson to be learned.
 
In a perfect world with infinite resources, I would agree with you. That being said, instructional lab budgets are tight and I feel bad about making students replace parts when a little bit of foresight on my part help prevent such problems. Since this is a Mechatronics course for Mechanical Engineering students, the purpose of the course is mostly to reinforce a system-level-thinking mindset among the students. These students have basically had one electronics lab course and we don't want the course to turn into just another electronics course.

To date we have used some of the Digilent chipKit Arduino-clone products because of their 100MHz speed (PIC32) and they are 5V tolerant at the microcontroller level. However, for some of our recent final projects (like our robot quidditch or predator/prey game) students have been running up against the limits of the microcontroller capabilities because they are using 2 wheel servos, 1 DC motor with quadrature encoder and a PID loop, at least 3 sensors, a radio to receive data from a remote vision system, usually at least one other motor of their choosing, etc.

Since I have been using the Teensy 4.1 on a consulting project and have loved it, my hope was to create a carrier board that makes the Teensy 4.1 a drop-in replacement for the Arduino boards we have currently been using.
 
Yes, but also this would demand some expense, to make PCB etc. Still it is absolutely possible to make Teensy 4.1 5V tolerant, to a certain extent. The only issue is pin function, input or output, analog or digital. One would have to choose first if a pin is digital or analog, because the level shifter will not work for analog inputs. For these a voltage divider or a buffering amp with a wider input range would do absolutely fine, but be useless for digital output and suboptimal (speed!) for digital input.

There are ways to make a pin both analog AND digital AND lightning proof, but this involves more expenses.

If you could give specs on what you need in pin configurations, this would take guesses out of the equation and add a solution.
 
My application of the Teensy 4.1 has to interface with a lot of 5V stuff. Generally, I look at each I/O and decide how I want to make it work. In the case of outputs, I really like T logic (as in AHCT or HCT). Wish there was a cheap high drive current variant, though. For lower speed inputs I use optos because there is lots of EMI/ESD going on. For other inputs, I use 5V tolerant front ends with a low pass filter for noise control.

In terms of an educational lab setting, I think it's import to build up a "tool kit" for this sort of thing. Honestly, letting the blue smoke out is absolutely an important part of the learning process. Protecting the poor student from their mistakes is not beneficial to them.
 
Status
Not open for further replies.
Back
Top