Using 12v wall wart to supply 2 different voltages for microcontroller project

Discussion in 'General Electronics Chat' started by bobhawkens, Apr 12, 2012.

  1. bobhawkens

    Thread Starter New Member

    Oct 29, 2011
    I currently have an arduino set up with a 12v wall wart external power supply going to a small fan and motor and a separate USB power cord going to the arduino's 5v regulator, which then powers the breadboard, arduino, and sensors.

    I'm going to get rid of the arduino and just make a standalone version on a breadboard. As I do this, it would be nice if I could combine the power supplies and only use 1 wall wart.

    I've done a lot of research, but if anyone here can nudge me further in the right direction I'd be greatly appreciative.

    First, I understand that current is important here and I'll need to add up all of the sensors to see how much current I'll need. I suspect that I'm well under what my current 12v wall wart can supply.

    But before I get to that stage I want to make sure I am on the right path. Basically, I think (I'm scared of power supplies and not very familiar with electronics) that I can run the 12v wall wart to a 5v regulator (provided I read the data sheet and use capacitors, heat sinks, etc as required) which can then power my microcontroller/standalone arduino/breadboard/senors.

    Then, what I'd like to do is also put another wire into the + pin of the screw terminal that receives the 12v wall wart connector. This wire will bypass the breadboard and go directly to the fan and motor. The ground pins of each device will go to separate transistors, which are controlled by the microcontroller.

    Am I on the right track? Thanks in advance for your help.
  2. BSomer


    Dec 28, 2011
    Sounds to me like you are heading the right direction. Like you had said you want to make sure you are not going to exceed the current rating of the wall wart. Just takes a little math for that part.
    bobhawkens likes this.
  3. WBahn


    Mar 31, 2012
    It sounds like you are on the right track, but I don't follow what you mean by the grounds of each device going to separate transistors. You should end up with a common ground (the negative side of the walwart output) that both the 12V section and the 5V section share.

    I'm also confused because you talk about getting rid of the arduino but then mention it as well as a microcontroller afterward.
    bobhawkens likes this.
  4. panic mode

    Senior Member

    Oct 10, 2011
    wall wart will have current rating written on it.
    arduino can be powered from 5V from USB or from DC plug (or from pin that connects to DC plug) which is 7- 15V or so (there is built in linear voltage regulator that reduces supply voltage to 5V). I've been using that regulator to power arduino from 12V source. arduino and few sensors was without issue (low current drawn by sensors). but adding 7-segment shield increased current draw considerably so regulator was getting hot. it would be better if they used switching regulator but i guess they tried to keep both price and component count down.
    bobhawkens likes this.
  5. bobhawkens

    Thread Starter New Member

    Oct 29, 2011
    I do end up with a common ground. The - pin of each device goes to a separate transistor. One pin of each transistor goes to ground, one connects to the device with a diode across it, and one pin connects to the microcontroller.

    I'm basically taking the parts I need from an arduino and putting it on a breadboard so I can put everything on one breadboard, then eventually everything will be on one pcb. So I confusingly used those terms interchangeably. Sorry about that. The 5V from the regulator will be powering the microcontroller and sensors, which are acting as an arduino.
  6. gerty

    AAC Fanatic!

    Aug 30, 2007
    We use 2 different voltages all the time on our projects.
    Here a drawing by one of my students from one of his projects, the pic is 5v and the leds are tied to 12v.
    bobhawkens likes this.
  7. bobhawkens

    Thread Starter New Member

    Oct 29, 2011
    I've computed all of the elements of my project. I'm a little confused about current flows for the different branches, and sadly, I did just review the textbook.

    The fan and motor could potentially require 530mA if started at the same time (although they never are). My power supply is 12v 1000mA. The rest of the components run on the other branch which is 5 volts. Do I need to use a resistor to insure a certain amount of current is always available for the fan and motor branch? Does it just take care of itself? I know this is a stupid question so if you'd like to link to something from the textbook or tell me what to google for myself, that's fine I deserve it.

    Here is the list and measurements of all my components and my notes. I'd appreciate if someone took a quick glance and let me know if something seemed out of whack. Thanks again for all your help.

    Measured 280 mA at start up
    Measured 200 mA in operation
    Measured 250mA at start up
    Measured 100mA in operation

    Hall sensor

    4 mA x 4 = 16 mA

    Dallas one-wire temp sensor

    5mA x 8 = 40mA

    Light resistor (shouldn't use any current)


    Not listed, assume 5mA

    120 mA x 2

    Voltage regulator itself
    Can SUPPLY up to 1.5A, but limited by power supply current

    1mA, but other components may draw more

    TOTAL from ABOVE:
    832 if everything is started at once
    602 in operation
    682 with occasional fan spike

    Could probably just get 2000mA for good measure and be fine