Inputs above 3,3v - what do you prefer? Pull-down or limit current?
Alex.Stanfield
Posts: 198
I have the following circuit which I must power above 3,3v (because the Allegro A1104 and the Melexis MLX90217 do require power above 3,3v)
So the question is: What do you prefer in order to avoid frying the propeller?
1 - Limit it's input current (square box) (as stated in "AN010: Low-cost Bidirectional Mixed-voltage Interfacing" http://www.parallaxsemiconductor.com/an010 )
2 - Also pulling down the input (R gnd) and avoiding (almost) any current into the Propeller
3 - Something else (plesase describe)
Thanks in advance.
Alex
So the question is: What do you prefer in order to avoid frying the propeller?
1 - Limit it's input current (square box) (as stated in "AN010: Low-cost Bidirectional Mixed-voltage Interfacing" http://www.parallaxsemiconductor.com/an010 )
2 - Also pulling down the input (R gnd) and avoiding (almost) any current into the Propeller
3 - Something else (plesase describe)
Thanks in advance.
Alex
Comments
-Phil
This will keep the current through the Props input protection diode to less than 0.5mA.
BTW, 3.9KΩ is the minimum value safe resistor in your circuit.
However, there will be a small amount of current, about 0.35mA, through the LED.
The resistor could be quite a bit higher in value, say 10KΩ to 100KΩ, depending on the rate of the pulses.
This causes even less idle current to flow through the LEDs.
That's all.
Duane J
In general a current-limit resistor is all you need but I have seen Props having trouble programming because during reset the current consumption drops to a very low value and current can flow from the input pin to the VDD supply pushing it up and somehow affecting the reset or programming operation.
Regards,
Mickster
Well once you allow for a resistor you can make it any value from zero upwards and 100K is more than fine for 100kHz signals even. If you want to minimize the RC delay effect just place the resistors as close to the Prop pin as practical. Since the external 24V signal ground will have to be connected to the Prop signal ground then just make sure that this connection is not made "through the Prop" but goes to the Prop's power supply ground from which the Prop then derives it's ground. This is usually the reason why Props get destroyed because of excessive ground currents due to bad signal grounding practices and sometimes just poor layouts, especially spaghetti breadboards.
Thank you for the input.
Regards,
Mickster
Alex's diagram shows he is using a power supply of 6.5V.
A zero Ω pin input resister along with a RED LED and 1KΩ ballast resistor could send as much as 1.1mA of current through the Prop's protection diode which is clearly higher than the spec limit of 0.5mA.
(6.5V - 1.5V - 0.6V - 3.3V) / 1KΩ = 1.1mA
That was why I suggested a minimum of 3.9KΩ in addition to the LED and 1KΩ.
(6.5V - 1.5V - 0.6V - 3.3V) / (1KΩ + 3.9KΩ) = 0.22mA with the Prop running on 3.3V
I would prefer to to do the calculation a bit more conservatively:
7V supply, 1.4V LED, 2.8V on the Prop
(7.0V - 1.4V - 0.6V - 2.8V) / (1KΩ + 3.9KΩ) = 0.46mA, still legal.
So 3.9KΩ would be the lowest safe value assuming the Prop is powered up simultaneously with the 6.5V supply.
If the Prop is powered down then the pin resister should be a minimum of 9.1KΩ:
(7.0V - 1.4V - 0.6V - 0.0V) / (1KΩ + 9.1KΩ) = 0.49mA, and legal with a powered down Prop
Duane J
Doh, I saw VCC but didn't see the VCC=6.5V text which IMO should be right next to the VCC symbol anyway. The point about "zero" ohms is really a general tip and just saying that once you have allowed for a resistor then it becomes a simple matter of changing it's value rather than trying to put one in afterwards. In this application the 3.9K would be required and I'd probably just use 100K as there are no high-speed signals plus a 3.9K would probably still let the LEDs glow as around 300ua+ is enough to make it look as if the LED is on (unless the LED is some really old junk box 3mcd part).
- Use AN010 as a design guide for limiting the input current
- Don't forget to check the calcs for an un-powered prop!
- Beware of possible programming problems (you might want to disconnect your high voltage inputs during programming...)
- Pay special attention to your ground returns which should NOT go "through the Prop"
And now to explain a little more my circuit- The reason I'm using 6.5V as Vcc instead of 5V is that I wanted to unload as much as possible the 5V and 3,3V LDO regulators from the Propeller Protoboard
- LEDs are ~3v types
- LEDs can be hooked on for debugging or totally disconnected (J1 jumper on the schematic), so the inputs get tied to Vcc through the 10K resistors (R5.4)
AlexIn general limit the current flow into each pin to an absolute minimum which is an easy thing to do with most signals so just use 100K as a standard value and only reduce this if needed for high-speed signals.
The resistors are there (R5.4) but tied to Vcc for layout reasons (granted they could be tied to Vdd but that would requiere more complex wiring.
Agreed, KISS is my motto but I became a little more paranoid here because these inputs come from outside the board so just in case I'm leaving the 100K resistors for every input coming from from outside.
The other reason I forgot to mention before for unloading the LDOs as much as possible is that the device is always on and will be subject to high ambient temperature (case surface exposed to direct sunlight which due to design constrains can reach well above 40° in the summer). I also have a hungry Xbee on board generating some heat among the switching PSUs. In general I tried to minimize every possible heat source so moving the sensor's supply to the switching PSU instead of the LDO seemed the right thing to do along with being able to disconnect the LEDs when not needed.
Alex