View previous topic :: View next topic |
Author |
Message |
Bryan
Joined: 23 Apr 2005 Posts: 73
|
RB5 Pin output high too low |
Posted: Wed May 25, 2005 8:05 pm |
|
|
I am trying to drive a solid state relay that is rated at 3-32VDC and 20mA using pin RB5. It doesn't work, and I checked my output voltage using a DMM on the pin and I am getting 2.4 volts from RB7 to VSS (GND). Should I use a pullup resistor to Vdd (Maybe 1.7k?) to get the output above 3V or maybe tie 2 output pins together in series and send this to the relay? Is there an easier way to do this, and is this a standard output for RB5 (On the spec sheets I remember reading somewhere that Voh for I/O pins should be around Vdd - 0.7V so I'm not sure why I'm getting only 2.4V)?
By the way, I'm using a PIC18LF1320. |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Wed May 25, 2005 8:29 pm |
|
|
What is your supply voltage (what voltage is the pic running at)?
Kind of sounds like the pic can't drive enough current. Maybe try hooking the SSR's "coil" up via a transistor and instead drive the transistor - use that to turn it on. |
|
|
Bryan
Joined: 23 Apr 2005 Posts: 73
|
|
Posted: Wed May 25, 2005 8:37 pm |
|
|
My supply voltage is 5V Vdd, so it should be enough and the pics I/O pins are rated for 25mA so it should theoretically be enough, but who knows in practice... |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Wed May 25, 2005 8:56 pm |
|
|
I know about the 25 mA/pin, but I wouldn't trust it. In theory, a chevy sprint should be able to hit 120 mph too, but probably only if it was going down a really long, steep hill.
I wouldn't want to be in the car for the attempt either. |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Thu May 26, 2005 12:57 am |
|
|
Some solid state relays are poorly rated in terms of the input. Some are TTL level inputs but a lot are simply a diode forming half of an internal optocoupler. In this case you would need a series resistor to limit the input current to the diode. From the 20mA number you have quoted I would assume your SSR falls into the later category in which case you are lucky you have not yet blown up the input diode. The typical forward voltage of these diodes is around 1.7 volts.
Let's say you need 5A to drive the SSR reliably on (i don't know what yours needs but this is a relatively safe figure). In which cae yo would need a series resistor of (5 - 1.7) / 5mA = 660R. The closest 10% value to this is 680R (ohm). A 100mW resistor would be fine.
Regards, Andrew |
|
|
Guest
|
On RB5 |
Posted: Thu May 26, 2005 10:14 am |
|
|
There was a "feature" in the PIC18F442's silicon, which some times prevented the PIC from programming (high voltage), if RB5 was not tied to ground. I haven't heard of this problem in 2 years, so it could have been a bug in the silicon, and it was fixed.
Nick |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Thu May 26, 2005 11:23 am |
|
|
I might try hooking up an LED with a 330 ohm resistor and try driving it. Check the voltage output and see if it's okay. If it is, your relay might be trying to pull too much current from the pin. Also, try connecting up the relay in reverse. Instead of driving the pin high to turn it on try driving it low to turn it on. See if that makes any difference.
Ronald |
|
|
|