Announce: Book: Assimilating the Raspberry Pi

I am pleased to announce a new in-depth book about the Raspberry Pi:
Assimilating the Raspberry Pi,
by Warren Gay.
(
formatting link
)
This book is targeted at the college level student or hobbyist, who is interested
in Raspberry Pi reference material and builds electronic interfaces. This book is
suitable for those who are familiar with the Pi and seeking more
advanced treatment.
The first half of the book is a comprehensive reference, saving you time.
Not only is the hardware referenced but the Raspbian Linux APIs to access
the hardware and drivers are covered.
The last half of the book covers interfacing projects, involving hardware and
software. The projects included are:
- Battery operation using an LM7805 regulator
- Battery operation using a DC-DC Buck Converter
- Designing your own one transistor power driver
- 1-Wire DS18B20 temperature sensor
- SPI Bus tester
- DHT11 temperature and humidity sensor
- MCP23017 I2C GPIO extender
- Nunchuk mouse for X11 Window desktop
- DS1307 I2C Real Time Clock
- VS1838BB IR Remote Control Receiver
- ULN2003A unipolar stepper motor driver
- L298 H-Bridge bipolar stepper motor driver
- CD4013 button/switch debounce with Remote Console software
- Hardware and Software PWM generation (CPU utilization on analog meter)
All project parts and preassembled PCBs can be individually purchased from eBay, for
less than $6.
The software is written in the C programming language, using a "bare metal"
approach to Raspbian Linux APIs and drivers. No special software packages
or hardware adapters are required. The source code is available from github and
is public domain licensed. The free software is available using the following
Linux command:
$ git clone git://github.com/ve3wwg/raspberry_pi.git
There is an extensive amount of researched material found in the reference
section, some of which is hard to find. No serious electronics hobbyist should
be without this hardcover book.
The book can be previewed and is available from:
formatting link

Thanks, Warren.
Reply to
Warren Gay
Loading thread data ...
Sounds very good.
It might be interesting to use a DC - DC *boost* converter to convert the output from a single 10 ampere-hour D cell to 5v. for a Pi.
--
Windmill, TiltNot@Nonetel.com               Use  t m i l l 
J.R.R. Tolkien:-                                   @ O n e t e l . c o m 
 Click to see the full signature
Reply to
Windmill
..
..
Indeed but I didn't want to take all the fun out of it. Seriously though, the challenge is mostly finding a reasonably priced solution that will accept enough input current, to end up with 2 Amps output at 5 V. To end up with 2A @ 5V, you need about 7 A minimum from 1.5V. If you add about 70% conversion efficiency it gets worse (10A as you say, should cover it).
The challenge though (as student/hobbyist or ham) is finding a cheap solution :)
I didn't check extensively but there are some boost converters available on ebay. Many of the cheaper ones however, do not deliver 2A or better on the 5V output.
Apart from the input requirements, there is otherwise no difference in application between boost/buck. You put current @ voltage in, and get current @ 5V out. They are amazing little things.
Warren.
Reply to
Warren Gay
It will be more than interesting. If the battery power option forces the need to add the extra complication of voltage regulation (preferably of the switching type to eliminate the losses in an analogue "Electronic Dropper Resistor" regulator), one might as well use the opportunity to eliminate the "battery" in favour of a single cell power source.
A single large cell of the same mass as a battery of smaller cells offers a slightly higher watt hour density which mitigates the greater losses inherent in low voltage power converters due to the volt drop in the switching elements representing a higher percentage of the primary supply source voltage.
Even when the converter losses reduce the utility of a single cell to 80% of that of a 4 cell battery of 90% the WH capacity of the single cell, it's still the better solution since the larger cells are cheaper per WH of capacity (particularly true in the case of primary cell technology) plus, you eliminate the risk of throwing away three quarters of a battery pack that may still have 80% capacity just for the sake of that single cell in the pack that has dropped to less than 50%, rendering the whole pack unservicable.
This discussion of the merits of a single cell over a multicell battery solution for powering portable devices appeared in a Wireless World magazine article some 40 years ago. In this discussion, the 'battery' technology was NiCd based.
These days, one might expect the discussion to be about NiMH (and, of course, the "No-Brainer" Lithium based technology). Sadly, googling fails to find any such discussion material other than for Lithium and none regarding primary cell technology.
--
Regards, J B Good
Reply to
Johny B Good
well to a theorist, yes. In practice it ain't that simple.
even with a switching amplifier, there will be typically 100-1000mV drop across the chopper and if you only have a 2v cell to play with that's 5-50% power loss right there,
Likewise in high power situations the ability to cool battery packs by blowing air between the cells is handy.
Its a bit like saying 'let's have a single cylinder car engine'. In practice for various odd reasons its optimal to have cylinders of no more than 500cc each Which means a 2 litre 4cyl or a 3 litre 6 cyl. or a 4 litre 8 cyl. and so on.
Even when the converter losses
First of all converter efficiencies can be a lot worse than that, and low voltage/high current circuitry needs massively bigger busbars. lets take 120 watts and a 12v car battery, Current is a handy manageable ten amps and lets say a given cross section of wire to it drops half a volt. So total loss is 5W in the wire. Or about 4%. its .05 ohms
Now look at 2V and 60 amps. That's getting on for SERIOUS wire. If THAT drops half a volt its 30 watts or 25% of the power being drawn. TO get back to just 5 watts loss or 0.00139 ohms
So you connection wires are MASSIVELY bigger heavier and more expensive. So too does your switching device.
AS with car engines, there is a broad range of 'optimal' supply voltage ranges for semiconductors which broadly fall between 5v and 250v, with the lower ends being handy for low power use, and the higher ones being more ideal at higher power, to keep conductor and semiconductor dimensions down.
This discussion of the merits of a single
That is because probably the original article was one dimensional and therefore flawed. It focussed on the positive aspects and ignored many serious negative impacts, as many third rate academic papers do,.
As a designer of power circuitry for many years, I know what the problems of using too low a voltage are ...I am happy to run logic off two to three volts, but its near the limits for anything else.
--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
 Click to see the full signature
Reply to
The Natural Philosopher
Published by Borg Galactic Publishing?
I'll get my coat.....
--
Tciao for Now! 

John.
Reply to
John Williamson
Lithium's an awkward choice, the core of the pi wants 3.3V
The usb and the ethenet want 5V-ish. (anything 4.5 to 5.5 is acceptable)
Sure you can run it all off 5V (-ish) but that's ineffificent
Li-po voltage is 3-4.2V depending on charge level so you need a switcher that can go up or down (eg. SEPIC)
--
?? 100% natural
Reply to
Jasen Betts
I never claimed it was simple.
Even back in the day, for the modest power levels being considered (circa 1 or 2 watts), converter technology was achieving efficiencies in the range of 70 to 90% from a 1.2v source for output voltages in the range 5 to 12 volts.
That implies very high power discharge rates of greater than 2C which is contrary to the whole idea of providing a battery powered solution that minimises the running costs of a portable self powered device (eg DAB radio, digital camera/camcorder, wildlife photo trap, Geiger counter or whatever similar gadget you need to provide a self contained battery powered solution for).
The classic example of just such a solution exists in today's mobile phones (cellular phone) with their single cell 3.7v lithium "battery pack".
If you want the best fuel economy, a single cylinder petrol (gasoline) or diesel engine will be the best solution (provided you can accept the lower HP per liter limitation this introduces).
Not really a very good example of your argument against reducing the cell count in a battery down to an ideal of one. Although you seem to be using a reductio ad absurdum argument, I'm afraid the MoBo makers CPU power solution where switching technology provides even lower voltage supply at even higher currents (typically 1.2v at 60 to 80 amps or more) removes the 'absurdem' element.
Admittedly, this conversion is in the opposite direction to that proposed by the single cell power solution, but it does demonstrate that the converter and 'cabling' losses for circa 100W loads can be kept to a suitably low level.
I'll concede that, as far as high power applications are concerned, you have a point regarding battery cooling. However, even this issue can be addressed by the "Battery" manufacturers prepared to jump on the bandwagon of "Single Cell" technology (only worthwhile for Lithium battery technology designed for high powered devices such as Note Books and the like).
The massively bigger and heavier wires will be very short, just long enough to link the battery to the converter so won't be a major expense. As for the converter components, well, the MoBo makers have been demonstrating the technology for the best part of a decade.
AFAIR, the negative aspects _were_ discussed but even way back then, there was still a good argument for the single cell solution for low power portable gadgets and the compromise 2 cell solution for higher power devices where the 2 cell count considerably eased the 'Battery Management' issues somewhat (to the point that the low voltage disconnect level based on the 1volt per cell exhaustion point would, by itself, protect the 2 cell battery against the reverse charge hazard (keep in mind that they were discussing NiCd cells).
Try telling that to Intel, AMD and the MoBo makers.
--
Regards, J B Good
Reply to
Johny B Good
After quite a lot of googling for material relating to single cell (NiMH and Lithium) 3.3v converters, I came across this article:

Annoyingly, not only everyone else but also this chap seems to have a fixation on AA and AAA cell sizes for the primary power source rather than the much more obvious 'Best Bang for Your Buck" C and D cell sizes... Doh! Talk about completely missing the whole point of the exercise!
I have to admit, I failed to find any references to 10W and higher output single cell (1.2v) 3.3 and 5 volt converters so it seems the lessons learned by the MoBo makers have not yet been applied to the question of reducing the cost of primary battery power for portable gadgets with power consumption in the 3 to 10 watt range.
I was looking at the list of battery sizes on wikipedia:

to get a handle on relative cell sizes and their correspong nominal AH capacities and noted that the time travelling tourist would still be able to buy AA sized carbon zinc batteries for his digital camera as far back as 1907 (if his camera used D cells, he could go back as far as 1898 when that size was first introduced).
A quick look at pricing on alkaline cells suggests that the C cell offers over twice as much energy for the same price whilst the D cell size offers about a six fold improvement over the AA cell cost/benefit ratio.
That fact alone should be enough incentive for the manufacturers of portable electronic equipment to replace 4 cell battery power options with a single larger cell (and likewise 6 and 8 cell batteries with 2 cell solutions) to offer their customers an enticing inducement to choose their product over that of their rivals who still persist in the ancient practice of regarding the battery compartment as an afterthought.
As for the use of lithium battery technology, it's always nice to know that the equipment itself doesn't have to second guess the state of the indivual cells when it can know about the one and only cell via the one pair of terminals essential for connecting to the equipment's power rail.
Also, there's less liklihood of "Wailing and Gnashing of Teeth" when the battery fails leaving you wondering how many of the cells being thrown away in the battery pack are still perfectly servicable but for that one cell that failed prematurely. You can at least have the consolation, with a single cell 'battery pack', that it's _all_ of the cells that are bad when it come time to buy a replacement.
--
Regards, J B Good
Reply to
Johny B Good
[.............]
That's clearly true, but devices change. I've seen 'on' resistance specs for low voltage power FETs which were amazingly low and which could probably beat any junction transistor in terms of losses. And you could always parallel two or three to get still lower IR losses.
Getting a large enough voltage for gate drive would be a challenge, but maybe that could be obtained from lower power JFETs or junction transistors feeding a step-up transformer.
Maybe it would be better just to use a low frequency inverter/transformer arrangement, feeding a regulator, rather than a switching supply with a difficult-to-design feedback loop. Depending on how the losses worked out.
I'm interested by the possibilities (without any real intention to attempt construction).
Sometimes the ability to use just one cell gives space savings, as in one of the (very low power) LED torches I got from CPC which runs on a single AA cell, rechargeable or alkaline, even though its blue-white LEDs must need about 3V.
An RPi run off a single D cell might be similarly compact.
--
Windmill,                                        Use  m a i l 
TiltNot@adsl.adsl.co.co                                 @ r m i l l 
 Click to see the full signature
Reply to
Windmill
MAXIM have a rather large range of switch-mode single chip voltage converters and at least one will handle 1.5v conversion to 5V at 4A out and with a single unit price of a bit under $5.
The data sheet says it dissipates up to 1.9 watts max, so for an output of 4A at 5v, that looks like its around 90% efficient.
What did I miss?
--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
 Click to see the full signature
Reply to
Martin Gregorie
The requirement for a 15 A @ 1.5v power source?
Added a decimal point between the 1 and 5?
B-)
--
Cheers 
Dave.
Reply to
Dave Liquorice
Or, for a Pi, a little over 7A for 5v @ 2A--well within D cell range. Even better if less than an amp is required.
It's not that hard...
-michael - NadaNet 3.1 and AppleCrate II:
formatting link
Reply to
Michael J. Mahon
Funny isn't it. When you think 1A at 5v, it doesn't sound so much but when you start calling numbers like 7A that sounds like a lot.
--
Stuart Winsor 

Midlands RISC OS and Raspberry pi show, 13th July 2013 
 Click to see the full signature
Reply to
Stuart
Yep, and that's under the 1C rate for zinc-carbon chemistry. Use an alkaline and you could get 4A at 5v, should you need it, and still not suck more than 1C out of it.
Indeed.
--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
 Click to see the full signature
Reply to
Martin Gregorie
range.
For how long? How much below 1.5 V with the convertor go before it stops?
I think you'd be pushing to get more than a few hours for a normal Pi and a good single, alakline, D cell. Don't forget to take into acount volt drop in all the wiring/connections from battery to convertor, the volt drop across the internal resistance of the battery and the discharge curve because you are pulling a reasonable current and the chemistry can't keep up.
If the discharge curve has the level "flat" section at around 1.3 V for 7 A and the convertor cuts off at 1.2 V that means the total loop resistance of the wiring/connections can't be higher than 0.1 / 7 = 0.015 ohms. You need something a bit more substantial than hook up wire... B-)
--
Cheers 
Dave.
Reply to
Dave Liquorice
The Maxim unit drops out at 0.7v
If we assume the Pi's steady state draw is 0.5A and the converter is 80% efficient (close enough for Government work), the RPi is pulling 2500 mAh, which, with the converter efficiency requires to 3125 mAh from the battery. Wikipedia thinks an alkaline D cell is good for between 12000 and 18000 mAh, so lets average that at 15000 mAh.
This would suggest an RPi might get 4.8 hours operation from a fresh D cell.
at 500mA into the RPi and, say, 0.8mm copper wires the voltage drop there is negligible. With converter losses that needs about 2.1A out of the battery. Lets assume minimum length wiring between the D cell (assume the D cell is in a 1-cell holder with the converter mounted on its side, i.e. about 40mm of wire on each pole, and use 1mm or 1.5mm copper since it doesn't need to flex. Hey, it seems the voltage drop here will also be minute. Wiring loss will almost certainly be less than that due to the battery holder contact resistance.
Alkaline D-cells have an IR or 0.15 - 0.3 ohms, so the voltage drop will be about 0.48v - IOW the converter will be happy, but the power used warming up the battery will be around 1 watt against the 2.5 watts being eaten by the RPi and the estimated 0.5 watts needed by the converter.
IOW once battery IR is included, the run time comes down by 75% to around 3.6 hours.
If I was going to do this I'd get the chip, assemble the PSU, plug in an RPi and measure the run time. Next steps would depend on how that matched the run time requirements, but note that if the setup was to be used in a high altitude balloon, 3.6 hrs might just about do the job and that watt 'wasted' warming up the battery might be useful to keep the electronics from freezing.
--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
 Click to see the full signature
Reply to
Martin Gregorie
These days, more likely a charge pump converter built into the module (they were doing this almost 4 decades back in the 16pin 64K bit dram chips as part of the strategy to gain an extra 2 address pins without increasing the pin count beyond that of the 4K bit dram chips.
The repurposed pins were the negative bias pin (made redundent by said charge pump cct) and the combining of the two unidirectional data out and data in pins into a single bi-directional data in/out pin.
Admittedly, the load on the internal negative bias rail was virtually nothing so the capacitor could be fabricated on the silicon die itself. The larger value of capacitor needed for a gate drive rail can be realised with a very small smd chip capacitor in a cct running at several MHz.
For a homebrewed solution, there is some merit to that idea, especially if you choose a buck switching regulator over an 'analogue' regulator chip (just an 'active dropper resistor' when all's said and done).
In which case, just consider the boost switching solution alone if you've no intention of getting 'down and dirty' with the nuts and bolts of a homebrewed solution.
That's making use of a boost type 'electronic ballast' cct to drive the LED rather than a simple dropper resistor in a 3 cell cct. The first thing I check when looking at any LED torch is to count the cells required to power it. I discount all 3 cell types out of hand, only 1 and 2 cell designs being good enough to make them worthy of further consideration since the design is forced to use a proper 'electronic ballast' cct which offers not only better battery life but also a constant light output over the useful life of the 'battery'.
The one major drawback of the single cell solution is it's susceptability to battery contact resistance issues. Even the primitive 3 cell/dropper resistor cct exhibits this defect whereby the light output can suddenly dim quite considerably (usually responding to a light to heavy tap against the side of the torch which will restore the ouput back to 'normal').
Attention to detail in the battery compartment's design to address this problem when using such user changable cylindrical cells is of vital importance (the use of much stronger springs and materials such as gold plated contacts being the two most obvious ones).
The use of cells with screw or push fit spade terminals can obviate this issue but if we want to be able to use (relatively) cheap and widely available "Torch" battery cells such as AA, C and D cells, a well designed battery compartment is a must.
--
Regards, J B Good
Reply to
Johny B Good
You mean aside from the 15A draw on the 1.5v cell (as pointed out by others)? Well, possibly the fact that there are additional losses in the inductor and other add in components (assuming my googling led me to the chip in question - could you provide a link or a part number please?).
In the particular case of powering a RPi, we're probably only considering 1A at 5v (assuming less than 300mA for usb gadgets) so a more reasonable 4A draw from the cell. Even at this level of current draw, battery contact resistance has to be maintained at the lowest possible level. The negative impedance characteristic of a switching regulator aggravates this issue somewhat to say the least.
--
Regards, J B Good
Reply to
Johny B Good
"Johny B Good" wrote in message news: snipped-for-privacy@4ax.com...
Here's one that might do the job. If I've read it right.
formatting link

Bill Garber
formatting link

Reply to
Bill Garber

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.