powering at 5V and 12V

I am building a project using an RPi and a [PIR motion sensor. The RPi needs 2A@5V, the motion sensor needs 12V*, and I’d like to power them both off a single power supply (i.e. taking up only one outlet). Something like [this would have been ideal, but it is out of stock.

  • - Can I use a 12V wall wart and a voltage regulator to get the 5V I need for the RPi?
  • - If so, would the hookup be as simple as putting the regulator and the sensor "in parallel", that is, putting their Vin pins on 12V and their ground pins on ground?
  • - Is there an easier way?
  • - Bonus points: is there a way exclusively using parts I can get from sparkfun (they don't seem to have a 5V regulator or a 12V power supply that'll handle 2A)
  • *supposedly, it’ll run off 5V, but research indicates the range is drastically reduced](https://www.sparkfun.com/products/11296)](https://www.sparkfun.com/products/13285)

    I would go with 5V supply, since that is your highest draw, and boost the 5v to +12v (since the +12v needs very little power). SFE carries a 5V/2A wallwart that could work. I didn’t see a suitable step-up converter from SFE, but Pololu has you covered: https://www.pololu.com/product/2117

    Good luck.

    I ran into a similar problem with my arduino nano/atTiny85 controlled automatic low voltage fan project. The fans needed 12v at about .2 amps each and I wanted to be able to use up to 5 fans, plus power the controller all with one main power supply. I ended up recycling a car adapter for charging phones - they’re small and easy to figure out where to solder on your leads if you hard wire, but also gives you the option to disconnect if you keep the USB ports. I snapped the plastic case off and soldered leads directly into the 12v in side and then soldered leads for my breadboard. I then had a stable 12v and 5v power source from one adapter.

    @arauf89: nice ingenuity – what did you use for a power supply?

    @languer: that makes sense, I hadn’t thought of stepping-up to 12V from 5V. thank you!

    I used a wall wart rated at 2 amps.