![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I'm very new to PIC and have had success turning on LEDs with my 16F627 PIC microcontroller. I'm now trying to turn on motors, but I don't want to drain power from the PIC by running the motor directly off of the output pin. So I tried using a small relay (5VDC,89mA) so that the PIC turns on the relay, which then draws power from a dedicated battery for the motor. However, my output pins can't provide enough voltage to turn on the relay (requires 5V)! I am providing 5.5V DC INTO the PIC chip and my output pins are putting OUT 2.4V when they go high. I also can't turn on transistors with my output pins because they also require 5V. I feel very limited by the low output pin voltage. Am I doing something wrong? Why are the output pin voltages so low? Please help! | |
| |
| | (permalink) |
| You cannot turn on relay by PIC output alone. LED is ok, piezo buzzer is ok but this is pretty much it. Just about anything else would require transistor that can handle load. PIC ouputs are limited to some 20mA max (did you read the datasheet for you PIC?). Get NPN transistor that can handle ca. 150-300mA of current. Connect 330 Ohm resistor from PIC output to a base of transistor. Connect emiter to DC common. Connect relay from colector of the transistor to a positive rail of your power source. Make sure that you have diode accross relay coil (cathode connected to +, anode to transistor). Hope this helps... | |
| |