Connecting two Picaxe chips directly

JSDL

Senior Member
Hi everyone, I have a question regarding a circuit in which I am connecting the output of one Picaxe to the input of another. I understand that it is recommended practice to place a series resistor between the input/output of the two chips in the event that the input accidentally gets configured as an output and goes low, this creating a short to ground. What I am having trouble understanding is that in the attached schematic, why does the resistor between the input/output have 0 voltage drop across it? Wouldn't it drop the 5V output from the Picaxe on the left, thus presenting 0V to the input of the Picaxe on the right? How does the input of the Picaxe on the right still see 5V? Unclear about this. Any explanation would be greatly appreciated. Thanks.
 

Attachments

Technical

Technical Support
Staff member
PICAXE on the right (input) is not driving the voltage to 0V or 5V, hence the voltage can be anything. As the right hand side PICAXE has no active influence on the circuit (and hence draws no current) the voltage is simply whatever the chip on the left provides, no current across the resistor means no voltage drop across it either.
 

JSDL

Senior Member
As the right hand side PICAXE has no active influence on the circuit (and hence draws no current) the voltage is simply whatever the chip on the left provides, no current across the resistor means no voltage drop across it either.
is the reason there is no current through the resistor because the input to the Picaxe on the right is high impedance (thus draws no current) and has no effect on the Picaxe on the left?
 

premelec

Senior Member
In short - yes. that is implied by your voltages shown - could also be that both pins attached to the resistor are at 5 volts [on] hence no voltge difference across resistor.
 

Goeytex

Senior Member
The impedance of the input pin is almost infinite (in the order of 10s of megaOhms). The only time any significant current flows into the input is during the transitions between low to high and high to low of the input signal. By significant I mean a short pulse between 25 and 200 micro amps depending upon the rise and fall times of the signal driving the input pin.

You circuit shows a steady 5V applied to the input. This will amount to a few nanoamps of leakage current into the Picaxe input. However it is doubtful that your simulator/model accounts for leakage current, otherwise it might show a few microvolts dropped across the 220R resistor.
 

JSDL

Senior Member
I still struggle to understand the concept of impedance and high/low (input/output) impedance after reading numerous explanations on the Internet. I understand that impedance typically refers to AC and is the combination of static (resistor) and dynamic (capacitor/inductor) resistance in a circuit, but I don't get the relationship between high/low impedance, input/output impedance and what they mean. Also, why is a Picaxe input considered high impedance? Does this only refer to situations when the input is left floating (neither HIGH nor LOW with the absence of a pullup/pulldown)?
 

premelec

Senior Member
Perhaps just stay with resistances in your thinking - and note that every voltage source can be considered as a zero ohm voltage source in series with a resistance [even the mains power grid has some series resistance though it may appear as microohms]. The your model of a voltage source is this series resistance or source resistance. Ohm's law rules... If you want to transfer maximum POWER to a load resistance matching of the source resistance is needed [set this up on a spread sheet and you can find that maximum POWER is transferred when the sink load resistance equals the source resistance]. Often times - especially with logic circuits you don't need to consider power only need to cause a certain voltage change... High vs low is relative it would depend on the arbitrary ratio of source and sink [load] - say 100 to 1 or even many times 10 to 1.

This is because the source R and load R form a voltage divider so if you need a logic 1 to be over 90% you better have the source R at least 1/10 [roughly] of the load R in logic. The practical input and output Rs are not necessarily simple resistors but dynamic in a certain range depending on various parameters.
 

hippy

Technical Support
Staff member
When talking of impedance of a digital input it is best to consider it as the equivalent of resistance.

It is not a resistance because there often will not be an actual resistor there creating the equivalent of its resistance. The datasheet and common convention is to call it an impedance.

Also, while impedance is commonly used with AC circuits, DC is AC at 0 Hz.
 

JSDL

Senior Member
Thanks guys, I struggled to understand this concept for the longest time, until you mentioned how I should look at it from a voltage divider perspective. I then looked up Thevenin’s equivalent circuit to understand more, and all those other forums and posts I had read before made more sense with this in mind, even though this was the first I read that made reference to the voltage divider. So, to answer the question about why a High Input impedance of an IC can change states if left floating, would it make sense to say:

High Z of an input pin, when left unconnected, could easily cause switching between high and low states because any stray voltage or noise picked up from elsewhere in the circuit could induce a current. In doing so, the input impedance of the IC would cause a larger (relative to that caused by source impedance) voltage drop at the input, therefore potentially changing the pin to a high state (or vice-versa)?
 

premelec

Senior Member
Yes high z input pin can pick up noise from environment and adjacent circuitry etc... in the case of the programming input pin that makes the chip get ready for a new download unless a disconnect command has been issued. There is some disagreement as to an UNUSED input pin fluctuating with noise can cause you trouble... I either use internal or external load R to NOT leave any input pins floating... On the other hand READADC on a floating pin can help give you a random number... ;-0 Glad you discovered Thevenin...
 

hippy

Technical Support
Staff member
A high impedance input when floating nominally sits at half-way between the power rails. It is neither high nor low though reading the pin internally can only give a high or low result.

Just a small voltage on the input pin can cause it to tip one way or the other, cause it to register a high or low, can cause it to repeatedly switch between high and low.

Current is drawn by the electronics which drive the internal signal line high or low switching. More current is drawn when switching from one level to another than when not, so a continuously switching signal will draw more current than if it were not.
 

hippy

Technical Support
Staff member
Zero seems to be correct for perfect resistors. Took me a while to see the more obvious topography involved though.
 

Technoman

Senior Member
You probably have recognized a Wheatstone bridge.

As every resistor has the same value (10k), the current is zero as the voltage across R2 is zero.

That was used in an electronics course to illustrate how the manner you draw a circuit diagram has an impact on its understanding.
 

premelec

Senior Member
This would be a lot more puzzling if drawn as your original picture with four _different_ value resistors [and who cares about the one across the bridge so 5 different resistor values...] ;-0
 

hippy

Technical Support
Staff member
Doesn't that just make things so complicated that no one will care to try to solve it. I wouldn't try.

The original leads to a realisation that the circuit shown is actually simpler than it first appears and the answer obvious once it is realised it's an "H" or Wein Bridge; zero.

The differing resistor values just leads people to thinking it probably involves maths or calculations which are beyond them or requires more effort than they wish to expend, far more so than the original.

I think making it overly complicated makes it a less valuable problem when it isn't the actual value but the realisation that it can be determined easily. I don't think the latter takes people on that journey.
 

hippy

Technical Support
Staff member
This would be a lot more puzzling if drawn as your original picture with four _different_ value resistors [and who cares about the one across the bridge so 5 different resistor values...] ;-0
That seems to be suggesting that the one across the bridge doesn't matter because there will always be zero current through it. I may be misunderstanding you or not knowledgeable enough but that's not as far as I understand things true.
 

premelec

Senior Member
That's interesting - if you construct 2 identical two terminal black boxes - or purple boxes - one containing the zero current resistor and the other without it - is there a way to test externally that it is there or not? [I need to get breakfast now...] ;-0

@hippy I think the solution to the two boxes is to weigh them - one resistor missing will show up ;-0
 
Last edited:

AllyCat

Senior Member
Hi,

As I said in another thread recently, Thevenin's Theorem (or here) can solve such circuits with ease. ;)

First, R1 and R3 across 5v to ground are equivalent to a voltage source of 3.75 volts (i.e. 5 * 30k / 40k ) with a source impedance of 7.5 k (i.e 10k in parallel with 30k). Similarly, R4 and R5 can be converted to a voltage of 3.75 volts (5 * 45k / 60k ) with a source impedance of 11.25 k - a little messy, but basically just (R4*R5) / (R4 + R5).

Since the voltage sources are identical the current in R3 is obviously zero, but if the divider ratios were different, then it's only a matter of subtracting the lower voltage from the higher and applying Ohms Law to the sum of all the effective impedances, i.e. I = V / (7.5k + 75k + 11.25k). :)

Cheers, Alan.
 

Buzby

Senior Member
... Since the voltage sources are identical the current in R3 is obviously zero, but if the divider ratios were different, then it's only a matter of subtracting the lower voltage from the higher and applying Ohms Law to the sum of all the effective impedances, i.e. I = V / (7.5k + 75k + 11.25k).
I'm definately not an analogue guru, but if the two voltages are different, and the resistance of R3 is known, then isn't V=IR ( where V is the difference and R is R3 ) enough to calculate the current through R3 ?.
 

AllyCat

Senior Member
Hi,

No, you must consider the source resistance of the (Thevenin) Equivalent Voltage Sources. It would be legitimate for R3 to be zero ohms, but an "infinite" current wouldn't flow through it. ;)

Cheers, Alan.
 

Buzby

Senior Member
But isn't zero ohms the only case where V=IR falls down, because a resistance of zero can't have a different voltage at each end ?

Surely if there is a voltage across a resistor of known value, no matter what the source impedance of that voltage, then V=IR holds true.
 

premelec

Senior Member
@Buzby - ohm's law works no matter what - source impedance / resistance _does_ affect actual currents that will happen with particular voltages. The example in this thread has to do with a resistor between two voltage points which are at the same voltage hence zero voltage and zero current across the resistor. There are superconductors which have zero resistance but they are not commonly in use with PICAXE circuits ;-0 All common wires have some resistance.
 

AllyCat

Senior Member
Hi,

What if the Thevenin voltages were 1 volt different but R3 = 1 ohm? There couldn't be 1 amp flowing when all the other resistors are in the region of tens of kohms!

Thevin calculates the equivalent "open circuit" output voltage (and source resistance) for each pair of resistors, not any specific voltage that you might measure in the complete circuit.

Cheers, Alan.
 

Buzby

Senior Member
Hi Alan,

If a 1 ohm resistor has 1 volt across it, then the current flowing must be 1 amp !.

In the 10's of K scenario, to get 1V across 1R means the supply voltage must be very high, as that 1A has to come through the 10's of Ks.

I'm not saying you are wrong, I just think it's over complicating the issue.

Code:
------------------------------------ +ve
   |                                 |
  9K                               1K
   |             1V                 |
   --------| 1R |---------------
   |                                  |
  1K                                9K
   |                                  |
------------------------------------ 0v
I'm sure with the right supply voltage, that one little ohm can have an amp flowing through it, and thus drop 1V across it.

Tea's ready, I'll be back with the calculations later !.

Cheers,

Buzby
 

AllyCat

Senior Member
Hi,

Thevenin just gives an intermediate calculation method, it doesn't directly give the actual voltages in the circuit. For example suppose R4 and R5 in #21 were exchanged:

Now, the Thevenin voltages are 3.75 volts and 1.25 volts, with source impedances of 7.5k and 11.25k as before. But that doesn't mean there is 2.5 volts across R3, whatever its value might be (except infinity).

However, we can now calculate the current in the original 75k would be 2.5 / (75k +7.5k + 11.25k) = 26.666 uA . Or if R3 were zero ohms its current would be 2.5 / (7.5k + 11,25k) = 133.333 uA.

If you wanted to know the actual voltage at (say) the junction of R1 and R2., then calculate the drop across their source resistance, e.g. 26.667 * 7.5k = 200 mV and subtract to give the actual potential of 3.75 - 0.2 = 3.55 volts (give or take any calculation errors. ;) )

Cheers, Alan
 
Top