Good Evening,

I've been playing recently with my 4801 in order to get it to drive a 
relay. I've used Steven Finnegan's FreeBSD GPIO patch in order to expose 
the GPIO pins in /dev/led/, modified to set GPIO pins to pull-up (as per 
hardware register default in the SIO datasheet).

I built the NPN transister circuit that PHK recommended last year 
(http://www1.jaycar.com.au/images_uploaded/relaydrv.pdf), and have 
managed to connect it up (finally found a use for all those internal USB 
cables).

However I've found something odd, well odd to me, and I think it's 
probably my lack of understanding of electronics and/or GPIO.

I have GPIO00 connected to the base of the transitor, 3.3V connected to 
the collector and GND to the emitter. What I find is as soon as the 
Soekris box is switched on (ie still in comBIOS) the transister is 
activated and the relay closes the connection.

Once the OS has loaded, I echo 0 > /dev/led/gpio00 and the relay remains 
closed, when I echo 1 > /dev/led/gpio00 the relay opens and breaks the 
circuit. Measuring the voltage between GPIO00 and GND I see 3.3v when 
set to 0 and 0v when set to 1.

Sufice to say, I'm a tad confused, this seems the opposite way round 
then expected? Have I done something wrong, or is it actually ment to 
work this way? I'm also more then willing to accept that I've buggered 
up the soldering, or veroboard layout.

Any help would be greatly appreciated, I mean it works as is, but it 
doesn't feel right...

Peter.

_______________________________________________
Soekris-tech mailing list
[email protected]
http://lists.soekris.com/mailman/listinfo/soekris-tech

Reply via email to