Wiring devices to Teensy 3.2

Status
Not open for further replies.

loganjon

Member
Hello,
it would be very nice, if you could help me.
I have some devices, which I used in the same circuit. Seven shift register "CD 4021" in daisy chain with hall effect sensors , and a BMP 180 pressure sensor.
They need different power supplies. The shift register needs at least 3.8V and the BMP 180 3.3V.
Is it possible to connect them to different pins of teensy(shift register to Vin pin, BMP 180 to 3.3v pin) for power supplying?

Or do I need a level shifter to connect both to the same pin. I prefer to not use a level shifter.
PS: The BMP 180 has a I2C interface and is a china product.
 
If your aim is to have 3.3V i2C and 5V i2c running out of the same micro controller pin you will certainly need some form of complexity. Several different solutions, and yes a level converter would be a workably but possibly tedious hand tweaked method. Have not checked the shift register data sheet, but given how i2C works it may be possible to power it from 5V but still get a successful read with 3.3V pullups on the i2C bus. Alternate option may be to split the difference and run the pullups from 4.0V.The teensy will survive that but may damage the sensor, if you can afford a smoke test easy method is to try it and see, less expensive way would be to dig into the data sheets and hope your from china board is actually a representative part.
 
The CD4021 is an ancient design 4000 series CMOS part that was designed for a 10 volt supply. While the datasheet may say it will work down to 3.0 volts, the actual performance is anyone's guess since there is no published operational data below 5 volts.

You'd be far better served using a device like the 74HC165N at 3.3 volts - which is still available in 16 pin DIP packaging. The HC family has published performance data down to 2.0 volts.
 
unfortunately, another device is not an option. I have already built my circuit.
I think my question is not clear enough.
I just wanted to ask, if it is possible to power up each device from other power pin of teensy in the same circut.
CD 4021 from Vin pin of teensy and BMP from 3.3v Pin of teensy.
 
unfortunately, another device is not an option. I have already built my circuit.
I think my question is not clear enough.
I just wanted to ask, if it is possible to power up each device from other power pin of teensy in the same circut.
CD 4021 from Vin pin of teensy and BMP from 3.3v Pin of teensy.
 
How are you powering the Teensy? From USB? Voltage into Vin?

If Vin, what voltage is being applied?

From USB.

I added a sketch(not very nice). I marked the tow connection, which I mean as C1 and C2.
Question, is it okay to have this both connection
 

Attachments

  • IMG_20170921_191814.jpg
    IMG_20170921_191814.jpg
    36 KB · Views: 121
Your circuit is fine, using the 3.3 v output with 5 volt Vin power. Note that to program Teensy by the USB port, you must first disconnect the Vin power source.

If necessary, you can isolate Vin from Vusb by cutting the very small trace from between to two larger pads shown below. This allows powering from Vin and programing via USB simultaneously but it is not without a risk to a powered Teensy when the USB connection is made. Most computers internally connect together earth ground and common of the USB power. This may create a "ground loop" if the Teensy ground potential is not at zero volts with respect to earth. Bad things can happen if the difference in potential is great or it has significant current ability.

card7b_rev1.png
 
Thank you very much.
It is nice to hear, that my cricut is fine. I am sorry, I am a little bit confused about your explanation. The Teensy is only powered via USB and not via Vin. I only use Vin as a source to power the shift registers and the hall effect sensors. As I heared, cutting the trace is for powering the Teensy by power supply and programming through USB simultaneously.
 
I think the confusion is you say 'separate power supplies' but you show seem to show sharing USB common power.


Vin is connected to USB power unless you sever the internal connection.

Otherwise you can power 5V peripherals with it up to the current limits of the USB source.

But in your case I suspect you can power everything from the 3.3V on-board power regulator.

The sensors can't use 5V power (from the data sheet I saw) so you need to take power from 3.3v power regulator pin (supplies a max of 250mA @ 3.3V).

The shift register should work at 3.3V (ancient or not) but you can power it at 5V even if the hall effects can run at 3.3V.

If you use 5V power for the hall sensors you will need a Teensy that is 5V tolerant on it's input pins (T3.2 or T3.5) but, again, I don't think you will need to.

What is the part for the hall sensor? If there are enough of them it could be the biggest part of the overall power consumption but I think a T3.x will power your project directly from USB.

...with my usual caveat on stuff like this that I'm not an E.Eng.:)

The real issue is getting seven shift registers to do what you want... they come up a bit with MIDI controller projects from noobs trying too-big a project for the first go... hopefully you have some experience with them.

Good luck.
 
Status
Not open for further replies.
Back
Top