I want to use " serial out pin " as gernal output to drive relay

Mike.

Member
hello guys , I have picaxe-18M2 Micro-controller and I want to use serial out pin( c.3 ) as output pin to drive a relay.
I have done some experiment but no success..

please provide any help !
 

tony_g

Senior Member
you should be able to do it, the M2 range allow use of the serial pins for general use, i have used both serial in and out on my 8 and 14 pin M2 chips as gp input/output.

how do you have the circuit connected? if you have the relay directly connected to the pin then that probably wont work assuming the relay coil needs more current to engage and the pins can only source around 20ma each, if you have a direct connection to the relay then you would need to use a transistor to be able to switch the higher current the coil would need to fully energise and latch.

what are the specs of the relay,coil current and required voltage for the coil?
 

Mike.

Member
you should be able to do it, the M2 range allow use of the serial pins for general use, i have used both serial in and out on my 8 and 14 pin M2 chips as gp input/output.

how do you have the circuit connected? if you have the relay directly connected to the pin then that probably wont work assuming the relay coil needs more current to engage and the pins can only source around 20ma each, if you have a direct connection to the relay then you would need to use a transistor to be able to switch the higher current the coil would need to fully energise and latch.

what are the specs of the relay,coil current and required voltage for the coil?
first thanks for your reply !
I am using transistor Bc547 to switch 5v pcb mount relay.. on other pins the relay is working.. but I dont know how to use with serial out pin..

thanks again..
 

nick12ab

Senior Member
ok this is the software....
and how should I arrange hardware..
You could connect the serial out connection from the PICAXE to the download socket normally - before the resistor and transistor for the relay. However that would cause the relay to make a noise and rapidly turn on and off during a download. If that is an issue, then you can use a small switch or jumper to temporarily disconnect the transistor when doing a download.
 

tony_g

Senior Member
you could also try tying a resistor across the base of the transistor to ground to prevent unwanted actions during serial download
 
Top