Go Down

Topic: Pin 13 led circuit conflicts? (Read 2053 times) previous topic - next topic

EmilyJane

Quote
Any thoughts, circuits, caveats?


A 2N7002 MOSFET, in common source configuration, works like the proverbial hose.

retrolefty

Quote
I would also only use it on outs and make it disconnect on pins being used as input.

Any thoughts, circuits, caveats?


Well that would take something very clever to accomplish. On reset all pins default to input pins, but after that the bootloader and then sketch code is what decides what mode the various I/O pins will become. How your shield will gain that knowledge is very problematic. And to expect a user to manual change jumpers or switch options on the shield prior to downloading their sketch doesn't sound very user friendly, and very susceptible to user error. I suspect you will have to have the shield led monitors always active, and the use of a FET isolation transistor on each pin is a good solution. That way the pin is always monitored regardless if being driven by the output pin or the external circuit driving the pin. A FET input pin will not effect the signal being monitored. However another challenge is that input pins by default are 'floating', so how will your pin monitor report that state where there is neither a valid low or high voltage being applied to the input pin? A pull-down resistor wired to each pin is probably the only logical option you can consider.

Lefty

MarkT

Quote
Well as I told lefty, another discussion in a different section about possible shield ideas lead me to consider adding LED status circuits to each of the digital lines on my Cidekick project http://arduino.cc/forum/index.php/topic,67044.msg493322.html#msg493322 but I was trying to figure out how an isolation circuit would work for each pin or if it was even needed.

The idea was an LED shield that would show the status of each pin high or low and I was thinking RGB for the pwm pins rather than just fade.

The whole idea would only work if it it could be electronically transparent, meaning not affecting other circuits or uses to display the status and if it was low component count.


Yeah, its a nice idea - I thought about this and the best I could think of was using a cheap microcontroller with enough inputs (ATmega 168?) and a bargraph style LED array wired in Charlieplex style.  So long as the update is fast enough the human eye won't notice...  And having a micro controller means being able to do some of the functions of a logic analyser.  You'd not do anything with the analog pins (and the 168's analog pins can be used as digital out to drive the charlieplex array.

The Arduino's digital pins only see one more CMOS input load, not going to affect function.

Couldn't think of a clever way to spot floating pins though, that would be useful...
[ I won't respond to messages, use the forum please ]

retrolefty

Quote
Couldn't think of a clever way to spot floating pins though, that would be useful...


Well thinking about it some more I suspect a fet(s) input circuit could be designed and drive a tri-color led, led RED = high, GREEN = low, Yellow = floating.

Lefty

EmilyJane

One problem I've encountered with the FET is that it appears to be an excellent low pass filter. If you are doing PWM on a pin with the circuit, The LED will remain off until the duty cycle is >50% at which point it will switch on. I couldn't tell if the brightness changed from 50-100%. Too subtle for my eyes. I didn't have a DVM or 'scope handy at the time so I never figured out what was going on. The low pass filter thing is just a theory.

Boz

#20
Aug 13, 2011, 03:14 am Last Edit: Aug 13, 2011, 03:16 am by Boz Reason: 1

Quote
Couldn't think of a clever way to spot floating pins though, that would be useful...


Well thinking about it some more I suspect a fet(s) input circuit could be designed and drive a tri-color led, led RED = high, GREEN = low, Yellow = floating.

Lefty



That was my first thought was tri color for "normal" pins, but how to show pwm state?

BTW Clever is just a little over my head,rudimentary I got down, clever, thats a jump.GRIN

CrossRoads

So just connect each pin to a buffer chip;
http://www.ti.com/lit/ds/symlink/sn74ac244.pdf
Non-inverting, so output to LED anode, cathode to >=180 ohm resister to ground.
1 microAmp of load on the ATmega pin (i.e. next to nothing!)
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

Hmm, seems I responded to end of page 1 & missed the whole page 2.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up