Powering the pyboard

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
PinkInk
Posts: 65
Joined: Tue Mar 11, 2014 3:42 pm

Re: Powering the pyboard

Post by PinkInk » Thu Jul 31, 2014 4:15 am

OK, I'll take your word for it - physics, electronics and programming are not my strong points ;)

User avatar
kamikaze
Posts: 154
Joined: Tue Aug 16, 2016 10:10 am
Location: Latvia
Contact:

Re: Powering the pyboard

Post by kamikaze » Mon Oct 31, 2016 7:38 am

Hi. It looks that my CAN bus project (based on PyBoard) is going to be powered from OBD2 port or any other way that will be possible to connect to in car (which has 12V). So here are some questions:

1) Which voltage regulator is better to use (12V -> 3.3V, but I have heard that in car it can jump from ~7V to ~15V)?
2) What max. current PyBoard is able to handle before it dies?
3) Which pin should I connect my "regulated" power to? V+ or VBAT? :roll:

Not an electrician guy, sorry )

Actually I'm thinking about this one

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Powering the pyboard

Post by pythoncoder » Tue Nov 01, 2016 6:33 am

@PinkInk Re self balancing robots you might like to look at this thread http://forum.micropython.org/viewtopic. ... =balancing. There are a few of us who have built these, including my effort at the bottom of page 3. A brief tl;dr summary:
  • You need a gyroscope and an accelerometer. The readings can be combined using Kalman filtering or by complementary filters. The latter is simpler and works well.
  • You need a grasp of PID controllers. These are easy to implement but you do need to understand the basic concepts.
  • As others have said, keep the mass high. Mine has a 12V lead acid gel battery at the top!
  • It is vital to mechanically isolate the gyro/accelerometer from vibration. My first attempt had to be completely redesigned because I hadn't appreciated the level of vibration (+- 2G).
Mine works but I keep intending to revisit it to see if I can make it "hunt" less when at a standstill. The best solutions can stand almost stock-still.
Peter Hinch
Index to my micropython libraries.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Powering the pyboard

Post by Roberthh » Tue Nov 01, 2016 8:20 am

@kamikaze. Just a few comment about powering Pyboard:
- you may either use VBAT or V+. VBAT ends up at V+, so use V+. DO NOT USE Vbackup!
- at V+ or VBAT at least 3.6 V must be supplied.
- the internal regulator of PyBoard is always active. I can handle 250 mA at a maximum of about 1 W power dissaption, which is (V+ - 3.3)/current. That means, the higher the input voltage, the lower the current you can draw. At 12V, 250 mA, the power is 2.18 W, at which point the regulator will overheat and break. That's why Dave suggested to power PyBoard with 5V and use an external regulator.
- Setting up a switching regulator by yourself is tricky. Better buy one of the prebuild 5v regulator modules like the pololu devices, or simply use a linear regulator like LM7805 or the like, if power efficiency is not the matter.

User avatar
JonHylands
Posts: 69
Joined: Sun Dec 29, 2013 1:33 am

Re: Powering the pyboard

Post by JonHylands » Tue Nov 01, 2016 11:36 am

I've used this switching regulator to get 12 volts down to 5 volts for my custom pyboards:

https://www.pololu.com/product/2119

That regulator could also be powered from a 2 cell or even a 1-cell lipo if needed, since it can both switch up and switch down.

- Jon

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Powering the pyboard

Post by Roberthh » Tue Nov 01, 2016 2:12 pm

Better use this one: https://www.pololu.com/product/2121 or this one: https://www.pololu.com/product/2843
since the input voltage in a 12 V car can exceed 11.8 V. When the engine runs, you'll typically see about 14V.

User avatar
JonHylands
Posts: 69
Joined: Sun Dec 29, 2013 1:33 am

Re: Powering the pyboard

Post by JonHylands » Tue Nov 01, 2016 2:19 pm

Actually, you're right - I only use that regulator with a 1s or 2s lipo, so max of about 8.4 volts in.

- Jon

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Powering the pyboard

Post by dhylands » Wed Nov 02, 2016 2:04 am

Just a warning.

On the early pyboards, VBAT is the backup battery for the RTC. On the newer boards, VBAT is for powering the pyboard using a battery and the RTC battery is called Vbackup.

User avatar
kamikaze
Posts: 154
Joined: Tue Aug 16, 2016 10:10 am
Location: Latvia
Contact:

Re: Powering the pyboard

Post by kamikaze » Wed Nov 02, 2016 4:03 pm

From main page:
On-board 3.3V LDO voltage regulator, capable of supplying up to 250mA, input voltage range 3.6V to 16V
Does it mean that I should step-down voltage to 3.6V because 3.3V is not enough?

User avatar
JonHylands
Posts: 69
Joined: Sun Dec 29, 2013 1:33 am

Re: Powering the pyboard

Post by JonHylands » Wed Nov 02, 2016 4:49 pm

kamikaze wrote: Does it mean that I should step-down voltage to 3.6V because 3.3V is not enough?
3.3 volts definitely isn't enough - you have to provide 3.6 volts as an absolute minimum, but realistically you're better off providing 5 volts, just like it would get if it is plugged into USB.

- Jon

Post Reply