Pages: 1 [2]   Go Down
Author Topic: Pin 13 led circuit conflicts?  (Read 1306 times)
0 Members and 1 Guest are viewing this topic.
Dallas, Texas
Offline Offline
God Member
*****
Karma: 0
Posts: 861
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Any thoughts, circuits, caveats?

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

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16517
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Online Online
Shannon Member
****
Karma: 161
Posts: 10438
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

[ I won't respond to messages, use the forum please ]

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16517
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 0
Posts: 861
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

LOS GATOS, CA, USA
Offline Offline
Full Member
***
Karma: 3
Posts: 180
The TinkerTech Blog and the MusheenShop
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: August 12, 2011, 08:16:57 pm by Boz » Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 439
Posts: 23735
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 439
Posts: 23735
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm, seems I responded to end of page 1 & missed the whole page 2.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: 1 [2]   Go Up
Jump to: