Connect with us

Controlling power output

Discussion in 'General Electronics Discussion' started by Swedecircuit, Dec 25, 2013.

Scroll to continue with content
  1. Swedecircuit

    Swedecircuit

    5
    0
    Dec 25, 2013
    I have a need for a setup where I would like to turn 12v power on and off depending on the input of a sensor that is outputting different voltage depending on the measurement.

    Could you guys recommend a very simple and cheap component that could achieve this? Maybe a very simple one, that can handle simple if/else cases? For example, if input voltage is > 5V then turn on power on the output.

    Any input is appreciated.
     
  2. davenn

    davenn Moderator

    13,589
    1,871
    Sep 5, 2009
    hi and welcome

    what is the sensor and what voltage range does it output ?

    Dave
     
  3. Swedecircuit

    Swedecircuit

    5
    0
    Dec 25, 2013

    The above was just an example, I pasted the text for the actual output signal below. It is an ultrasonic distance measuring sensor:

    Pin 3 - (AN) This pin outputs analog voltage with a scaling factor of (Vcc/1024) per 2 cm. A supply of 5V yields ~4.9mV/2cm., and 3.3V yields ~3.2mV/2cm.

    So, based on the voltage input I would like to turn on and off a 12v (low power) device. It would be nice if the "controller" could handle if/else and maybe some simple math.

    I appreciate your help.
     
  4. Swedecircuit

    Swedecircuit

    5
    0
    Dec 25, 2013
    Also, I forgot to mention that the max range is 10m, so that should be (1000/2)x4.9mV=2500mV. If the input is 5V.
     
  5. Arouse1973

    Arouse1973 Adam

    5,164
    1,080
    Dec 18, 2013
    Based on what voltage would you like to turn on the device, maximum output, minimum or something in between? Being a 10bit result there are quite a few divisions of the supply voltage on the output.
    Thanks
    Adam
     
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    10,025
    2,138
    Nov 17, 2011
    If you need only two levels (e.g. 12V on for diistance less than xx m, 12V off for distance greater than xx m) you can use a simple Schmitt-trigger circuit. This circuit wil generate an on/off signal depending on the analog input. How you use that signal to control 12V depends on different factors:
    - how much current is required?
    - how fast do you need to switch the 12V?
    - how often do you expect to switch the 12V?

    A simple solution uses a relay where the coil is controlled by the signal from the Schmitt-trigger and the contacts open or close the 12V circuit.
     
  7. Swedecircuit

    Swedecircuit

    5
    0
    Dec 25, 2013
    Thanks for the replies.

    At this point I am not sure at what distance to turn the 12v on, if possible, I would like to use a "controller" that is flexible on the input signal, for example that can handle 0-5V.

    As I mentioned before I would like it to be programmable at a very basic level....if that is possible.

    It could also be so that I also will attach a speed sensor to the controller, so it would be great if it had a few inputs and is flexible in at what voltage to turn on the 12V. If I add the speed sensor I would need to also do a simple math calculation involving both the distance and speed.

    The current needed will be around 5A, so around 60W, but it would be good if the device could handle a bit more.

    It is enough if the 12v turns on in around 0.5s. It will turn on and off max around few times per minute.
     
  8. Harald Kapp

    Harald Kapp Moderator Moderator

    10,025
    2,138
    Nov 17, 2011
    A Schmitt-trigger circuit with adjustable threshold can handle the uncertainty in distance.

    Your wish for more flexibility plus tha capability to handle some math on the input signals calls for a microcontroller with (built-in) A/D-converter. From your posts I assume you're not too familiar with electronics. A complete unit therefore would suit your needs best. Look up arduino, basic stamp or picaxe.
    You find these units in different variants in many shops. Or similar units that may go by another name. Even though these modules give you the basic hardware, some adaptation of the sensors to the inputs of the module may be required. You will also have to learn how to program such a module. It is not very difficult. But it requires some understanding of the architecture of the module (i.e. mainly of the microcontroller used on the module) and knowledge of the programming language used.

    As for the switching requirements (power, no. of cycles), a relay can be used. If you want long lifetime plus silent operation, use a power MOSFET. You can buy preassembled "power modules" (also known as "shields") for the controller modules I mentioned. It is however, not too difficult to add a single power MOSFET to such a controller yourself. This forum is the right place to help you with that issue once you have decided which controller to use.
     
    Last edited: Dec 26, 2013
  9. Swedecircuit

    Swedecircuit

    5
    0
    Dec 25, 2013
    Awesome, this is exactly the info I was looking for.

    The Arduino board seems very well documented so I think I will pick that one. I have a programming background so I should be able to figure it out.

    Thanks for the help.
     
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.
Electronics Point Logo
Continue to site
Quote of the day

-