Joined: 06 Jun 2006 Posts: 4915 Location: Dresden, Germany
Posted: Thu Oct 04, 2007 2:22 am Post subject:
3_dir just sets the direction of the gpio. input or ouput
3_out is important for you _________________ one cigarette costs 2 minutes of your life.
one bottle of beer costs 4 minutes of your life.
one working day costs 8 hours of your life.
Joined: 07 Mar 2007 Posts: 10 Location: Dresden, Germany
Posted: Thu Oct 11, 2007 7:31 pm Post subject: you probably fragged it
Hi,
the Atheros WiSOC is not designed to drive a relay directly.
You probably fragged the GPIO pad cell by now. Whilst modern IO pads are designed to withstand short circuits and all kinds of other abuse within the supply voltage limits the lack of the recovery (kickback) diode in your design might have meant its death.
I would suggest using a simple NPN (BC238 or something) bipolar transistor as driver and 1N4148 as recovery diode at the relay coil.
Then also make sure to use the GPIO in totem-pole mode, not open-drain if that is configurable.
Oh, and yeah, make sure you dont hurt yourself, rereading this post it sounds really dangerous.
Joined: 07 Mar 2007 Posts: 10 Location: Dresden, Germany
Posted: Fri Oct 12, 2007 11:36 pm Post subject: probably...
In fact you can be pretty happy that (aparently) not much else broke.
You see an inductance such as a relay coil will always try to keep the current flow steady. That is,
if during on-time there are 20mA flowing through the coil and then by turning off the output
it stops, the coil will *force* the current flow to continue until the energy stored in its magnetic
field is gone.
That is, whatever voltage needed to keep these 20mA flowing (cf. Ohms law) will be generated
by the coil and therefore be applied to the pad. This can mean quite some overvoltage that
probably fragged the driver and clamp diode within the chip. The precise behaviour of such a
circuit can be described by a first order exponential differential equation, but this would go
too far for this board. Use a NPN transistor driver and recovery diode protection I would
suggest.
And, oh yeah, next time make sure to apply your hacks to a borrowed AP first.