The Shop > Electronics & IC Programing
Turn on 12v DC with logic PIC output.
raynerd:
Hi guys
I know my electronics knowledge is massively lacking but we are talking low voltage here so pretty safe for a clown like to be playing around with without too much worry :zap:
I can code PICs at a basic level and something very very simple but I've never successfully tried it, I basically would like to know how I could turn on a 12v supply with a logic 5v output. I basically want a switch on my PIC to acknowledge an input and make a pin go logic high which in turn will turn on a 12v supply to a separate circuit. I can happily code a pic to acknowledge a input and send a pin high on receipt of this signal but I can not then create the external circuit required to switch on the 12v supply.
I'm sure the answer will be using relays etc BUT I'm asking quite specifically, exactly what circuit I would need to use...including components and sizes etc. I know quite often on here I get advice and appear not to take it but that is quite simply because it is going over my head so I admit I need some quite specific help and support here!
Cheers - all advice much appreciated :nrocks:
Chris
Lew_Merrick_PE:
Chris,
Take a look at http://www.digikey.com/product-search/en?v=64&pv72=1&FV=fff40010%2Cfff80368&k=reed+relay&mnonly=0&newproducts=0&ColumnSort=0&page=1&quantity=0&ptm=0&fid=0&pageSize=25 -- they are solid, easy to apply, and inexpensive reed relay units that are easy to stick on PCB's and control things. The datasheet should make it all clear.
MetalCaster:
In general, you need to find a relay that has a coil that operates at 5 volts (DC I assume), and verify that your PIC has the power to operate the coil of that relay.
This is a mechanical relay solution, others may have a solid state solution.
The same relay needs to have output contacts that are rated for the voltage and amperage you are trying to switch (12 vDC I assume).
For instance, if you are trying to switch 12 vDC at 10 amperes, then don't use a relay with output contacts rated less than 10 amperes at 12 vDC.
A common mistake is to use a relay that has output contacts that are not rated to switch the load, or you try and operate the relay coil, but overload and burn out the PIC circuit.
So two wires out of the PIC to the relay coil, and then loop whatever 12 vDC circuit you are trying to switch through a SPST (single-pole-single-throw) contact on the relay output. I am guessing that you have a 12 vDC power supply.
Hope this helps.
raynerd:
Yes, it does help a lot!
I'm trying to create a change machine so that £1 is changed into 10x 10p using a fruit machine 10p hopper I've been given.
Apparently I need to supply 12v and a coin is dispenced. When the coin is dispenced an optical sensor sends a pulse output and it is up to my controller to tell it when to turn off.
My idea is to write a micro controller PIC code - coin is dropped in which triggers a micro switch input. This turns on the 12v and a separate input counts 10pulses before it turns the 12v off. Coin validation is a separate part and this all presumes a £1 coin has been inserted.
That is my plan - so the two issues I had were first turning on the 12v supply from my logic high and the second issue I have is trying to find out what sense pulse will be sent from the hopper to the PIc!!
sparky961:
Chris,
Try one of these. I've used them on lots of projects even if you don't need all of the outputs. Dead simple to use, and very robust.
http://www.ti.com/lit/ds/symlink/uln2803a.pdf
Note that the output SINKS current, so you are switching the GROUND not the POWER.
Navigation
[0] Message Index
[#] Next page
Go to full version