Hi Luke,
On Wed, Nov 19, 2014 at 11:05:43PM +1100, Luke Weston wrote:
> It looks good. :)
Thanks. :)
> What are you planning with regards to the power supply?
> I would probably use either a 2S LiPo pack (7.4V nom.) or a 6-pack AA
> holder (9V nom.)
Yes, good suggestions. These options got discussed, and we also talked
about using a 5V "power bank" USB phone charger, as these are really
cheap.
The current plan is 6-pack AA.
The major downside others pointed out for the 2S pack is that you need
a specialised LiPo multicell charger, and not a lot of people have
those.
> It will be worth measuring the current consumption of the complete
> active hardware stack (Raspberry, plus WiFi, plus PiLeven, plus
> SimpleBot shield and motors running) to ensure that there's sufficient
> charge capacity for good user experience, i.e. not recharging it every
> 5 minutes.
Yes, I actually got a sample of the wifi adapter we want to use on
Monday so I ran a test that night running everything but the motors.
This was with cheap ALDI alkaline batteries because the other unknown
factor is actual alkaline battery capacity. A test program ran that
kept the wifi alive and polled the Firmata instance on the PiLeven,
which was also monitoring voltages. That setup ran for almost 8 hours,
there's a graph here:
http://i.imgur.com/EU0gxzS.png
(According to the PiLeven design the regulator should have cut out at
a slightly higher voltage than it did, about 5.8V, but it was a pretty
good result anyhow).
Current draw running that setup is a bit less than 330mA @ 5V. On the
input side I measured 250mA from 7.2V and 285mA from 6V.
The servos will add about 100mA (combined) when idling, 200mA when
driving and 500mA at stall. Because they're driven from the less
efficient linear 6V reg this might halve the battery life, but I think
close to 4 hours is still OK from Alkaline cells (should be longer
from NiMH rechargeables).
> It's probably worth putting a terminal block on the SimpleBot shield
> to connect the battery up to Vin. (add an appropriate protective fuse
> or PPTC in series, especially a good idea if high-energy-density
> batteries such as LiPos are used.) And add a power switch on board,
Good suggestion. We've gone with a DC jack into the PiLeven DC
In. Although (as you also pointed out) this is an extra construction
step, it has the advantage of being already polarity protected. I also
found some nice cheap screw-terminal-to-2.1mm adapters so we might use
those to save fiddly soldering.
A power switch is a bit interesting, because cutting the power
suddenly on Raspberry Pis has a habit of corrupting their SD
cards. Unplugging the battery pack should be a reasonable compromise,
and it's less inviting to just cut power on impulse.
> and/or power LED? If the SimpleBot Shield is on the top of the stack
> then it will be easiest to see/access those parts there rather than on
> a lower board. (The WS2812s can arguably function as a power LED, but
> it can be nice to know that the power supply is online without any
> dependence on the state of the microcontroller/software, for
> fault-finding purposes.)
The power LED on the B+ kind of sticks out on the end at the bottom,
so that's OK for that. It's always nice to have more LEDs though I
guess!
> I would probably replace the 7806 regulator with a low-dropout
> regulator, because an ordinary 7806 with relatively high dropout
> voltage won't work with a 7.2V-7.4V rechargeable battery pack (2S) and
> that seems like a good power option to support, avoiding the size/cost
> increase of going up to a 3S battery pack. The buck converter on the
> PiLeven will already be happy with 7V.
Good suggestion. The determining factors for the reg were cost and
(through)holiness.
I'm kind of hoping that even though dropout on a 7806 is typical 2V @
1A, it'll be a lot less at the ~250mA of useful current we care about. I haven't seen an actual graph for this though, so maybe it's a bad assumption - I wil test it.
If the dropout is no good, these look they might be OK as an
alternative (0.4V @ 500mA, about twice the cost)
http://www.digikey.com.au/product-detail/en/LF60ABV/497-7316-5-ND/1038562
If you know of any other throughhole 6V LDOs that are also cheap, it'd
be great to have alternatives. :)
> On the SBS board layout, can C5 and C6 be physically moved closer to
> the regulator? They seem to be a fair distance away and they don't
> need to be?
It's not apparent on the board layout, only on a "comment" layer in
Kicad, but the spacing there is for a TO-220 heatsink. I calculated
that at stall current the regulator will get pretty hot, and didn't
want someone driving their robot into a wall for 5 minutes and then
picking it up.
C5 & C6 are standard cheap bulk electrolytics (ie bad ESR) so any
extra impedance from long traces is probably a minor factor. The 6V
rail only drives servos so I didn't add any other bypassing. Maybe
this will prove to be a mistake, I don't know!
> It's a shame that the PiLeven doesn't have the full 40-pin GPIO header
> on it, and the identifier EEPROM (as per the Raspberry Pi HAT
> specification). That might have come in handy for smart
> identification/provisioning of the peripheral hardware connected to
> the Raspberry Pi. I wonder if it can be hacked up a bit by putting the
> EEPROM onto a little daughterboard with a 2-pin DuPont-style connector
> that plugs into the unused I2C ID EEPROM pins at the end of the
> Raspberry's IO header?
This could be done. It's a bit funny though, there's actually not a
whole lot that the I2C EEPROM can do for the PiLeven config. It can
setup the RTS GPIO pin, that we use for auto-reset, but there's a
bunch of other minor config that has to happen in Linux regardless
(disabling serial console, disabling getty) - and as far as I know
it's not possible to do anything in userland via the HAT config
EEPROM.
That said, the shorter header is really only because the PiLeven
design predated the B+ release by a few weeks. Probably something that
can be changed in a future revision.
> I would change C5 and C6 on the SBS to both be either 25V or 16V, both
> the same not one of each. This makes for better part sourcing
> logistics, cheaper and easier, and it's also easier for beginners
> assembling the kit when there's more commonality in the components, if
> they have to solder those ones themselves.
Good point. I planned to order them as identical 25V capacitors
anyhow, but I see it's confusing having different ratings on the
schematic.
> I'd like to consider the possible use case of connecting the SBS to a
> couple of external motor drivers for driving a pair of powerful DC
> motors on a bigger robot - so you'd probably have 4 signal lines plus
> ground - a TTL direction plus PWM signal, one pair for each motor
> driver, or perhaps a protocol such as I2C. But I think this is already
> covered, there are already plenty of spare 'hackable' I/O pins on the
> SBS, including I2C - but anyway it's something worth thinking about.
Yes, I reckon this would be a fun upgrade. :)
> Another possible modification/hacking use case I would be thinking
> about would be removing the Raspberry Pi to reduce cost - I'd maybe
> remove the Raspberry Pi, remove the PiLeven, replace the PiLeven with
> an Eleven or similar Uno-compatible, and then I'd be looking at using
> spare digital pins on the Arduino (D0/D1 UART, or SPI or something) to
> talk to a wireless communications link - another module that could
> communicate over Bluetooth, Bluetooth Low Energy, 802.11 or 802.15.4
> etc, which could potentially reduce cost and power consumption (if
> 802.11 used) compared to the Raspberry Pi plus Pi WiFi module - or in
> the case of Bluetooth LE you're adding an extra form of connectivity
> potential that you don't already have, as well as reducing cost and
> power. (Well, I suppose you could add a USB dongle to the Raspberry
> based system to add Bluetooth if you wanted to.) To accommodate this I
> would consider adding a 4-pin breakout header on the SBS that has 5V,
> ground and D0/D1.
Andy made this suggestion as well actually, he pointed as there's no
reason the Shield itself can't be used as you describe - similar to
the earlier SimpleBot revisions.
The catch is that when it's used on the PiLeven D0/D1 are taken and
not really available for other uses unless you cut jumpers on the
PiLeven itself and reorder things. So there's a tradeoff there.
In the end we settled on the 4 pin header that you see on the side of
the shield, with two data pins that can be used for software serial.
(To give the other side, the appeal of the Pi on there is people can
explore high level languages and high level processing stuff. I'm
hoping to have some image processing examples and encourage people to
bring webcams from home, so they can add higher level interaction
stuff).
Thanks for all this input, much appreciate the thoughtful feedback. :)
Angus