Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. converting 12v to 5v

converting 12v to 5v

Scheduled Pinned Locked Moved Hardware
49 Posts 7 Posters 26.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • sowardS Offline
    sowardS Offline
    soward
    wrote on last edited by
    #12

    I added a doorbell alert with mySensors back in the fall -- I was going to post the code here, but I seem to have misplaced it. I have a trigger going to the VERA and a mosfet driving a couple of feet of bright LEDs strung over either side of the door frame between the two sides of the basement. These flashes a few times when the bell is rung, and the vera sends me a prowl message as well. I haven't missed any deliveries since adding it.

    However, my 1955 era house here in the US uses AC voltage for the doorbell circuit ( it seems most, but not all, here in the US do as well ). Since the actual transformer is in a difficult to access area of the attic ( I think I code violation now ), I tapped into the wires as they run from the door bell button to the actual bell, this line was easily accessible in the unfinished side of the basement.

    I just built a small bridge rectifier from 4 diodes 'dead bug' style on the pins of a relay, and covered the whole thing in some shrink. The relay just grounds a pin on a pro-mini. The pro-mini is just powered by a scavanged wall-wart which also provides enough current to flash the LEDs...

    IMG_2692.jpg

    Moshe LivneM 1 Reply Last reply
    0
    • sowardS soward

      I added a doorbell alert with mySensors back in the fall -- I was going to post the code here, but I seem to have misplaced it. I have a trigger going to the VERA and a mosfet driving a couple of feet of bright LEDs strung over either side of the door frame between the two sides of the basement. These flashes a few times when the bell is rung, and the vera sends me a prowl message as well. I haven't missed any deliveries since adding it.

      However, my 1955 era house here in the US uses AC voltage for the doorbell circuit ( it seems most, but not all, here in the US do as well ). Since the actual transformer is in a difficult to access area of the attic ( I think I code violation now ), I tapped into the wires as they run from the door bell button to the actual bell, this line was easily accessible in the unfinished side of the basement.

      I just built a small bridge rectifier from 4 diodes 'dead bug' style on the pins of a relay, and covered the whole thing in some shrink. The relay just grounds a pin on a pro-mini. The pro-mini is just powered by a scavanged wall-wart which also provides enough current to flash the LEDs...

      IMG_2692.jpg

      Moshe LivneM Offline
      Moshe LivneM Offline
      Moshe Livne
      Hero Member
      wrote on last edited by
      #13

      @soward yep.... Mine will send me hangouts message. And probably also a snapshot of who ever dared to ring my bell....
      I have no idea what half of the terms you used means but will look that up when I am home. Dead bug? Bridge rectifier?

      I am actuslky luckier than I thought. The ring just short two wires so can trigger the nano directly. Its so easy its frightening....

      1 Reply Last reply
      0
      • sowardS Offline
        sowardS Offline
        soward
        wrote on last edited by
        #14

        dead bug is just a term for soldering together components w/o a breadboard or similar to put them on -- the resulting bits of electronics with wire 'legs' sticking out looks sorta like a dead bug. There's an art to doing it and making it still look nice which I never learned.

        A bridge rectifier is a very simply way to convert AC into DC by using 2 (for a 1/2 wave) or 4 (for a full wave) diodes. Wikipedia probably has a better explanation than I could come up with though.

        I added the lights as a secondary feature, since sometimes the lag of getting the message out and back to my phone was enough that I could miss someone -- that and I might have the phone on the charger, and not hear it (or be on the phone and not be able to see the message, etc).

        regardless, sounds like your bell is a bit easier to work with than mine was.

        I'd like to have a camera there as well, but it's going to be a challenge to get one mounted appropriately.

        Moshe LivneM 1 Reply Last reply
        0
        • R Offline
          R Offline
          rickmontana83
          wrote on last edited by
          #15

          For what it's worth, I have a couple of the power supply boards from the OP that I'm using with a bridge rectifier to convert from a 24VAC sprinkler system to DC voltages appropriate for Arduino. Much cheaper to get the rectifier and DC-DC board separately than a dedicated AC-DC board that is effectively the same thing. If memory serves, I think my doorbell is also on a 24VAC transformer, so that would be appropriate here, too.

          1 Reply Last reply
          0
          • sowardS soward

            dead bug is just a term for soldering together components w/o a breadboard or similar to put them on -- the resulting bits of electronics with wire 'legs' sticking out looks sorta like a dead bug. There's an art to doing it and making it still look nice which I never learned.

            A bridge rectifier is a very simply way to convert AC into DC by using 2 (for a 1/2 wave) or 4 (for a full wave) diodes. Wikipedia probably has a better explanation than I could come up with though.

            I added the lights as a secondary feature, since sometimes the lag of getting the message out and back to my phone was enough that I could miss someone -- that and I might have the phone on the charger, and not hear it (or be on the phone and not be able to see the message, etc).

            regardless, sounds like your bell is a bit easier to work with than mine was.

            I'd like to have a camera there as well, but it's going to be a challenge to get one mounted appropriately.

            Moshe LivneM Offline
            Moshe LivneM Offline
            Moshe Livne
            Hero Member
            wrote on last edited by
            #16

            @soward OK, I knew it was too easy to be true. apparently the transformer is 9v AC and the doorbell ring closes ~6v dc circuit that has the tiniest current on it (9ma). So, I can't steal current from the 6vdc so need to use the 9vac... so, bridge rectifier? and how do I "sense" the closing of the circuit without triggering a doorbell ring? I tried connecting the arduino with pin 3 and gnd in parallel to the door ring but it triggers a continuous ring. darn, and i thought that this at least will be simple!

            1 Reply Last reply
            0
            • rvendrameR Offline
              rvendrameR Offline
              rvendrame
              Hero Member
              wrote on last edited by
              #17
              This post is deleted!
              1 Reply Last reply
              0
              • rvendrameR Offline
                rvendrameR Offline
                rvendrame
                Hero Member
                wrote on last edited by rvendrame
                #18

                Maybe if you post the circuit, it will be easy to understand. Anyway, I think the less-invasive method is by using a optocoupler:

                voorbeeld - dragoslav_1.jpg

                Moshe LivneM 1 Reply Last reply
                0
                • rvendrameR rvendrame

                  Maybe if you post the circuit, it will be easy to understand. Anyway, I think the less-invasive method is by using a optocoupler:

                  voorbeeld - dragoslav_1.jpg

                  Moshe LivneM Offline
                  Moshe LivneM Offline
                  Moshe Livne
                  Hero Member
                  wrote on last edited by
                  #19

                  @rvendrame here is the page from the manual:
                  doorbell_20150626_0001.jpg

                  my installation is the one without the batteries,
                  i'll get some optocouplers and play. Thanks!

                  AWIA 1 Reply Last reply
                  0
                  • Moshe LivneM Moshe Livne

                    @rvendrame here is the page from the manual:
                    doorbell_20150626_0001.jpg

                    my installation is the one without the batteries,
                    i'll get some optocouplers and play. Thanks!

                    AWIA Offline
                    AWIA Offline
                    AWI
                    Hero Member
                    wrote on last edited by
                    #20

                    @Moshe-Livne Do you have a volt meter? Than measure between 0 and 1 while pressing the button and releasing it (or 0 and 2, depending which one is used) and than post your measurements. From the pictures I imagine that it is a DC circuit.

                    Moshe LivneM 2 Replies Last reply
                    0
                    • AWIA AWI

                      @Moshe-Livne Do you have a volt meter? Than measure between 0 and 1 while pressing the button and releasing it (or 0 and 2, depending which one is used) and than post your measurements. From the pictures I imagine that it is a DC circuit.

                      Moshe LivneM Offline
                      Moshe LivneM Offline
                      Moshe Livne
                      Hero Member
                      wrote on last edited by
                      #21

                      @rvendrame Oh wow. there are zillions of kinds... As aliexpress are a bit thin on details, anyone knows when one I should get to detect 6v 6ma ?

                      1 Reply Last reply
                      0
                      • AWIA AWI

                        @Moshe-Livne Do you have a volt meter? Than measure between 0 and 1 while pressing the button and releasing it (or 0 and 2, depending which one is used) and than post your measurements. From the pictures I imagine that it is a DC circuit.

                        Moshe LivneM Offline
                        Moshe LivneM Offline
                        Moshe Livne
                        Hero Member
                        wrote on last edited by
                        #22

                        @AWI It is 6vdc, about 6ma current. i tried to tap it for powering the arduino but its not enough

                        1 Reply Last reply
                        0
                        • rvendrameR rvendrame

                          @Moshe-Livne , it should be simpler than that --- Just connect the ground of the doorbell to arduino's ground, and use a voltage divider below to divide the +12v by lets say, 3, and connect it to any arduino input pin.

                          R1 = 670K and R2 = 470K should do the trick... 12V will become ~4V , and digitalRead() will read '1' when the bell rings (and zero when idle).

                          voltage-divider-w.gif

                          AWIA Offline
                          AWIA Offline
                          AWI
                          Hero Member
                          wrote on last edited by AWI
                          #23

                          @Moshe-Livne going back to an earlier suggestion from @rvendrame (adapted a little for the situation)

                          Current is not important here as long as you do don't power the arduino from it. Just connect the ground of the doorbell to arduino's ground, and use a voltage divider below in parallel (U1) with the pushbutton. This divides the voltage of +6v by 1.5, and can be connected to any arduino input pin (Digital or Analog).

                          R1 = 470K and R2 = 670K should do the trick... 6V (U1) will become ~4V (U2) , and digitalRead() will read 'low' when the bell rings (and 'high' when idle).

                          voltage-divider-w.gif

                          Moshe LivneM 1 Reply Last reply
                          0
                          • AWIA AWI

                            @Moshe-Livne going back to an earlier suggestion from @rvendrame (adapted a little for the situation)

                            Current is not important here as long as you do don't power the arduino from it. Just connect the ground of the doorbell to arduino's ground, and use a voltage divider below in parallel (U1) with the pushbutton. This divides the voltage of +6v by 1.5, and can be connected to any arduino input pin (Digital or Analog).

                            R1 = 470K and R2 = 670K should do the trick... 6V (U1) will become ~4V (U2) , and digitalRead() will read 'low' when the bell rings (and 'high' when idle).

                            voltage-divider-w.gif

                            Moshe LivneM Offline
                            Moshe LivneM Offline
                            Moshe Livne
                            Hero Member
                            wrote on last edited by
                            #24

                            @AWI Errrr tried something similar before and the bell was ringing continuously as if the arduino acted as a short. might be something stupid i did. I excel in these. maybe defined the pin as output. will double check tomorrow.
                            Thanks!

                            1 Reply Last reply
                            0
                            • tbowmoT Offline
                              tbowmoT Offline
                              tbowmo
                              Admin
                              wrote on last edited by tbowmo
                              #25

                              hmm.. only 6v DC?

                              why use optocouplers for that? Could also be done very simple with a resistor and one or two diodes.

                              connect gnd together, a 10-100k resistor in line with the +6V signal to the input on arduino, and a clamping diode to VCC (optionally a second clamping diode to GND for good measures).

                              See the first answer to the question here http://electronics.stackexchange.com/questions/45127/what-kind-of-diode-to-use-with-adc-inputs

                              Moshe LivneM 2 Replies Last reply
                              0
                              • rvendrameR Offline
                                rvendrameR Offline
                                rvendrame
                                Hero Member
                                wrote on last edited by
                                #26

                                @tbowmo , I suggested the optocoupler as an alternative to not trigger the ring as Moshe Livne had mentioned. But I agree with you, it should work without it if connected in the right way.

                                1 Reply Last reply
                                0
                                • tbowmoT tbowmo

                                  hmm.. only 6v DC?

                                  why use optocouplers for that? Could also be done very simple with a resistor and one or two diodes.

                                  connect gnd together, a 10-100k resistor in line with the +6V signal to the input on arduino, and a clamping diode to VCC (optionally a second clamping diode to GND for good measures).

                                  See the first answer to the question here http://electronics.stackexchange.com/questions/45127/what-kind-of-diode-to-use-with-adc-inputs

                                  Moshe LivneM Offline
                                  Moshe LivneM Offline
                                  Moshe Livne
                                  Hero Member
                                  wrote on last edited by
                                  #27

                                  @tbowmo SO, just re-iterating so I wont do something stupid:

                                  1. I still need a bridge rectifier or some sort of ac-dc regulator/transformer to drive the arduino as the dc circuit does not have enough juice
                                  2. the circuit will look something like:
                                    edit#breadboard.jpg
                                    (the simulation shows zero current so i probably did something wrong)

                                  Again, thank you for your patience.

                                  1 Reply Last reply
                                  0
                                  • tbowmoT tbowmo

                                    hmm.. only 6v DC?

                                    why use optocouplers for that? Could also be done very simple with a resistor and one or two diodes.

                                    connect gnd together, a 10-100k resistor in line with the +6V signal to the input on arduino, and a clamping diode to VCC (optionally a second clamping diode to GND for good measures).

                                    See the first answer to the question here http://electronics.stackexchange.com/questions/45127/what-kind-of-diode-to-use-with-adc-inputs

                                    Moshe LivneM Offline
                                    Moshe LivneM Offline
                                    Moshe Livne
                                    Hero Member
                                    wrote on last edited by
                                    #28

                                    @tbowmo added the door bell to the simulation and its working. you are the bestest! now to get some diodes.....

                                    1 Reply Last reply
                                    0
                                    • tbowmoT Offline
                                      tbowmoT Offline
                                      tbowmo
                                      Admin
                                      wrote on last edited by
                                      #29

                                      @Moshe-Livne

                                      That doesn't look quite right. If you look at the link I provided, you will see that the resistor is in line with the signal from "outside" to the arduino. So 1 side goes to the doorbell, the other go to the arduino pin. Then the two diodes go from arduino pin and vcc, and arduino and gnd.

                                      Moshe LivneM 1 Reply Last reply
                                      0
                                      • tbowmoT tbowmo

                                        @Moshe-Livne

                                        That doesn't look quite right. If you look at the link I provided, you will see that the resistor is in line with the signal from "outside" to the arduino. So 1 side goes to the doorbell, the other go to the arduino pin. Then the two diodes go from arduino pin and vcc, and arduino and gnd.

                                        Moshe LivneM Offline
                                        Moshe LivneM Offline
                                        Moshe Livne
                                        Hero Member
                                        wrote on last edited by
                                        #30

                                        @tbowmo did I get it right now?
                                        edit#breadboard (1).jpg
                                        its a shame that they don't have ac power supply there so i can't simulate the rectifier. nifty site...

                                        1 Reply Last reply
                                        0
                                        • tbowmoT Offline
                                          tbowmoT Offline
                                          tbowmo
                                          Admin
                                          wrote on last edited by
                                          #31

                                          @Moshe-Livne

                                          Without knowing the details of the doorbell, I would think it is something like this.. That is, the doorbell get power, when the button is pressed, and makes a connection to GND. So this would be the circuit that I would create:

                                          doorbell1.png

                                          It's only the arduino part you should make, the rest is the existing doorbell.. The resistor should be high value, I've put in 56Kohm, but something in the order of 56-220K ohm, whatever you have in your parts bin :)

                                          Moshe LivneM 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          19

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular