Powering your equipment

Computers need reliable power. Reliable power is especially important for the computers used to host RACHEL because these computers need to supply and collect information from many users at the same time. If the power fails, or just dips or spikes while information is being collected and before it is safely saved, the information being collected can be corrupted losing that information and even making it difficult or impossible to restart RACHEL or reload the database with the information when the power is good.

All computers, especially computers that do not have internal batteries can have their files corrupted by bad power. File corruption caused by bad power are more common a RACHEL Server is collecting information such as the answers supplied by students for question is some of the teaching material such a the Khan Academy math lessons in KA-Lite.

Bad power or power failure can cause problems even with the parts of RACHEL that only supply information and to do not collect or change the information on the hard drive or SD Card. Even computers that are used by just one person at a time can have their files corrupted by bad power. The reason for this is that most computer operating systems open files while they are working and need to close these files when they stop working and erase small files were made only for temporary use. See these sections on shutting down RACHEL for examples of what is required before disconnecting the power from a computer acting as a RACHEL server.

Some computers, especially laptop computer, tablets, and smartphones, have their own battery to supply power when they are disconnected from external power supplies. This internal battery power makes laptops and tablets good for traveling and for areas with unreliable power. Laptops and powerful tablets can be a good computer for a RACHEL server in areas with unreliable power because they can be programmed shut down properly when the battery is about to run out of power.

In the spring of 2015 World Possible started selling a RACHEL Pi server with a built-in battery and a control board for areas with unreliable power: The RACHEL Pi 2 Remote Deployment Pack. See the World Possible Store at: http://world-possible.myshopify.com/ There is only a small battery in the RACHEL Pi 2 Remote Deployment Pack. This small battery can only supply enough power for about 10 minutes of operation. The system then shuts down automatically in a careful process that takes about 3 minutes. Therefore, this server should have an external source of power that only has only a few outages that are longer than 10 minutes. If power outages are going to be longer than 10 minutes and large car battery or solar battery charged with solar panels or wtih AC power from the electric company or a generator should be added, not to protect the server, but to provide reliable service to users. Of course, if all of the users are dependent upon AC power from the electric company or the power company to run their computers, then there is not benefit of have a large battery for the server. However, many users now often use laptops or tablets so having a server with a reliable power source will enable them to keep working.

With poor quality that could potentially cause damage to the contents of the computer or even the computer itself it is possible to filter, or condition, the power so the quality is improved. This conditioning is especially good for protecting the computer hardware and also for protecting the software from short dips or surges.

An external battery can be added to most computers to enable them to have a reservoir of power to protect both the software and the hardware. To be sure to protect the software the computer needs to be shutdown before the power in this reservoir is used up. If the power to a computer dies or is turned off before it is shutdown, most of the times the problems with the files will be so small, the computer will start without any visible problems when it is turned on. However, just because this appears to be OK, the problems when they occur can be very difficult to correct, especially if back up copies of the software for the operating system are not available.

Often the external battery is combined with power conditioning which can help increase the reliability of the computer.

When the computer consumes power, that power leaves the battery. Eventually the battery will run out of power. When the battery runs out of power it can no longer power the computer. If nothing else happens the computer will stop, sometimes abruptly. It’s wise and prudent to shutdown a computer before all the power has been used up. Some computers are programmed to do this automatically, others may need us to tell them to shutdown by using commands. Commands are covered in another chapter of this book.

Some batteries can be recharged while they are providing power, others are limited to either being charged or providing power. Generally we prefer using batteries that can be recharged while being used, otherwise our computer will not be available when the battery is being charged.

Power for low cost computers and Android Tablets

Most of our projects use computers powered using USB connections. USB power is 5 volts DC. Therefore much of our work and equipment focuses on USB power. This includes the solar panels, batteries, and power adapters/chargers.

USB power

USB was originally designed to enable computers to interact with peripheral devices, including keyboards, mice, network adapters, and storage. Many of these devices needed power to be provided, so the USB standard allowed these devices to use up to 500 milli-Amps (mA) of power at 5 volts, a total of 2.5 watts (watts are a common measure of power).

As devices became more sophisticated some of them needed more power than the original USB standard permitted. Some manufacturers devised their own custom solutions, eventually the industry established standards that allowed devices to communicate with the provider of USB power to negotiate more power for that device.

The devices and the power provider both need to use a common protocol to communicate effectively. Otherwise the power provider should limit the power to protect itself and the device that is asking for power. Miscommunications between the device and the power can cause problems for us, devices may not work properly when they don’t have enough power. Poor quality power supplies may overheat, short-circuit or fail.

How batteries work

Batteries use chemical reactions to store power and to provide power. The chemical reactions generate heat, and too much heat may be dangerous to us and to the battery. Over time and as batteries are used they lose their potency. Eventually a battery may become so work out that we cannot usefully use it any more. Old batteries can be recycled which protects our environment.

Batteries have a defined capacity, measured in milli-Amp hours (mAh). They may have a limit on how much power they can provide at any one time. This may affect us if our computer(s) need more power that the battery is able to safely provide, so we try to design our systems so the battery is able to provide more power than whatever is connected to it. The actual capacity of a battery decreases as it loses its potency. Often the decrease also affects how the power is delivered, where a battery suddenly becomes exhausted. We may need to account and allow for this behaviour when designing and implementing a e-learning system, otherwise a system that initially works and serves the users well may start to fail, perhaps in a few months time. Once a system starts failing and becoming unreliable it’s much less useful for the users who may become frustrated and stop using the system.

Continuous batteries vs. offline while charging

Some USB battery packs are able to be charged while they continue to provide power to devices connected to them. Other batteries stop providing power while they’re being recharged. For most situations the difference is not important, however when the battery is used to power a Raspberry Pi (or other similar single board computer) the difference has a major effect. With the continuous batteries the computer continues to run regardless of whether the battery is being charged or not (unless the battery becomes exhausted i.e. it’s been fully dischaged). With the other batteries, the computer stops as it has no power when the battery is being charged.

If the offline-charging batteries have enough power to support whatever is connected for as long as we need that computer to run, then we may have an overall system that’s acceptable - provided the computer is shutdown safely (to protect the contents of the system on that computer). We could potentially devise an overall system where we have several batteries, one in use and the others either charged or being charged. Then the computer is shutdown, for example at the end of the school day, and the battery replaced with one that’s been fully charged, and the previous battery can then be charged offline.

I don’t know why some batteries work as online batteries, and others only as offline batteries. Perhaps the online models have more sophisticated charging electronic circuits.

We can test and measure the behaviours of various batteries in order to buy the most suitable and available models, and so we can design viable e-learning systems. We have found that the behaviours of batteries vary significantly. Some models from the same brand may work as online-batteries, but others work as offline batteries.

How to test whether batteries support online charging

All batteries appear to support offline charging (otherwise they’re unlikely to be effective as batteries!). Only some work as online batteries. A simple way to test is to connect something that draws significant power, at least 500 milli-watts, which indicates that it’s working - for instance a bright LED light - then connect power to the battery. If the light dims, flickers, or extinguishes then the battery is not suitable for online use. This test isn’t quite sufficient as computers may be more sensitive to power problems, so batteries that pass the simple test can then be tested again with a Raspberry Pi connected. Connect something to the computer (either a display or a network connection) and make sure the computer is running OK. Then try a similar test, connect and then disconnect the charging power to the battery. If the computer continues running than we have a battery that may work acceptably in online mode. We’ll only really know whether it’s acceptable through longer term testing or use (which is a form of testing in practice).

Charging and recharging

Batteries are designed and specified for a number of recharge ‘cycles’; for instance I recently bought 2 USB batteries who promise 500 recharge cycles - they should continue working for at least 500 discharges and recharges. Where practical we may want to design our systems so we reduce the number of charge cycles, some computers are designed to do this automatically, however for Raspberry Pi’s, recharging USB batteries, and other low-cost small computers we may need to devise a system that does this instead.

There are several ways we can design these systems. For instance we could have several batteries where we use one until it is almost fully discharged, then unplugged from whatever it’s powering and then recharged fully, perhaps using a solar panel or a power adapter/charger.

Solar Panels

In the last few years solar panels have become available for USB power. The panels seldom meet the claims in terms of how much power they provide, and the power may not be suitable to power a computer directly, so we need to test the behavour of the panels and design systems so they provide suitable ‘clean’ power for the computers.

The power output varies based on the position of the panel relative to the sun. If we install the panel, for instance on a roof, we need to consider and test various locations and angles of the panel so that we can harness as much of the solar power as practical. Measurement tools can help us to do so.

Power adapters/chargers

There are various words used to describe the USB power adapters or chargers. In essence these devices consume mains voltage power (often around 230 volts AC) and convert that power to 5 volts DC suitable for USB-powered devices such as Android Tablets and small computers such as the Raspberry Pi.

Each charger has particular characteristics in terms of the quality and amount of power they provide, particularly when the quality of the mains voltage varies, such as during overloading of the power grid, brown-outs, etc. It’s unwise to assume that we can use any or every power adapter for our projects, poor quality chargers may cause problems for the services provided and even cause the computers to fail. In some countries there are lots of fake branded equipment, including USB chargers that claim to be from top brand companies such as Apple or Samsung. We need, therefore to choose wisely. Testing the bahaviour of chargers may help us decide which ones are going to work well for our project, context and situation.

Measuring power

Low cost power meters are available for USB. We can use these meters to measure power flowing through a USB cable. This means we can measure power provided from a solar panel, battery, or USB charger. DC power is measured in Volts and (milli-) Amps. The meters may not be 100% accurate, however once we have a good idea of how inaccurate a meter is we can use it to provide representative or comparative readings. I travel with at least one USB power meter so I can easily measure the power at various points in a system. Be careful as the power meter often needs to be connected ‘inline’, between the source and the consumer of the power. Connecting and disconnecting the power meter disrupts the power to the consumer and if that’s a computer it may stop working, and potentially fail.

Power engineering

Power engineering enables us to understand how devices use power, the impacts power use has on the availability and viability of the system, and ways to implement more efficient and effective systems.

Duty cycles

Duty cycles measure or assess how long a device can be in-use compared to when it needs to be idle. Some things are always in use, until they expire. Others are used for a period then idle (or turned off). For our purposes duty cycles help us assess how long particular computers or devices can be used uninterrupted, without needing to be retired or turned off.

For Android Tablets, if we can’t charge them while they are being used, then the duty cycle will be quite low, as often tablets take longer to charge than how long they can be used without interruption. For instance, the Google Nexus 7 can be used in a classroom on battery power for several hours, before it then needs to be recharged. The charging often happens away from the classroom, perhaps in a separate office, and may take the rest of the day to complete (especially if there are many devices and few sources of charging).

  • One way to siginficantly increase the duty cycle of the tablets is to provide charging facilities to the device, for instance using USB chargers in the classroom.

For Raspberry Pi computers, if they rely on using a battery then their duty depends on whether the battery can be charged while it’s being used to power the Pi. If so, the duty cycle can be extended significantly, potentially to many months if the power is sufficiently available. (Outages of say an hour or so wouldn’t have a significant event provided the battery has enough capacity to keep the device running for at least that period.)

Power consumption

The more power a device uses, the more it needs - that should be obvious. Therefore it’s worth spending some time seeking and selecting devices that use less power, provided they meet other criteria such as quality, price, etc.

Sometimes we can reduce the power consumption, for instance by reducing the brightness of the screen of an Android tablet in the Settings application. When we are able to reduce the power consumption, the device can be used for longer and may therefore be more useful in terms of learning and teaching, etc.

With Raspberry Pi’s the main factor is likely to be the choice of model, for instance the Model A’s use significantly less power than the Model B’s - however the reduction comes at a price in terms of performance and capabilities. It’s also possible to tweak the configuration of the software to reduce power, however it’s a relatively specialist topic outside the scope of this book currently.

Efficiency

When a computer is on it uses power, as you probably well know. Some of the power generates heat. That heat is not useful (unless you’re cold) instead it means we need more power to keep the computer running. For very limited power sources such as small solar panels, the power loss may have a significant impact on being able to keep devices charged and working. There’s little we can do practically, apart from test equipment, including USB chargers and batteries to determine how efficient they are. Generally we prefer devices that are more efficient.

“Robbing Peter to pay Paul (or compound losses)”

We may decide to charge a battery from another battery, for instance an Android tablet from a USB power pack. When we do so, power is lost (or used) twice in the process, firstly when the power pack is charged, and secondly when it charges the Android tablet. This may be necessary in some circumstances, however as a general practice, it may be worth trying to charge each battery directly. Exceptions include:

  • Charging an Android tablet or phone from a solar panel. Some devices can cope with the voltage variations, others may fail either temporarily (needing a power reset to recover) or permanently if some of the internal hardware fails. We risk the cost of destorying a device to find out whether it will cope, again sometimes that may be a practical, albeit unattractive, choice.
  • Where there is no source of power locally, for instance the batteries may be charged in a local town and needed to charge tablets in a rural school.
TBC
  • Extended use, overheating, etc.
  • Extra capacity in the system to cope with peaks in demand.
  • Power engineering when power is intermittently available e.g. Solar power doesn’t generate useful power during the night.