Sinking around 9v to Picaxe

D396

Senior Member
I have a device that I am trying to control that requires the pin to be connected to ground to turn on, which normally would be no problem except that the pin is pulled high to nine volts. Is there an easy and cheap way to do this.
The device is a ceiling fan remote that I am trying to convert to IR by making the IC on the remote think I pressed the button. I have already verified that if pin 1 is connected to ground it will send the fan low command and so on by using a wire. The remote runs on a nine volt battery.
 

westaust55

Moderator
You can:
1. USe a transistor as a low side switch with say a 1 to 2.4 kOhm resistor from the PICAXE output to the transistor base.
2. Use one channel of a ULN2803 Darlignton transistor array - a frequent package on many Rev Ed PICAXE project boards. You may also need a pull-up resistor form the control pin to 9V for the off condition but the ULN2803 can handle that.
 

Dippy

Moderator
The remote may have a 9V battery but it doesn't mean the pin in question (that you wish to ground) is 9V. So, easy first job, dig out your DMM , set to Volts and measure it when NOT pressing button.

However, the easiest solution is to use a transistor. Either an NPN bipolar or an N channel baby MOSFET. If its all running at 5V then the PICAXE I/O pin could do this (for safety, via a coupla hundred Ohm resistor).
But as it sounds like you are new to electronics I'd use a transistor to protect the PICAXE from 'accidents'.

Look in the Manuals to see how to use a transistor as a switch.
All the info you need for that is in MANUAL 3.
Look at how a relay is switched (but forget the diode shown as you don't need it).
 

D396

Senior Member
Found a ULN2803 in my parts bin. Yhe remote already has pull up resistors. So all I have to do is have the output of the ULN2803 connected top the remote and the input to my picaxe?
thanks for the help
 

Dippy

Moderator
If you want a 100% Yes/No then post your proposed circuit.
Guessing can lead to magic smoke.
However, it sounds like it's OK - if my Crystal Ball has been reconnected properly.
A transistor would be much simpler and smaller.
 

D396

Senior Member
There are 7 pins I need to wire up and the device needs to be small and through hole so i dont want to use transistors
 

BeanieBots

Moderator
Glad you got it sorted and thanks for letting us know.
Just for the record and any other readers, a word of caution about using the ULN2803 (or any other darlington transistor) for such applications.

Darlingtons cannot pull right down to 0v. They will drop the equivalent of two diode volt-drops. This can be in the order of 1v.
Some digital inputs regard anything over about 0.8v as logic high.
Hence, there is the possibility that SOME devices might not work when switched this way.
 
Top