Connect with us

Programmable Microcontroller with relays

Discussion in 'Microcontrollers, Programming and IoT' started by john2k, Nov 29, 2017.

  1. john2k

    john2k

    96
    1
    Jun 13, 2012
    I'm completely new to programmable microcontrollers. I am looking for a solution. I would like some sort of device that is always on and powered with 12v power source. The device also then has a completely standalone additional 12v trigger from a completely different power source. When power is detected coming from this trigger power source and as long the power is greater than 9v then I would like a relay 1 to turn on for x seconds and then relay 2 for x seconds.

    Can anyone recommend anything for this?
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    8,694
    1,692
    Nov 17, 2011
    Detect an input: simply use a voltage divider to reduce the 12 V input signal to a 5 V (or 3.3 V, depending on the controller) input signal. Connect this signal to a GPIO pin configured as input.
    You may add a zener diode with a breakdown voltage near the µC's operating voltaeg for additional protection of the input from overvoltage.
    Here are a few more ideas: http://www.kevinmfodor.com/home/My-Blog/microcontrollerinputprotectiontechniques

    Turn a a load on or off: https://www.electronicspoint.com/resources/using-a-bipolar-transistor-to-turn-a-load-on-and-off.30/
     
  3. Minder

    Minder

    2,706
    563
    Apr 24, 2015
    Are there other functions that you need a μp for?
    If not, a couple of 555's or a 556 should do it.
    If you do use a micro then I would use a logic mosfet on the output of the μp to operate the relays or switch the load direct with the mosfet.
    Depending on the other requirements, a small 8 pin micro could be used.
    M.
     
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.