74HCT245 to read 5V sensor modules ?

Status
Not open for further replies.

nlecaude

Well-known member
Hello,

I have 8x 5V sensors that I would like to interface with Teensy and was wondering if I could use the 74HCT245 to convert the 5V rage to 3.3V ?
 
Are the sensors digital or analog? I believe the 74HCT245 can only be used for digital sensors. If they are digital, you could use a Teensy 3.1, whose digital input pins can accept 5v.

If they are analog, I imagine you can use a voltage divider to bring the range between 0..2.5v, and just use the reduced range (0..676 instead of 0..1023). If you need a full range, you could use 2 i2c analog to digital converters like the ADS1115 (https://www.adafruit.com/products/1085), and an i2c level converter (https://www.adafruit.com/products/1875).
 
For analog signals, you might also consider a simple op-amp level shifter. Four resistors and a quarter of a TL084 give you every flexibility in terms of level shifting.

EDIT: The TLV247x types might be suited better, as they support full rail-to-rail voltage ranges on input and output. The TL08x have some limitations when you get close to the max/min voltages.

You might also want to check Appendix L of this document.
 
Last edited:
You could get much better (perhaps even useful) advice if you told us the part number or model number or a link to a web page or PDF file with technical info about these specific sensors. Knowing which Teensy you're using, and some idea of what you're trying to really accomplish could also go a long way towards help us give you useful tips.

But to answer your original question: no, you can't use the 74HCT245 chip. It converts digital signals from lower voltage to 5V. The 74HCT245 is never useful to convert from 5V down to something lower. That's simply not how the 74HCT245 works.
 
Sorry for not being more clear. At the time of writing my collegue just told me we would need to interface with 8 analog sensors, since then I have learned it's actually Parallax distance range sensors which are actually digital, not analog which should work fine with the Teensy and the NewPing Library. I'll keep the advices in mind though as I sometimes have to use analog sensors.
Thanks all for the help !
 
Well the best is to search around to see if you can find analog sensors that can work on 3.3v so that you don't have to do a conversion.
 
Status
Not open for further replies.
Back
Top