Problem interfacing to a 5v I2C device.
edlikestoboogie
Posts: 71
I am trying to interface the prop to a 4 channel 10 bit ADC, the AD7995. Problem is, the ADC requires 3.4v i believe to see a logic high, and the prop can't do that without swinging out of the range for a logic 0 for the prop. Is there yet a simple solution to this without using an expensive level shifter like suggested in the sticky thread? The mosfet solution looks okay, is there a really simple way to interface these two devices?
Any help would be greatly appreciated.
-Ed
Any help would be greatly appreciated.
-Ed
Comments
Tracy Allen's message in the sticky thread on 5/14 describes using a 1K series resistor and a 10K pullup on the 5V device side of the series resistor. That should work for most cases of a single 5V I2C device not far from the Propeller.
The suggested mosfet by NXP is the BSN10. But that part number is no longer availible. What is the replacement part number for the BSN10 for interfacing with 5 volt I2C devices using the prop? I am looking at the BSP89. I can't find out what the replacement for BSN10 is.
Thanks in advance to anyone who can help.
EDIT: 900mv not 0.900mv
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Post Edited (Peter Jakacki) : 12/27/2009 1:36:23 PM GMT
I am having a little bit of trouble picturing your description of what I should do. Are we still talking about Tracy Allen's circuit attached here?? Could you describe a bit more clearly?
thank you,
If I have an output from the prop that is only from 0-3.3 volts, but you need it to be higher, you will need to add voltage to it to get it to your desired threshold level of 3.6 volts when the pin is pulled high.
However, the ADC (or any device for that matter) doesn't care if it is 0-5 volts, it actually cares if it is 3.6 to 5.0 volts (High) or not (Low.) So, if there is 3.3 volts coming in, it won't trigger and it will read that as low, regardless of how the pin is pulled.
So, we can use that as a part of our circuit by supplying a constant voltage to the pin which gets added to the voltage of the pin output.
If we supply 3.3 contsantly to it, the ADC will see that as low. If we then add 3.3 volts to it and pass that into the ADC, it will now see 6.6 volts... which is above the threshold for it seeing High.
The resisters are there just to keep the voltage down in the range that is accpetable. For example... 6.6 volts is too high... so we limit it to 5 (or slighly less for safety's sake.)
Also, the input only needs to be a little higher than 3.3 volts, so instead of having a constant supply of 3.3 volts you add a resitor to the supply side which limits it down to a constant supply of 1.7 which gets added to the 3.3 when the pin is pulled High giving us our 5.0 volts. When the pin is Low, you only have 1.7 volts which is below the threshold.
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Is that correct?
Bill
Basically that's correct but you don't get a constant offset due to the dual supply.
When the prop is outputting a low there is 5 volts across the series resistor combination and 5/(10K+2K2) current flows.
When the prop outputs are high then only 1.7V (5-3.3) appears across the resistors and 1.7/(10K+2K2) current flows.
So only a small offset gets added to the 3.3V signal but a much larger offset is added to the 0V signal.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
www.sparkfun.com/commerce/product_info.php?products_id=8745
In the end I did not have to use them for my interface.. I used a BC337 to boost the prop signal.. It was very easy
http://forums.parallax.com/attachment.php?attachmentid=66034