1 2 Previous Next 18 Replies Latest reply on Oct 5, 2012 10:00 AM by userc_43810

    12v to 5v logic

      Hi folks,


      Ive got my hands on a wireless remote control, Basically i want to connect the output from the wireless receiver to an input on my PSoC1 microcontroller to control some external devices.


      Unfortunately the output of the wireless receivers relay is 12volts and the inputs are 5v, my question is can i just use a 5v regulator such as the L7805 and add capacitors to make sure its a stable voltage such as in the diagram below?




        • 1. Re: 12v to 5v logic

          It would be cheaper and less power-consuming to use a voltage-divider consisting of 2 resistors to get an input-voltage between 0 and 5V. The next question could be: where to get the power from to run the PSoC. Since a step-down converter has a better efficiency factor than a 78xx voltage-regulator you may consider to use a switching regulator. Have some googles on that theme.





          • 2. Re: 12v to 5v logic

            Its not clear what you are trying to do so -




            1) A simple diagram would be helpful.


            2) Are you tyring to -


                 a. Power PSOC off a 12 V supply ?


                 b. Power PSOC with some other supply, and take in 12V and 5 V logic signals


                     from Receiver into PSOC ?


                 c. Is receiver relay output a 0, 12V output, or a set of contacts connected to 12 V that


                     receiver actuates by turning on relay coil




            3) You can see a block diagram with labeled voltages would be helpful.




            If you are trying to translate a 12 V logic signal to a 5V signal, there are a ton of interface


            parts, failrchild semi, ON Semi, that will do that job for pennies. In addition they have single gate


            logic translators that will do that. They feature low drive, low power typically, and short circuit protection.


            If its a low speed low C interface translation needed then R divider would be fine.




            Regards, Dana.

            • 3. Re: 12v to 5v logic

              If you are trying to power PSOC from 12V -




              1) Linear regulator typically a lot less noisy, so if you are doing precision analog


              consider this.




              2) Switcher can have wider input range, in fact there are parts that will buck or boost depending


              on input supply, like a battery pack that starts out high (regulator in buck mode) and then drops


              below desired Vdd (swicthes over to boost mode).




              3) TI, National, Micrel, LT, Phillips are just some of the providers. NSC/TI have an online design


              tool to pick and design and evaluate a designs perfromance. Inclduing BOM generation.




              Regards, Dana.

              • 4. Re: 12v to 5v logic

                hi guys,


                thanks for the replies,


                Basically I want to interface one of these: http://www.ebay.co.uk/itm/RF-Wireless-Electric-Garage-Gate-Door-Remote-Control-/310412645874?pt=UK_Gadgets&hash=item48460915f2


                with an input on my PSoC 1, the output from the receivers relay is 12vdc far too much for an input on the psoc. i was thinking of bringing the 12v signal down to 5v and then using the 5volt as a logic high.

                • 5. Re: 12v to 5v logic

                  So the voltage divider solution with two "R"s is the easiest.





                  • 6. Re: 12v to 5v logic

                    Then a simple R divider should work. You do have to be concerned


                    with power sequencing, eg. get PSOC started up first, then GD opener.


                    If R divider limits total current to < PSOC pin injection current spec you


                    might be able to get away with powering up both devices at once.




                    Regards, Dana.

                    • 7. Re: 12v to 5v logic

                       A lot of remotes provides relay contact outputs. ie, Contact close/open during activation.


                      Check if that is the case, if it is then you don't need the voltage divider. 

                      • 8. Re: 12v to 5v logic

                        Hi guys, im not sure if my relay has he microcontroller output, I am still waiting for it to arrive, However I actually have a few of these 5v regulators here now and some capacitors, it would cost me anything to make up a little circuit using the components i suggested, Im short on resistors though. In saying that could I use the setup i suggested. I was also thinking of using a 100uF and a 10uF capacitor instead of the ones listed on the diagram. Speaking of which, is it a good idead to put a filtering/smoothing capacitor across the 5vdc supply connected to ground on the PSoC1 device when i eventually decide to run it on a pcb i make up myself. I was thinking of putting a 0.01uF capacitor across the supply pin and connect it to ground? any ideas, thanks guys

                        • 9. Re: 12v to 5v logic

                          On regulator output you should have both a bulk and a .01 or .1 Ceramic. Bulk handles large


                          current switching transients, like driving LEDs or large C loads, and the ceramic takes care of


                          higher freq noise that the high ESR bulk caps cannot. Read your regulator specs, make sure


                          there is no minimum ESR cap specs on the output that aid in stability management.




                          Regards, Dana.

                          • 10. Re: 12v to 5v logic

                            Hi Dana,


                            thanks for the advice, will try implementing that system

                            • 11. Re: 12v to 5v logic

                              So you received the remote and it is ouputing 12V?


                              Make I know why you need to use a regulator?


                              you can use a resistor divider




                              a resitor in series with a 3.9V zener diode

                              • 12. Re: 12v to 5v logic

                                hi lleung,


                                its just that i dont have any of these zeners about at the moment, id need to order them in. ive made voltage clamps before, i remeber using a 5v7 zener with a diode in series to drop the voltage down to 5vdc, with a resistor value of 100k, not in that order though

                                • 13. Re: 12v to 5v logic

                                   No matter what you use, just remember to limit the voltage at the input pin lower then the VCC(VDD). 


                                  I would not use a 5V7 zener to clamp the input as the input should less then 5V.


                                  I woudl also measure the output of your reguatlor first and it should always be lower then the VCC of your PSOC

                                  • 14. Re: 12v to 5v logic

                                    with the 5v7 i wasnt using the said circuit, ive used 4v7's and 100k resistor to provides some protection to inputs and outputs on the psoc but thats about it, I meant to reply to the other query i had before about the programming, i kind of liked the method you were describing but im a little confused about it, i may revisit it soon, just that ive ben busy, also thanks for your replies very helpful

                                    1 2 Previous Next