Electronics > Beginners
74F08N current issue for ARDUINO
iMo:
Wiring the 08's output to an Arduino pin set as output directly is not a good idea.
The 08 AND gate has got 2 inputs, wire them to 2 Arduino pins set as output.
Do wire the 08 AND gate's output through a 2k-10k resistor to Arduino pin set as input (the resistor will limit the current in case the Arduino pin is set to output as well).
Anyhow, 40mA might be deadly for both.
vis5254:
I added a pull up resistor 10k . 2 number of 10k for each input and Output went high ! when I grounded , the voltage went low ! But the issue is if I remove both the input, I still receive high voltage across output ! I'm not speaking about grounding ! just removed two input and just gave vcc .
Kalvin:
Do not leave the inputs floating: Connect all unused inputs either to VCC or to GND with a 1 kohm ... 10 kohm series resistor. One resistor for each input pin.
newbrain:
--- Quote from: vis5254 on April 18, 2019, 11:40:19 am ---I added a pull up resistor 10k . 2 number of 10k for each input and Output went high ! when I grounded , the voltage went low ! But the issue is if I remove both the input, I still receive high voltage across output ! I'm not speaking about grounding ! just removed two input and just gave vcc .
--- End quote ---
As said above, do not leave inputs floating.
BUT:
TTL inputs are at high level when left unconnected, look at the simplified NAND gate below from Wikipedia:
With A and B unconnected, current will flow through R1, the directly polarized PN B-C junction of VT1 and similarly through the B-E junction of VT2, so VT2 is conducting and Q is 0 - remember, this is a NAND gate, to get a logic AND another inverting stage is needed.
Now, if one of A or B is connected to GND, VT1 will conduct (and saturate), so VT2 will see less than 0.6V across B-E and will switch off, yielding a high output.
I still remember when this bit me as a kid... :blah:
rstofer:
--- Quote from: vis5254 on April 18, 2019, 07:58:07 am ---I've a 74F08N AND GATE IC . I checked the datasheet and realised that the output voltage on HIGH condition goes to 5v and when output goes in LOW , current predominates and reach a value of 40mA . ARDUINO UNO digital pin has maximum withstanding capacity of 40mA . So what could be a better way in reducing 40mA to some 20 or 30mA ..??
Will a resistor in series will do the job ?
--- End quote ---
I think you have this all wrong! The 74F08N datasheet on page 3 shows IIH (input current at logic '1') as 40 uA and IIL (input current at logic '0' as -1.6 mA). The minus sign means the current is flowing out of the pin when it is low and the Arduino needs to 'sink' that current. The Arduino can sink as much as 40 mA so there is no mismatch. The Arduino can drive a LOT of gates on one output pin.
To get down to the details, if you were driving more than one logic gate from an Arduino output, you would need to see how close to ground the pin could get versus the amount of current it is sinking. There's a chart for that somewhere. Page 313 of the datasheet gives IOL as 20 mA for a 5V device for normal operating conditions.
If you are using the 74F08N to provide an input to the Arduino, you would look at IOH and realize it can only source 0.8 mA. No problem! The input current for an ATmega328 pin is just 1 uA = page 313
https://www.sparkfun.com/datasheets/Components/SMD/ATMega328.pdf
It is sometimes useful to put a 330 Ohm resistor in series with uC pins to protect against misconfiguration and sometime to slow down the edges (less reflection and EMI). There is a reason that uC pins come out of reset as 'input'. This prevents short circuiting devices that are driving the pin as an input and would be unhappy driving against an output. The resistor is useful in protecting the hardware engineer's beautiful design from the vagaries of a programmer! They can still screw it up but they have to work at it.
Navigation
[0] Message Index
[*] Previous page
Go to full version