Friday, March 25, 2016

ESP8266 - powering it via AC

"In the beginning"

Been meaning to do this for a while now.  As in "for the last 10 years or so".  Anyway.   As I shot emails back and forth with a young man getting started in his making/tinkering journey it occured to me that:
1.) someone else might benefit from the knowledge
2.) the above is pretty well a self-serving bit of preening on my part
3.) the real reason is to give myself an easily accessible log for things I've learned and subsequently forgotten

With that bit of confession out of the way...let's go!

We were talking about how to get started with the ESP8266 modules.  A wonderful little doohickey, complete arduino microcontroller WITH wifi on a single (cheap!!) module.  I'd done a presentation at Boise Code Camp on getting started with the things (https://github.com/adbacker/bcc2016 for code and notes) that started the whole thing off ....



RE: getting the things powered by a/c for long term sensoring...

*****************
[question]
I'm looking at getting a bunch of those HUZZAH's from Adafruit. How did you power them? I'm probably an idiot, but I'm not seeing a good way to hook it up to wall (120v) power. All the examples I'm seeing have it powered through the console cable... which is all well and good until you want it to be not hooked up to a computer.

Do you know of any pointers to doing this?


[reply]
To power it via household current, you'll need an ac/dc converter.  (aka ac adapter, ac converter, etc)

I've used ac adapters from old cell phone chargers and other dead electronic devices with good success.  Anything from 5v to 12v will do. (the voltage should be printed on it somewhere).   You know what I'm talking about ~ they look something like this: https://www.ebay.com/ulk/itm/151620955695

If you don't have a 20 year collection to pull from (as I do), thrift stores are great sources for minimal $.

The Huzzah has an onboard VRM (voltage regulator module) that'll step the wall wart's DC to the 3.3v it needs.  But it'll only handle a max of 12v to step down, so keep that in mind.

You could cut/solder the ends of the ac adapter directly to the huzzah(make sure you get pos/neg right!), but I'd recommend soldering something like this, and then plugging your ac adapter into it. https://www.ebay.com/ulk/itm/262198002613

Note that the female connectors above are for a 2.1mm plug ... this size is pretty common to 12v ac/dc adapters, so make sure your adapter plugs match!

According to the huzzah docs, they recommend soldering the battery connector with the positive to +vbatt and negative to ground.  Those would be where you would want to connect your power.

You probably already have, but if not be sure to read through the adafruit learning tutorials ... good stuff in there.

https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/pinouts

Let me know if you hit any more bumps.

No comments:

Post a Comment