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

Powering the pyboard

Post by PinkInk » Tue Jul 29, 2014 7:15 pm

A converse and/or related problem is; how to safely power the pyboard and an external load, from a single power source?

My current pet project is a self balancing uPy-bot (close, but no chocolate biscuit) ... seems to have been a good project to have (randomly) chosen from the learning perspective because I've had to grok (the hard way) the outer edges of the MCU's inner workings (result; botched pwm), physical-stuff (dcmotor's, power/torque, gears/friction) and 'beginners PID' ... the next challenge appears to be weight (as in top-heavy weight), more specifically; batteries, lots of 'em ... the usual google'ing hasn't yet brought up anything comprehensible on the subject of providing consistent power to an MCU whilst also feeding a highly variable and greedy load like a dcmotor ...

Moderator note: I split this off into a separate topic.

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 » Tue Jul 29, 2014 7:43 pm

So there was a recent discussion on this very topic on the HBRobotics mailing list. The URL seems to go to the end of the thread, so you should scroll back to the top and read the whole thing. Wayne gave a fairly detailed answer (about the 5th post down).

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 Jul 30, 2014 3:17 am

There was another question over here related to powering the pyboard, so I thought I would answer it here.

This was also discussed here

You can power your pyboard in one of 2 ways. You can use the USB connector, or you can use VIN.

VIN provides the power to the MCP1802 3.3v linear voltage regulator. The specs say that it works with voltages from about 3.5v to 10v. The 3.5v is 3.3v plus the 200mV dropout voltage.

I don't like pushing linear regulators because all of the excess voltage is converted to heat. So if you provide 9V, then 9V - 3.3V = 5.77V will be wasted in the form of heat. I'd probably try and keep the voltage to a max of about 7.5V, but the closer to 3.5V you can get, the better (especially if its battery powered).

User avatar
UltraBob
Posts: 43
Joined: Mon Jul 28, 2014 1:18 pm
Location: Zushi, Japan
Contact:

Re: Powering the pyboard

Post by UltraBob » Wed Jul 30, 2014 3:31 am

Gotcha, I think I had my wires crossed a little when I asked that question, but putting higher voltage in to vin won't result in higher voltages at the pins, it will just result in waste heat on this board, is that correct?

On the arduino apparently if you supply higher voltage via the dc jack, you can access it through the vin pin, which I think was the source of my confusion. There is no similar pass through on the micropython board?

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 Jul 30, 2014 3:44 am

UltraBob wrote:Gotcha, I think I had my wires crossed a little when I asked that question, but putting higher voltage in to vin won't result in higher voltages at the pins, it will just result in waste heat on this board, is that correct?
Yes. All of the pins conneced to the microprocessor will only go to 3.3v.
UltraBob wrote:On the arduino apparently if you supply higher voltage via the dc jack, you can access it through the vin pin, which I think was the source of my confusion. There is no similar pass through on the micropython board?
Well the similar pass through is that if you power the board though the USB connector, then you get the USB 5v on VIN. There is no DC input jack on the micropython board.

User avatar
UltraBob
Posts: 43
Joined: Mon Jul 28, 2014 1:18 pm
Location: Zushi, Japan
Contact:

Re: Powering the pyboard

Post by UltraBob » Wed Jul 30, 2014 3:49 am

All perfectly clear to me now, thanks!

PinkInk
Posts: 65
Joined: Tue Mar 11, 2014 3:42 pm

Re: Powering the pyboard

Post by PinkInk » Wed Jul 30, 2014 7:00 pm

Thanks for the referenced conversation chain, from which I understand - the jury is very much out on whether there will ever be a right or wrong way to power logic and actuators. Single power source appears to be beyond what I have available to me right now, so for my self-balancing bot I'll stick with separate supplies, try to minimise their size /weight (hardly matters if it only has enough juice for a couple of minutes balancing, if it can achieve it) and sling them as close to the axle as possible ... hmmm, I wonder wether 'under it' would be considered cheating ...

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

Re: Powering the pyboard

Post by JonHylands » Wed Jul 30, 2014 7:15 pm

For balance bots, you actually want the weight to be as high as possible - gives the bot much more time to respond if the weight is further from the axis of your wheels.

PinkInk
Posts: 65
Joined: Tue Mar 11, 2014 3:42 pm

Re: Powering the pyboard

Post by PinkInk » Thu Jul 31, 2014 3:43 am

Hmmm ... I have been struggling to get a motor response 'kick' (from the limited set of parts available to me) that is fast/hard enough to push back against the momentum from battery weight slung above axle ... slinging the battery beneath might balance the load leading to less momentum - the battery weight should be 'aiding' the push from the motor's rather than fighting it (which was why I suspect that it might be considered cheating)?

I was thinking of this sort of arrangement in order to maximise range of output from pyboards accel, and minimise required torque form motor;

Code: Select all

   pyboard
      |
      |
      |
      |
      | 
 |    |    |
 |----+----|
 | BB   BB |
My current basic bot responds in the right general kind of way, although I'm trying to refine it response with PID, but still needs training wheels ;o)

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 » Thu Jul 31, 2014 3:58 am

You really do want most of the weight at the top if you're going to do a real balancing not.

Take a baseball bat or a brooom and try balancing it with the weight at the top and the weight at the bottom.

Post Reply