You are on page 1of 76


Switchmode charger operation
Maximum power point tracking (MPPT)
12V or 24V operation
120W/220W solar panel rating
microchipDIRECT offers access to the worlds largest inventory of Microchip products
STEREO VALVE PREAMPLIFIER microchipDIRECT offers access to the worlds largest inventory of Microchip products MCLV-
and the most comprehensive online resource for pricing and support directly from
and the most comprehensive online resource for pricing and support directly from Develo 2
Microchip Technology. We invite you as a valued Microchip customer to experience our pmen
Part 2 Building the bespoke case
Microchip Technology. We invite you as a valued Microchip customer to experience our
service 24 hours a day, 7 days per week.
service 24 hours a day, 7 days per week.
Board t
Visit and enjoy the confidence and convenience of buying
Visit and enjoy the confidence and convenience of buying
from microchipDIRECT and take advantage of the following features:
from microchipDIRECT and take advantage of the following features:
Direct stock from factory Long-term orders and scheduling
Direct stock from factory Long-term orders and scheduling

TURNTABLE LED STROBE Direct customer service

Direct customer service
Secure ordering
Secure ordering
Programming and value add services
Programming and value add services
Ability to adjust open orders
Ability to adjust open orders
Check your turntables speed precisely
Volume pricing
Volume pricing
Ship to your sites globally
Ship to your sites globally
Credit lines Online order status and notifications
Credit lines Online order status and notifications


Check out our AMAZING offer see page 5
The Microchip name and logo, the Microchip logo are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. All other trademarks are the property of their registered owners.
The Microchip
Microchip Technology
name and logo,Inc.
theAll rights reserved.
Microchip logo areDS40001752B. MEC2010Eng04/15
registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. All other trademarks are the property of their registered owners.
2015 Microchip Technology Inc. All rights reserved. DS40001752B. MEC2010Eng04/15


Part 1 An amazing low-cost microcontroller that uses BASIC



FEB 2017 Cover V2.indd 1 20/12/2016 16:17

JAN 2017 Page BC.indd 1 14/11/2016 11:18
ISSN 0262 3617

VOL. 46. No 2 February 2017

Projects and Circuits

by John Clarke
Use 12/24V solar panels to charge batteries or drive lighting circuits
by John Clarke
Get the very best from your vinyl using this precision turntable speed checker
by Nicholas Vinen
Time to put our pre-amp in its custom-designed case; plus upgrading
the bass response
by Nicholas Vinen
We explain how to use the clock anywhere in the world thanks to GPS

Series and Features

TECHNO TALK by Mark Nelson 11
Just a flash in the pan?
by Geoff Graham
Part 1: Introduction
NET WORK by Alan Winstanley 52
A Slice of Alexa Pi... Content is king... Up close and personal
Darlington relay switch
AUDIO OUT by Jake Rothman 58
Totally derailed: powering amplifiers Part 3
PIC n MIX by Mike OKeeffe 60
PICs and the PICkit 3: A beginners guide Part 9
MAXS COOL BEANS by Max The Magnificent 64
Having fun with Stone Age LEDs Where does the space go?...
So much fun stuff to do
Four-Channel Car Sound Amplifier

Regulars and Services

SUBSCRIBE TO EPE and save money 4

Meet the mighty EDITORIAL 7

Control spoilt for choice?... And then there were four!

NEWS Barry Fox highlights technologys leading edge 8
Plus everyday news from the world of electronics
EPE Exclusive Win a Microchip dsPICDEM MCLV-2 Development Board
A wide range of technical books available by mail order, plus more CD-ROMs
Wimborne Publishing Ltd 2017. Copyright in all
PCBs for EPE projects
drawings, photographs and articles published in
protected, and reproduction or imitations in whole or NEXT MONTH! Highlights of next months EPE 72
in part are expressly forbidden.

Our March 2017 issue will be published on

Thursday 2 February 2017, see page 72 for details. Readers Services Editorial and Advertisement Departments 7

Everyday Practical Electronics, February 2017 1

Contents (MP 1st) FEB 2017.indd 1 20/12/2016 16:08

All prices INCLUDE 20.0% VAT. Free UK delivery on orders over 35
Quasar Electronics Limited Postage & Packing Options (Up to 0.5Kg gross weight): UK Standard 3-7
PO Box 6935, Bishops Stortford Day Delivery - 3.95; UK Mainland Next Day Delivery - 8.95; Europe
CM23 4WP, United Kingdom (EU) - 12.95; Rest of World - 14.95 (up to 0.5Kg).
Tel: 01279 467799 Order online for reduced price Postage (from just 3)
Fax: 01279 267799 Payment: We accept all major credit/debit cards. Make POs payable to
Quasar Electronics Limited.
E-mail: Please visit our online shop now for full details of over 1000 electronic
Web: kits, projects, modules and publications. Discounts for bulk quantities.

Card Sales
& Enquiries
Solutions for Home, Education & Industry Since 1993

PIC Programmer & Experimenter Board 4-Ch DTMF Telephone Relay Switcher
PIC & ATMEL Programmers With test buttons and Call your phone
We have a wide range of low cost PIC and LED indicators to carry number using a
ATMEL Programmers. Complete range and out educational experi- DTMF phone from
documentation available from our web site. ments such as the anywhere in the
supplied programming world and remotely
Programmer Accessories: examples. Includes a turn on/off any of
40-pin Wide ZIF socket (ZIF40W) 9.95 16F627 Flash Microcontroller that can be the 4 relays as
18Vdc Power supply (661.121UK) 19.96 reprogrammed up to 1000 times. Software to desired. User settable Security Password,
Leads: Parallel (LDC136) 2.56 | Serial compile and program your source code is Anti-Tamper, Rings to Answer, Auto Hang-
(LDC441) 2.75 | USB (LDC644) 2.14 included. Supply: 12-15Vdc. up and Lockout. Includes plastic case. 130 x
Kit Order Code: K8048 - 29.58 21.54 110 x 30mm. Power: 12Vdc.
Assembled Order Code: VM111 - 38.88 Kit Order Code: 3140KT - 79.95
USB & Serial Port PIC Programmer Assembled Order Code: AS3140 - 94.95
USB or Serial connection.
Header cable for ICSP. 8-Ch Serial Port Isolated I/O Relay Module
Free Windows software. Computer controlled 8
See website for PICs sup- Controllers & Loggers channel relay board.
ported. ZIF Socket & USB Here are just a few of the controller and data 5A mains rated relay
lead extra. 16-18Vdc. acquisition and control units we have. See outputs and 4 opto-
Kit Order Code: 3149EKT - 49.96 23.95 website for full details. 12Vdc PSU for all isolated digital inputs
Assembled Order Code: AS3149E - 38.95 units: Order Code 660.446UK 10.68 (for monitoring switch
Assembled with ZIF socket Order Code: states, etc). Useful in a variety of control and
AS3149EZIF - 74.96 48.95 sensing applications. Programmed via serial
USB Experiment Interface Board port (use our free Windows interface, termi-
USB PIC Programmer and Tutor Board Updated Version! 5 nal emulator or batch files). Serial cable can
The only tutorial digital inputs, 8 digital be up to 35m long. Includes plastic case
project board you outputs plus two ana- 130x100x30mm. Power: 12Vdc/500mA.
need to take your logue inputs and two Kit Order Code: 3108KT - 74.95
first steps into analogue outputs. 8 bit Assembled Order Code: AS3108 - 89.95
Microchip PIC resolution. DLL.
programming us- Kit Order Code: K8055N - 39.95 22.74 Infrared RC 12Channel Relay Board
ing a PIC16F882 (included). Later you can Assembled Order Code: VM110N - 39.95 Control 12 onboard relays
use it for more advanced programming. with included infrared re-
Programs all the devices a Microchip 2-Channel High Current UHF RC Set mote control unit. Toggle
PICKIT2 can! Use the free Microchip tools State-of-the-art high or momentary. 15m+ in-
for PICKit2 & MPLAB IDE environment. security. Momentary or door range. 112 x 122mm.
Order Code: EDU10 - 46.74 latching relay outputs Supply: 12Vdc/500mA
rated to switch up to Kit Order Code: 3142KT - 64.96 51.96
ATMEL 89xxxx Programmer 240Vac @ 12 Amps. Assembled Order Code: AS3142 - 61.96
Uses serial port and Range up to 40m. 15
any standard terminal Txs can be learnt by one Rx. Kit includes Temperature Monitor & Relay Controller
comms program. 4 one Tx (more available separately). 9-15Vdc. Computer serial port
LEDs display the Kit Order Code: 8157KT - 44.95 temperature monitor &
status. ZIF sockets Assembled Order Code: AS8157 - 49.96 relay controller. Ac-
not included. 16Vdc. cepts up to four Dallas
Kit Order Code: 3123KT - 32.95 21.95 Computer Temperature Data Logger DS18S20 / DS18B20
Assembled ZIF: AS3123ZIF- 48.96 37.96 Serial port 4-ch temperature digital thermometer sensors (1 included).
logger. C/F. Continuously Four relay outputs are independent of the
Introduction to PIC Programming log up to 4 sensors located sensors giving flexibility to setup the linkage
Go from complete beginner 200m+ from board. Choice any way you choose. Commands for reading
to burning a PIC and writing of free software applications temperature / controlling relays are simple
code in no time! Includes 49 downloads for storing/using text strings sent using a simple terminal or
page step-by-step PDF data. PCB just 45x45mm. Powered by PC. coms program (e.g. HyperTerminal) or our
Tutorial Manual + Program- Includes 1xDS1820 sensor. free Windows application. Supply: 12Vdc.
ming Hardware (with LED Kit Order Code: 3145KT - 19.95 16.97 Kit Order Code: 3190KT - 79.96 49.96
test section) + Windows Software (Program, Assembled Order Code: AS3145 - 22.97 Assembled Order Code: AS3190 - 59.95
Read, Verify & Erase) + a rewritable Additional DS1820 Sensors - 4.96 each
PIC16F84A. 4 detailed examples provided 3x5Amp RGB LED Controller with RS232
8-Channel Ethernet Relay Card Module
for you to learn from. Parallel port. 12Vdc. 3 independent high
Connect to your router with
Kit Order Code: 3081KT - 17.95 power channels.
standard network cable.
Assembled Order Code: AS3081 - 24.95 Preprogrammed or
Operate the 8 relays or
user-editable light
check the status of input
PICKit2 USB PIC Programmer Module sequences.
from anywhere in world.
Versatile, low cost, Standalone or 2-wire
Use almost any internet browser, even mo-
PICKit2 Development serial interface for
bile devices. Email status reports, program-
Programmer. Programs microcontroller or PC communication with
mable timers, ...
all the devices a Micro- simple command set. Suits common anode
Assembled Order Code: VM201 - 134.40
chip PICKIT2 program- RGB LED strips, LEDs, incandescent bulbs.
mer can. Onboard sockets & ICSP header. 12A total max. Supply: 12Vdc. 69x56x18mm
USB powered. Many items are available in kit form (KT suffix) Kit Order Code: 8191KT - 29.95
Assembled Order Code: VM203 - 39.54 or pre-assembled and ready for use (AS prefix) Assembled Order Code: AS8191 - 29.95

DEC 2016 Page 2.indd 1 19/10/2016 12:31

Official UK Main Dealer
Stocking the full range of Cebek & Velleman
Kits, Mini Kits, Modules, Instruments,
Robots and more...

2-Ch WLAN Digital Storage Scope PC-Scope 1 Channel 32MS/s With Adapter
Compact, portable battery powered 0Hz to 12MHz digital storage
fully featured two channel oscillo- oscilloscope, using a com-
scope. Instead of a built-in screen it puter and its monitor to dis-
uses your tablet (iOS, Android or play waveforms. All standard
PC (Windows) to display the meas- oscilloscope functions are
urements. Data exchange between available in the free Win-
the tablet and the oscilloscope is via dows program supplied. Its
WLAN. USB lead included. operation is just like a normal oscilloscope. Connection
Code: WFS210 - 161.95 iinc VAT & Free UK Delivery is through the computer's parallel port, the scope is
completely optically isolated from the computer port.
Supplied with one insulated probe x1/x10.
LCD Oscilloscope Self-Assembly Kit Code: PCS100A - 124.91 inc VAT & Free UK Delivery
Build your own oscilloscope
kit with LCD display. Learn
how to read signals with this 2-Channel PC USB Digital Storage Oscilloscope
exciting new kit. See the Uses the power of your PC to
electronic signals you learn visualize electrical signals.
about displayed on your own High sensitivity display resolu-
LCD oscilloscope. Despite tion (down to 0.15mV), high
the low cost, this oscilloscope has many features found bandwidth and sampling fre-
on expensive units, like signal markers, frequency, dB, quency up to 1GHz. Easy set-
true RMS readouts. 64 x 128 pixel LCD display. up USB connection. No exter-
Code: EDU08 - 49.99 inc VAT & Free UK Delivery nal power required! In the field measurements using a
laptop have never been this easy. Stylish vertical space
saving design. Powerful free Windows software.
200 Watt Hi-Fi Amplifier, Mono or Stereo (2N3055) Code: PCSU1000 - 246.00 inc VAT & Free UK Delivery
Self-assembly kit based on a
tried, tested and reliable de-
sign using 2N3055 transis- Four Legged AllBot Kit
tors. Relay soft start delay From the AllBot modular robot
circuitry. Current limiting loud- system with Arduino compati-
speaker protection. Easy bias ble robot shields. Build and
adjustment. Circuit consists of enhance the robot, learn how to
two separate class AB amplifi- program, use the app and have
ers for a STEREO output of fun! Includes all necessary
up to 100 Watts RMS @ 4 / channel or a MONO out- plastic parts, 4 x 9G servo mo-
put of up to 200W @ 4. Includes all board mounted tors, a servo motor connector
components and large pre-drilled heatsink. shield (VRSSM), a battery shield (VRBS1).
Order Code 1199KT - 69.95 inc VAT & Free UK delivery Code: VR408 - 104.34 inc VAT & Free UK delivery

130-in-1 Electronic Project Lab Stereo Valve Amplifier Kit- Chrome Version
Get started on a great hobby For most of us, a high
or career in electronics. Con- power valve audio ampli-
tains all the parts and instruc- fier was an unaffordable
tions to assemble 130 educa- luxury. The Velleman
tional and fun experiments and K4040 Chrome Stereo
circuits. Build a radio, electron- Valve Amplifier SELF-
ic organ, kitchen timer, logic circuits and more. Built-in ASSEMBLY electronic kit
speaker, 7-segment LED display, two integrated circuits changes that, so now
and rotary controls. Manual has individual circuit expla- everybody can enjoy that
nations, schematic and connection diagrams. Requires sublime "valve sound". For many audiophiles, the rich,
6 x AA batteries (not included). Age 14+. warm sound created by vacuum tube valves cannot be
Order Code EPL130 - 59.95 inc VAT & Free UK delivery surpassed, either by transistors or FETs.
Also available: 50-in-1 39.95 | 75-in-1 49.95 Code: K4040 - 839.94 inc VAT & Free UK delivery

Secure Online Ordering Facilities Full Product Listing, Descriptions & Images Kit Documentation & Software Downloads

DEC 2016 Page 3.indd 1 19/10/2016 12:33



Microchip and EPE (mode

(Inc VA
l DV16

have teamed up to

bring you this

The PICkit 3 allows debugging and programming of PIC and dsPIC Flash microcontrollers using the
powerful graphical user interface of the MPLAB Integrated Development Environment (IDE). This kit
includes the 44-pin demo board with a PIC18F45K20 microcontroller and a USB cable. Microchips
FREE MPLAB IDE software and the FREE Edition of the C Compiler provide a complete code
development environment, and are available via free download from

Spend over 125 on any of EPEs products,

including subscriptions, and receive a
PICkit 3 worth 68.64 for FREE
This offer is available to UK & overseas customers; however, for orders in
Europe & ROW the following amounts will be added to cover postage:
4.05 Europe: 5.10 ROW

50 to give away so
hip products
rectly from
experience our
hurry while stocks last!
nce of buying Go to to check availability
(Please note: subscriptions purchased with this offer cannot be cancelled before
heduling they expire; also, goods purchased with this offer can only be returned for exchange)
e add services
notifications JUST CALL 01202 880299 OR VISIT OUR SECURE ONLINE

other countries. All other trademarks are the property of their registered owners.
EPE/M'chip offer page.indd 1 14/11/2016 11:03
Arduino Starter Kit
Genuine Arduino Starter kit which comprises of a 170 page instruction manual, 69.90
Arduino UNO Board, Breadboard, components & more. Inc Delivery* & VAT

The kit walks you through the Arduino programming and basic electronics in
a hands on way. You will be able to build 15 projects using the components
supplied. They allow you to control the physical world through different kinds
of sensors and actuators. Once you have mastered this knowledge, you will
have the ability and circuits to create something beautiful, and make someone
smile with what you invent. So build, hack and share!

The Arduino Starter kit is the ideal partner for anyone following the Teach-In 2016
Teach-In 2016
which started in the February 2016 issue of EPE Everyday Practical Electronics. Exploring the
This Starter kit is supplied with a Wood base, USB & Interconnect leads, Electric motor, Piezo sounder, Movement
and Temperature sensors, Switches, LCD, Breadboard & Servo motor. The kit also includes over 100 electronic com-
ponents:- Diodes, Transistors, Capacitors, h-Bridge, Resistors, LED's, Switches and Trimmers. Quote: EPEARDSK

Offical Arduino Dealer HPG1 Function Generator

A complete pocket function generator.
Genuine Arduino UNO R3 Now you can take test signals on the
from 18.98+p&p move, 3 waveforms can be selected. Set
Wide range of Boards,Shields & Accessories the output voltage or frequency and se-
lect signal waveform using the on the
HPS140i Oscilloscope screen menu. A powerful sweep function
The HPS140i Oscilloscope packs al lot of power in is also included.
a tiny box. Now you can really take a powerful os-
cilloscope everywhere. These features make the * Frequency range: 1Hz to 1.000.000Hz
HPS140 indispensable to the professional user, * Frequency steps: 1Hz, 10Hz, 100Hz,
service centres and even to the hobbyist. Supplied 1kHz and 10kHz
with a probe. * Sine, square and triangle wave forms
* Runs on NiMH rechargeable battery
pack (includeed)
* 40Mhz real time sample rate
* BNC Lead and Charger Included.
* Full auto range option Inc Delivery* & VAT

* Hold & store function Quote: EPEHPG

* Operates up to 6 hours on
2.4GHz Frequency Counter
one charge
0.01Hz to 2.4GHz
* Scope Lead and Charger
8 Digit LED Display
Gate Time: 100ms to 10s
2 Channel Operating mode
Power Supply: 110-220Vac 5W
Quote: EPE24G
99.60 81.00
Inc Delivery* & VAT
Inc Delivery* & VAT

30V 5A Programmable PSU Build your own Oscilloscope

Dual LED (Voltage & Current) Displays A new self assembly kit, ideal for education and way to visualise sig-
Course & Fine Voltage /Current Adjustment nals. Features: Markers, Frequency, dB, True RMS readouts
Volatge or Current Limiting. Timebase range:
* 5 Memories 10s-500ms/division (15 steps)
* PC Link via USB Input sensitvity:
or RS232 100mV-5V/division (6 steps)
*Output: Max Input voltage: 30Vpp
0-30Vdc Max Sample Rate:
0-5A 1ms/s repetitive signal,
100ks/s real time signal
Dim: 80 x 115 x 40mm


99.90 Quote: EPESCOPE Inc Delivery* & VAT

Inc Delivery* & VAT

ESR Electronic Components Ltd Prices INCLUDE Delivery* & VAT.

/15 Tel: 0191 2514363 Station Road, *Delivery to any UK Mainland address,
please call for delivery options for
Fax: 0191 2522296 Cullercoats, Tyne & Highland & Island, Northern Ireland, Wear. NE30 4PQ Ireland, Isle of Man, Isle of Wight &
Channel Islands

ESR MARCH 2016.indd 1 20/09/2016 12:23

VOL. 46 No. 02 FEBRUARY 2017

Editorial Offices:
EDITORIAL Wimborne Publishing Ltd., 113 Lynwood
Drive, Merley, Wimborne, Dorset, BH21 1UU
Phone: 01202 880299. Fax: 01202 843233.
See notes on Readers Technical Enquiries below Control spoilt for choice?
we regret technical enquiries cannot be answered
over the telephone. One of the biggest developments in electronics over the last couple of
Advertisement Offices: decades has been the increasing integration of intelligent control into
Everyday Practical Electronics Advertisements products, systems and projects. The key ingredient in this revolution has
113 Lynwood Drive, Merley, Wimborne, Dorset, been the microcontroller, a standalone IC that can interface with the real
BH21 1UU
Phone: 01202 880299 Fax: 01202 843233
world, store and run programs, and crucially be easy to use.
At EPE we have always been huge fans of Microchips range of
microcontrollers the PIC. Long-time readers will fondly remember our
General Manager: FAY KEARN early forays into PIC use with John Beckers imaginative projects, coupled
Graphic Design: RYAN HAWKINS with our regular PIC n Mix column, in which originator Mike Hibbett and
Editorial/Admin: 01202 880299 now Mike OKeeffe describe the fascinating world of that particular brand
Advertising and
Business Manager: STEWART KEARN of silicon control.
01202 880299
On-line Editor: ALAN WINSTANLEY Of course, theres more than one way to skin a silicon cat, and in 2014 we
Publisher: MIKE KENWARD ran a very popular Teach-in series on the Raspberry Pi, and over the last
12 months Mike and Richard Tooley have been describing the Arduino.
We try to avoid too much overlap in our coverage of the silicon zoo and
We are unable to offer any advice on the use, purchase, its interesting to note that PICs, Pis and Arduinos do provide different,
repair or modification of commercial equipment or the if related functions. PICs are fast and powerful devices that operate at a
incorporation or modification of designs published
in the magazine. We regret that we cannot provide
circuit-board level and are deeply integrated into projects. The Raspberry
data or answer queries on articles or projects that are Pi is much more like a cut-down standalone PC, capable of running its own
more than five years old. Letters requiring a personal operating system, while the Arduino is a kind of electronic building block,
reply must be accompanied by a stamped self-
which really comes into its own when teamed up with the many add-on
addressed envelope or a self-addressed envelope and
international reply coupons. We are not able to answer systems, sensors and actuators shields that have been developed for it.
technical queries on the phone.

PROJECTS AND CIRCUITS And then there were four!

All reasonable precautions are taken to ensure that Now, hot on the tail of Teach-In 2016, we are bringing you a new
the advice and data given to readers is reliable. We microcontroller to add to your arsenal of smart silicon. Called the
cannot, however, guarantee it and we cannot accept
legal responsibility for it. Micromite, it is the brainchild of Australian engineer Geoff Graham.
A number of projects and circuits published in So, why do we need yet another way to exert control? Put simply, the
EPE employ voltages that can be lethal. You should Micromite provides the ease of use that we associate with a high-level
not build, test, modify or renovate any item of mains-
powered equipment unless you fully understand the
language like BASIC with the low cost, low power demands and small
safety aspects involved and you use an RCD adaptor. footprint of a PIC. In fact, it is based on a powerful and fast 32-bit PIC, but
you dont need to be a PIC guru to use it. We think youre going to love
We do not supply electronic components or kits for constructing projects with this device, and our three-part introduction
building the projects featured, these can be supplied starts here!
by advertisers.
We advise readers to check that all parts are still
available before commencing any project in a back-
dated issue.

Although the proprietors and staff of EVERYDAY
precautions to protect the interests of readers by
ensuring as far as practicable that advertisements are
bona fide, the magazine and its publishers cannot give
any undertakings in respect of statements or claims
made by advertisers, whether these advertisements
are printed as part of the magazine, or in inserts.
The Publishers regret that under no circumstances
will the magazine accept liability for non-receipt of
goods ordered, or for late delivery, or for faults in

We advise readers that certain items of radio
transmitting and telephone equipment which may
be advertised in our pages cannot be legally used in
the UK. Readers should check the law before buying
any transmitting or telephone equipment, as a fine,
confiscation of equipment and/or imprisonment can
result from illegal use or ownership. The laws vary from
country to country; readers should check local laws.

EPE Editorial_100144WP.indd 7 13/12/2016 04:29

A roundup of the latest Everyday News
from the world of

Pain-free Wi-Fi extension report by Barry Fox

Y ou dont have to live in a big
house to have problems with
Wi-Fi cover. Thick walls or doors
where in the house where the signal
would normally be getting weak.
What makes Orbi special is that its
with single Ethernet port; in fact
most people will have a combined
modem/router with multiple Ether-
can play havoc with signal strength, a tri-band system it uses one Wi- net ports and multiple Ethernet ca-
and some Wi-Fi modem/routers (eg, Fi band (at the top end of the 5GHz bles. To avoid subnet conflicts, only
early models from BT) have small band) to connect the Orbi rout- one Ethernet port on the existing
antennae buried inside the case with er with the satellite unit. router should be used, to connect to
very limited radio reach. The satellite unit the Orbi router, with the Orbi router
So there is now a ready market then radi- taking all other Ethernet connec-
for Wi-Fi extenders or signal boost- ates tions. Also, there will be Wi-Fi con-
ers, which either pick up the signal flicts if two networks use the same
off-air and repeat/re-transmit it, or SSID. If necessary, disable all Wi-Fi
use an Ethernet-over-mains con- on the existing modem/router.)
nection from the router to a second The Orbi online registration pro-
Wi-Fi transmitter. Some extenders cess is something of an obstacle
(eg, from Belkin) can daisy chain, so course. The password requirements
that one extends the signal from the and forced double-security ques-
router, and another extends the sig- tions and the need to verify steps
nal from the first extender. by email will surely just make many
I have tried many of these solu- people give up and not bother to
tions and found multiple practical register their devices. So any benefit
problems. Extenders can be tricky to from registering, updates perhaps,
set up, and the best spacing between may be lost.
router and extender will often de- This sums up the dilemma now
pend on variables like doors that are facing the IT industry. Too little
sometimes open, sometimes closed. security is asking for trouble; too
The extender may need a different much security drives users into us-
SSID and password from the main ing no security at all.
router, so Wi-Fi devices need multi-
ple logins. Also, using extenders can Fixing AOL file corruption
slow data speed, which really mat- Talk Talk (the ISP recently hacked by
ters for homes that are using many a teenager to impress his friends) now
Wi-Fi devices, some streaming HD Wi-Fi runs the AOL email service in the
or 4k video, along with hi-res audio. at 2.4GHz and UK. I have used AOL for decades and
also at the bottom would love to ditch it, but I have too
Netgear Orbi end of the 5GHz band. much back correspondence stored in
To date, by far the best solution Ive So one band is behaving like a the proprietary data format used by
found is Orbi from Netgear. Its ex- virtual Ethernet cable and the other the Personal Filing Cabinet, which
pensive, costing close to 400, but two bands are filling the house with is an integral part of AOLs Desktop
there is a lot of clever technology Wi-Fi. Strong cover for over 4,000 software. It recently took me weeks
under the hood. Orbi looks stylish square feet is claimed. of work to nail a problem that may
and really works without the need I tried a prototype from the US, well be crippling other long-term
for extra power line or Ethernet ca- ahead of the official European AOL users. Since I can find no ad-
ble connections. launch (December 2016) and found vice from AOL on this, I pass on the
Orbi is a two part solution, a router a couple of quibbles with the Quick following simple explanation; when
that connects by Ethernet cable to Start guide and online registration the PFC file hits 2GB, it corrupts! So
an ordinary, existing broadband mo- which should now have been fixed. users should archive their PFC while
dem or modem/router, and a satellite (If not, the early guide wrongly as- under 2GB and start a new one.
extender unit that is placed some- sumed that users will have a modem While (pointlessly, as it turned out)
8 Everyday Practical Electronics, February 2017

News (MP 1st) FEB 2017.indd 8 13/12/2016 04:04

Pain-free Wi-Fi extension continued LEDs attract fewer insects
reinstalling the AOL Desktop soft- ie1.8.8.3/AOLUK_Desktop98.exe
ware many times to stop the PFC data The US version comes from: http://
corruption, and trying both the US
and UK versions, I stumbled across waol/0.4346.2023.1/roadie1.8.8.3/
an intriguing piece of trivia. The US AOL_Desktop_9.8.exe
version comes with rather annoying So Bush and Blair are the US/UK file
American voice prompts, while the identifiers! Both files gave the same
UK version has for years used Joan- security warning when installed on a
na Lumleys more appealing tones.
The UK version downloads from:
Windows 10 PC. This type of file can
harm your computer. Do you want to R esearchers at the University
of Bristol have revealed that
domestic LED lights are much less keep anyway. Keep? Discard?
blair/waol_uk/0.4346.2018.1/road- attractive to nuisance insects such
as biting midges than traditional
filament lamps.
When programming was physical The study, funded by the Natural

T he 2016 Tony Sale Award for

computer conservation has been
won by the Heinz-Nixdorf Museums
Other entries shortlisted for the
2016 award included a restoration
Environment Research Council and
UK lighting manufacturer Integral
LED, used customised traps at 18
Forum (HNF) for its evocative and of a 1972 PDP-12 computer by the field test sites across south-west Eng-
educational reconstruction showing Rhode Island Computer Museum; the land, illuminated by a series of LED,
how ENIAC, one of the first electronic conservation of a 1980s IBM 30684 filament and fluorescent light sourc-
computers, was programmed. The computer in the Jim Austin collection es. Over 4,000 insects were carefully
Tony Sale Award, managed by the in York, England; and the restoration identified. The results showed that
Computer Conservation Society and of a 1960s computer peripheral, an LEDs attracted four times fewer in-
sponsored by Google, recognises IBM 1403-N1 printer at the Computer sects compared with the traditional
achievements in the growing area of History Museum in California. incandescent lamps, and half as
computer conservation. For those with an active interest many as were attracted to a compact
ENIAC was programmed by plug- in preserving past computers, Mak- fluorescent lamp.
ging wires and turning knobs, a phys- ing IT Work, a meeting on computer Notably, for biting flies (midges in
ical skillset quite different from those conservation, will be held over 22-23 the genus Culicoides, some species of
deployed today. The reconstruction May 2017. which are vectors of wildlife disease),
of part of the huge 1946 US computer The international meeting will be 80 percent were attracted to the fila-
has the look and feel of the original, the first of its type and is jointly organ- ment lamp, 15 percent to the compact
but has been simplified to make it ised by the Computer Conservation fluorescent and only 2-3 percent to
readily understood and even pro- Society and The National Museum each of the two different LED lamps.
grammable by non-specialists. of Computing. Conference sessions The team urges further research on
Operating six days a week in the with international speakers will be heat-seeking flies that transmit dis-
museum, the reconstructed ENIAC on Monday, 23 May at the BCS HQ ease, including mosquitoes that are
accumulator (the register in mod- in London and workshop sessions at carriers of pathogens that cause dam-
ern terminology) is safe and robust The National Museum of Computing aging diseases such as malaria and
enough to be operated unsuper- on Tuesday, 24 May 2017. More de- Zika fever.
vised by visitors. A video discuss- tails at: www.computerconservation-
ing the new ENIAC is available at: and Unstealthy bike technology

Microchip launches new 8-bit AVR MCUs

M icrochip has announced a new
generation of 8-bit tinyAVR
MCUs. The four new devices range
storage; 20MHz internal oscillator;
high-speed serial communication
with USART; operating voltages rang-
from 14 to 24 pins and 4KB or 8KB ing from 1.8 to 5.5V; 10-bit ADC with
of Flash and are the first tinyAVR internal voltage references; and sleep
microcontrollers to feature core currents at less than 100nA in power-
independent peripherals (CIPs). The down mode with SRAM retention.
new devices will be supported by CIPs allow the peripherals to oper-
START, an innovative online tool for
intuitive, graphical configuration of
embedded software projects.
ate independently of the core and
include serial communication and
analogue peripherals.
S tealth technology for helping
military aircraft evading radar
is well known but what about
The new ATtiny817/816/814/417 Accompanying the release of the technology to do the exact opposite?
devices provide all the features need- four new devices, Microchip is add- The iLumaware Shield is a bicycle
ed to help to drive product innova- ing support for the new AVR family rear light that doesnt just sport a
tion, including small, low pin-count in START, the online tool to configure red light, but also includes a radar
and feature-rich peripherals with 4 software components and tailor em- reflector that makes bikes more
or 8KB of Flash memory. Other inte- bedded applications. This tool is free visible to cars equipped with radar-
grated features include: a core-inde- and offers an optimised framework based crash-avoidance systems. The
pendent peripheral touch controller that allows the user to focus on add- devices technology amplifies the
(PTC); event system for peripheral ing differentiating features to their radars reflected signal, helping the
co-operation; custom programmable application. For more information, bike and rider be seen more easily
logic blocks; self-programming for visit Microchips Web site at www. by the cars radar system see
firmware upgrades; non-volatile data
Everyday Practical Electronics, February 2017 9

News (MP 1st) FEB 2017.indd 9 13/12/2016 04:04

microchipDIRECT offers access to the worlds largest inventory of Microchip products
and the most comprehensive online resource for pricing and support directly from
Microchip Technology. We invite you as a valued Microchip customer to experience our
service 24 hours a day, 7 days per week.

Visit and enjoy the confidence and convenience of buying

from microchipDIRECT and take advantage of the following features:

Direct stock from factory Long-term orders and scheduling

Direct customer service Programming and value add services
Secure ordering Ability to adjust open orders
Volume pricing Ship to your sites globally
Credit lines Online order status and notifications

The Microchip name and logo, the Microchip logo are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. All other trademarks are the property of their registered owners.
2015 Microchip Technology Inc. All rights reserved. DS40001752B. MEC2010Eng04/15

FEB 2017 Page 10.indd 1 15/12/2016 10:37

Just a flash in
the pan? Mark Nelson

How many times do you read about some amazing new development in electronics and then never hear
about it again? Did the technologists really foul up? Or were other factors at play?


create some duds or solutions
looking for problems, but most new
the largest electric power companies
in the US, supplies electricity to
approximately 7.4 million consumers in
tech fulfils its promise. By the time it the Carolinas, the Midwest and Florida.
does, its no longer hot. You dont turn Last spring, it started testing a first-of-
to Barry Foxs news roundup to read its-kind battery technology in North
stale stories, so its understandable if Carolina. The hybrid ultracapacitor-
the media fails to report progress with plus-battery energy storage system
technologies that are no longer novel. provides extended operational
In this article well revisit and celebrate life, rapid response, real-time solar A sample multidimensional circuit carrier
two developments that are doing very smoothing and load shifting. Thomas made by Beta LAYOUT using EOS equipment.
nicely thank you, even if theyre no Golden, technology development
longer on everybodys lips. manager for Duke Energy, explains: We widely used in industry for making
must look for innovative ways to better prototypes of all manner of products.
What happened to supercapacitors? incorporate renewable energy into Just recently it has also been applied
Supercapacitors or ultracapacitors, our system and still provide reliable to manufacturing what you might call
which were hot stuff back in 2007, service at a competitive price for our 3D PCBs. The correct term, however,
are electrochemical energy storage customers. With North Carolina fourth is multidimensional circuit carriers and
devices that are ideal for delivering in the nation for installed solar power, a leader in this field is German firm
high power for relatively short periods. managing and maintaining these grid- EOS (Electro Optical Systems). As the
The capacitance of a single device connected renewable installations is company explains, in many electronic
can be as high as 2.6kF (kilofarads), critical now and in the future. devices there is often only a very small
combining high efficiency, strong low- In Ireland, where wind power amount of installation space available
temperature performance with virtually is expected to generate 40 per for conventional circuit boards, and
maintenance-free operation. They cent of electrical power by 2020, there tends to be very little space left
are not a substitute for conventional supercapacitors are also playing a over for the actual electronics. Often,
batteries, which are optimised for role. At Tallaght, just outside Dublin, the circuitry has to compete for limited
delivering lower power for longer a Smart Grid Testbed has been space within the housing, which leaves
periods, but the combination of established by South Dublin County product designers forced to abandon
supercapacitors and batteries is an Council and the Micro Electricity conventional PCBs and fit in everything
attractive option for powering hybrid Generation Association to demonstrate three-dimensionally, using whatever
diesel-and-electric vehicles that start how energy storage can minimise space is left. Three-dimensional circuit
and stop frequently. electricity distribution issues and grid carriers made of plastic are now the
The latest generation of city buses has instability. With multiple sources of solution of choice.
turned out to be a classic application energy generation, the grid network Thats all well and good, but injection
for supercapacitors. A diesel engine in Ireland must deal with voltage and moulding would be fiendishly
drives an integrated electrical generator frequency issues before distributing expensive (making the moulds costs
that powers the bus. When the bus is the electricity to end users. The testbed mega-money and takes time). So plastic
not in motion the diesel engine turns uses a combination of lithium-ion parts manufactured by 3D printing
off automatically to save fuel, with batteries and supercapacitors for active are the solution, something that EOSs
the supercapacitor acting as a kind of voltage and frequency stabilisation client Beta LAYOUT (well-known for
electronic flywheel that can restart in the grids distributed network. its PCB-POOL operation) has perfected.
the bus. The supercapacitor also stores Ultracapacitors made by Maxwell Very good then, but how on earth do you
the power produced in regenerative Technologies perform fast functions add the metallic electrical connections?
braking, which improves efficiency such as frequency response, leaving the This is the really clever part, which
by recovering energy otherwise lost as batteries to handle peak shifting and takes place after the printing process
heat in the braking system. In Spain, operating reserve. itself. The parts created are coated with
electric trams already run off lithium- a special finish that contains an additive
ion batteries in some sections of the What became of 3D printing? that can be turned into conductive
networks in Zaragoza, Seville and Remember how computers were tracks by activating the finish. A laser
Cadiz, and also use supercapacitors to going to connect to gadgets that could triggers a physical-chemical reaction
provide on-board energy storage. The print three-dimensional objects that creates metallic powder while
same combination of supercapacitors from liquid plastic in your own simultaneously roughening the surface.
and lithium-ion battery banks is being home? Well, you can still buy them Afterwards, copper particles are
used experimentally in the US by the at Maplin Electronics, but theyre by deposited on the previously activated
AFS Trinity Power Corporation for no means cheap, the consumables areas to create PCB tracks that can
hybrid petrol-electric cars, claiming up are eye-wateringly expensive and the either undergo further electroplating or
to 150mpg fuel efficiency. skills needed to design objects in 3D else be given a surface finish directly.
are significant. Although makers Electronic components are then added
Renewable power applications too love them, these devices have not to the initial prototypes and samples,
Renewable energy production is another become a mass-market for hobbyists. allowing functional testing and a check
niche market that supercapacitors However, the same technology, often of design layouts. I bet youd like one of
are now filling. Duke Energy, one of termed additive manufacturing, is these gizmos at home!

Everyday Practical Electronics, February 2017 11

TechnoT (MP 1st & AE) FEB 2017.indd 11 13/12/2016 04:08

Constructional Project


Solar MPPT Charger

and Lighting Controller
This MPPT charger/light controller will work with 12V or 24V solar
panels to charge a 12V or 24V lead-acid or lithium iron phosphate
battery. You can then use the battery to run 12V DC lighting or a
12V/24V 230VAC inverter to run lighting or other loads.

S OLAR PANELS are becoming

cheaper all the time, so now you
can build a low-cost system to power
LiFePO4 battery; more about this later.
Whether you intend operating with
a 12V or 24V system, you are not limit-
a light sensor to monitor the ambient
light, a PIR detector and a timer.
For use in garden lighting, the light
lighting and other loads around your ed to 12V DC lighting. The battery can sensor allows the lights to switch on
home, your boat or caravan, or for a be used with a 12V or 24V/230VAC at dusk and they can remain lit for a
home thats not connected to the grid. inverter of up 600W or more (depend- preset period of up to eight hours, as
This unit gives you the choice of run- ing on the size of your battery) to set by the timer. Alternatively, you may
ning a 12V solar panel up to 120W, or run 230VAC LED downlights, laptop wish to have the lights lit for the entire
a 24V panel up to 220W. It can switch computers, TV sets, power tools and night and to switch off automatically
lights on at dusk and off at dawn. By so on. Mind you, while the unit can at sunrise, provided there is sufficient
including a PIR (passive infrared) de- work with a solar panel rated up to battery charge (and capacity).
tector, you can also have lights switch 120W at 12V, or 220W up 24V, you For security or pathway lighting, the
on with movement detection and off can use a smaller panel if that is all lights can be set to switch on after dusk,
with the timer. You can also manually you require. but only when someone approaches
switch the lights on or off at any time. A big advantage of using a 230VAC the area. In this case, a PIR movement
The unit incorporates maximum inverter is that you will have a much detector switches on the lights, while
power point tracking (MPPT) to max- larger choice of lights than if you are the timer switches off the lights after a
imise the output from the solar panel, confined to a 12V DC system. predetermined period, typically about
regardless of the solar intensity, and it Fig.1 shows the arrangement of our one to two minutes. Periods extending
provides three-stage charging for SLA Solar Lighting Controller and depicts up to the full 8-hour timer limit are
(sealed lead-acid) batteries or two-stage the solar panel, battery and the 12V available if you need more time.
charging for LiFePO4 batteries. Cell lighting or 230VAC inverter. Addi- The actual total wattage of the lights
equalisers will be required if using a tional inputs to the controller include that you can use does depend on the

12 Everyday Practical Electronics, February 2017

Solar Lighting Controller0216 (MP 1st) FEB 2017.indd 12 13/12/2016 04:39

Constructional Project

application. With its internal MOS-

FET switching, it will supply a load
drawing up to 10A from a 12V or 24V SOLAR PANEL
12V 120W OR
battery. You will get the best efficiency 24V 220W
using LED lighting or 12V fluorescent 230VAC INVERTER
lamps rather than using standard or
halogen filament lamps.
Alternatively, the controller can SENSING (NTC1)
switch a heavy-duty relay to drive a SOLAR
12V or 24V inverter, as noted above, CHARGER
and it will protect the battery by LIGHT SENSING
switching off to prevent over-dis- (LDR1)

charge, since it includes low battery

detection, with a cut-off below 11V.
This is most important for lead-acid PIR DETECTOR Fig.1: block diagram of the
or lithium iron phosphate batteries. lighting system. It uses a
Standby current drain of the So- a solar panel, a 12V/24V
lar Lighting Controller is quite low at TIMER (VR4) battery and the MPPT
2.2mA, but this increases to around charge controller to drive
either 12V lighting or a
12mA if a PIR detector is used. 230VAC inverter and can
be switched using various
Multi-stage charging sensors.
As mentioned above, the Solar Light-
ing Controller provides three-stage
charging for lead-acid batteries or a The cut-off voltage for bulk charge sensing. Charging will not occur if the
two-stage charge for LiFePO4 batter- and the float voltage are reduced for thermistor is shorted or not connected.
ies. Fig.2 shows the three-stage charg- temperatures above 20C, in line with The two-stage charging used for
ing with bulk, absorption and float the battery manufacturers charging LiFePO4 batteries is shown in Fig.3
modes. Bulk charge is applied when specifications. Typically, this is 19mV and consists of bulk and absorption
the battery voltage drops below 12.7V per C for a 12V battery. So at 30C, stages. In fact, the bulk and absorp-
and feeds maximum power from the the voltages are reduced by 190mV, ie, tion stages are exactly the same as
solar panel until the battery voltage 14.2V and 13.3V respectively. for lead-acid batteries, but there is
reaches cut-off at 14.4V (20C). Next The ambient temperature is meas- no subsequent float charge mode. We
is the absorption phase, where the bat- ured using an NTC (negative tem- based these modes on information to
tery is maintained at the cut-off volt- perature coefficient) thermistor which be found at
age of 14.4V for one hour, to ensure should be located close to the battery LLLF.htm and similar websites.
full charge. After that, the battery is or preferably, attached to the case of the Note that it is important that a
maintained on float charge at 13.5V. battery for more accurate temperature cell balancer is used when charging







Fig.2: Three-stage
FIG.2:charging is used
THREE-STAGE for lead-acid batteries, start-
CHARGING Fig.3: Two-stage charging
FIG.3: is used
TWO-STAGE for LiFePO4 batteries and
ing with an initial bulk charge. When the battery reaches the consists of bulk and absorption stages. These stages are
cut-off voltage, the absorption stage takes over to fully charge exactly the same as for lead-acid batteries, but there is no
it. The float stage then maintains the charge. subsequent float charge mode.

Everyday Practical Electronics, February 2017 13

Solar Lighting Controller0216 (MP 1st) FEB 2017.indd 13 13/12/2016 04:39

Constructional Project

inductor, as this is drawn from the

SOLAR PANEL POWER CURVE SIMULATION 2200F capacitors. Incidentally, these
(120W PANEL) capacitors are low-ESR (effective se-
24V OPEN CIRCUIT Fig.4: the current/ ries resistance) types, suited to the
VOLTAGE voltage curve for a switching frequency of 31.24kHz.
22V (Voc = 21.8)
typical 120W solar The voltage from the solar panel is
panel. monitored by op amp lC2a, and the
MAXIMUM current is monitored by measuring
POINT the voltage across a 0.01 shunt resis-
tor. This voltage is multiplied by 45

CURRENT LIMIT in op amp lC2b, which also acts as a
THRESHOLD low-pass filter. Both op amps feed their
signals to microcontroller IC1 and this
12V controls the whole circuit operation.
LIMIT Circuit details
8V The full circuit for the Solar Lighting
Controller is shown in Fig.6 and is
6V based around a PIC16F88 microcon-
troller (IC1). This monitors the solar
CURRENT panel voltage and current signals from
2V (Isc = 7.14A) IC2, a PIR sensor (if used), switch S1,

a light-dependent resistor (LDR) and

0 0.8 1.6 2.4 3.2 4.0 4.8 5.6 6.4 7.2 8.0 an NTC thermistor, and controls the
lighting using MOSFET Q4.
A 12V supply is provided for the
PIR sensor at CON2 via resistor R2
LiFePO4 batteries. We intend publish- more interesting. If we were to con- from the 12V battery supply. Many PIR
ing a suitable cell balancer shortly after nect the 120W solar panel directly to sensors can be operated from a 9-16V
Part 2 of this project. the battery, the charge current would supply, and in these cases R2 can be a
be about 6.9A at 12V (ie, 82.8W) and wire link and zener diode ZD4 omit-
Charge indication about 6.8A at 14.4V (ie, 97.9W). Both ted. If the PIR sensor requires a fixed
An LED indicator shows the charging these values are far less than the 120W 12V supply, then R2 should be 270
stage. It is on continuously for the bulk available from the solar panel when its and zener diode ZD4 is included. For
charge mode; flashes on for 0.5s and off voltage is at 17.8V. 24V operation, R2 should be 1.2k.
for 0.5s for the absorption mode, and Ideally, the solar panel should be A pushbutton switch (S1) is moni-
flashes on for one second and off for operated at peak efficiency, to deliver tored by IC1s RB1 input, normally
one second during float mode. If you maximum power. And that is where the held high at 5V with a 100k pull-
have a battery that has been discharged MPPT aspect of the controller comes up resistor. Pressing the switch pulls
below 10.5V, it will be charged with into play. Its essentially a switchmode the RB1 input low. S1 is included for
short bursts of current until it reaches step-down power converter, which in- test purposes, but an external on/off
10.5V, whereupon bulk charging will creases the available power from the (pushbutton) switch can be connected
begin. This initial charging will be in- solar panel to the battery with minimal as well, using two of CON2s terminals.
dicated by a short flash of the charge power loss. At the same time, it pro- The 100nF capacitor at RB1 prevents
LED every four seconds. vides the required two-stage or three- interference from causing false switch-
stage charging to the battery. ing when long leads are used to an
MPPT operation Fig.5 shows how this takes place. external switch.
Fig.4 shows the output of a typical 12V When MOSFET Q1 is closed, current Ambient light is monitored using a
solar panel. It will deliver maximum from the solar panel flows through par- light-dependent resistor (LDR) at the
current when the output is shorted and alleled dual diode D1 and this is filtered AN5 analogue input of IC1. The LDR
maximum voltage when the output is with two 2200F capacitors. The cur- forms a voltage divider with a series-
open-circuit (ie, no load). So the max- rent (i1) flows through inductor L1 into connected 100k resistor and trimpot
imum short circuit current might be the battery. The inductor charges (ie, VR5, all across the 5V supply.
around 7.2A and the maximum voltage current rises to its maximum value) and In normal daylight, the LDR is a low
can be anywhere between 21.8V and after a short period, Q1 is switched off resistance (about 10k) but this rises
22.5V, or maybe a little more. How- and the stored charge in L1 maintains to over 1M in darkness. Therefore,
ever, the maximum power output for current flow (i2) via paralleled dual di- the voltage at the AN5 input will be
a nominal 12V 120W panel will be be- ode D2. The ratio of the on-to-off period inversely proportional to the ambient
tween those extremes, at a load current (duty cycle) for Q1 is controlled so that light. If the voltage across LDR1 is be-
of 6.74A and a voltage of 17.8V (or very the solar panel delivers the maximum low 2.5V, IC1 determines it is daylight;
close to those figures). available power. above 2.5V it reads it as dark.
When we consider the power deliv- The solar panel is not required This measurement is made when
ered to the battery, the story becomes to supply the peak current into the MOSFET Q5 is switched on, tying

14 Everyday Practical Electronics, February 2017

Solar Lighting Controller0216 (MP 1st) FEB 2017.indd 14 13/12/2016 04:39

Constructional Project

Table 1: Lamp operation options

JP1 JP2 Lamp on Lamp off
Night-to-day transition. With S1 Day-to-night transition,
Day position LDR position during day with S1 or timer time-out
Day-to-night transition. With S1 Night-to-day transition,
Night position LDR position during night with S1 or timer time-out
LDR position and with the LDR
Night position S1 during day or night Timer time-out or S1
disconnected from CON3
PIR movement detection or with S1 Day-to-night transition,
Day position PIR position during the day only with S1 or timer time-out
PIR movement detection or with S1 Night-to-day transition,
Night position PIR position during the night only with S1 or timer time-out
PIR position and with the LDR PIR movement detection or with S1 Timer time-out or with
Night position disconnected from CON3 during the day or night S1

Well cover the procedure for adjust- Note, if an inverter is to be controlled, D1 is a twin-diode package, which
ing VR4 later. Q4 is used to switch a heavy-duty relay. has the advantage that both diodes are
closely matched for forward voltage,
Lamp driver Charging since they are both on the same silicon
The lamp or lamps are powered on For charging, we use the switch- die. This means that they will share cur-
using MOSFET Q4. This is switched mode step-down circuit previously rent equally when they are connected
on with gate voltage from the RB0 out- described in Fig.5. MOSFET Q1 is a in parallel, to give a total rating of 20A.
put of IC1. Q4 is an IRF1405 and this P-channel type that switches on with MOSFET Q1 is controlled by NPN
can be driven using a low-voltage gate a gate voltage that is negative with transistor Q3 thats driven by the PWM
signal such as the 5V from IC1. The respect to its source. The voltage at output at pin 9 of ICI via a 100 resis-
expected voltage drop between drain Q1s source (from the solar panel and tor. Q3s emitter is connected to ground
and source is around 0.12V when con- diode D1) can range up to about 22V via another 100 resistor. With about
ducting 10A. A small heatsink ensures when the solar panel is not deliver- 5V at Q3s base, the emitter is at about
that this MOSFET runs relatively cool. ing current. 4.3V and so there is 43mA through its

Building the Solar Charger and Lighting Controller is easy, with all parts mounted on a single PCB. This is housed in a
diecast metal case which provides the necessary heatsinking. The full assembly details are in Part 2 next month.

16 Everyday Practical Electronics, February 2017

Solar Lighting Controller0216 (MP 1st) FEB 2017.indd 16 13/12/2016 04:40

D1 MBR20100CT L1: 5 H (12V)
Q1 SUP53P06-20 10 H (24)
Q2 K
22k 100 A2 2 x 2200 F 1k
BC337 C K G F1
(47k) (1k) 25V (12V) 1W D2 100nF 100nF
ZD3 10A
2 x 470 F 18V MBR20100CT X2 X2
63V (24V) K B 10
K 1W A1 A2 +12V
100nF 10 F CON1
4.7k 30V 35V A TP1 C
A 330
C +5V 8 SERIES 1
A B TIP31C REG1 6 12V (24V)
8 VR1 TL499A K

Solar Lighting Controller0216 (MP 1st) FEB 2017.indd 17

3 1k 100nF 100nF 100 F 20k
+ 2.2k 2 SW REG 3 ZD1
1 100 REF
12V 120W OR 5 4 7 A D
100 4.7k
24V 220W
IC2: LM358 Vdd
68k +5V

Everyday Practical Electronics, February 2017

+12V E
9 LED1 +
470pF PWM/RB3
CON1 470
1.5k 8.2k CON1
10 OPTO1
2.2k AN4/RA4 RB0 4 4N28
7 22k (51k) D
IC2b +5V 1 2
0.01 5 RA2/AN2 Q4
4 IC1 VR2 IRF1405N
10nF G
PIC1 6F8 8
PIC16F88 TP2 S
DAY JP1 16
R2 270 13
TP3 +5V
+12V LDR JP2 15 18
(1.2k) 470
ZD4 17 100k
RA0/AN0 10k CON3
12V R1 10k
100k VR4
A 100k 8 12
7 11 TP4 VR5
+ RB1 RB5 500k 1nF
10k LDR

S1 100nF 100nF 10
CON2 2N7000
D3: 1N4148
2N7000 BC337 D1, D2 K TIP31C Q1, Q4
20 1 6
A K G E C A2 E S

Fig.6: the full circuit for the 12V/24V Solar Lighting Controller is based on PIC16F88 microcontroller IC1. This monitors the solar panel voltage and current signals
from IC2, a PIR sensor (if used), switch S1, a light-dependent resistor (LDR) and an NTC thermistor. The resulting PWM (pulse-width modulation) output on pin 9
of IC1 then drives power MOSFET Q1 via transistors Q3 and Q2 to control the charge current for the battery, while Q4 controls the lighting.

Constructional Project

13/12/2016 04:40
Constructional Project

Parts list: Solar MPPT Charger/Lighting Controller

1 double-sided PCB, available 1 50mm length of 0.7mm tinned 2 100k
from the EPE PCB Service, copper wire (for PIR, see text) 1 68k
coded 16101161, 141 4 PC stakes 1 47k (24V version)
112mm 1 51k (24V version)
1 diecast box 171 121 Semiconductors 2 22k (12V version)
55mm 1 PIC16F88-I/P microcontroller 2 10k
1 6-way PC-mount screw programmed with 1610116A. 1 8.2k
terminal block (CON1) hex (IC1). 2 4.7k
1 3-way PC-mount screw termin 1 LM358 dual op amp (IC2) 2 2.2k
al block, 5.08mm pin spacing 1 4N28 optocoupler (OPTO1) 1 1.5k
(CON2) 1 TL499A regulator (REG1) 1 1.2k (use for 24V supply with
3 2-way PC mount screw 1 SUP53P06-20 P channel 12V PIR see text)
terminals 5.08mm pin spacing MOSFET (Q1) 1 1k (24V version)
(CON2,CON3) 1 BC337 NPN transistor (Q2) 1 1k 1W
1 powdered-iron toroid 28 14 1 TIP31C NPN transistor (Q3) 1 1k
11mm 1 IRF1405N N-channel MOSFET 2 470
1 SPST PC mount tactile (Q4) 1 330
membrane switch with 3.5 or 1 2N7000 N-channel MOSFET (Q5) 1 270 (for 12V PIR, see text)
4.3mm actuator (S1) 2 MBR20100CT fast dual diode 2 100
1 10k NTC thermistor (D1,D2) 1 100 (12V version)
1 LDR with 10k light resistance, 1 1N4148 diode (D3) 3 10
1M dark resistance 2 30V 1W zener diodes (ZD1,ZD2) 1 0.01 3W resistor
2 IP68 cable glands for 8mm 1 18V 1W zener diode (ZD3)
cable 1 12V 1W zener diode (ZD4) (for Trimpots
1 IP68 cable gland for 6.5mm 12V PIR, see text) 2 10k mini horizontal trimpots
cable 1 3mm high intensity LED (LED1) (103) (VR3,VR4)
1 DIL18 IC socket 2 20k mini horizontal trimpots
2 M205 PC mount fuse clips Capacitors (203) (VR1,VR2)
1 10A M205 fast blow fuse (F1) 2 2200F 25V low-ESR PC 1 500k mini horizontal trimpot
1 TO-220 U shaped heatsink, 19 electrolytic (12V version) (504) (VR5)
19 10mm 2 470F 63V low-ESR electrolytic
1 M3 10mm machine screw (24V version) Miscellaneous
4 TO-220 silicone insulation 1 100F 16V 1 12V or 24V SLA or LiFePO4 battery
washers 1 10F 35V 1 12V (up to 120W) or 24V (up to
4 TO-220 insulating bushes 6 100nF MKT polyester 220W) solar panel array
4 M3 12mm machine screws 2 100nF X2 class metallised 12V lamps suitable for 14.4V use
5 M3 nuts polypropylene 1 12V PIR
2 3-way pin headers with 2.54mm 2 10nF MKT polyester 10A cable, battery clips, shielded
pin spacings (JP1,JP2) 1 1nF MKT polyester cable, heatshrink tubing
2 jumper shunts for pin headers 1 470pF ceramic
Reproduced by arrangement
2 100mm cable ties with SILICON CHIP
1 3m length of 0.5mm enamelled Resistors (0.25W, 1%) magazine 2016.
copper wire 1 100k (R1) see text

collector. When Q3 is on, MOSFET a 1k resistor. This switches Q2 on, exceeded. For example, a 15V battery
Q1s gate is pulled negative with re- pulling Q1s gate to its source and voltage will be converted to just 4.69V.
spect to its source via diode D3 and thus switching it off. Q1 is switched Well cover this in the setting-up pro-
the 10 resistor, thus switching Q1 on. on and off by IC1 at 31.24kHz. cedure later.
Q1s gate is protected from voltages in The resistive divider is not directly
excess of 18V (which could damage it) Voltage/temperature monitoring connected to the battery but via the
by zener diode ZD3. Q3s emitter resis- The battery voltage is monitored at lC1s transistor within optocoupler OPTO1
tor is set at 100 so that ZD3s current AN2 input via optocoupler OPTO1 and and this connects the battery voltage to
is limited to 43mA. a resistive divider comprising a 22k the divider whenever the LED within
Whenever Q3 is on, NPN transistor resistor and 20k trimpot VR2. This OPTO1 is on. The collector-emitter
Q2 is off since the base is one diode divider is adjusted using VR2 so that voltage of the transistor has a minimal
drop below the emitter, due to D3 the voltage appearing at AN2 is actu- effect on the battery voltage measure-
being forward biased. Conversely, ally 0.3125 times the battery voltage. ment, as it is only around 200V. The
when IC1 switches Q3 off, Q2s base The reason for this is so that the 5V divided voltage is converted to a digi-
is pulled to Q1s source voltage via limit of analogue input AN2 is not tal value by IC1. The optocouplers

18 Everyday Practical Electronics, February 2017

Solar Lighting Controller0216 (MP 1st) FEB 2017.indd 18 13/12/2016 04:40

Constructional Project

LED is driven from the 5V supply VR4 and VR3. So in order to make larly important. The software within
through a 470 resistor to 0V when these measurements, Q5 is switched IC1 multiplies the voltage and current
MOSFET Q5 is switched on. on whenever S1 is pressed. readings obtained at the AN3 and AN4
The NTC thermistor forms a voltage Other power saving techniques in- inputs to find where the maximum
divider with a 10k resistor across the clude driving the charge LED (LED1) power point is for the solar panel
supply when Q5 is switched on. IC1s from the solar panel instead of the bat- This calculation is not after any par-
AN6 input monitors this voltage and tery. The only time this LED will light ticular value, but just the maximum in
converts it to a value in degrees Cel- using battery power is if the thermistor a series of power calculations. It does
sius. At the same time, IC1s AN1 input is open or short circuit. In these cases, this calculation periodically (once
monitors the setting of trimpot VR3. the LED flashes at a low duty cycle, every 20 seconds) and varies the on/off
This trimpot is effectively connect- again conserving power. duty cycle of MOSFET Q1 to find the
ed across the 5V supply when Q5 is Op amp lC2 is also powered from duty cycle that provides the maximum
switched on. The AN1 input voltage the solar panel, because we only want power from the solar panels.
is converted to a mV/C value and this to measure the solar panel voltage and Power for the remainder of the So-
can range from 0mV/C when VR3 is current when solar power is available. lar Lighting Controller circuit comes
set to 0V to 50mV/C when VR3 is Therefore, IC2 is fed via a 100 series from the 12V battery via REG1, a
set for 5V. resistor for a 12V panel and a 1k re- TL499A regulator. This is a low qui-
sistor in the case of a 24V panel. Zener escent current type that can run as
Power saving diode ZD2 limits the voltage to 30V. a linear step-down regulator and as
As mentioned, MOSFET Q5 connects Diode D1 prevents the battery from a switchmode step-up regulator. We
trimpots VR3 and VR4, the LDR and powering IC2 via Q1s internal diode have used it as a 12V to 5V linear
the NTC to 0V and also powers the and L1. The solar panel voltage is mon- regulator, with the output voltage
optocoupler LED. Q5 is powered on itored using a 22k and 4.7k voltage trimmed using VR1 to as close to 5V
with a 5V signal from the RB5 output divider, while a 100nF capacitor filters as possible. This then calibrates the
of IC1. The MOSFET then momentar- any transient voltages or noise that analogue-to-digital conversion within
ily connects these sensors to 0V so could be induced through long leads IC1, ensuring correct charging volt-
that microcontroller IC1 can meas- from the panel. IC2a is connected as a ages for the battery.
ure the values. When Q5 is off, these unity-gain buffer and its output is ap- Protection against reverse polarity
trimpots, sensors and battery divider plied to the AN3 input of IC1. connection of both the 12V battery and
are disconnected from the supply to As noted previously, current from solar panel are included. If the solar
reduce battery drain. the solar panel is measured by the panel is connected with reverse polar-
One problem with using Q5 to make voltage developed across a 0.01 ity, IC2 is protected because ZD2 will
the 0V connection for the trimpots, bat- shunt resistor. This is around 70mV conduct in its forward direction, pre-
tery and sensors is that these sampled for a current of 7A. The voltage de- venting more than 0.6V reverse volt-
voltages cannot be easily measured veloped across the shunt is negative age from being applied across its pin
with a multimeter. This is because a and this is inverted and amplified by 4 and pin 8 supply rails. D1 prevents
multimeter will not capture the volt- IC2b, which has a gain of 45. There- reverse voltage from the solar panel
age when Q5 switches on momentar- fore, lC2bs output will be around being applied to the remainder of the
ily. And we do need to measure some 315mV per 1A of current from the circuit. Finally, should the battery be
of these voltages for setting up. solar panel. This output is applied connected back to front, D2 will con-
For example, we need to be able to to the AN4 input of IC1 via a 2.2k duct via inductor L1 and the fuse will
set VR2 so that the battery divider is current-limiting resistor. blow, breaking the connection.
correct and we need to measure the Note that the actual calibration of Next month, well cover construc-
timer and mV/C values as set with voltage and current is not particu- tional details and set-up procedure.

Extruded enclosures
standard and heatsink

01256 812812
Everyday Practical Electronics, February 2017 19

Solar Lighting Controller0216 (MP 1st) FEB 2017.indd 19 13/12/2016 04:40

Constructional Project


Check your turntables

speed with this white
LED strobe
So you have dragged out the old turntable and are playing vinyl
records again. Good. But how do you know that the turntable
speed is correct? The old way to do it was to use a circular disc
with strobe markings, but that does not necessarily work these
days. Why not? Read on.

P LAYING VINYL records has made

a big comeback in recent years and
many people are resurrecting their old
and 78 RPM. So you need to check that
aspect. How do you do that?
The old tried and true method was
bands would appear to be stationary.
The reason for this was that incan-
descent or fluorescent lighting had a
turntables or buying new ones. But to use a circular card which had stro- strong 100Hz or 120Hz component and
there are a few hurdles before you get boscopic markings on it and run the this would act to make the relevant
the optimum result, such as making turntable under mains voltage lighting; strobe band on the circular card ap-
sure the cartridge stylus is not worn 230VAC 50Hz in the case of Australia, pear to stop moving.
out and that your preamplifier pro- New Zealand and most of Europe or The same method applies to those
vides the correct equalisation. 120VAC 60Hz in the case of the Ameri- turntables that have strobe markings
On a more prosaic note, many turn- cas, parts of Japan or Asia. on the rim of the platter. But while the
tables which have been out of action These stroboscopic cards have four principle is still correct, it does not
for decades may not necessarily op- or six bands of markings and depend- work very well in most homes these
erate at the correct speeds of 33.3, 45 ing on the speed selection, one of those days. Why not? Because our political

20 Everyday Practical Electronics, February 2017

Turntable Strobe1215 (MP 1st) FEB 2017.indd 20 13/12/2016 04:57

Constructional Project

masters have deemed that old-fash-

ioned incandescent lights are waste-
ful and bad for the environment. At
Turntable speed variations
Turntables that rely on a 50Hz or 60Hz mains supply to drive a synchronous or
the same time, fluorescent lighting
shaded pole motor may not necessarily run at the correct speed. Typically, the
in most homes is now out of fashion,
50Hz mains frequency can vary between 49.85Hz and 50.15Hz (ie, 0.15Hz)
unless it is using those ugly compact
over the course of a day. Typically, the mains frequency will be slightly low
fluorescent lamps (CFLs) with their
during periods of peak power demand and a little high at other times.
unnatural hues and copious electro-
magnetic interference. That variation would mean that middle C could be as low as 260.841Hz and
So why cant these modern lamps as high as 262.411Hz. Whether this is noticeable or not depends on how well
provide the same stroboscopic effect? you discern pitch.
The reason is that they run at much Further turntable speed problems can be present if an incorrect-sized pul-
higher frequencies so that any residual ley on the motor spindle is used to drive the belt. This could be because you
AC component in the light output is have an imported turntable thats been designed to operate from 60Hz instead
very small. This applies to any lighting of 50Hz (or instead designed to run with 50Hz instead of 60Hz). You may be
which uses electronic ballasts. able to supply the correct voltage for the motor using a transformer but the
Mind you, even when you are us- frequency will not be correct.
ing incandescent or fluorescent light- For precision speed from a synchronous motor drive, an electronic driver circuit
ing powered by 50Hz or 60Hz mains, could be used to produce a suitable sinewave source for the motor. This could
the strobing effect is not particularly be a low-powered crystal-locked sinewave inverter such as for an uninterruptible
strong, and it is even weaker with computer supply. Modified sinewave inverters may not be suitable since the square
halogen lamps with their much hotter wave supply may introduce noise into the motor and cartridge pick-up leads.
filaments. We will explain why later
in this article. Why is this white LED strobe necessary?
In the olden days the usual method of providing a strobe light source involved
Turntable types using an in-built Neon discharge lamp powered from the 240VAC 50Hz or
Most good turntables are either belt- 120VAC 60Hz mains supply. The neon would produce light pulses at 100Hz
driven or direct drive. Cheaper turnta- or 120Hz and this would give a stationary pattern for the set speed.
bles were driven from an idler wheel
However, using the mains supply is most unlikely to give a completely steady
inside the rim of the platter. The belt-
strobe pattern when you are using a crystal-controlled direct-drive turntable
driven types usually have a small
unless the mains frequency is precisely 50.000Hz or 60.000Hz. Even a slight
synchronous motor which can be as-
error will cause the strobe pattern to rotate slightly. Of course, with a belt-driven
sumed to be locked to the mains fre-
synchronous motor turntable, you would never be aware of these speed errors
quency, provided the belt is not slip-
(unless you build our Turntable Strobe).
ping on the motor shaft. This could
happen if the belt is perished, kinked
or hardened. Idler-driven turntables to give the most accurate speed indi- If the markers drift clockwise, then
typically have a shaded pole motor cation with a strobe card. the turntable speed is fast and if the
and they are not so tightly locked to So why is that? Funnily enough, a markers drift anticlockwise, the turn-
the mains frequency (and because of lot of strobe cards are not necessarily table speed is too slow. Any slight
the idler-drive, they are more likely accurate and if you want the most ac- wavering forwards or backwards of
to produce rumble). curate speed indications at 33.33 and the markers will be due to irregular
Direct-drive turntables should run at 45 RPM, you should use a strobe pat- speed variations and significant vari-
the correct speed but again, that cannot tern designed for 60Hz operation. In- ations of this nature may be audible
be taken for granted. Also, some direct terestingly, as far as 78RPM records are as wow and flutter.
drive turntables had or have a variable concerned, it is not possible to get an What can be done about a turntable
speed feature which allows the music absolutely accurate speed indication at that doesnt run true to speed? More
pitch to be shifted over a a range of 100Hz or 120Hz, but 100Hz is the more information on this is detailed in the
about a semitone. Again, how do you accurate, with a speed error of 0.1%. above panel.
know what is the correct speed setting Because of these issues, we have Our LED Turntable Strobe is built on
(unless you have absolute pitch)? also designed a PCB strobe disc that a small PCB that fits into a small plastic
Any substantial speed variation is you can place on your turntable to utility box. Alternatively, the PCB can
liable to cause any music to sound check its speed. It is just the right be installed inside the turntable cabi-
off-pitch. And if you want to dance size to fit on the record label and will net and the strobe LED can be mounted
to records and the number of beats not cover the playing area. Since it to illuminate strobe markings on the
per minute is important, then again, is precisely etched and machined, platters rim. It can be powered with
the turntable speed should be correct. it will not have the common fault of a 9V battery, an external DC supply
Our solution has been to design a some printed strobe discs which can or a 5V supply via a USB connector.
white LED stroboscope which pro- be slightly off-centre or the centre hole
duces one millisecond pulses of light is a little over-size. Circuit description
at a very precise 100Hz or 120Hz (ie, A turntable rotating at the correct Fig.1 shows the circuit and it is based
twice the mains frequency). But our speed will have one band of the strobe on a PIC12F675 microcontroller (IC1).
recommendation is to use it at 120Hz disc markers remaining stationary. The microcontroller vastly simplifies

Everyday Practical Electronics, February 2017 21

Turntable Strobe1215 (MP 1st) FEB 2017.indd 21 13/12/2016 04:57

Constructional Project

D1 1N4004 S1 1N4004
CON1 REG1 78L05 78L05
100 F GND 470 F 1N5819
16V 16V IN OUT
9V D2 1N5819
A K +5V

1 1k 68 68
5 Vdd
2 IC1 7
PIC12F675 GP0
470 C
4.0MHz Q1
3 5
Reproduced by arrangement GP4 GP2 B BC337
IN: 120Hz
magazine 2016. 33pF 33pF 8 JP1
OUT: 100Hz
LED BC 33 7


Fig.1: the circuit is based on a PIC12F675 microcontroller (IC1), with 4MHz crystal X1 used as the reference clock. Pin
7 of IC1 drives transistor Q1 to flash white LED1 while jumper JP1 sets the strobe frequency to 120Hz or 100Hz.

the circuit, compared to using a sepa- program are therefore 1s in duration. 60Hz mains supply, with the result-
rate crystal oscillator and dividers. In As already noted, the strobe LED ant display being quite indistinct by
addition, the microcontroller makes it is driven with 1ms pulses and this comparison.
easy to incorporate 100Hz and 120Hz gives a duty cycle of 10% at 100Hz The white LED (LED1) is driven via
operation. or 12% at 120Hz. This will ensure transistor Q1 and a 68 resistor con-
IC1 uses a 4MHz crystal as the refer- that the strobe disc markings appear nected to the +5V supply rail. Q1 is
ence clock for its program to run the quite sharp. Longer pulse durations switched on/off by the GP0 output of
strobe. The un-calibrated accuracy of will cause noticeable blurring of the IC1, using a 470 base resistor. The LED
the crystal (typically 50ppm) is suf- strobe pattern as the markings move is driven at a nominal current of 29mA,
ficiently accurate for the strobe. IC1 further during the on-period. This is assuming a 3V drop across the LED.
internally divides the 4MHz frequency a distinct advantage of our LED strobe Connector CON2, a 3.5mm jack
by four, so that the program runs at compared to the light from an incan- socket, is provided so that an external
1MHz. Single clock instructions of the descent lamp powered from a 50Hz or LED can be connected.
We have provided several options
for the power supply: a 9V battery, a
Designing the strobe disc 9-12V DC plugpack via CON1 or 5V
via a micro-USB B socket. If using a
We have designed our strobe disc to suit 120Hz operation for 33.33 RPM and 9V battery or a DC supply via CON1,
45 RPM. We have also provided a strobe band for 78 RPM at 120Hz, but it will the 78L05 3-terminal regulator (REG1)
produce a speed error of 0.325%. To counter that, we have also provided a 78 provides 5V to the micro. Alternative-
RPM strobe band for 100Hz operation and this will have a speed error of 0.1% ly, if you are using a 5V USB supply,
(close, but no cigar). Mind you, precision speed setting at 78 RPM is not so im- this is fed to the micro via Schottky
portant because most records from that era were not cut at a precise 78 RPM. diode D2. If you intend using a USB
Note that there are lots of strobe disc patterns that can be down-loaded from power source exclusively, you can
the Internet, but most are incorrect. They may be correct at one speed, say 45 omit the other supply components
RPM, but incorrect at 33.3 RPM or 78 RPM. As an example, some patterns are such as CON1, D1, switch S1, REG1
designed for 33 RPM, not the correct value of 33.33 RPM. and the 100F capacitor.
If you already have a strobe disc, how do you check that the pattern is cor- For those interested in the effects of
rect? Its a simple calculation. Just multiply the strobe frequency (100Hz or the strobe flash length, you can select
120Hz) by 60 to convert to pulses per minute. Then divide the turntable speed a 2ms flash duration by tying pin 6 of
in RPM into this number. So 33.33 RPM requires 100 x 60 33.33333 or 180 IC1 to pin 8 using a short piece of wire
bars for a 100Hz strobe or 216 bars for 120Hz. Its not possible to obtain a under the PCB. This will set the strobe
correct pattern for 45 RPM at 50Hz, since the number of bars is not an inte- to flash for 2ms but it will still run at
gral number; it is 133.333. So any card with 133 bars is doomed to error. So, 100Hz or 120Hz, as selected with JP1.
if you want to be sure of the result, use our strobe disc from the Silcon Chip This change needs to be done while
On-line Shop, part number 04101162. power is off. A return to a 1ms flash
duration will only occur when pin 6

22 Everyday Practical Electronics, February 2017

Turntable Strobe1215 (MP 1st) FEB 2017.indd 22 13/12/2016 04:57

Constructional Project

By the way, the micro-USB input

does not have to connect to the USB Parts List
12mm 13mm port on a computer. Any USB output
from a 5V plugpack or power board 1 PCB, available from the
+ + can be used to supply power. Some EPE PCB Service, coded
modern turntables even include a USB 04101161, 79 31mm
port on the turntable plinth. 1 set turntable templates (see
A = 5mm dia.
B =- 6mm dia. The first job with the case is to re- text)
move the internal ribs on each side 1 UB5 case, 83 54 31mm
TOP OF CASE (NO LID) and this can be done using a small pair 1 4MHz crystal (X1)
5mm 10mm 24mm of sidecutters. You can then finish off 1 DIL8 IC socket
C 10mm by using a sharp chisel to remove any 1 SPDT vertical slider switch (S1)
+ + remaining rib material. 1 2-way header (2.5mm pin
9mm The next step is to use the PCB as a spacing) (JP1)
template to mark out its three mount- 1 pin header shunt
C = 6mm dia. +
D = 9 x 5mm ing holes in the case. Thats done with 3 6.3mm tapped nylon stand-offs
E = 5 x 9mm
the PCB sitting inside the case and 3 M3 5mm countersink head
Fig.2: the two end-panel drilling pushed hard against two of the side screws
templates. They can either be copied pillars (see photo). The PCB is then re- 3 M3 5mm machine screws
or downloaded as PDF files from the moved and the mounting holes drilled 1 Micro-USB type B socket
EPE website. (CON3) (FCI 10103594-
to 3mm. Countersink these holes on
the outside of the case using an over- 0001LF) (
is disconnected from pin 8 with power size drill. Part No. 2293752)
switched off and on again. You now have to cut and drill the 1 PCB-mount DC socket (CON1)*
The program checks the GP2 input holes in the end panel and thats done 1 9V battery*
level and produces the 100Hz strobe using the templates shown in Fig.2. 1 9V battery snap connector*
signal when this input is high at 5V. These templates can either be copied Semiconductors
It produces a 120Hz signal when the from the magazine or downloaded in 1 PIC12F675-I/P microcontroller
input is low. The GP2 input is pulled PDF format from the EPE website and programmed with 0410116A.
high via an internal pull-up resistor in printed out. hex (IC1)
IC1 when JP1 is out and is pulled low Once you have the templates, cut 1 78L05 regulator (REG1)*
when jumper shunt JP1 is inserted. The them to size and attach them to the 1 5mm white LED (LED1)
jumper setting can be altered while end panels using adhesive tape. Be 1 BC337 NPN transistor (Q1)
the strobe is operating and the strobe sure to attach the correct template to 1 1N4004 diode (D1)*
frequency will change immediately. its panel the template with the two 1 IN5819 Schottky diode (D2)
circular holes must go on the end that
Drilling the case matches the LED end of the PCB. Optional external LED parts
The Turntsable Strobe is housed in Its now just a matter of drilling 1 5mm white LED
a UB5 plastic utility box (83 54 and cutting the holes in the panels as 1 switched stereo 3.5mm PCB-
31mm) with holes cut in one end for required. The square cut-outs for the mount jack socket (CON2)
the LED and the external LED socket (if micro-USB socket and switch S1 can 1 mono 3.5mm jack plug
fitted) and in the other end for the on/ be made by drilling a series of small 1 length of single-cored
off switch, the DC socket and micro- holes in a row, then joining them and shielded cable
USB socket. filing to the required shape. 1 100mm length of heatshrink
Its necessary to drill and cut the case Note that its a good idea to always tubing (1mm and 5mm)
before installing any parts on the PCB. use a 1mm pilot drill to start the holes Capacitors
There are a few options here, though. (to ensure precise location) and then 1 470F 16V PC electrolytic
First, if you will be running the unit enlarge them to the required size us- 1 100F 16V PC electrolytic*
from battery power only, then theres no ing successively larger drills. 1 100nF MKT polyester
need to cut holes in the case for the DC 2 33pF ceramic
socket and the micro-USB socket and PCB assembly
these two parts can be left off the PCB. All parts (except the battery) are Resistors (0.25W, 1%)
Alternatively, if you will be supplying mounted on a PCB which measures 79 1 1k
power via the DC socket or micro-USB 31mm and is available from the EPE 1 470
socket only, then the battery and on/ PCB Service, coded 04101161. Fig.3 2 68
off switch can be left out and theres shows the parts layout. Begin by sol- *Note: omit DC socket CON1,
no need to cut a hole for the switch. dering the surface-mount micro-USB diode D1, switch S1, the 100F
You could also leave out either the socket (if used) to the underside of capacitor, regulator REG1, the
DC socket or the micro-USB socket, the PCB, then flip the board over and 9V battery and the battery snap
depending on the external supply. install the resistors on the top side. It connector if the unit is to be
At the other end of the case, you can a good idea to check each one using exclusively powered via the micro
leave out the 3.5mm jack socket if you a digital multimeter before soldering USB socket.
dont intend using an external LED. it into place.

Everyday Practical Electronics, February 2017 23

Turntable Strobe1215 (MP 1st) FEB 2017.indd 23 13/12/2016 04:58

Constructional Project

JP1 out 100Hz + REG1 78L05 + CON3

JP1 in 120Hz
S1 04101161
100 F100nF


2016 revB LED1 A
Turntable Strobe CON2 K USB-B
D1 4MHz IC1
470 T

9V PIC12

33pF F675 Q1 BC337

+ 33pF S
D2 R + +
CON1 5819 JP1


Fig.3: follow these two parts layout diagrams and the photos below to assemble the PCB. The micro-USB socket (CON3)
should be soldered to the underside of the PCB first, after which the remaing parts are installed on the top side.

a 4mm-thick spacer to set this height),

so that the centre of its lens lines up
Left: inside the with the adjacent jack socket.
completed unit. The last part to connect is the battery
The battery and
snap. Feed its leads through the stress
switch S1 can be
omitted if the unit relief holes as shown in Fig.3 before
is to be powered soldering them to the PCB.
only via the DC If you intend using an externally con-
socket or micro- nected LED, this can be now wired to
USB connector. a length of single-core shielded cable.
Similarly, CON2 Connect the centre lead to the LEDs an-
can be left out ode and the shield wire to the cathode.
if you wont be
using an external
CHIP Turntable




Follow with diodes D1 and D2, CON1, jack socket CON2 and switch
making sure that the 1N5819 is used

S1 are optional. CON1 is required if


for D2. Make sure also that D1 and D2 you are using a 9-12V DC plugpack (ie,
are correctly oriented. The DIL8 socket one with no USB output) to power the
can be then installed, followed by the unit, CON2 if you are using an external
100nF capacitor and the two 33pF ce- LED and S1 if you are using battery
ramic types. power. If you are using a DC plugpack

Crystal X1, transistor Q1 and REG1 to power the unit (via CON1) but will
are next on the list, but dont get Q1 not be fitting a battery, switch S1 can

and REG1 mixed up. The two electro- be replaced by a wire link.
lytic capacitors can then go in, along LED1 is installed by first bending
with the 2-way pin header (the headers its leads down by 90 exactly 10mm
shorter pins go into the PCB). Once the from its plastic body. Make sure that it
header is in place, install the jumper is correctly oriented before doing this
Fig.4: the front panel label can be
shunt (ie, to short the pins) so that the though (the anode lead is the longer downloaded as a PDF file from the
unit will operate at 120Hz. of the two). The LED is them mounted EPE website.
As explained earlier, DC socket with its leads 4mm above the PCB (use

24 Everyday Practical Electronics, February 2017

Turntable Strobe1215 (MP 1st) FEB 2017.indd 24 13/12/2016 04:58

Constructional Project

These two views show the completed unit. Note that some of
the holes in the end panels can be omitted, depending on the
options chosen when you build the unit (see text).

The other end of the cable is then ter- Fig.4: this screen grab
minated in a 3.5mm jack plug, with the shows the waveform
centre lead going to the tip contact and at the GP0 output,
the shield to the outer sleeve contact. pin 1, of IC1. In this
case, the circuit is set
for 100Hz operation
Final assembly (JP1 out). The LED is
Now for the final assembly. First, at- lit for 1ms at a 10%
tach three M3 6.3mm tapped nylon duty cycle. Ignore
stand-offs to the PCB mounting holes the error of the
and secure them using M3 5mm displayed 100.032Hz,
machine screws. The PCB assembly is which is because
then installed by angling it down into the oscilloscope
the case so that LED1 and CON2 pass frequency calibration
through their respective holes, then is not particularly
squeezing the sides of the case together
and pushing the other end of the PCB
down until the switch and micro-USB then reapply power and check that EPE website. Its just a matter of
socket go into their panel cut-outs. the LED lights. downloading it and printing it out
The PCB is then secured in position If it does, then your Turntable Strobe onto an A4-sized synthetic Dataflex
using three M3 5mm countersink- is working and you can attach the lid or Dataplex sticky label (see panel).
head screws which go through the which now becomes the base of the This label is then attached to the top
base and into the stand-offs. Once its unit. If you now move the unit rapidly of case (ie, not the lid), as shown in
in place, fit the battery snap to the bat- from side-to-side with the LED viewed the photos.
tery and slide the battery into the case side-on (ie, not looking directly into Alternatively, you can print out a pa-
as shown in the photo. the lens), it should be seen to light in per label and attach this using double-
several different positions. That indi- sided tape. Thats it your Turntable
Testing cates that the LED is being flashed on Strobe is ready for use.
Now for the smoke test. Apply pow- and off. By contrast,
er and check that there is 5V (4.85- if you look directly
5.15V) between pins 1 and 8 of ICs at the LED when it
socket (or 4.5-5.2V if using USB pow- is stationary, it will
er). If this is correct, switch off and appear to be contin-
install IC1 (watch its orientation), uously lit due to its
120Hz flash rate.
Dataflex/Datapol Labels Finally, if you have
made up an external
(1) For Dataflex labels, go to: LED cable, plug it in and check that its
php?main_page=product_info& LED also operates.
(2) For Datapol labels go to: www. Front panel label
main_page=product_info&cPath The front-panel la-
=49_55&products_id=326 bel is available in
PDF format on the

Everyday Practical Electronics, February 2017 25

Turntable Strobe1215 (MP 1st) FEB 2017.indd 25 13/12/2016 04:58

Order on-line from
low-cost Precision
10V Dc reference TouCh-
Perfect for checking DMMs auDio SCReen Dig
10.000V without adjustment ReCoRD iTal
Compact and battery powered CD sound eR PaR
Accurate and affordable SD card quality T1 (go to the UK store)

Powe memo
red by
Colou a single
r touch AA-size
-screen lithium-ion
with no cell

WIN Burp Cha

A rge Your Bat

or by phone, fax, email or post

dsPIC OC Rapid
HIP alternate
process charge/disc teri es!
temperatureduces press harge
ure and
KIT R and increa re build-up
in cells,
Deluxe fan speed controller ses effici
Precise control without noise or interference

rGB leD striP DriVer

Decoration and illumination half a
with a rainbow of colours The first CenTuR
2N3055 50 years of
Y of Pow
powe the
r trans
TeACh-In 2015 PArT 4 TeaCh- istor
understand discrete linear circuit design in 201 MIC WIN
Learn about noise and distortion
PaRT 5
about linear UE C3
filters circuit ST TO 2 IP
and tone desig AR OT
PluS MAY 2015 4.40 PluS controls n KI TER H
CirCuit Surgery, Net work, audio out, readout, CirCuit
PiC N MiX, teChNo talk & PraCtiCally SPeakiNg teChNo Net work
talk &
iNterFaCe , audio out, JUNE 2015
MAY 2015 Cover.indd 1 JUNE 2015
20/03/2015 10:39:48 Cover
PiC N MiX, 4.40


VOL 1: BACK ISSUES January 1999 to June 1999

219.965.F4OR55 YEAR)
Plus some bonus material from Nov and Dec 1998
VOL 2: BACK ISSUES July 1999 to December 1999
VOL 3: BACK ISSUES January 2000 to June 2000 ( ing VAT an
d p&p
each includ
VOL 4: BACK ISSUES July 2000 to December 2000
VOL 5: BACK ISSUES January 2001 to June 2001 VOL 23: BACK ISSUES January 2010 to June 2010
VOL 6: BACK ISSUES July 2001 to December 2001 VOL 24: BACK ISSUES July 2010 to December 2010
VOL 7: BACK ISSUES January 2002 to June 2002 VOL 25: BACK ISSUES January 2011 to June 2011
VOL 8: BACK ISSUES July 2002 to December 2002 VOL 26: BACK ISSUES July 2011 to December 2011
VOL 9: BACK ISSUES January 2003 to June 2003 VOL 27: BACK ISSUES January 2012 to June 2012
VOL 10: BACK ISSUES July 2003 to December 2003 VOL 28: BACK ISSUES July 2012 to December 2012
VOL 11: BACK ISSUES January 2004 to June 2004 VOL 29: BACK ISSUES January 2013 to June 2013
VOL 12: BACK ISSUES July 2004 to December 2004 VOL 30: BACK ISSUES July 2013 to December 2013
VOL 13: BACK ISSUES January 2005 to June 2005 VOL 31: BACK ISSUES January 2014 to June 2014
VOL 14: BACK ISSUES July 2005 to December 2005 VOL 32: BACK ISSUES July 2014 to December 2014
VOL 15: BACK ISSUES January 2006 to June 2006 VOL 33: BACK ISSUES January 2015 to June 2015
VOL 16: BACK ISSUES July 2006 to December 2006
VOL 17: BACK ISSUES January 2007 to June 2007
VOL 18: BACK ISSUES July 2007 to December 2007
VOL 19: BACK ISSUES January 2008 to June 2008 July 2015 to December 2015
VOL 20: BACK ISSUES July 2008 to December 2008
VOL 21: BACK ISSUES January 2009 to June 2009
VOL 22: BACK ISSUES July 2009 to December 2009

Please send me the following Back Issue DVD/CD-ROMs.

Volume Numbers:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Price 16.45 each, 29.95 for Five Year DVD/CD-ROMs
includes postage to anywhere in the world.
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
No.1 Jan 03 to Dec 07 .......
No.2 Jan 04 to Dec 08 Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
No.3 Jan 05 to Dec 09 ...................................................
No.4 Jan 06 to Dec 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
No.5 Jan 07 to Dec 11

Post Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
No.6 Jan 08 to Dec 12 I enclose cheque/P.O./bank draft to the value of . . . . . . . . .

No.7 Jan 09 to Dec 13 please charge my Visa/Mastercard . . . . . . . . . . . . . . . . . . .
No.8 Jan 10 to Dec 14 Card No. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Card Security Code . . . . . . . . . . (The last 3 digits on or just under the signature strip)
No.9 Jan 11 to Dec 15
Valid From . . . . . . . . . . . . . . . . Expiry Date . . . . . . . . . . . . . . . .
NOTE: These DVD/CD-ROMs are suitable for use on any PC with a
DVD/CD-ROM drive. They require Adobe Acrobat Reader (available SEND TO: Everyday Practical Electronics,
free from the Internet Wimborne Publishing Ltd., 113 Lynwood Drive, Merley,
Wimborne, Dorset BH21 1UU.

WHAT IS INCLUDED Tel: 01202 880299. Fax: 01202 843233.

All volumes include the EPE Online content of every listed issue. Please E-mail:
note that we are unable to answer technical queries or provide data Payments must be by card or in Sterling cheque or bank
on articles that are more than five years old. Please also ensure that draft drawn on a UK bank.
all components are still available before commencing construction Normally posted within seven days of receipt of order.
of a project from a back issue.

Back Issues CDs - New copy.indd 53 15/12/2016 10:53

Constructional Project

laser cutter software, including Au-

toCad DXF.
We used a 60W CO2 laser operating
at full power and at a speed of 8mm/s
(10mm/s also works, but were being
a little conservative to ensure it cuts
The parts are cut from a sheet
of acrylic measuring at least 230
315mm. The cuts shown in red are
done first, in case the sheet isnt per-
fectly flat. In this case, if the outer
sections were cut first they could shift
slightly and then the inner cuts would
be less accurately placed. We have op-
timised the cutting path to eliminate
the duplication of overlapping cuts,
although typical laser cutters have an
extremely high degree of repeatability
so this will generally not affect the
quality of the end result.
The case pieces incorporate holes in
the top for the valves and some cool-
ing slots over the power supply. The
front panel has holes for the power
switch, volume pot, its anti-rotation
tab and the two power LEDs, while
the rear panel has holes for the input
and output RCA sockets and the DC
power connector. There are also four
screw holes in the top and bottom
panels corresponding to holes on the
PCB, to hold the whole thing together.
If youre building the musical in-
strument version of the PCB with the
extra panpot (VR2) and mixed output
(CON5), well supply a modified ver-
sion of the cutting diagram with these
extra holes. Their locations are shown
in Fig.9, relative to the pre-cut holes.

Putting it together
You will now have the completed PCB,
six case pieces (with protective film Note: diagram not to scale
on both sides) and an assortment of
machine screws, tapped spacers and
feet (as specified in the parts list last
month). Start by removing the two Fig.8: the laser cutting pattern used to produce the six pieces for the Stereo Valve
12AX7 valves (or vacuum tubes, if Preamplifier case, from a 230 315mm piece of 3mm-thick clear acrylic (perspex).
you prefer) and set these aside so they The sections shown in red are cut first to maximise precision of the hole placement.
wont get damaged dont put them Note the cooling slots in the top cover, which go over the power supply circuitry.
on a surface they might roll off! The prototype lacked an onboard power switch, so a hole has been added to the
front panel for the final version (note: diagram not to scale).
The bottom, rear and side panels of
the case are glued together into one the protective film on the case pieces shorter spacers. Do it up tight against
assembly, which screws to the PCB. for now, so they dont get scuffed or the underside of the lid, then thread the
The top panel is also screwed to the dirty clear acrylic shows fingerprints other spacer on and repeat the proce-
PCB while the front panel is held on quite well unfortunately, so you want dure for the remaining corners.
by the potentiometer nut(s). The PCB to avoid getting these on the inside of Next, orient the lid so that the valve
is sandwiched between the top panel the case if possible, where theyre hard socket holes are above the sockets, then
and the bottom panel assembly and to clean off. push the protruding screw threads
held in place with screws and spacers. Using Fig.10 as a guide, pass an M3 through the PCB mounting holes and
Its a good idea to check that eve- 32mm machine screw through a hole attach the M3 25mm tapped spacers
rything will fit before gluing. Leave in the top panel and screw on one of the to hold the PCB in place.

Everyday Practical Electronics, February 2017 29

Stereo Valve Preamp0216 Pt2 (MP 1st) FEB 2017.indd 29 13/12/2016 05:21
Constructional Project



25.4mm 25.4mm
2 x 9mm or 1 x 6.3mm & 1 x 12mm

( 8.25mm) 50.8mm


Front panel
20.32mm 22.86mm CASE BOTTOM PANEL


Note: diagram not to scale 7.62mm ( 8.25mm) M3 x 10mm MACHINE SCREW

Fig.10: the top panel, bottom panel and

Fig.9: heres where to drill the extra holes in the rear panel (for the mixed output PCB are sandwiched together using
RCA socket, CON5) and in the front panel (for panpot VR2) if required four sets of machine screws and tapped
spacers. This spaces the top and bottom
You can then screw the bottom panel they may not line up with the holes in panels the correct distance apart for
on using the remaining 10mm machine the case. In that case, you would either the front, back and side panels to fit.
screws (no need to fit feet just yet). need to adjust the RCA socket height If theyre too close together, add 3mm
With the top and bottom panels held by melting the solder joints (tricky) or inner diameter washers in each stack as
rigidly in place, check that the rear simply enlarge the panel holes until spacer shims.
panel fits. The RCA sockets will be a they fit through.
relatively tight fit through the holes, You may find, depending on the ex-
but assuming they have been soldered act height of the spacers you have used, With the front and rear panels in
evenly, it should slide into place. Oth- that the rear panel will be slightly too place, it should be possible to slide
erwise, you may need to use a tapered tall to fit between the top and bottom the side panels into place.
reamer to open the holes up slightly. panels. In our prototype, it was an al-
most an exact fit, but spacer lengths Gluing the case
RCA sockets can vary slightly. In this case, you Once youve confirmed that everything
Note that, on our prototype, we used may need to add some sort of a shim fits, disassemble it and peel the pro-
the RCA sockets which are available (eg, a washer or two) somewhere in tective film off the pieces. Reassemble
from the Silicon Chip Online Shop, the spacer stack to increase the gap the top and bottom halves and the PCB
because its hard to find white sockets enough for the panel to fit correctly. as before, using the screws and tapped
of this type at the usual retailers. They Assuming it fits OK, remove the nut spacers, to form a rigid assembly.
have a slightly different footprint but from the pot(s) and fit the front panel. The parts are glued together using a
will fit on the board with some slight This can be held in place temporarily specialised, solvent-type plastic adhe-
bending of the pins. with the potentiometer nut(s). If nec- sive formula. We used SciGrip Weld
We mention this because this is like- essary, reach behind the front panel On 16 fast set clear, medium-bodied
ly to affect the height that the sockets using small pliers to push the LEDs solvent cement. This is available from
sit at, so if you use a different type, through their respective holes.
With a clean cloth at hand to wipe
up any excess, the next step is to glue
Changing the preamplifiers gain two pieces of the case together (see be-
low) by applying a moderate amount of
The circuit as presented last month has a maximum gain of four (12dB). While the adhesive to all the mating surfaces
the output swing is limited by the valve operating conditions, if you have a and then pressing and holding them
situation with low-level input signals, you may wish to increase this. This can together. Try to avoid getting any of
be achieved by increasing the value of the 10k 1W resistors to the lower left the adhesive on the faces, especially
of each valve socket. via your fingers.
For example, using a 15k resistor will give a gain of 15k / 3.3k + 1 = Start by gluing the rear panel to the
5.5 or 15dB. A 22k resistor will give 22k / 3.3k + 1 = 7.5 or 17.5dB. And base. Make sure its pressed in fully
a 30k resistor gives a gain of 10 or 20dB. until the adhesive sets (this takes a
Note that increasing the gain will slightly prejudice the performance by few minutes). You may find that fric-
increasing the distortion and reducing the signal-to-noise ratio. Having said tion holds it in for you, otherwise you
that, the performance as specified is sufficiently good that you probably wont may have to hold it. Once its nice and
notice the difference. rigid, carefully unscrew the base and
remove the two panels which are now

30 Everyday Practical Electronics, February 2017

Stereo Valve Preamp0216 Pt2 (MP 1st) FEB 2017.indd 30 13/12/2016 05:21
Constructional Project

The rear panel of the case has holes for the RCA stereo input and output sockets and a square cut-out to provide access
to the DC power socket. Note the ventilation slots in the top cover above regulator REG1 and MOSFET Q2.

Voltages of up to 285V DC are
present on the PCB when power
is applied and whenever the red
LED is lit. Never operate this unit
without the top cover in place!

joined. You can then glue the two side

panels on, again making sure they are
pressed in fully before it sets.
Dont use great dollops of glue but
dont be too stingy either. If youre
quick, you can wipe off any excess
from the outside with a cloth.
Leave this assembly aside for some
time (ideally, overnight) before re-
fitting it using the four screws. If you
have stick-on rubber feet, stick them
on now, otherwise attach screw-on
feet using the four mounting screws.
Thats what we did on the prototype
(see photos).

Fitting the front panel

All thats left is to push the front pan-
el in place, ensuring the LEDs pass
through the two holes, attach the po-
tentiometer nut and fit the knob. DO
NOT glue the front panel or any of the
The case is assembled by first fastening the top and bottom panels and the PCB
panels to the top cover. If you find the
together (see also Fig.10). The rear panel is then glued to the base, after which
front panel wont sit flat, it may be that the base is removed and the remaining panels fitted as detailed in the text. DO
the LEDs are protruding too far and NOT glue the front panel or any of the other panels to the top cover.
pushing on it. Pressing them carefully

Everyday Practical Electronics, February 2017 31

Stereo Valve Preamp0216 Pt2 (MP 1st) FEB 2017.indd 31 13/12/2016 05:21
Constructional Project

Improving the bass response

A reader has brought to our attention the fact that the circuit, as presented
last month, could have a significant amount of bass attenuation when driving
a fairly typical power amplifier load impedance of around 10k.
This is because the 220nF output coupling capacitor is not quite large
enough. Our Audio Precision test equipment has a 100k input impedance
and in combination with the 220nF coupling capacitor and 1M onboard bias
resistor, this results in a 3dB point of around 8Hz.
However, with a 10k load impedance, the 3dB frequency increases by
nearly a factor of 10, to 72Hz. Weve confirmed this by simulating the full
preamp circuit. This is not an unrealistic load impedance for a power amplifier.
The solution is simple: increase the coupling capacitor value. At the very
least, use 470nF 630V capacitors (one in each channel) for a 3dB point of
34Hz for a 10k load. Ideally, though, they should be at least 1F. The simplest
way to achieve this is to use pairs of parallel 470nF capacitors, one on either
side of the PCB for each channel. This will yield a 3dB point below 20Hz.

back into the case should fix this. You minutes and this may affect perfor-
will need to do this to both LEDs or mance slightly.
the result could look strange.
Its now ready to use. Remember Kit of parts
that it takes 10-15 seconds each time Altronics has preparied a kit for this
you power it up before the HT rail project, Cat. K5192. This complete kit - USB - PWM
- Ethernet - Encoders
rises to its normal level and all the includes the parts required to make - Web server - LCD
bias voltages stabilise. Until then, the case. However, the case may not - Modbus - Analog inputs
you arent likely to get much output. be identical to the one described here. - CNC (Mach3/4) - Compact PLC
- IO
Ideally, wait 30 seconds or so after Reproduced by arrangement
powering up for it to achieve a reason- with SILICON CHIP
able level of performance. The valves magazine 2016.
will continue to warm up for some

Get the answer Getyouve

the been
answer youve been
Get the answer looking
been looking for
Get the answer for Get the answer youve been
youve been - up to 256
- up to 32
looking for Can Can - 50 V / 6 A - 30 V / 2.5 A
anyone help looking for
anyone help - USB conguration
PICs Can Pme?ICs? me? - Isolated

Can anyone help

? Can
?PICs anyone help me? anyone help PoScope Mega1+
PICs me? Cs? PI me?
sourcing PoScope Mega50
Problem ftware? Problem
software? sourcing software?

l Generaic l len nl
cte s
Generaic s o n s GEe chat ics
Electron E le c tr Electron
chat l c h a t chat I Can
Generaic s help!
I Can I Can
help! I Can
chat help! help! - up to 50MS/s
- resolution up to 12bit
I Can
the EPE Chat Zone - Lowest power consumption
- Smallest and lightest

Vist the EPE Chat Zone - 7 in 1: Oscilloscope, FFT, X/Y,

Recorder, Logic Analyzer, Protocol
Vist the EPE Vist Chatthe
EPE Chat Zone decoder, Signal generator

Vist the EPE
Zone Everyday Practical Electronics, February 2017
Stereo Valve Preamp0216 Pt2 (MP 1st) FEB 2017.indd 32 13/12/2016 05:22
Learn C with hands-on tools that inspire real world applications!

Sensors Explorer Kit

The inexpensive E3mini
board can be used to Learn
Embedded C on a PIC MCU.
The Microchip PIC MCU is
the most popular micro-
controller for new designs.
Learn about real world interfaces
with the included devices.

Learn Embedded C with the most popular

microcontroller using real world interfaces

Sensors Included

Kit Includes:
Accelerometer Magnetic Sound Temperature (2) E3mini Prototyping Board
Field (2) 16 Sensors/Devices
Getting Started with C Tutorial
C Compiler
Breadboard and Jumpers

Humidity Ultrasonic
Advanced Options
Text Book $59.95 E3mini Advanced
A text book for a formal Accessories Kit $25
course in learning C on a Includes GPS, Keypad, and more
microcontroller parts referenced in the textbook

Vibration Light Barometric


Included Output Devices

Stepper Generic Full Color

Motor Relay LED

When you buy all 3! | Sales 262.522.6500 Ext 35 Sensors Explorer Kit
Text Book $13
E3mini Advanced Accessories Kit Expires: March 31, 2017
Use Discount Code: epe217

CCS Info FEB 2017.indd 1 15/12/2016 10:48

Constructional Project

High Visibility 6-Digit

Last month, we introduced our GPS high-visibility 6-digit LED clock.
We want to emphasise its main feature: it automatically changes
time zones as you travel is important if you are cruising the world
on a yacht or just touring the world. This second article provides all
the information you need to build and use the clock.

W ERE VERY pleased with this

clock because its big, bright
display is so eye-catching and can be
complicates interfacing. As a result,
many GPS modules simply use a
0-3.3V (or thereabouts) swing, ie, TTL
both inverted and non-inverted sense
until it detects valid NMEA data. The
most common rates of 4800 and 9600
viewed from quite some distance. It levels and the signals are inverted too. baud are tried first.
also has quite a few features beyond You may get a better deal on an RS- By the way, GPS modules are now
just displaying the time, as will be- 232 module, and in this case you can becoming available with GLONASS
come apparent when you read the simply wire a resistor of say 4.7k- support. GLONASS is a GPS competi-
operating instructions below. 10k between the GPS modules TX tor built by Russia, and modules which
In Part 1, we mentioned you can use a line and the clocks RX pin. The mi- support this will typically work better
module with RS-232 signalling but that crocontrollers internal clamp diodes indoors or in poor signal areas because
TTL is preferred. Modules with RS-232 will then limit the applied voltage to they have access to more satellites
signalling have a bipolar voltage swing a safe level. in other words, they can use both GPS
on their serial port pins of between 3V This works despite the signal inver- and GLONASS satellites to get a fix.
and 15V. This allows longer cable runs sion because if the clock detects gib- Last month, we mentioned the u-
and improves noise immunity. berish from the GPS module, it tries blox Neo-6M, available for around
However, with the module only a inverting the signal level. If that doesnt US$10.42, but do consider the Neo-7M
few centimetres away from the mi- work, it will also try various baud rates for around $20, which is very similar
crocontroller this is unnecessary and from 2400 bps up to 115,200 bps with to the 6M but with GLONASS support.

34 Everyday Practical Electronics, February 2017

LED Clock0116 Part 2 (MP 1st) FEB 2017.indd 34 13/12/2016 05:31

Constructional Project

Scale: 1mm on diagram = 3mm ( actual size)



Back Left


217mm (rear)


Front Right


Part 2 Fig.4: this diagram shows how the single sheet of 350 225mm (or larger) acrylic is
by Nicholas Vinen cut up into the six large pieces and six smaller pieces that are then glued together
to form the case. Cutting takes about five minutes. The case includes slots for wall-
hanging and some holes to make the piezo sound louder.

X1 is shorted to the case or some other

adjacent metalwork.
If a GPS module is detected, the
unit will indicate that it is waiting
for a position fix by showing GPS
on the display, along with a progress
display. Otherwise, the clock will flash
12:00:00 until you set the date and
time (see below for information on
how to do this). Assuming its working,
you can move on to making the case.

Assembling the case

The case is made from a single piece
of clear or tinted acrylic which starts
out at 350 225mm and is laser-cut
into six large pieces plus a number of
Fig.5: the front of the case with the left and right panels already in place and the smaller pieces, which are then glued
top and bottom about to be glued. The red shaded areas show where adhesive together. The back is not glued on; its
would need to be applied for the top panel to be glued, although as stated in the held with four self-tapping screws so
text, you could apply adhesive to only the top piece as long its applied to all the that it can be removed to allow access
faces that will contact the shaded ones. Note carefully the hole positions in the to the PCB module for maintenance.
four surrounding panels so that you glue them with the correct configuration. The cutting pattern is shown in Fig.4.
We should point out that like most test where each segment on all the If you have a laser cutter, or access
other modules, both the Neo-6M and digits lights up in turn and then the to one, you can download this pat-
Neo-7M come with ceramic patch an- piezo buzzer will sound a 100ms beep. tern from the EPE website in DXF or
tennas, but these are external anten- If that doesnt happen after a few SVG format and cut it yourself. With
nas connected via a short cable. This seconds, switch off and check for a 50W laser, we used settings of 8mm/
means you could in theory connect it faults, such as incorrectly installed second at 80% power. Pre-cut case
to a larger external antenna. components or bad solder joints. You kits are available form the Silicon
can also check that the output voltages Chip On-line Shop see Parts List
Testing of REG1, REG2 and REG3 are correct. last month together with the PCBs,
There isnt much to testing the clock. After the test procedure, IC1 will programmed microcontrollers and
The simplest method is to power it up fire up its 32kHz oscillator. If you get some of the 7-segment displays.
briefly. There might be a short delay the digit test but nothing else, check You can use clear acrylic, as shown
(of no more than a few seconds) while for the presence of the 32kHz signal on our prototype or acrylic tinted with
the supercap charges up, but it should on pin 11 of IC1. If thats missing, it a colour that matches the displays (ie,
then immediately perform a display may be that one of the leads of crystal green, blue, red). You will see more of

Everyday Practical Electronics, February 2017 35

LED Clock0116 Part 2 (MP 1st) FEB 2017.indd 35 13/12/2016 05:31

Constructional Project

This view shows the completed clock PCB from the rear. The PCB is held in position by the two small centre pieces that
mount at right angles to the rear panel (see Fig.6).

the workings of the clock with the clear Gluing the pieces Glue the first panel, then wait a few
case, but the tinted case may provide The front section (ie, where the display minutes for the adhesive to make a de-
better contrast for the display. The will be seen) can be identified by the cent bond before moving on to one of
clear case is suited to any display col- four 5mm holes for the colon LEDs. the adjoining panels. Repeat until all
our whereas a tinted case will need to Four more sections are glued to this four sides are in place, then quickly
match the display colour used. to form an open box. These sections drop the rear panel into place (being
The case is glued using a special must be fitted with a specific orienta- careful not to get any glue on it) to check
solvent-based adhesive that makes tion so before gluing them, put them that everything is nice and square and
very strong bonds between pieces of together loosely to make sure you have nothing will foul the rear panel once
acrylic. You could use cyanoacrylate the right pieces and understand the the adhesive finishes curing.
(super glue) in a pinch but we cant required orientations. The next step is to glue six small piec-
guarantee that the result would last. Start the assembly by gluing the top, es to the rear panel, as shown in Fig.6.
We used SciGrip Weld-On 16, fast- bottom and side pieces to the front The trick is to use enough adhesive to
setting clear, medium-bodied solvent panel, as shown in Fig.5. Note that give a good strong bond without the ex-
cement. It states on the label that its the front panel does not have mirror cess spreading out too much. You also
suited for butyrate, polycarbonate, sty- symmetry, so be sure to orient it so need to be careful to make sure each
rene and acrylics. You are unlikely to that the LED colons will slant in the piece is glued exactly perpendicular
find this adhesive in a shop, so go to: correct direction. The other pieces can to the rear panel. Check that the four then be laid out around the front panel pieces which have holes in them are
This forms a strong bond quickly, so in the correct orientations before you not angled out towards the edge of the
you only have about a minute to apply start gluing any pieces. panel, as they must slot inside the top
the adhesive to the pieces to be mated, That done, start with one of the and bottom pieces of the case.
press them together and get them lined smaller left or right end panels. When You can check this once the six piec-
up properly. Full strength is achieved gluing these pieces, you will need to es are in place and the adhesive has
after about 24 hours, but it sets well coat all the mating surfaces with a started to set; gently drop the rear pan-
enough to manipulate the pieces after decent amount of adhesive to make el into place and then remove to set.
about 10-15 minutes. sure the bonds are good. An example Its best to leave the pieces overnight
The bond is clear but you dont want is shown in Fig.5 for gluing the top so the bonds achieve full strength. You
to get excess adhesive on the material panel; the areas shaded red are where can then introduce the PCB assembly
as it will affect the surface finish and adhesive would need to be applied, as- into the case. Hold it at an angle and
you definitely dont want to drip it suming the left and right panels were slide the DC socket and pushbutton
on the front face. It tends to get a bit already in place. into one side of the case, then rotate
stringy (sort of like melted mozza- Note that you could coat just the sur- it until the 7-segment displays rest on
rella) after coming in contact with the faces of the panel being introduced to the inside of the front panel.
acrylic. Keep a clean (disposable) rag the assembly each time you would The rear panel can then be attached
on hand to mop up any excess adhe- need to apply adhesive to those sur- using four 4GA self-tapping screws
sive. Also make sure you have a large, faces which would mate with the red through the holes in the top and bot-
clean, flat surface to lay the pieces surfaces shown on the other pieces tom that bite into the parts glued into
down on, eg, lay down some sheets of (which would have been difficult to the rear panel earlier. The basic idea
plain paper on your workbench. depict from this angle). behind this is illustrated in Fig.7.

36 Everyday Practical Electronics, February 2017

LED Clock0116 Part 2 (MP 1st) FEB 2017.indd 36 13/12/2016 05:31

Constructional Project

Reproduced by arrangement
magazine 2016.

Fig.6: the six smaller pieces are glued into the rear panel. Be sure to use sufficient
adhesive to form strong bonds. The four upper and lower pieces with holes are used
to hold the back onto the case and by extension hold the case and whole assembly
to the wall. The two smaller pieces glued in the middle press the PCB assembly
up against the front of the case. The rear panel is symmetrical so the parts can be
glued to either side as long as theyre all on the same side.
For desk use, fit a small rubber foot
to each corner at the bottom. For wall
mounting, two screws placed 200mm
apart will fit into the slots on the back.
The heads must be between 4mm and
9.5mm in diameter. Most small wood
screws should fit; check before screw-
ing them into the wall. Dont hang it
until the adhesive has achieved full

LDR calibration
Once the unit is in place and pow-
ered up, calibrating the LDR is sim-
ple. Shine a bright light on the LDR
for a few seconds (eg, a torch), then
cover the unit up for a few seconds Fig.7: this shows the two halves of the case being put together. Machine screws are
shown, but we recommend you use No.4 self-tapping screws. Be gentle when cutting
(eg, with a pillow case) to block out
the threads initially; if any of the smaller pieces break off during this process you
all light or simply place it in a dark will have to re-glue them and wait for the adhesive to set again.
room and turn the lights off. The unit
will automatically record the highest valid date/time information, at which default mapping. The various functions
and lowest values read and adjust its point the display will change to GPS indicated are described below.
calibration to suit. SE as it searches for valid time zone Weve chosen this remote because
data based on that information. Once its relatively inexpensive, easy to get,
GPS time acquisition the data is found, the display will looks good and has all the buttons
If there is no GPS module fitted, by de- change to show the local time. needed for this project. Having said
fault the unit will power up showing If GPS fix is lost, the unit will fall that, just about any universal remote
a flashing 12:00:00 display, waiting back on its 32.768kHz crystal for time- control can be used, including Jaycars
for the time and date to be set, as ex- keeping. After several minutes, the dis- Cat. AR1719.
plained below. However, if a GPS unit play will start pulsating (ie, varying in Whichever remote you use, it just
is detected, the display will change to brightness over time) to indicate that needs to be set up to produce Philips
GPS 00. As satellites are picked up, it is no longer 100% accurate. If a GPS RC5 or NEC-compatible infrared
the number will be updated to show fix is re-acquired, the time is updated commands. To check this, point the
how many are seen. If the unit has a and it stops pulsating. remote at the clock and press the but-
1PPS output, the decimal point after tons. You may need to guess at some
GPS will flash in time with it, until Setting up the IR remote appropriate code settings first (eg,
a GPS lock is acquired. By default, the clock is set to respond Philips TVs). Check the manual sup-
Once the unit has a GPS fix (latitute/ to infrared remote commands from an plied with the remote.
longitude), the display will change to Altronics/DynaLink A1012 learning re- If its producing commands that the
GPS FI. It will then wait to receive mote on TV code 170. Fig.8 shows the clock can receive, the last decimal

Everyday Practical Electronics, February 2017 37

LED Clock0116 Part 2 (MP 1st) FEB 2017.indd 37 13/12/2016 05:31

Constructional Project

The display will flash NUM 0, in- before or after setting the time. Press
dicating the button code that is to be the OK button on the remote control
TV SAT CD set. Hold down the 0 button on your and then press the down button until
ENTER remote control for a second or two. the display shows SETTZ. Press OK,
VCR DVD AUX NUMBERS It will then briefly show the remote then refer to Table 1 and choose the
1 2 3
NUM 0, NUM 1, code received and then the display appropriate zone using the up/down.
NUM 2, NUM 3,
NUM 4, NUM 5, will switch to flashing NUM 1. Re- Press OK to confirm.
NUM 6, NUM 7,
4 5 6 NUM 8, NUM 9 peat this procedure for the remaining The default is NONE, in which case
buttons. The codes corresponding to no time zone calculations are done. If
7 8 9
CNTUP each button are shown in Fig.8. a time zone is selected which has no
AV 0 -/--
ADJUST If at any point you make a mistake, DST rules (as per Table 1), this will
you can go back and reset the previ- not have any obvious effect, except
+ +
BRI DN ous button code by pressing the left- that changing to a different time zone
CH SET VOL hand pushbutton on the clock. If you will then change the time to suit that
NAVIGATE dont want to assign a button to an IR location. If a time zone with daylight
code, press the righthand pushbutton savings rules is selected, those rules
SELECT UP, DOWN, to skip that one. will be obeyed and the clock will au-
Once you have set all the codes, tomatically change the displayed time
IR FIN will be shown. You can then when appropriate.
press the right-hand button on the Its possible to override the DST
clock to go back to normal operation rules, should they change after this
TURN ALARMS or the left button if you need to change article is published, or if an error is
a code first. found; we explain how to do that later
TIPAU If necessary, buttons can be re-as- in this article.
TIMER signed later, using the CHANGE op-
SPLIT/LAP tion in the IR menu. Menu operation Showing the date
is described below. Once set, the clock normally displays
the time. The date can be shown with
RESUME TIADD Setting the time and date a quick press of either button on the
This is only necessary if you havent clock itself or by pressing the show
fitted a GPS module. Press the OK but- date button (usually mute) on the re-
ton on the remote control and then mote control. It will be displayed for
press the down button until the dis- five seconds with decimal points sep-
play shows SETDA. Press OK; the arating the day/month/year, then the
Fig.8: the default button mapping on
the Altronics DynaLink A1012 remote display will then show 010116 rep- unit will switch back to time display.
control set to TV code 170. Other resenting 1st January 2016 (assuming
remotes can be used, but you may have your date format is set to the default Display brightness
to program the button codes into the of DDMMYY). Use the keypad on the Hold down the volume+ or volume
clock, as described in the text. If so, remote control to enter the correct date buttons on the remote control to vary
use this as a guide as to which buttons then press the select button. the display brightness. Auto-dimming
to map to which functions. The button You can then go back into the menu continues to operate, if configured. For
function names displayed on the clock and select SETTI. It will change to example, if youve set the brightness to
during set-up are shown in blue on this show 000000 representing midnight 50% and the auto-dim is at 50% then
(HHMMSS). Check the current time, the overall display brightness will be
point on the display will flash. While then enter what the time will be in a 25% of maximum.
many different modes will produce minute or two, in 24-hour notation us-
some valid commands, you may need ing the keypad but dont put in the last Menu system
to try several different codes before digit yet. Do that the instant that the ref- The time setting description above in-
you find one where all the buttons erence clock matches the time entered. volved entering the menu to access the
you need actually work. Refer to Fig.8 This same procedure can be used to SETDA, SETTI and SETTZ options.
for guidance, but note that the button change the time or date at a later stage. The full menu tree is shown in Fig.9.
mapping for your remote doesnt need Note that you can also use the up/ The top level menu, shown in the blue
to match exactly (ie, your remote may down/left/right arrows to change the boxes at the left, is accessed by press-
not have an identical button layout). time and date; however, its easier to ing the OK button on the remote (or via
Once you have decided which re- use the numeric buttons. If necessary, the pushbuttons, as described later).
mote to use and the setting to use it you can set the time and date without Up and down scroll through the list.
on, power up the clock and put it in a remote; see the Operating without a Each additional level of the menu is
IR set-up mode by holding down the remote section below. shown in a different colour and is ac-
buttons on either side of the clock si- If you want the clock to make day- cessed by pressing OK on its parent
multaneously for several seconds. The light saving time (DST) changes auto- entry. Similarly, pressing the escape
display will show IR SET. Release matically without a GPS module, you button (normally the power on/ off but-
the buttons, then press the right-side will also need to tell it which time ton on the remote) will take you back up
button to continue. zone you are in. This can be done to the parent menu or back to the time

38 Everyday Practical Electronics, February 2017

LED Clock0116 Part 2 (MP 1st) FEB 2017.indd 38 13/12/2016 05:32

Constructional Project

(Mon-Fri) (Sat,Sun)

global on/ set on/ set on/ set on/ set on/ set on/ set on/ set on/ set on/ set on/ set
on/off off off off off off off off off off off


12/24 AM/PM Leading Set colon Set 32kHz Set manual Set alarm
hour decimal zero on/off/ date trim brightness % buzzer duration
mode point blanking flash or format set Set LDR Set alarm
ULIM upper limit % HZ
select on/off decimal buzzer pulse rate
point Set LDR Set alarm
IR DISP CHANGE on/flash LLIM lower limit % DUTY buzzer duty cycle
Set Set dimming
Show NUM 0 Set alarm
IR code MINBR mininmum CADENC
received buzzer cadence
brightness %
IR codes Set
IR code
Use up/down buttons to cycle through menu items;
IR code OK/Enter (SELECT) to descent into sub-menus or select current menu item;
power/standby (ESCAPE) button to return to previous menu or exit.

SETDA (no GPS) Set date


Show Show Show Show Show Show/set Show/set Show/set

detected detected latitude longitude number time zone DST DST rules
timezone timezone from GPS from GPS satellites offset in delta in (refer to
ID name receiver receiver detected hh:mm minutes Table 1)

SETTI (no GPS) Set time

SETTZ time Show/set Show/set Show/set Show/set Show/set Show/set Show/set Show/set Show/set
(from Table 1 start start start start end end end end mode
or auto.) month week day hour month week day hour

Fig.9: this shows the complete menu tree for the clock. The main menu is shown in blue on the left; two of the options
vary depending on whether a GPS module has been detected or not. Sub-menu options are shown in mauve with their
sub-menus shown in green. Pressing the OK/select button activates the function indicated for each menu item, allowing
that parameter to be viewed or set. The escape (on/off) button goes out of the current menu and back to the parent, or in
the case of the main menu, back to the regular time display.

display, if viewing the top level menu. need to enter a numeric value (eg, set- Setting the alarm
Below, well go through the remain- ting the time), short presses of each Normally, the right-most decimal point
ing menu items and explain what they button will increment or decrement on the clock shows the global alarm
do, as well as detailing other clock the currently selected digit. status. If on, the alarm is set to go off
functions accessed by different but- Holding down the right button for at at least once in the coming week. Its
tons on the remote. least one second will cycle to the next dim if there is no alarm set in the next
digit. Holding down the left button for 24 hours or bright if there is.
Operating without a remote at least one second will save changes To set the alarm, enter the ALARM
The menu system can also be accessed and return to the previous menu item. menu. You will see either ALA ON or
without a remote, using the units push- Holding down both buttons together ALAOFF, indicating the global alarm
buttons. Hold down the right push- and then releasing will abort chang- on/off status. Press either OK or the re-
button for at least one second and re- ing that value. cord (ALA ON) button on the remote
lease it to enter the menu. Pressing the In this manner, you can operate the to toggle it. The ALA ON button will
left button is then equivalent to the up menus without the remote. The buttons also work when the clock is showing
button on the remote; pressing the right can also be used to show the date. How- the time, as a quick and easy way to
button is equivalent to down. These ever, note that many other functions are enable or disable the alarm.
then let you scroll through the menus. not available without a remote, such Cycle through the next seven menu
To escape from a menu, hold down as timer modes and so on. Basically, entries to turn the alarm on or off for an
the left button for at least one second the unit is designed to be used with a individual day, or set the time for that
and release. To select an item, hold remote and the button functions are a day (in 24-hour format). The record
down the right pushbutton for at least fall-back, primarily intended for appli- button is used to toggle that days on/
one second and release. When you cations where its used purely as a clock. off status, while select can be pressed

Everyday Practical Electronics, February 2017 39

LED Clock0116 Part 2 (MP 1st) FEB 2017.indd 39 13/12/2016 05:32

Constructional Project

Fig.10(a-d): this series of images shows the complete global land mass coverage of the time zone data programmed into the
clock. There are 128 separate shaded areas, mapped to 73 different time zones, each with different UTC/GMT offsets and
daylight savings rules. Note that many zones overlap, which has been done to reduce the compressed size of the data set;
see text for more details.
to set the alarm time, similarly to the it sometimes being off by a fraction of In this mode, the fast forward and
way the clocks own time is set as de- a second. rewind buttons change the target time
scribed above. There are three basic modes: count by one minute; it will be briefly dis-
You will also find menu entries for up with no limit, count up until a spe- played when they are pressed, then it
WD (weekdays), WE (weekend days) cific time is reached, or count down will go back to showing the timer. Also,
and ALL. Changing the on/off status from a specific time to zero. When the when counting up to a target time, the
or time for any of these entries affects limit is reached (either counting up last decimal point on the display indi-
multiple alarms, ie, Monday-Friday for or counting down), the piezo buzzer cates whether the buzzer will sound
WD, Saturday-Sunday for WE and sounds, although this can be turned when the target is reached (by default,
Monday-Sunday for ALL. They can off if desired. Counting can be paused its on). Press the record (alarm on/off)
still be individually changed after that. and the counter can have one minute button on the remote to toggle it while
When finished setting alarm times, added or subtracted while its running. in this mode.
keep pressing on/off to exit the menus Press the channel (CNTDN) but-
and return to the clock display. Starting the timer ton to initiate counting down. The
When the alarm goes off, briefly Press the channel+ button and the tim- procedure is essentially identical to
press either pushbutton or the Escape er will start counting up from zero. You counting up, except that you are al-
button on the remote for a 5-minute can tell the timer and not the clock is ways prompted to set the initial time,
snooze. A long (1s+) press of either running since the colon LEDs switch using the same method as described
pushbutton or a second press of the off and the decimal points flash in- above. Essentially, this mode is iden-
Escape button will cancel it altogether. stead. Press the pause button to pause tical to counting up towards a target
the timer; the display will freeze and time, except for the fact that the timer
Using the clock as a timer flash. Press the play button to resume. starts at the set time instead and counts
The clock can count time upwards If you press the stop button, the down to zero.
starting at zero (eg, to measure how display will freeze and flash but it
long something takes) or downwards will show the time for the last lap; ie, Changing options
to zero (eg, to alert you when a certain since the timer started for the first lap, There are a number of options which
amount of time has passed). It also or since the last time you pressed this can be changed through the OPTS
has stopwatch type functions such as button for subsequent laps. Press the menu. Once an option is displayed,
a lap counter. It counts with 1/100th- play button to go back to the normal use the OK button to change it. Nu-
second resolution for times less than timer display. Pressing fast forward or meric values can be changed using
one hour, 1/10th-second resolution rewind will add or subtract one minute the up/down/left/right buttons or, in
up to 10 hours, one-second resolution from the displayed time. some cases, the numeric keypad on
for up to 100 hours and with further- Hold down the on/off button for a the remote. The options are as follows.
reduced resolution up to 1000 days. second or so to abort timer mode and
Since infrared commands normally go back to the normal clock display. (1) 12/24-hour time
take the same amount of time to trans- If you want to count up to a specific Display shows either 12 HRS or 24
mit, receive and decode, the timing time, press one of the numeric buttons HRS. Hours are shown as 01-12 in 12-
should be pretty accurate, to within or up/down immediately after press- hour mode or 00-23 in 24-hour mode.
a few hundredths of a second. How- ing channel+ (within a few seconds).
ever, since theres no guarantee an Enter the time to count up to (in a simi- (2) Leading-zero blanking
infrared command will be received lar manner to setting the time), with Display shows either LZB ON or LZ-
without corruption, you will need a maximum of 23 hours, 59 minutes BOFF. Press select to toggle between
to hold down the button to start the and 59 seconds. Once youve entered them. Applies only to the first digit on
timer reliably, which could result in the time, press select to start counting. the display, ie, 3pm will be shown as

40 Everyday Practical Electronics, February 2017

LED Clock0116 Part 2 (MP 1st) FEB 2017.indd 40 13/12/2016 05:32

Constructional Project

Hz indicates the frequency of the

pulses from the piezo between 1 and Last-minute extras
10Hz (default = 2Hz). Duty is the duty
cycle from 1-100% (default = 50%). (1) To calibrate the 32kHz crystal, set
Each of these can be set by pressing the XTAL menu option to between 512
select, then either up/down or using (260ppm slower than default) and +511
the numeric buttons to enter a value. (260ppm faster). This is adjusted auto-
Cadence lets you enter three pairs matically when a GPS module with a 1pps
of duration/pause values as a 6-digit output is used.
number. The default is 100000, which (2) The unit can show the day of the week.
gives an even series of pulses from the Simply activate the date display function,
piezo at the selected frequency but, then press the same button again.
for example, a setting of 113200, in (3) A new menu item, GPSLCK, has
combination with a 2Hz frequency, been added to the options menu. If set to
would give a 0.5s beep, followed by IGNORE, the unit will use GPS time even
a 0.5s pause, followed by a 1.5s beep, if the satellite fix is not perfect. This will
3:00:00 with leading zero blanking followed by a 1s pause, with this pat- allow the unit to work in marginal signal
enabled or 03:00:00 with it disabled. tern repeating. areas, although time accuracy may not
This would normally be disabled in be quite as good.
24-hour mode, but you can enable it. (6) Date format (4) A new brightness menu item, CUR RD,
This defaults to DDMYY as is used shows the minimum/current/maximum
(3) Hours/minutes/seconds separator in in the UK. The other options are MD- raw LDR readings in 8-bit hexadecimal
time display DYY or YYMDD; affects both date notation. The fourth digit decimal point
There are five options: COLFLA (co- display and setting. lights when the data is going to be saved
lons flash at 1Hz; default), COL ON to Flash memory and goes out once its
(colons on permanently), COLOFF Changing infrared codes saved. This can be used to troubleshoot
(colons off permanently), DP ON, The infrared menu, labelled IR has the autodim function.
(decimal points on instead of colons) two sub-menu options: DISP and
and DP FLA (decimal points flash CHANGE. If DISP is selected, the
instead). unit shows the Philips RC5 or NEC
code for any button pressed on the re- countries), we accurately define one
(4) Dimming sub-menu mote. Press either pushbutton on the border, which is often defined by a river
Each entry allows you to set a value clock itself to exit this mode. or mountain range and thus has many
between 0% and 100%. If CHANGE is selected, you can wiggles often requiring thousands of
BRIGHT is the current manu- then select any of the remote button co-ordinates to define.
ally displayed brightness setting. It functions (as shown in Fig.8) using When we check whether your cur-
also changes when the volume+ and up and down and re-program it by rent location is within that time zone
volume buttons are pressed. pressing OK. The procedure is simi- with the well-defined border, and the
ULIM is the percentage of ambient lar to that described in the initial set- result is a negative, we dont need the
brightness where the display starts to up above. Use the left pushbutton on border for the adjoining zone to be
dim automatically. For example, if set the clock to abort and leave that code defined with such precision since we
to the default of 75%, the display will as it is, or the right pushbutton to de- already know that if you are near the
be at full brightness between 75% and assign the existing infrared code for border, you are on the other side of it,
100% ambient, but will dim below that button and disable it (until a new by a process of exclusion.
75% ambient. Set it to 0% to disable code is set). As you can see, the data involved
auto-dimming. is substantial and it takes up about
LLIM is the percentage of ambient Time zone/daylight saving data 150KB, even after a specially designed
brightness where the display reaches As mentioned last month, the clock in- compression algorithm has been ap-
minimum brightness. It will not dim corporates geographic data, time zone plied. If youre interested in more de-
further as the ambient light level falls data and daylight saving data, which tails, see the panel on pages 28 and
below. The default is 10%. allows it to determine the correct lo- 29 of the February 2016 issue of EPE.
MINBR is the display brightness cal time virtually anywhere on Earths
achieved at the lower ambient limit. land mass with just the output of a GPS Time zone data updates
Setting this to zero means the display module. The geographic data is shown Weve made a substantial effort to pro-
will turn off entirely at the lower ambi- in Fig.10, plotted on top of the Earths vide up-to-date time zone geographical
ent limit. The default is 25%. surface. Each coloured region repre- data and daylight savings rules in the
sents a different time zone. firmware for the clock. However, the
(5) Piezo buzzer sub-menu You may notice that many of the rules are very complex and vary drasti-
This determines the sound the piezo boundaries seem rather sloppy; this cally between different locations. They
makes when the alarm goes off or the is done on purpose as borders defined also change over time, so we decided
timer expires. with fewer points take up less flash there needed to be a way to keep the
The duration setting is from 0-900 memory. Basically, where two time rules up-to-date, at least for the loca-
seconds (0 seconds = off, default = 10s). zones meet (eg, at the border of two tions that constructors occupy.

Everyday Practical Electronics, February 2017 41

LED Clock0116 Part 2 (MP 1st) FEB 2017.indd 41 13/12/2016 05:32

Constructional Project

Table 1: Time zones and DST rules As a result, the clock has the facility for you to change the rules
Display Details Offset DST Rules for your current location. Updates are stored in the same section
AU EAS NSW, Vic, Tas +1000 AUST
AU QLD Queensland, PNG +1000 -
of Flash memory as the clock options are kept and override the
AU SA South Australia +0930 AUST built-in rules.
AU NT Northern Territory +0930 - There are three basic parameters for each location that can
AU WA Western Australia +0800 - be changed: offset from UTC (in hours and minutes), daylight
AU EUC Eucla +0845 AUST savings time shift (+0, +30 or +60 minutes) and daylight savings
AU LHI Lord Howe Island +1030 AUST (+30)
rules. The menus that provide these options also offer some in-
AU COC Cocos Islands +0630 -
AUMAC Macquarie Island +1100 - formation regarding the currently detected time zone and GPS
NZ NZ New Zealand +1200 NZ module status.
NZ CHA Chatham Island +1245 NZ There are 19 different sets of daylight savings rules, listed in Ta-
INTHAI Indonesia/Thailand +0700 - ble 1 under DST Rules. Table 1 also shows which set of rules is
JAPKOR Japan/Korea/Palau +0900 - used by default in each location. The time zone menu allows you
FIJI Fiji +1200 FIJI
USA HI Hawaii -1000 NTHAM
to change the setting for your current location to one of the other
USA AK Alaska -0900 NTHAM rules, including disabling daylight saving for a zone which previ-
NA WE USA/Canada West -0800 NTHAM ously used it, or enabling it for one which did not.
NA MO USA Mountain -0700 NTHAM To change these options for your location, go into the CHA
ARIZON Arizona -0700 - TZ menu (which appears when the unit has a GPS fix). The first
NA CEN USA Central -0600 NTHAM
five menu items simply show information; press OK to display
NA EAS USA Eastern -0500 NTHAM
ASAMO American Samoa -1100 -
that particular parameter and then escape (on/off) to go back to
SA BOL Bolivia, Eastern Quebec -0400 - the menu.
CAN NL Newfoundland -0330 NTHAM Of the remaining three, OFFSET allows you to change the dif-
CAN NB New Brunswick -0400 NTHAM ference in hours and minutes between UTC/GMT and your time
PERU Peru, Ecuador, etc -0500 - zone. This can be set anywhere from 22 hours before UTC to 22
CAN SK Saskatchewan -0600 -
hours after UTC in 15 minute intervals, although few locations
EUWES Western Europe +0100 EURO
EU IS Iceland +0000 - use offsets of more than 12 hours from UTC.
EU UK United Kingdom +0000 EURO DAYDEL allows you to select how much the time changes
EU EAS Eastern Europe +0200 EURO when daylight saving starts and ends. This will almost always be
EUMOS Moscow +0300 - one hour (60 minutes) although there is one location, Lord Howe
AS NKO North Korea +0830 - Island, which has a half hour (30 minute) DST delta. To disable
AS BAN Bangladesh +0600 -
AS NEP Nepal +0545 -
daylight saving in your location, you can either set this to zero
RUWES Western Russia +0500 - or change the DST rule to NONE.
AFMOR Morocco +0000 MOROC DAYRUL allows you to select the DST rules for your location.
AF ALG Algeria, Tunisia +0100 - These rules define which hour of which day DST starts and ends
AF LIB Libya +0200 - in a given year.
AF EGY Egypt +0200 EGYPT
AFNAM Namibia +0100 NAMIB
AF AZO Azores -0100 EURO
Changing DST rules
AFMAU Mauritius +0400 - Since these rules can also change, there is a separate menu called
IRAN Iran +0330 IRAN CHADST to change them. There are nine DST settings for each
AFGHAN Afghanistan +0430 - rule, represented by nine menu items, of which four define when
ISRAEL Israel +0200 ISRAEL it starts and four when it ends. The ninth determines how these
GAZA S Gaza Strip/West Bank +0200 PALEST
are interpreted.
JORLEB Jordan, Lebanon +0200 MIDEA
SA SEB South-east Brazil -0300 BRAZIL The most common mode, used by the vast majority of loca-
SA NEB North-east Brazil -0300 - tions, is HDWM which stands for hour, day, week of month.
SA PAR Paraguay -0400 PARAGU For example, in Australia at the time of writing, daylight sav-
BRAZIL Rest of Brazil -0400 BRAZIL ing starts at 2am on the first Sunday of October and ends at 2am
SA URA Uruguay -0300 URUGUA (3am DST) on the first Sunday of April.
SA VEN Venezuela -0430 -
MEXBJC Baja California -0800 MEXIC
So in this case, the mode is HWDM and the following rules
MEX W Western Mexico -0700 MEXIC are used:
MEX YU Yucatan -0500 MEXIC
MEX EA Eastern Mexico -0600 MEXIC
RU EAS Eastern Russia +1200 -
INDIAS India, Sri Lanka +0530 - STAHR: 2 FINHR: 2
MONGO Mongolia +0800 MONGO
GRQAAN Qaanaaq, Greenland -0400 MEXIC (In this menu, the hour values always refer to the time before
GREENL Greenland -0300 GRNLND daylight saving is applied, hence FINHR is 2, not 3).
ATLSSI S. Sandwich Islands -0200 - The following countries use different modes. Iran uses EQUI-
PA BAK Baker Island -1200 - NO where DST start/end dates are relative to the spring and
PASAM Samoa +1300 SAMOA
autumn equinoxes. Brazil uses NOCARN which is identical to
PA TON Tonga, Tokelau +1300 -
PA KIR Kiribati, Line Islands +1400 - HDWM except that DST changes are delayed by one week if they
FR PON French Polynesia -1000 - fall during Carnaval. Similarly, NORAM delays DST changes if
PAMAR Marquesas Islands -0930 - they fall during Ramadan and likewise NOROSH delays DST
PAGAM Gambier Islands -0900 - changes if they fall during Rosh Hashana.

42 Everyday Practical Electronics, February 2017

LED Clock0116 Part 2 (MP 1st) FEB 2017.indd 42 13/12/2016 05:33

Meet the mighty
Part 1: Introduction
The Micromite is an amazing device. A low-cost humidity, GPS and more. Even better, the
microcontroller programmed in a Microsoft- microcontroller only costs a couple of pounds
compatible version of BASIC with floating and the BASIC interpreter is free. Available in
point, arrays and extensive string handling. a user-friendly 28-pin package, the Micromite
The Micromite can interface to a variety makes a great controller for your heating
of devices including touch-sensitive LCD system, lighting manager or whatever else
panels and a host of sensors for temperature, your imagination can dream up.

Overview What can you use the Micromite for? can react instantly without polling the
The Micromite is based on the Microchip Currently, there are thousands of I/O pins.
PIC32MX170 microcontroller. This is Micromites being used for anything from Up to five PWM or SERVO outputs can
a powerful 32-bit device, which runs controlling a fish tanks temperature to be used to create various sounds, control
at 48MHz and has plenty of memory running an automated lathe. The chip servos or generate computer-controlled
for programs and data. The Micromite itself costs just a couple of pounds, so you voltages for driving equipment that uses
firmware is free and the chip does not can treat it as a low-cost replacement for an analogue input (eg, motor controllers).
cost much (about 2) so the investment discrete circuitry, even if it is not doing One of the outstanding features of the
to get started is small. The firmware will anything important. Micromite is the range of communications
run on two versions of the PIC32; a 28- When coupled with a touch-sensitive protocols which it supports. There are
pin dual-in-line package (DIP) which can LCD panel it becomes a sophisticated two serial ports which support ordinary
be easily soldered or plugged into an IC controller, and we are planning a series serial (TTL levels), RS232 or IEEE 485.
socket, and a 44-pin package which is of articles based on this configuration. The Micromite also supports I2C, SPI
surface mount with a reasonably easy- These include a garage parking assistant and 1-wire communications, which are
to-solder pitch of 0.65mm. using an ultrasonic sensor and a boat great for interfacing to a wide range of
Despite its low cost, the Micromite computer which uses a GPS to display sensors including pressure, temperature,
does not scrimp on features. The BASIC speed, heading and other parameters. acceleration, light and more.
interpreter (called MMBasic) is Microsoft Futher projects include a sophisticated Incorporated within the Micromites
compatible with a number of modern appliance energy meter, a super-accurate firmware is support for a number of
extensions. Variables can be either single- clock and a synthesised 1Hz to 1MHz special devices. This includes 34
precision floating point, 64-bit integers signal generator. and 44 keypads, 2- and 4-line LCD
or strings up to 255 characters long. You All these projects will cost very little
can have arrays of these types with up to build because the Micromite and its
to 8 dimensions, and with 50KB of RAM peripheral devices are low cost and for
you have plenty of space to generate large the most part can be purchased direct
arrays. The names of variables can be from China via Internet sites such as eBay.
up to 32-characters long, so you can use
meaningful names such as, TotalCount, Input/output
ExternalTemp and so on. The 28-pin Micromite has 19 I/O pins Fig.1. Top view of the Micromite
Your BASIC program is stored in the and the 44-pin chip has 33 I/O pins. showing its 44-pin surface-mount IC
chips Flash memory so it will never be Under program control these can be
lost, even after cycling the power. The individually set to a digital input, digital
space available is 60KB, and this will output, analogue input, frequency
accommodate quite complex programs measurement, pulse-width measurement
consisting of thousands of lines. The and so on. MMBasic commands can also
interpreter can be set to automatically be used to generate pulses and transfer
run the program on power up so that data in parallel. Interrupts can be used
the Micromite will act as an embedded to notify your program when an input
intelligent controller. pin has changed state, so your program Fig.2. Underside of the Micromite

44 Everyday Practical Electronics, February 2017

MicroMite-Pt1 (MP 1st & Geoff G) FEB 2017.indd 44 13/12/2016 05:54

distance measurement and servos. There Using these features you can display
is also support for NEC or Sony infrared a lot of data on the screen, draw graphs
remote-control protocols, which can be and display on-screen touch-sensitive
used to control the program running buttons and graphical objects. The
on the Micromite using an ordinary IR photographs in Fig.3 show some typical
remote control. displays. They are bright and easy to read
and the touch sensitivity means that you
LCD displays often do not need any manual controls
The Micromite has built-in support for such as switches and knobs, the touch
touch-sensitive colour LCD displays screen will do it all.
using the ILI9341 controller. These are
manufactured in large numbers for use Console and editor
in common consumer products such as To communicate with the Micromite
microwave ovens and washing machines. you use the console. This is a serial
As a result, they are very cheap and can port on the Micromite over which you
be purchased on eBay for under 5 (often can issue commands, edit your program
including free freight). and observe error messages. Generally,
The displays supported by the the Micromites console will connect to
Micromite have 270 340 pixels with a serial port on your desktop computer
65,000 colours and come in three or laptop. On this computer you run a
sizes 2.2-inch, 2.4-inch and 2.8-inch terminal emulator, which provides a
diagonal. Most also have a resistive touch window where you can type and observe
controller built in and MMBasic will the Micromites output.
report the position of the touch in pixels The best method of making this
so you can draw buttons and symbols on connection is via a USB-to-serial
the screen and users can then select these converter. The USB end plugs into your
by simply touching the screen. computer and the serial end connects to
There are a wide range of fonts that you the Micromite. To your desktop computer
can use, including large fonts for easy it presents a virtual serial port to which
readability, fonts with special icons and your terminal emulator will connect.
specialty fonts such as seven segment We will have more to say on this subject
fonts. Using the TEXT command you later, when we will cover plugging in and
can position the text anywhere on the connecting to the Micromite.
screen, select the colour and scale its The Micromite includes its own built-in
Fig.3. Examples of the graphics size. As well as displaying text, you full-screen editor, which works over this
capability of the Micromite can draw extensive graphics on the serial interface. It enables you to enter
displays, temperature and humidity LCD screen, including lines, boxes a program, save it to the Micromites
sensors, battery-backed real-time clocks, and circles. memory and run it in quick sequence.

Micromite features create various sounds, control servos or

generate computer-controlled voltages
as sophisticated input devices. These
LCD panels typically cost US$7 and
Fast 32-bit CPU with 256K of Flash and for driving equipment that uses an provide a low-cost, high-tech graphical
64K RAM running a powerful BASIC analogue input (eg, motor controllers). user interface.
interpreter. 60KB of non-volatile Flash
memory is reserved for the program. Programming and control is done via A comprehensive range of comm-
50KB of RAM is available for BASIC a serial console (TTL voltage levels) unications protocols are implemented,
variables, arrays, buffers, etc. This is at 38400 baud (configurable). Once the including I2C, asynchronous serial,
sufficient for quite large BASIC programs program has been written and debugged RS232, IEEE 485, SPI and 1-Wire.
up to thousands of lines. the Micromite can be instructed to These can be used to communicate with
automatically run the program on power many sensors (temperature, humidity,
The BASIC interpreter is fully featured up with no user intervention. Special acceleration) as well as for sending data
with floating point, 64-bit integer and software is not needed to develop to test equipment.
string variables, long variable names, programs.
arrays of floats, integers or strings The Micromite has built in commands
with multiple dimensions, extensive Full-screen program editor is built into to directly interface with infrared
string handling and user-defined the Micromite, which only requires remote controls, including the DS18B20
subroutines and functions. Typically, a VT100 terminal emulator and can temperature sensor, LCD display modules,
it will execute a program at 30,000 edit a full program in one session. It battery-backed clocks, ultrasonic distance
lines per second. MMBasic allows the includes advanced features such as sensors and numeric keypads.
embedding of compiled C programs for search and copy, cut and paste to and
high-performance functions and the from a clipboard. Special embedded controller features
running program can be protected from in MMBasic allow the clock speed to be
being listed or modified by a PIN number. Easy transfer of programs from another varied to balance power consumption and
computer (Windows, Mac or Linux) speed. The CPU can be put to sleep with a
19 input/output pins are available on using the XModem protocol or by standby current of approximately 100A.
the 28-pin chip and 33 on the 44-pin streaming the program over the serial While in sleep mode the program state and
chip. These can be independently console input. all variables are preserved. A watchdog
configured as digital input or output, feature will monitor the running program
analogue input, frequency or period TFT LCD display panels using the and can be used to restart the processor if
measurement and counting. MMBasic ILI9341 and other controllers are the program fails with an error or is stuck
commands will generate pulses and supported allowing the BASIC program in a loop. The running program can be
can be used to transfer data in parallel. to display text and draw lines, circles protected by a PIN number, which will
Interrupts can be used to notify when an or boxes in 65,535 colours. Resistive help prevent an intruder from listing or
input pin has changed state. Up to five touch controllers on these panels are modifying the program or changing any
PWM or SERVO outputs can be used to also supported, allowing them to be used features of MMBasic.

Everyday Practical Electronics, February 2017 45

MicroMite-Pt1 (MP 1st & Geoff G) FEB 2017.indd 45 13/12/2016 05:54

Because the editor is built into MMBasic Fast enough to respond
you can easily modify a program running to a high-revving engine
on the Micromite. You might have a and generate signals
Micromite controlling something (say such as ignition triggers.
your heating system) and you need to And if that is not fast
make a change. You can just connect enough, you can embed
to the console, interrupt the running compiled C functions
program (with CTRL-C), run the editor in your BASIC program
to make the change and then set the (explaineded later).
program running again. Follow that with
a disconnect from your laptop and in a Data types
matter of minutes your change is done. MMBasic on the
Micromite supports
BASIC interpreter three data types
The BASIC interpreter running on the floating point, 64-bit
Micromite (called MMBasic) is Microsoft integers and strings.
BASIC compatible, which means that the Floating point allows Fig.4. Solderless prototyping with the Micromite
syntax was kept as close to Microsoft you to use numbers
BASIC as possible and this makes it with a decimal point;
possible to download many programs for example, 12.4. It also means that required, for instance, when working
from the Internet and run them with with general calculations (particularly with frequency synthesisers.
little modifications. involving division) you get the result that The third data type strings is an
There are some functions not covered you would intuitively expect. So floating often overlooked but important feature
by Microsoft BASIC (eg, SELECT CASE) point is good for most applications and of MMBasic. A string is a sequence of
and in that case MMBasic relies on the is the default used by MMBasic. ASCII characters and MMBasic has an
ANSI Standard for Full BASIC (X3.113- But the problem with floating point extensive set of functions to pull them
1987) or ISO/IEC 10279:1991 for the numbers is that they only store an apart, search them and reassemble them
appropriate syntax. approximation of the number when in many ways. These powerful string
MMBasic is an interpreter, but it is the number has more than six or seven functions come into their own when you
optimised for speed. Most commands significant digits. To avoid this issue, are dealing with text displays, GPS data,
and functions are converted to single- you can specify numbers as 64-bit signed serial interfaces and so on.
byte tokens when a program is loaded, integers. These can be used to accurately Before we leave data types we should
and that makes it possible for the count and manipulate numbers up remind you that you can define arrays of
interpreter to execute a command or to nine million million million (or these data types with their size limited
function with little overhead. Similarly, 9223372036854775807 to be precise), only by the amount of free memory.
caching is used for things such as user- which is a very large number indeed.
defined functions, so that they can be An illustration of where 64-bit integers Interrupts
instantly located when a call is made come in handy is when you are dealing Interrupts are another powerful feature
to them. with latitude and longitude, which need of MMBasic. An interrupt is when
As a result, the Micromite will typically to be stored with more than six digits of MMBasic suspends the running of the
execute each command in 50S or faster. accuracy. There are many other cases main program to execute a subroutine
This is plenty fast for most applications. where large and precise numbers are when some signal is received.

Electrical characteristics Digital outputs

Current draw/sink 1
 0mA (absolute max 15mA per pin or
Power supply 200mA for whole chip)
Voltage range  .3 to 3.6V (3.3V nominal). Absolute
2 Max open-collector voltage is 5.5V
maximum 4.0V
Current at 48MHz 31mA typical (plus current draw from PWM output
the I/O pins) Frequency range 20Hz to 500kHz
Current at 5MHz 6mA typical (plus current draw from Duty cycle  -100%, 0.1% resolution below 25kHz
the I/O pins)
Current in sleep 90A to 100A typical (plus current Communications speeds
draw from the I/O pins) Console serial Default 38400 baud (range is 100 bps
to 230400 bps at 40MHz)
Digital inputs COM1 serial Default 9600 baud (range is 10 bps to
Logic low 0 to 0.65V 230400 bps at 40MHz)
Logic high 2.5V to 3.3V on normal pins COM2 serial Default 9600 baud (range is 10 bps to
2.5V to 5.5V on pins rated at 5V 19200bps at 40MHz)
Input impedance >1M. All digital inputs are Schmitt- SPI 10Hz to 10MHz (at 40MHz), limited to
trigger buffered 25% of clock speed
Freq response Up to 200kHz (pulse width 20nS or I 2C 10kHz to 400kHz
more) on the counting inputs (pins 15 1-Wire Fixed at 15kHz
to 18)
Timing accuracy
Analogue inputs All timing functions (the timer, tick interrupts, PWM
Voltage range 0V to supply voltage, normally 3.3V frequency, baud rate) are dependent on the internal fast RC
Accuracy Analogue measurements are referenced oscillator, which has a specified tolerance of 0.9%, but
to the supply voltage on pin 28 and the typically is within 0.1% at 24oC.
ground on pin 27. If the supply voltage
is precisely 3.3V, the typical accuracy Flash endurance
of readings will be 1%. Over 20,000 erase/write cycles every program save incurs
Input impedance >1M (for accurate readings, source one erase/write cycle. In a normal program development it is
impedance should be <10k) highly unlikely that more than a few hundred program saves
would be required.

46 Everyday Practical Electronics, February 2017

MicroMite-Pt1 (MP 1st & Geoff G) FEB 2017.indd 46 13/12/2016 05:54

This signal can be a change of state on These will be explained in more detail in Embedded C routines
an I/O pin (for example a button press), a later article, but the following provides MMBasic running on the Micromite is
it can be when data has been received on a short summary. an interpreter. This means that your
a communications port (serial or I2C), or The Micromite can be configured to program is held in its original text
a keypress on the console, reception of a automatically start running its program format and the interpreter steps through
signal from an infrared remote control, on power up, so it will act as a dedicated it, interpreting each instruction as it
and so on. intelligent chip. The processor speed is encountered. The alternative is a
When you use interrupts you can write can be dynamically changed to provide compiler, as used on the Arduino and
your main program to just take care of speed when it is needed and conserve other microcontroller systems that use
the main job, which might be something power when it is not. The sleep function the C or Python language. A compiled
like monitoring a collection of sensors results in even more power saving with language like these requires a desktop
and generating the appropriate control the chips current draw dropping to less type computer to do the translation of
signals. While the main program is doing than 100A. the program for the microcontroller.
that job, intermittent signals such as All errors can be trapped if necessary, This two-step process (compile/
key presses and timing events can be and the watchdog feature will transfer/run) makes for a slow
handled in interrupt subroutines without automatically restart the Micromite development process, but the benefit is
disturbing the main program. should the program fail for some reason. that the resulting program runs much
To prevent anyone from interfering faster than an interpreted program. An
Embedded features with the running of the program, the interpreter like MMBasic has a very fast
The Micromite is primarily intended as break feature can be disabled and a PIN development cycle because you can jump
an embedded controller and therefore number can be set to restrict access to from the editor to running the program
has a number of features to support this. the command prompt. in a fraction of a second and then, if an

2.3V to 3.6V, 26mA

PICkit 3 1 28
2 27
3 26
4 25
5 24
6 23
7 22
NC 6
8 Micromite 21 47F tantalum or
10F MMC ceramic
9 20
10 19

11 18

12 17
13 16
14 15

Fig.5. PICkit 3 connection to the Micromite Fig.6. Using the IPE with the Micromite

Programming the chip component, you should select this as

the full installation consumes a lot of
hex data. This operation is fairly fool
proof, so if IPE reports that the chip
To program the Micromite firmware disk space, which is not needed when was successfully programmed you can
into the PIC32 chip you need a suitable you just want to program a chip. be sure that it is OK.
programmer and arguably the best for To get started you must connect the However, that may not happen. A
the job is the Microchip PICkit 3. This PICkit 3 as shown in Fig.5. Then run typical error message is Target Vdd
can be purchased from Microchip and the IPE software, which will display the not detected which means that the
clones are available on eBay for as little as screen shown in Fig.6. From then on the programmer could not detect 3.3V
10. We have tried a few of these clones operation is reasonably intuitive: select on the Vdd pin (ie, the chip is not
and they worked just as well as the real the chip then select the programmer powered). Another error is Cannot read
thing, so the choice is yours. (PICkit 3). Next, click on the browse device ID. The programmer could tell
To program the chip, you need to button to load the Micromite firmware. that you had connected to something
supply 3.3V power and connect the The firmware can be downloaded from (because Vdd was present) but it could
47F capacitor to pin 20 on the 28-pin the EPE website or from the author (http:// not communicate with the chip. This
chip or pin 7 on the 44-pin chip. In this You need a usually means that something was
tutorial we are going to concentrate on file with the name Micromite_x.x.hex interfering with the MCLR, PGD and/or
the 28-pin chip. where x.x represents the current version PGC lines (ie, they were not connected
To drive the PICkit 3 you should load number. The .hex suffix means that the or other components were loading down
MPLAB IPE (Integrated Programming data is in hexadecimal format, ready for the signals).
Environment) onto your desktop the programmer. Finally, assuming the chip was
computer running Windows, Mac OS The final step is to click on the Program programmed correctly, you can
or Linux. This software is available button in the IPE window. IPE will first disconnect the PICkit 3 and cycle the
from Microchip and is part of their erase the chip, then program the hex power. This will set the chip running
MPLAB IDE programming environment. data into the chip, followed by a verify the Micromite firmware. The next step
When you install the software you are stage, which reads back the programmed is to connect a terminal emulator to the
given the option to load just the IPE chip and compares it to the original console, as described in the main text.

Everyday Practical Electronics, February 2017 47

MicroMite-Pt1 (MP 1st & Geoff G) FEB 2017.indd 47 13/12/2016 05:54

Table 1. Microcontrollers suitable for use as a Micromite code and add it to MMBasic so that it
will act the same as a built-in command.
Version Dimensions (mm) If you are fluent in the C programming
PIC32MX170F256B-50I/SP 28-pin DIL package. Guaranteed to run at 48MHz language you can write your own
embedded C routines. There is also
PIC32MX170F256B-50I/SO 28-pin SOIC package. Guaranteed to run at 48MHz a selection of embedded C routines
PIC32MX170F256D-50I/PT 44-pin surface-mount package. Guaranteed to run at 48MHz included with the MMBasic firmware
distribution, which includes drivers
PIC32MX170F256B-I/SP 28-pin DIL package. Guaranteed to run at 40MHz for alternative LCD display panels,
additional communications ports (serial,
PIC32MX170F256B-I/SO 28-pin SOIC package. Guaranteed to run at 40MHz
I2C and SPI), sorting routines and more.
PIC32MX170F256DI/PT 44-pin surface-mount package. Guaranteed to run at 40MHz
Note: from testing, the chips rated at 40MHz also ran at 48MHz (at room temperatures), so
Getting started
they are a viable choice if you cannot find the higher speed versions. The Micromite firmware can be
programmed into a range of chips as
error is discovered, quickly jump back C functions for speed. The embedded listed in Table 1. These cover a variety
into the editor. C routines require a larger computer of package sizes and two speeds (40MHz
With MMBasic running on the (Windows, Mac or Linux) to compile or 50MHz). The Micromite will start
Micromite you can have the best of both the routines and the resulting code is up at 40MHz, so the firmware will run
worlds an interpreter for fast and easy embedded in your BASIC program. on any chip, but within your program
program development and embedded MMBasic will extract this embedded you can step its speed up to 48MHz to
take advantage of the faster chip speed
available if you are using a 50MHz chip.
28-pin Micromite connections You can program the firmware into the
chip yourself see side box Programming

the chip for details. You can also buy
RESET Wired to +V directly or via 10k resistor 1 28 ANALOG POWER (+2.3V to +3.6V)
a pre-programmed chip and this will
be much easier if you are just starting
out with the Micromite and would like
to avoid the added complication that
programming the chip would entail. See
the Micromite sources box for a list of
where to obtain pre-programmed chips.
With a pre-programmed chip you can
just plug it into a breadboard and start
experimenting. However, note that the
firmware is often updated with new
features and bug fixes, so a programmer
POWER (+2.3V to +3.6V) 13 16 DIGITAL | 5V | COUNT | WAKEUP | IR
will be necessary if you want to take
advantage of future updates.

Where is the development board?

The above diagram shows the possible functions of each I/O pin on the Micromite.
Readers familiar with microcontroller
Note that the physical pins on the chip and the pin numbers used in MMBasic
evaluation products might ask, where is
are the same. This means that nine pins are not available in MMBasic because
the printed circuit board with a display,
they are dedicated to functions such as power and ground. These pins are shaded
I/O connectors, etc?.
in grey in the diagram.
The answer is to not think of the
Micromite as a complex system. It is a
The notation is as follows (the mnemonic in brackets is the mode used in the
single-chip microcontroller, which you
SETPIN command):
build into a circuit and program in place.
If you want to experiment with the 28-
ANALOG These pins can be used to measure voltage (AIN). pin chip you can plug it into a solderless
breadboard, as illustrated in Fig.4.
DIGITAL  an be used for digital I/O including digital input (DIN) and
C The 44-pin version of the Micromite is a
digital output (DOUT) surface-mount chip and to make it easier
COUNT Can measure frequency (FIN), period (PIN) or counting (CIN) for readers to use this you can purchase
the 44-pin Micromite module from UK
5V  hese pins can be connected to 5V circuits. All other I/O pins are
T supplier This is
strictly 3.3V max shown in Fig.1 and Fig.2, and includes
COM xxx These are used for serial communications (see Appendix A) the Micromite chip and a USB-to-serial
converter for the console. It is designed
I2C xxx These are used for I2C communications (see Appendix B) to plug into a solderless breadboard for
testing so it can be used in a similar
SPI xxx If SPI is enabled these pins are for SPI I/O (see Appendix D)
manner as the 28-pin version.
PWM xxx PWM or SERVO output (see the PWM and SERVO commands) Using a solderless breadboard is
invaluable when experimenting with
IR  an be used to receive signals from an infrared remote control
C the Micromite, but once you have the
(see the IR command) hang of how the chip works you would
WAKEUP Can wake the CPU from sleep (see the CPU SLEEP command) normally design a circuit around it and
then continue to develop your program
Pins 27 and 28 are the ground and power for analogue measurements. Normally, while it is in the circuit. This in-circuit
they are connected to the general ground and power (pins 8 and 13) but if you development is very productive because
require noise-free and accurate analogue readings you should make sure that the it allows you to develop and test small
power on pin 28 is regulated to 3.3V and well filtered. Also, your analogue inputs parts of the program as you go.
should be referenced to pin 27 (the analogue ground). For example, if your project was a home
brew controller you could develop and

48 Everyday Practical Electronics, February 2017

MicroMite-Pt1 (MP 1st & Geoff G) FEB 2017.indd 48 13/12/2016 05:55

2.3V to 3.6V, 26mA

2 x AA batteries or a
nominal 3.3V supply
1 28

2 27

3 26
4 25

5 24

6 23

7 22
USB-serial converter 8 Micromite 21
9 20
10 19
11 18
USB 12 17
47F tantalum or
PC running WIndows / OS X / Linux 13 16 10F MMC ceramic
14 15

Fig.5. Using a CP2102 to enable console connection between the Micromite and a PC
test the temperature sensor first, then interface over which you can issue Console connection
the power control and so on. The final commands to configure the chip and With the chip programmed, the next
program would just string these modules edit/run programs. MMBasic also uses step is to connect a terminal emulator
together. the console to display error messages. to the console. The console is a serial
A serial interface consists of
two signals. One, often referred
44-pin Micromite connections to as Tx (for transmit) sends
 a coded signal to the other

device, and the second (called

Rx) receives a signal. The data

is sent with start and stop bits


POWER (+2.3V to +3.6V)

and uses ASCII coding for each




character sent or received. The

speed of transmission is referred

to as baud rate, which is another


way of saying bits per second.

The Micromite starts up with its
console serial port set to a baud
33 32 31 30 29 28 27 26 25 24 23
rate of 38400.
The signal level is TTL, which
means that the signal swings
between 0V and 3.3V. There are
DIGITAL | 5V 38 18 RESET Wired to +V directly or via 10K resist
other signalling methods, notably
GROUND 39 17 ANALOG POWER (+2.3V to +3.6V)
RS232, which swings the voltage
POWER (+2.3V to +3.6V) 40 16 ANALOG GROUND
12 volts. The Micromite can
accommodate RS232 too, but to
get started you must ensure that
your signalling levels are TTL.
The best method of accessing the
1 2 3 4 5 6 7 8 9 10 11 serial console is to use a USB-to-
serial converter, which will plug
into a USB port on your desktop











computer and at the other end

connect to the Micromites serial
console. To your computer it
will look like a serial port (via
USB), while the connection to the
Micromite Plus is a standard serial
interface with TTL signals levels.
We recommend converters based
on the CP2102 chip and they can
The above diagram shows the possible functions of each I/O pin on the 44-pin Micromite. be found cheaply on eBay (search
Note that the physical pins on the chip and the pin numbers used in MMBasic are the for CP2102). Fig.7 shows how
same. This means that 11 pins are not available in MMBasic (these pins are shaded in grey). such a converter can be connected
to the 28-pin Micromite and a 44-
The notation is the same as described for the 28-pin version. Pins 16 and 17 are the ground pin Micromite module.
and power for analogue measurements. Normally they are connected to the general ground When the converter is plugged
and power (pins 29 and 28) but if you require noise-free and accurate analogue readings into your computer, and the
you should make sure that the power on pin 17 is regulated to 3.3V and well filtered. Also, correct driver is installed, it
your analogue inputs should be referenced to pin 16 (the analogue ground). will appear as a serial port (ie,
COM29 in Windows). You then

Everyday Practical Electronics, February 2017 49

MicroMite-Pt1 (MP 1st & Geoff G) FEB 2017.indd 49 13/12/2016 05:55

time you will find yourself sophisticated functions that you might
repeatedly reconnecting to only need in specialised circumstances.
make one tweak or another, It is in PDF format and available for
so many people leave the free download from the EPE website
USB to serial converter and the authors website: http://geoffg.
permanently connected net/micromite.html
(they do not cost much). This series of articles will go through
many aspects of the BASIC language but
Trouble shooting they will not cover everything. Many
What if it does not work the commands have additional features, so
first time? The first step is to it would be worthwhile downloading
check your power supply. Is the manual and having it handy as you
it 3.3V and is it stable and free read through this and following articles.
Fig.8. Micromite emulator command prompt from electrical noise? If you That way, you can explore the full detail
need to start a terminal emulator on your have some doubts, you can use two fresh of a command that might interest you.
computer. For Windows we recommend AA batteries in series as a power source
Tera Term version 4.88, which can be for testing. Then check that 3.3V is on Short tutorial
downloaded for free from http://tera- each pin, as specified in Fig.7 and that Assuming that you have correctly Set the interface each ground pin is correctly connected connected a terminal emulator to the
speed to 38400 baud and connect to the to ground. Micromite and have the command
serial port created by the USB-to-serial The next check is the 47F capacitor prompt (the greater than symbol: >) you
converter. connected to pin 20 on the 28-pin can enter a command followed by the
Macintosh and Linux computers have chip or pin 7 on the 44-pin chip. This enter key and it will be immediately run.
similar features and terminal emulators; capacitor is used to stabilise the internal For example, if you enter the command
however, the procedure for setting these 1.8V regulator within the PIC32 chip PRINT 1/7 you should see this:
up will vary. and without it you will not be able to
After the console has been connected program or use the chip. This capacitor > PRINT 1/7
to a terminal emulator, apply power to must be a tantalum or a ceramic type 0.142857
the Micromite and you should see the an electrolytic capacitor will not work. >
Micromites prompt (>), as shown in Has the chip been properly programmed?
Fig.8. At this point, you can enter, edit If you programmed it yourself you should This is called immediate mode and is
and run programs using nothing more check that the programmer did report useful for testing commands and their
than the terminal emulator and a USB that the programming operation was effects.
cable. successful. Check the current drawn by To enter a program you can use the EDIT
When your program has been tested the chip a draw of about 26mA means command, which will be described later
and is running on the Micromite you do that the chip is working correctly and in this series. However, to get a quick
not necessarily need the console, so you running the BASIC interpreter. A current feel for how it works, try this sequence
could set the Micromite to automatically of less than 10mA indicates that: (your terminal emulator must be VT100
run its program on startup (OPTION n Power or ground connection is faulty compatible):
AUTORUN). However, unless you got the n 47F tantalum capacitor is faulty or At the command prompt type EDIT,
programming perfectly correct the first not connected followed by the ENTER key. The editor
n Chip not programmed correctly. should start up and you can enter this line:

Micromite sources If you have a current draw of about

26mA the fault is most likely with the
PRINT "Hello World"

Programmed ICs, modules and kits USB-to-serial converter or your terminal Press the F1 key in your terminal emulator
emulator. To check these two elements (or CTRL-Q, which will do the same thing).
EPE online store you can disconnect the serial connections This tells the editor to save your program
??? tbd ??? from the Micromite and short the Tx and and exit to the command prompt.
Rx pins of the converter together. At the command prompt type RUN, When you type something on the followed by the ENTER key. You should keyboard into the terminal emulator you see the message:
should see the characters echoed on the
Graeme Rixon (Rictech) screen. If not, you should diagnose and Hello World correct the error in your USB-to-serial
converter and terminal emulator before Congratulations! You have just written
CircuitGizmos proceeding. and run your first program on the If the above test is OK (ie, keystrokes Micromite. If you type EDIT again you
echo on the screen) the only possible will be back in the editor, where you
Mick Gulovsen remaining fault is in your connection could change or add to your program. of the USB-to-serial converter to the
Mites Micromite. Check that the Tx pin on Flashing an LED
the converter goes to the Micromites Connect an LED with a suitable current-
Unprogrammed (blank) chips Rx pin and that Rx on the converter limiting resistor (say 470) to pin 15 of
goes to the Micromites Tx pin, as
Microchip illustrated in Fig.7.
User manuals 12 17
Element14 The Micromite is quite a sophisticated 13 16
470 device. After all, it is a full computer with 14 Micromite 15
a multitude of facilities. As a result, the LED
RS Components Micromite User Manual, which describes it adds up to almost 100 pages.
This manual is the ultimate reference
All suppliers will ship internationally for the Micromite and covers Fig.9. Schematic for a Micromite LED
everything from the I/O pins through to flasher circuit

50 Everyday Practical Electronics, February 2017

MicroMite-Pt1 (MP 1st & Geoff G) FEB 2017.indd 50 13/12/2016 05:55

the 28-pin Micromite, as shown in Fig.9. Then
use the EDIT command to enter the following


PIN(15) = 1

PIN(15) = 0

When you have saved and run this program

you should be greeted by the LED flashing
on and off. It is not a sophisticated program,
but it does illustrate how your Micromite
can interface to the physical world via your
The chapter Using the I/O pins later in the
manual provides a full description of the I/O
pins and how to control them. OSCILLOSCOPE
Setting the AUTORUN option
You now have the Micromite doing something

useful (if you can call flashing an LED useful).
Assuming that this is all that you want the
Micromite to do you can then instruct it to
20 MHz
always run this program whenever power is resolution bandwidth
To do this, you first need to regain the
command prompt and you can do this by
entering CTRL-C at the console. This will
interrupt the running program and return
you to the command prompt. Then enter the


This will instruct MMBasic to automatically

run your program whenever power is applied.
To test this, you can remove the power and
then reapply it. The Micromite should start
up flashing the LED.
8 channels 256 MS
buffer memory

If this is all that you want to do you can

disconnect the serial console and it will sit The PicoScope 4824 is a low-cost, portable solution
there flashing the LED on and off forever. If for multi-input applications. With 8 high-resolution
ever you wanted to change something (for
example, the pause between on and off) you analog channels you can easily analyze audio,
could reattach your terminal emulator to the ultrasound, vibration, power and timing of complex
console, interrupt the program with a CTRL-C
and edit it as needed. This is the great benefit systems.
of the Micromite, it is very easy to write and
change a program.
The PicoScope 4824 has the power and functionality
Next month to deliver accurate results. It also features deep
In Part 2 we will describe the editor, special
device control and interfacing to touch sensitive memory to analyze multiple serial buses such as
LCD panels. UART, I2C, SPI, CAN and LIN plus control and driver

Also features:
High-performance arbitrary waveform generator
Keep up to date! Advanced digital triggers
For updates to the Micromite firmware
you can visit the authors website at: Serial bus decoding SuperSpeed USB 3.1 Gen 1 interface
Another resource is The Back Shed
forum where there are many Micromite Windows, Mac and Linux software
users who are happy to help newcomers,
see: For more information please visit
Email: Errors and omissions excepted. Prices are correct at the time of publication. Sales taxes not included.
Please contact Pico Technology for the latest prices before ordering.

Everyday Practical Electronics, February 2017 51

MicroMite-Pt1 (MP 1st & Geoff G) FEB 2017.indd 51 13/12/2016 05:56

A Slice of Alexa Pi
N RECENT editions of Net Work, control technology that understands are buried deep within the Google
I outlined Amazon UKs Echo, spoken commands and responds Play Store and are not yet available.
an anglicised version of their accordingly. Echos so-called skills Developments and refinements are
network-aware smart speaker that has are app-like features designed for a a work in progress, so its probably
stolen the lead over Googles Home particular task. Alexas skillset is not better to think of all these devices as a
smart device. In November, Amazon confined to the smart Echo cylinders good start, with the best still to come.
decided to celebrate Black Friday, that are starting to populate our homes
Americas latest export to Britain, by though: AVS offers developers of Content is king
lopping 20% off the price and Echo connected products the possibility of Twenty years ago, when the web was
is starting to appear in major British integrating Alexa into their devices, first taking shape, a certain Bill Gates
retail stores as well. Rather perversely, along with third-party skills using the of Microsoft exclaimed that Content
many bricks-and-mortar retail stores Alexa Skills Kit (ASK). Interestingly, is king and never has that been more
claimed they were nearly empty on Amazon provides examples based on true than today. With broadband
Black Friday, because shoppers had the Raspberry Pi, which gives rise to services becoming ever more generic
gone online hunting for bargains the prospect of a Pi responding Alexa- and indistinguishable, ISPs have fallen
instead. Even a DIY store checkout style to spoken queries. More details of over themselves to add more value
assistant whispered to me how she AVS are at: (make more profit) and lock customers
hates shopping in stores and much com/alexa-voice-service/what-is-avs. into deals by bundling more services
prefers using eBay and Amazon! A sample Java app for Pi is offered (mobile phones, data plans, VoIP) but
One motive behind Amazons on GitHub at: the one thing major providers, portals,
Echo is to make online shopping as alexa/alexa-avs-sample-app/wiki/ blogs and websites are desperate to
painless and seamless as possible, Raspberry-Pi, along with hardware supply is unique content. Satellite
removing every physical obstacle requirements and an installer broadcaster Sky and British Telecom
between wanting to buy something ensuring a hassle-free Alexa setup stumped up some 5 billion ($6.1
and actually completing Amazons within an hour... in theory. billion) on Premier League soccer
checkout process. Amazons Echo will It is still early days for Google Home, rights between them, with BT Sport
manage a shopping cart for you, as but already they are starting to leak out offering soccer, Australian cricket and
well as handling an increasing number onto eBay (with US mains adaptor) tennis to its own subscribers.
of simple everyday tasks. for 125-240 ($150-$300). In due Meanwhile, Amazon is pressing on
Amazons Alexa is the product of course, it will be possible to customise with its Prime service, which offers
Alexa Voice Service (AVS), Amazons your Google Home with a choice of free next-day delivery on many lines
cloud-based voice recognition and fabric and metallic bases, but these and is showing The Grand Tour,
the re-incarnation of BBC TVs Top
Gear motoring program, streamed
in 4K HDR. Amazon claims the first
programme in the series, streamed
on 18 November, enjoyed the biggest
ever premiere viewing figures on
Prime, and the programme was widely
acclaimed. The Grand Tour will be
released to some 200 countries in
December 2016, no doubt giving
some viewers the excuse they crave to
upgrade to the biggest and best 4K TV!
In order to convert an ordinary TV
into a smart one capable of receiving
services such as catch-up TV, Netflix
or Amazon Prime, Amazons Fire Stick
HDMI streaming media player also
received the Black Friday discount
treatment, dropping to just 25, and
I admit to finally succumbing to the
appeal of the Fire Stick just before
Christmas. Other streaming devices
Amazons Alexa Voice Service (AVS) offers the prospect of adding Alexas voice such as NowTV, Roku and Googles
control to a Raspberry Pi for example very versatile Chromecast dongle may

52 Everyday Practical Electronics, February 2017

Network FEB 2017.indd 52 16/12/2016 14:30

also fit the bill. There has never been a more comprehensive
but confusing choice for HDMI streaming media devices for
your TV, and we can expect the major brands to continue to
slug it out in the quest to conquer your home offering more
content than you can ever consume, of course.

Up close and personal

Isnt it strange how many people have uneasy or irrational
views when it comes to their privacy and anonymity? If
a local town council was to rummage through everyones
wheelie bins one dark night when trying to profile the
residents, even if the bins were anonymised and contained
no personally identifiable materials, people would still
complain about being snooped on. Paradoxically, the
same citizens probably wont complain about surveillance
cameras following them everywhere in a shopping mall,
claiming that as they have nothing to hide they have nothing
to fear. They would never, however, accept CCTV watching
them at home in the lounge or anywhere else. So privacy
does matter then, its just that most people dont think about
it objectively or rationally. This very human phenomenon
was the subject of a thought-provoking TED Conference
talk by Glenn Greenwald, entitled: Why Privacy Matters,
viewable at:
A users online experience embraces some of the same
confused rationale. I have written in the past about how Tor is a web browser designed from the ground up to protect
some online operators seem to know almost everything about your privacy
you except your name, and this intrusion starts with your from Windows, Mac, Linux and
IP address. The use of cookies, so-called trackers and geo- Android versions are provided. After opening the Tor
location services all help the web industry to gather statistics browser, you have to connect to the Tor network, which
and determine what websites your browser recently visited, might take a minute or two. Using Tor to check our own
what products you looked at recently, roughly where you are EPE website hosted right here in Britain, the Tor circuit
located and what your personal tastes and interests are likely (like Traceroute), displayed via the onion button, showed
to be. Marketers could even use so-called beacons to track anonymous detours via several European countries.
your progress walking up and down the shopping mall or Thats all for this months Net Work. You can contact the
around a store and target suitable adverts directly to your author at or send comments for possible
smartphone, which will become commonplace in the future. inclusion in Readout to
To see the scale of this online snooping, try installing the
Ghostery Extension for your web browser, downloadable
from A quick trip to the mobile site of
eBay UK, for example, showed no less than 33 trackers, all
keeping an eye on you. A Daily Express web page contained
Electronics & Robotics for Makers
nearly 50 of them.
There is probably nothing in the world that technology TinyDuino
companies like Google, Amazon, Facebook and eBay want As powerful as the Arduino Uno but smaller than
a 2 pence coin.
more than to hone an artificial intelligence that gets inside
users minds, second-guessing what they want and what Complete with a wide and growing range of
TinyShields - where will your next project take
they might like to buy. Advertising opportunities abound you?
and the name of the Internet game is monetisation, as
All the power of the Arduino in a fraction of the
industries scramble to profile you and grab a share of your space, great for building intelligence in to your
disposable pounds, dollars and euros. If anyone is worried projects.
by how the Internet industry spies on web surfers then one STEMTera Breadboard
solution is to use the Tor (The Onion Router) web browser,
which disguises your IP address and is downloadable A breadboard with built-in Arduino! The breadboard has a total of 41 I/O
pins of which 9 provide PWM. Pin-to-pin compatible with Arduino UNO R3
shield. The bottom cover is Lego compatible and will fit base plates and
bricks - great for Robotics and Animatronics.
Fully Arduino IDE compatible and built
with strong ABS plastic and is available in
a range of colours.

Edison Robot
Edison is great for schools and hobbyists alike
to teach kids robotics and programming on any
computer, tablet or phone.
Edison is a LEGO compatible robot which
means your kids can let their imagination run
wild. Why not make a remote control LEGO
There's a lot that one Edison Robot can do, imagine what your kids can do
with a team of them working together!

Supporting Education

Ghostery is a browser plug-in that highlights the trackers that
are monitoring your surfing activities

Everyday Practical Electronics, February 2017 53

Network FEB 2017.indd 53 20/12/2016 16:00

Circuit Surgery
Regular Clinic by Ian Bell

Darlington relay switch

N EW EPE Chat Zone user wolfie
posted some questions about a
circuit (see Fig.1) which uses a relay
To prevent inductive kickback
from damaging the transistor.
corresponding voltages will indeed
be above and below 1.3V respectively.
The variable resistor can be adjusted
to switch a load depending on the In this article we will look at the to set the exact light level at which the
light level sensed by a light-dependent circuit in more detail and examine circuit switches.
resistor (LDR). He writes: Hi all. I am the issues raised by the questions, In idealised circumstances these
a newbie when it comes to electronics with particular focus on transistor dark/light conditions provide a clear
and Im trying to teach myself from switching operation. signal to switch the transistors (and
some books I have. The trouble with In the Chat Zone thread, fellow hence the relay) on and off. That is,
books is if you dont understand EPE author Alan Winstanley pointed if transistors were perfect voltage
summat you cant ask it! In one of my out the battery symbol is not correct controlled switches, which did not
books theres a little project at the end of the symbol used represents a single require any input current then the
each chapter. However, it doesnt have cell (typically 1.2V to 1.5V, but it situation would be straightforward.
much explanation as to how it works. I depends on the battery technology). A However, transistors require an input
dont need to actually build the project, 9V battery contains multiple cells. A (base) current when conducting, so we
but I want to understand what each correct symbol is shown in Fig.2. have to work out if enough current will
part of it does. The first one looks very be available from the potential divider.
simple, but it leaves me with a number +
of questions. I understand that the LDR Rough calculations
and the VR create a voltage divider that 9V It is often worth performing
at some point turns the transistor on, approximate calculations to get a feel
which allows current to run through the for the situation in a circuit. Here we
relay and turn on whatever you want need some idea of the ratio of current
turning on. So, heres my questions: into Q1s base (the switch control
1. Whats the resistor doing, the 2.2k Fig.2. Correct 9V battery symbol input) to Q2s collector current (the
one? Whats its purpose? current through the load). In addition
2. Why two transistors, if they act Circuit operation to the original circuit in Fig.1, for
as switches why do we need two The circuit operates as follows. First, comparison purposes, we will also
switches? as noted by wolfie, the LDR and consider a single transistor, as shown
3. Whats that diode doing? variable resistor form a potential in Fig.3. This is simplified to show
Thanks in advance. divider connected across the supply. just a transistor and load; plus, the
Consider the LDR and variable resistor various currents and voltages have
Wolfies post was titled First silly on their own, initially. The voltage at been labelled. For the circuit in
questions, but the questions are far the junction between them will depend Fig.3, current ratio relates to the base
from silly, and as is often the case, on the relative resistance of the two and collector currents of the single
produced helpful responses from devices, which in turn depends on the transistor Q1. The ratio of collector
other Chat Zone users. The basic light level and the variable resistance current to base current is called the
answers are: setting. With the LDR in darkness, its current gain of the transistor (symbol
1) The 2.2k resistor limits the base resistance will be very high (typically ) we can apply this idea to the Q1/
current into Q1 to a safe level. several million ohms), probably at Q2 transistor pair as well as the single
2) A single transistor is unlikely to least ten times larger than the variable transistor.
have sufficient current gain to resistor value. Thus, the voltage at the The worst case for supplying
switch the load from the current junction will be close to the supply current to the transistor(s) when
available for the LDR potential voltage. When the LDR is exposed to the LDR is dark (transistor(s) on) is
divider. bright light its resistance will drop when the variable resistance is set to
significantly (to typically several its maximum value of 220k. With
thousand ohms), probably at least ten a supply of 9V, Ohms law shows
times smaller than the variable resistor
value. Now, the voltage at the junction
220k D1 Relay
will be close to zero.
If the light level changes from
dark to light then the voltage will RL
+9V +
switch between something close to
9V to something close to 0V. For the VBC

Q2 transistors to conduct (and turn on the IB

relay) their base-emitter voltages (VBE) Q1 VCE
must both be greater than about 0.65V,
so the voltage at the base of Q1 in VBE IE

the circuit in Fig.1 needs to be above

about 1.3V. With the typical LDR dark
Fig.1. Chat Zone user wolfies schematic and light values just discussed, the Fig.3. Single-transistor switch

54 Everyday Practical Electronics, February 2017

Circuit Surgery FEB 2017.indd 54 16/12/2016 14:28

or reverse biased (off) so there are actually four different regions of operation for the
transistor. These are shown in table 1. When using transistors in circuits it is important to
make sure they are in the appropriate region of operation. When a single transistor is used as
a switch it is usually switched between the saturation and cut-off regions.

that maximum current through Table 1 Bipolar transistor regions of operation

Table 1: Bipolar transistor regions of operation
a 220k resistor is 9V/220k =
41A. The actual voltage across Base-emitter Base-collector
it will be a little lower, but Region of operation Comment
this will do for a rough idea. A junction bias junction bias
typical 9V relay might have a Forward Forward Saturation Switch ON
coil resistance of 115; so with Poor amplifier, specialist
9V across it the current is 78mA. Forward Reverse Reverse Active
(This is a guess of course, as
wolfie does not state what relay
Reverse Forward Forward Active Good amplifier
is used, but it is sufficient for Reverse Reverse Cut-off Switch OFF
illustrative purposes).
The ratio of controlled current In tothe cut-off
switch. We can
region both also address
junctions in thethe first
transistor transistor.
are With aand
reverse biased voltage drop flows
no current of 0.2V
controlling current is 78mA/41A, question in this context. the dissipation in the
through the transistor (except some leakage current). Thus, a transistor-based switch will transistor duebeto
which is about 2000. Thus, a the load current would only be about
transistor switch needs a current off. TheRegions
very low of current flow through the cut-off transistor
operation 16mW. ensures
In morethat very little switching
demanding power is
gain of about 2000 in this situation. dissipated in the transistor
A bipolar junctionwhen the switch
transistor applications
is off; however,
contains the be
care must current,
taken tovoltage
Single transistors typically have the s maximum
two diode (PN) junctions,voltage
collector-to-emitter CEmax) isand
this is(Vtrue power dissipation
not exceeded. In the case ofneed careful
circuits in
in the low hundreds, but the effective of Fig.3,
Fig.1 and both NPN and PNPcollector
the maximum transistors; consideration.
the voltage
to emitter is about 9V, which not a
is often much lower in switching junctions
demanding are simply
specification the switching
for a discrete opposite transistor.From Fig.1 and Fig.3 it is clear that
applications (more on this later). This way round in the two types, requiring most of the supply voltage will appear
rough calculation indicates that a opposite voltages for the same across the load if the transistor is
single transistor (as in Fig.3) would operation.
The saturation regionThe two junctions
is characterised by can saturated.
be voltage
a small In saturation,
drop between the collector-
the collector and
not have sufficient current gain emitter either forward
(called biasedis(on)
VCEmax), which around 0.1 to-emitter
or reverse
typically voltage
to 0.2V. In the across
saturation a bipolar
region both
hence the use of two transistors junctions in biased (off) sobiased,
are forward there so
junction four transistor
will have about 0.6Vdoesacross
not it.
For much with
wolfies circuit and the answer to the different regions of operation for the varying collector current, so we apply
we might see VBE = 0.7V and VBC = 0.50. The collector to emitter saturation voltage (VCEs) is
second question. transistor. These are shown in table a more or less constant voltage to the
equal to1.theWhen
usingbetween VBE and
transistors VBC in saturation,
in circuits load, in this case
which 0.2V. what we want.
is usually
Darlington pair it is important to make sure they are The forward active region is used
The two transistors in Fig.1 are in the appropriate region of operation. for amplifiers; where normally we
connected in what is known as a When a single transistor is used as a would want to avoid saturation as it
Darlington pair configuration. One switch it is usually switched between would probably imply clipping of
transistor is used to directly drive the saturation and cut-off regions. the signal. The base-emitter junction
another, resulting in a sort of super In the cut-off region both junctions will be forward biased with typically
transistor with a very high current in the transistor are reverse biased and around 0.6 to 0.7V across it (VBE);
gain. The Darlington configuration no current flows through the transistor but slightly lower than in saturation
can be made from either two NPN (except some leakage current). Thus, a case. The reverse active region is not
transistors (as used in the circuit transistor-based switch will be off. The commonly used, but does have some
in Fig.1, also see Fig.4) or two PNP very low current flow through the cut-off applications.
transistors (see Fig.4). Darlington transistor ensures that very little power
configurations are use in power- is dissipated in the transistor when Junction characteristics
switching applications (as in Fig.1), the switch is off; however, care must Fig.5 shows typical current-against-
power amplifier output stages, be taken to ensure that the maximum voltage characteristics for the base-
voltage regulators and some types of collector-to-emitter voltage (VCEmax) is emitter and collector-emitter junctions
sensing applications particularly in not exceeded. In the case of circuits in of a general-purpose switching
optocouplers, where the Darlington Fig.1 and Fig.3, the maximum collector transistor. The IBE curve (red) is the
arrangement can be used to increase to emitter voltage is about 9V, which base-emitter current and the IBC
the gain of a phototransistor. They is not a demanding specification for a (blue) is the base-collector current.
can also be used in the input and gain discrete switching transistor. Both curves show the standard diode
stages of amplifiers. The saturation region is characterised switch on characterises, where
The Darlington pair behaves like by a small voltage drop between the the current starts to increase very
a single transistor which requires collector and emitter (called VCEsat), significantly when the applied voltage
twice the value of base-emitter voltage which is typically around 0.1 to 0.3V. is increased about 0.6V to 0.7V.
(VBE) of a single transistor to switch In the saturation region both junctions The curves in Fig.5 are exponential,
it on, and which has a current gain are forward biased, so each junction so the rate of increase rises as the
approximately equal to the product will have about 0.6V across it. For applied voltage increases. Thus, small
of the gains of the two individual example, we might see VBE = 0.7V and increases in applied voltage can result
transistors (so potentially up to tens VBC = 0.50. The collector to emitter in very large current increase. These
or even hundreds of thousands). This saturation voltage (VCEs) is equal to curves are the input currents, so the
indicates that a Darlington pair should the difference between VBE and VBC in collector current will be larger still in
be able to achieve the gain of around saturation, in this case 0.2V. most cases. The total current in the
2000 that we calculated above. Before transistor is the sum of these junction
looking at use of the Darlington pair High current currents plus the collector current.
in switching applications in more A single transistor-based switch The curves in Fig.5 indicate why the
detail, it is worth looking at the is usually configured so that the 2.2k resistor is needed in the circuit
characteristics of a single transistor transistor is saturated when the switch in Fig.1 (and would be in the circuit
is on. The resulting low voltage drop in Fig.3 too). If the 2.2k resistor was
from collector to emitter means that not present and the variable resistor
the power dissipation is not excessive, was adjusted to its minimum value
B B even for relatively high load currents. (effectively zero resistances) the 9V
Q1 Q1
However, care must be taken to supply would be connected directly
Q2 Q2 ensure that the maximum collector across the transistors inputs. Ignoring
current (ICmax) is not exceeded. Again, the details of the Darlington pair for
a) NPN Darlington b) PNP Darlington
the current of 78mA discussed the moment, and just considering
above would not be a demanding doing this with a single transistor
Fig.4. The Darlington Configuration specification for a discrete switching (Fig.3) we see that the graph in Fig.5

Everyday Practical Electronics, February 2017 55

Circuit Surgery FEB 2017.indd 55 16/12/2016 14:28

junction of Q2 will be reverse biased.
Thus Q2 is not in saturation.
The previous figures were very
approximate, a slightly more realistic
set of values is:

Q1: VBE = 0.65 V, VCE = 0.19 V, IB = 33

A, IC = 400 A, = 12
Q2: VBE = 0.79 V, VCE = 0.84 V, IB =
433 A, IC = 71 mA, = F 164.

These figures correspond with the

graphs in Fig.5 and the input and
load currents (33A and 71mA) are
close to our earlier estimate of 41A
and 78mA. The overall current gain
of the transistor pair is 12164, about
2000, which matches the requirement
discussed above.
In general, a Darlington configuration
prevents the second transistor from
entering saturation, which helps keep
the gain of the pair relatively high, but
has the disadvantage that the voltage
across the output transistor is larger
than it would be for a single-transistor
Fig.5. Plot of base-emitter (IBE, red trace) and base-collector (IBC, blue trace) junction switch. This is important in power
characteristics (applied voltage vs. current). The base-collector junction conducts at switching applications because it
a lower voltage than the base-emitter junction. means greater dissipation due to the
larger voltage drop across the device
only covers voltages up to 1V. The usually quoted as a typical transistor when it is on. However, for the circuit
steep increase even at 1V indicates gain. discussed here, the dissipation of
that by VBE = 9V the transistors input The properties of a transistor in about 60mW in Q2 is not likely to be
current would be extremely large. In saturation are different from those of serious concern.
fact it would be so large that it would in the active region of operation and
destroy the transistor due to excessive we need to be careful about making Darlington package
power dissipation. Note that this familiar assumptions about transistor The Darlington configuration can
potential destruction is due to power operation which really relate to the be built using two individual
dissipation from input current and forward-active operation. An important transistors, but Darlington pairs in
voltage, not necessarily due to the load characteristic of the transistor in the a single package are also available.
current, although that could play its forward-active region is the already A typical example is given in Fig.6,
part in the destructive scenario. mentioned current gain , or strictly which shows the equivalent circuit
This situation does not change speaking the forward current gain of the TIP120. This devices includes
significantly for the Darlington pair. F. In the forward-active region the a protection diode and a couple of
Although the individual junction collector and base currents are related resistors. The resistors act as pull-
voltages would be smaller, with a 9V by the well know relationships: downs to make sure the transistor is
input, with no base resistor the power off when required this is particularly
dissipation would still be more than IC = FIB and IB = IC/F important if the drive circuit is high
sufficient to destroy the transistors. impedance when it is off.
The 2.2k resistor limits the maximum Values of F will be given on transistor Another disadvantage of the
current into the base. Again, using data sheets and are typically in the Darlington pair is that it can be rather
a rough figure, this cannot be more range 100 to 200. However, as we have slow in switching this is not likely to
than 9V/2.2k, about 4mA less in just seen, these standard values be an issue for the circuit in Fig.1, but
practice, because the base-emitter do not apply in the saturation region. may be of concern in high performance
voltage(s) mean that the full 9V would For a transistor in saturation the base applications. The problem is due to
not be dropped across the resistor. current is greater than IC/F. In fact the the fact that the first transistor cannot
base current exceeding IC/F can be switch the second one off quickly
Forced beta regarded as a condition for saturation. it goes open, circuit leaving charge
Going back to the single transistor The value of IC/IB in saturation is in the base of the second transistor,
scenario (Fig.3), we can use Fig.5 for called the forced beta. which takes time to shift. This
reference, we see that a 4mA total problem is alleviated by connecting a
input (base) current to the single Saturated Darlington
transistor would imply that the It would be easy to assume that when C
transistor is saturated with almost a Darlington pair is used as switch that
all of the 4mA base current flowing both transistors are in saturation, but
into the base-collector junction. As the real situation is more complex. B
far as the input is concerned, this is Referring to Fig.1, assuming both
a safe level (the power dissipation transistors are on, then the base-
R1 R2
due to the input current and voltage emitter voltages of both transistors will 8k 120
is not excessive). As long as the load be approximately 0.65V. If we assume
current is low enough, the transistor Q1 is in saturation with a VCE of about E
will not burn out. Also, assuming 0.2V then the voltage at the collector
the 115 discussed above, the ratio of Q2 must be equal to the VBE of Q2 Fig.6. Example Darlington power
of collector to base current would be plus the VCE of Q1, so it will be about transistor internal circuitry. This is the
about 78/4, that is, approximately 20 0.85V. This implies the VBC of Q2 will TIP120 from the Fairchild datasheet
significantly lower than the 100 or 200 be about 0.2, so the base-collector (

56 Everyday Practical Electronics, February 2017

Circuit Surgery FEB 2017.indd 56 16/12/2016 14:29

resistor from the base of the second
transistor to ground (as R2 is in
the circuit in Fig.6). Another issue Current mirrors for High-Side Current Measurement
with the Darlington pair is that any
leakage current in the first transistor errors in diagrams
will be amplified by the second,
meaning that total leakage effects
Unfortunately, some errors crept into a few of the figures in last months
may be quite large. Again, the R2
Circuit Surgery on the use of current mirrors for high-side current
(Fig.6) base resistor helps it is
measurement. The problems were spotted by Chat Zone users bowden_p and
selected to ensure that its voltage
james thank you to them for pointing it out. My original diagrams were
drop when the first transistors
fine, but I did not notice the errors in the proof copies so they made it to press.
leakage current is flowing through
The correct diagrams are printed here. Corrected Fig.1 includes the missing
it is such that the second transistor
base wiring for Q3 and Q4. Corrected Fig.2 and Fig.3 show the correct voltage
will not turn on.
polarity and current direction respectively for the sense resistor RS.
Protection diode
Finally, in relation to wolfies third
question, we should mention the RS IL
Input To load
need to protect the transistor from
back emf from the relay coil. When
current in an inductive load, such as
a relay or solenoid coil is switched
off, the magnetic field, which had Q1 Q2
been established by the supplied
current collapses, inducing a voltage RB
known as the back emf or inductive
kickback. The inductor stores energy
in a magnetic field while the current
is flowing through it, but returns Q3 Q4
the energy to the circuit when the
current is switched off.
For the circuit in Fig.1, the back Vout
emf appears as a positive voltage
spike at the collector of the transistor. Ro
This may result in voltages large
enough to damage or destroy the
transistor (possibly hundreds of
volts). The more rapid the change in
current as the inductor is switched Corrected Fig.1. Ken Woods high-side
off, and the larger the inductor value, current monitor circuit
the greater the back emf generated.
The usual method of preventing the
back emf from causing problems is
to place a diode (variously called IL
a freewheeling diode, flyback V+

diode or snubber diode) across RS

the inductor, as shown in Fig.1.

Measure- Vo
The term clamped inductive load Supply VS ment Load
is also used in this situation. This circuit

diode is reverse biased when the

power-switching device is on, but 0V Gnd
is forward biased by the back emf;
so the diode dissipates the power or
75mm x 1 COL
Corrected Fig.2. High-side supply current
Looking to advertise? measurement. VO is proportional to IL
Stewart Kearn on:

Measure- Vo
VS ment Load
Supply circuit


0V Gnd
01202 880299 Possible measurement circuit
negative supply connections

or email
Corrected Fig.3. Low-side supply current
Corrected-CS3-Feb17 stewart.kearn@ measurement. VO is proportional to IL
42mm x 1 COL

Everyday Practical Electronics, February 2017 57

Circuit Surgery FEB 2017.indd 57 16/12/2016 14:33



By Jake Rothman
Totally derailed: powering amplifiers Part 3
Mains ground by a thick single
The mains ground/earth is connected connection to the
Input R
to the metalwork to prevent electric main ground point Amp1
shock. It should also be connected to (Fig.21b). There Common earth
point in power
the amplifier earth. This has to be done is the possibility supply
Earth joined
via a ground-lift resistor to prevent an this resistor may in source
eg, CD player
Earth loop

earth loop forming. This is typically a increase distortion

1k 0.5W device, with a 10nF ceramic since it may affect
RF bypass capacitor. It is convention to operation of the a) Input L
connect this to the input socket ground, feedback loop, but
since this is the defining point of 0V. I have not seen any
In practice, it can be connected to the evidence for this. +18V

signal ground or dirty ground point with Another technique 14

little difference in hum level. If there is is to use a mirror Power amlifier

eg, LM380
any mains leakage current flowing, say image layout with Input

2 Output
Input R driver stage LS1
from a high interwinding capacitance the centre earth rail stage

on the mains transformer, it would be for the both left and

best to connect it to the dirty ground. right channels signal 7
3, 4, 5,
10, 11, 12
On amplifiers with a balanced input the earths (Fig.21c) con-
earth plays no part in signal transmis- nected to the shared
sion and pin 1 is simply connected to supply earth. Using Power amlifier
eg, LM380
the metalwork/mains earth. the same transform-

Input L
er core with two LS2

Stereo wiring layout and separate secondar-

hum loops ies and rectifiers
A stereo amplifier is just two mono provides complete
Signal earth
amplifiers fed off the same power sup- earth isolation 10
Resistors break
b) earth loop
ply. However, there is an opportunity (Fig.22). I once saw
for an earth loop to occur (as shown a guitar amplifier Star earth

in Fig.21a) because the two amplifier with an intractable

earths are joined at two points, the earth hum. I had a
power supply and at the input. This look at the PCB and
Left input
loop can often give an earth buzz of 5 to saw the earth track
20mV on the speaker terminal. 5mV is running continu-
R1 C1 D1
enough to be heard with ones ear close ously all the way
to the speaker. The earths on the input round the outside Common earth rail

sockets are normally connected to- of the board. With Shared 0V

gether on the socket, pre-amplifier and a deft application

signal source. Most stereo PCB-mount of the side cutters, R1 C1 D1

phono sockets have a single earth pin. breaking the loop

The earth problem is avoided in profes- instantly cured the Right input
sional amplifiers by the use of balanced hum.
inputs that dont need an earth to pass c)

the signal. For unbalanced inputs, a Distorted rails

common trick is to use 2.2 to 22 Another problem Fig.21 a) Wiring layout for a stereo amplifier, b) Using ground-lift
168mm x 1.5 COL
ground-lift resistors between the signal with class AB am- resistors, c) alternative mirror image stereo amplifier layout (often
grounds and the main ground point on plifiers is that the used for PCBs)
the power supply. This was devised To- rectified audio rides
by-Dinsdale (Wireless World, Jan 1965) on top of the sawtooth hum waveform channels. Using the same secondary
and also used in the ground-breaking on the unregulated power supply, as but separate rectifiers and smooth-
Quad 303 power amplifier in 1969. The shown in Fig.23. This causes a degree ing caps provides some isolation of
input shared ground is then connected of distorted crosstalk between both this signal see Fig.24. Individual

58 Everyday Practical Electronics, February 2017

Audio Out (MP 1st & JR) FEB 2017.indd 58 16/12/2016 14:40
the cost-no-object
Dual transformer
(standard toroid) fraternity, two sep- Signal
arate mono amplifi- Input
+ ers with individual
+ power supplies, or Load resistor
Input L Amp1
monoblocks is the driven to full
way to go.
A new test? Input
0V Earths
joined N One test I always Listen
do on stereo/mul- here

+ ti-channel amplifi-
+ ers and active loud-
Input R Amp2
speakers is to drive Fig.25. Testing dual-channel amplifiers to
check for supply modulation.
one output hard

into a load resistor
and listen to any
resulting noise on
Fig.22. Inter-channel power rail and ground isolation provided by sep- the other outputs
arate secondary windings on mains transformer. (Fig.25). I once sent
an active speaker back because I could
hear distorted bass harmonics in the
tweeter output when the bass amplifier
was clipped into a load resistor. A bit
of track cutting and rerouting fixed it.
Fig.26 shows the layout of a stereo
power amplifier using the circuit
from Audio Out September 2016. 10
ground-lift resistors have been inserted
48mm x 1 COL by cutting the ground track from the
driver stage. Notice the noding on the Fig.26. Prototype of stereo audio amplifier us-
main smoothing capacitor in Fig.27. A ing Taylor-Rothman amplifier modules (EPE,
Sep 2016). I included 10 ground-lift resis-
normal bridge rectifier is used. If schott- tors, which eliminated a hum-loop that put
Fig.23. Oscillogram showing how audio su- ky diodes are used an additional volt is 7mV on the output.
perimposes itself onto the ripple waveform on usually gained for a given transformer.
the power supply. These rectifiers have to be discrete since
decoupling capacitors for each am- they are not available in high current
plifier fed by resistors from the main bridge versions see Fig.28.
smoothing capacitor also helps. A
single transformer with separate Ripple current
secondaries (Fig.22) provides almost One thing to watch out for, especially
total inter-channel isolation, apart with class-A amplifiers, which draw a
from a bit of voltage sag due to the large continuous current, is the ripple
mutual primary resistance. If you are of current rating of the capacitor. It should
be at least two times Fig.27. Noding on a power supply capaci-
Amp1 the DC current sup- tor. The lower left cable cluster contains the
plied. One way of ground cables/stub; the upper left contains
L measuring the rip- the power cables/stub.
Amp2 ple current is to put
+ 230V
25V Mains
input a clamp meter set to
+ + the 2A AC range on
4700F 4700F 6A
35V 35V bridge N
the capacitor lead. If
you dont have a true
a) 0V RMS meter, an ap-
proximation allow-
ing for the pulsed
+ nature of the wave-
form is to multiply
2.2 the current reading Fig.28. If you use a schottky bridge rectifier it
From will have to be made from individual diodes.
rectifier by two. If the rated
current is exceeded, process accelerates until the capacitor
+ +
2200F 4700F the capacitor warms becomes an open circuit. If an old
up, which results amplifier has developed a loud 100Hz
in an increase in hum it is usually the smoothing capac-
b) 0V
Isolating distorted music signal on power supply its ESR (equivalent itors have dried out. It is convenient to
series resistance) as check them in circuit by using an ESR
Fig.24. Providing separate rectifiers and smoothing capacitors gives it dries out. It then meter, such as the peak ESR70, which
effective isolation of audio on the supply rails. gets hotter and the I hope to review soon.

Everyday Practical Electronics, February 2017 59

Audio Out (MP 1st & JR) FEB 2017.indd 59 16/12/2016 14:41
are three identical Timer2 modules void main(void) {
and are 8-bit timer and period OSCCON = 0b00111000;
registers, which are commonly used TRISC = 0;
by the PWM modules. LATC = 0;
The timers are based on the clock OPTION_REG = 0b00000111;
oscillator chosen. As mentioned LATCbits.LATC4 = 1;
earlier, for most of the examples, we
will be using the internal oscillator. while (1) {
There are three internal system clock while (!INTCONbits.TMR0IF) continue;
sources, the 16MHz High-Frequency INTCONbits.T0IF = 0;
Internal Oscillator (HFINTSOC), the LATC >> = 1;
500kHz (MFINTSOC) and the 32kHz if (STATUSbits.C)
Low-Frequency Internal Oscillator LATCbits.LATC3 = 1;
Consider the flowchart in Fig.2. We }
start the timer, increment the timer
every time theres a rising edge on Fig.3 shows an accurate description
the clock and reset the timer once its of the code above. First we set the
reached its maximum value. Now its clock oscillator to 500kHz using the Set Clock
time to look at some code and see how OSCCON special function register. to 500kHz
this all comes together. Then we set Port C, which is connected
to our LEDs, to outputs and set them
Timer0 example to low output, ensuring theyre off to
Lesson 9 in the PICkit 3 Starter Kit start with. Then we set our Option Set Port C
to outputs
Users Guide covers an example Register using the OPTION_REG
using Timer0. It takes directly from register. This sets our prescaler rate
Lesson 3: Rotate, which we covered to 1:256. A prescaler is a method to
back in October. Instead of using reduce a high frequency to a lower
Set Port C
a delay function like __delay_ frequency by integer division. Well as low
ms(500) to rotate around the four look at why shortly. In this case, the
on-board LEDs, we will use Timer0. oscillator is 500kHz, the prescaler is
The problem with the delay function 1:256, so Timer0 only increments once
is that it uses a while loop for the for each 256 rising edges of the clock. Set prescaler
entire time specified, and thus takes In effect, reducing our clock speed to to 1:256
up all the processors time and power. 500,000 / 256 = 1953Hz. Well come
By using the Timer0 module, we are back to this in a moment.
offloading this counting elsewhere, In the while loop, we have a new
so the processor is free to perform control register INTCON and the Timer0 Set Port C4
as high or 1
other tasks. Overflow Interrupt Flag bit. The
Interrupt Control Register (INTCON)
controls various interrupts in the
PIC. An interrupt is an event that is
Start timer captured by the microcontroller, which While loop

interrupts the current behaviour of

the running code and does some task
based on the event, before returning to
Run timer normal operation. A button press is an
example of an interrupt, which can be
Check if Timer0 No
set up to turn on an LED every time the interrupt flag
button is pressed. Instead of checking is set
if the button is pressed, the interrupt
controller will automatically check for
Clock rising No you, which saves time and code.
edge? In this example, the event is the
Timer0 reaching its maximum value. Clear Timer0
interrupt flag
Since its an 8-bit timer, the maximum
Yes value it can hold is 2^8 = 256. As the
prescaler is 1:256, the Timer0 will
increment every 256 rising edges of
Right shift
Increment timer the clock. Once the maximum value Port C by 1
is reached in Timer0, the Timer0
Overflow Interrupt Flag bit (TMR0IF)
is set to a 1. Inside the while loop, we
check to see if this flag is set and if it is,
Check for No
the flag gets reset. Then we right shift
maximum Port C, just like in Lesson 3: Rotate. Check if Carry
Bit in Status
timer value?
Before the while loop is restarted we is set
turn on the LED at Port C3 if the carry
bit is set STATUSbits.C
Yes Yes
What were really trying to do here
is rotate the four LEDs, changing every
204mm x 1 COL Reset timer half a second. The big question here Set Port C3
as high or '1'
is, how do get from a clock frequency
of 500kHz to an LED flashing that we
can actually see. This is where the
Fig.2. Timer operation flowchart prescaler comes into play. Fig.3. Timer0 example code flowchart!

Everyday Practical Electronics, February 2017 61

Pic n Mix (MP 1st) FEB 2017.indd 61 16/12/2016 14:39

When the prescaler is equal to 1, (eg, LATCbits.LATC3 = 1), then it implementing a watchdog timer into
Timer0 will increment at the same must determine what this instruction any code you write and let the PIC
speed as the clock oscillator. If the means, and then execute the required save itself.
prescaler is 256 and the maximum actions.
Timer0 value is 256, then we need According to the datasheet, for the Next month
256 256 = 65536 rising clock edges PIC16F1829, an instruction cycle Weve covered a few important and
before the interrupt flag is set. The clock is equal to FOSC/4. Thus, an detailed topics in the last few months,
period of the clock oscillator is the instruction cycle (or period) is the including PWM, timers and debounce.
reciprocal of the frequency, which is reciprocal of the clock, which means Next month, Id like to take a break
1/500,000Hz = 2s. If we multiply the the clock oscillator, which is 500kHz, and build a little project using our
number of clock edges we need (65536) is divided by four to handle each newfound skills. The project wont
by the period (2s), we calculate how instruction inside the PIC. With this involve the Low Pin Count Demo
often our LED will change, 65536 in mind, the effective clock oscillator Board this time, but well stick with the
0.000002s = 0.131s, which is still period is now (1 / (500,000 / 4) = PIC16F1829 and use some Veroboard.
faster than we want. 8s. Therefore the LEDs will rotate at
Were missing one final piece of the 65536 0.000008s = 0.524s, which is
puzzle. We want the LED to change close enough to half a second.
every half a second or 500ms. The Not all of Mikes technology
code above is correct; however, we The watchdog timer tinkering and discussion
didnt take into account the length I said there are only three timers makes it to print.
of time for an instruction cycle. This inside the PIC; however, I should add
is sometimes called a fetch-decode- the watchdog timer. This is a separate You can follow the rest of it
execute cycle, which is a fundamental timer, with a very useful function. on Twitter at @MikePOKeef-
aspect of the internal workings of the When enabled, this timer must be fe, up on EPE Chat Zone as
PIC microcontroller. When we write reset periodically or it will reset mikepokeeffe and from his
our code, the microcontroller must the PIC microcontroller. Its a safety
blog at
decode it to understand what it needs mechanism to help if your software
to do. First, the PIC fetches the next or hardware has gone awry and it
command from program memory cant fix itself. I highly recommend

ELECTRONICS Established 1981

Frustrated with your supplier?

Visit our component packed
website for a vast range of
parts - old and new,
many unavailable elsewhere!
Alternatively phone us on
020 8452 0161 with your
JTAG Connector Plugs Directly into PCB!!
No Header! No Brainer!

Our patented range of Plug-of-Nails spring-pin cables plug directly

into a tiny footprint of pads and locating holes in your PCB, eliminating
the need for a mating header. Save Cost & Space on Every PCB!!
Solutions for: PIC . dsPIC . ARM . MSP430 . Atmel . Generic JTAG . Altera
Xilinx . BDM . C2000 . SPY-BI-WIRE . SPI / IIC . Altium Mini-HDMI . & More
Visit our Shop, Call or Buy online at:
020 8452 0161
Tag-Connector footprints as small as 0.02 sq. inch (0.13 sq cm) Visit our shop at:
40-42 Cricklewood Broadway
London NW2 3ET

62 Everyday Practical Electronics, February 2017

Pic n Mix (MP 1st) FEB 2017.indd 62 16/12/2016 14:39

Development Tool
of the Month!
PIC32 Ethernet Starter Kit II

Part Number

Overview: Key Features:

The PIC32 Ethernet Starter Kit II provides the easiest USB-powered board
and lowest-cost method to experience 10/100 Ethernet
Includes 10/100 Fast Ethernet LAN8740 PHY
development with PIC32 microcontrollers. Combined
Daughter Board
with Microchips free TCP/IP software, this kit gets your
USB and Ethernet connectors, user switches and LEDs
project running quickly. The PIC32 microcontroller has an
Integrated programmer/debugger
available CAN 2.0b peripheral and USB host/device/OTG.
This starter kit features a socket that can accommodate Standard A to mini-B cable for debugger
various 10/100 Ethernet transceiver (RJ-45) PHY Standard A to micro-B cable for USB application
Daughter Boards for prototyping and development and development
an expansion connector that enables the addition of PIC32 running at 80 MHz with 512K Flash, 128K RAM,
Microchips PIC32 expansion boards or the creation of 8 channel DMA + 8 channel DMA dedicated to
your own board. Ethernet, CAN and USB

Order Your PIC32 Ethernet Starter Kit II Today at:

The Microchip name and logo, PIC and MPLAB are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. All other trademarks mentioned herein are the property of their respective companies.
2016 Microchip Technology Inc. All rights reserved. MEC2133Eng12/16

FEB 2017 Page 63.indd 1 15/12/2016 10:42

if (brightness ==
fadeAmount = -fa
// wait for 30 mil

By Max The Magnificent

Upload this sketch
successfully, the LED
back off again. If you

Fig.3. Its all done with mirrors... well, LEDs actually

( My chums Bruce and Bob
from Out of the Box Exhibits (
added the rays of coloured light coming out of the ball
to reflect the light effects in our cave, and they also
created the stone-look picture frame and pillar. if (brightn
Fig.1. Yours truly (left), Mike Mittlebeeler (right), and fadeAmou
Where does the space go?
Caveman Diorama (center). }
Were working at a 1:32 scale, which means that a six-
foot-tall man would be 2.25-inches in height in our di- // wait for
Having fun with Stone Age LEDs
orama. One thing weve discovered is that its incredibly delay(30)
As you may recall probably for longer than you care
to recall Ive been waffling on about creating a cave- easy to fill up a cave with stuff. We dont have the room }
man diorama. This all started several years ago when I to show close-up images of everything here, but Ive in- Upload th
found and refurbished an old wooden television cabinet cluded some highlights. successfully
and decided I wanted to create a diorama inside it. I Lets start by considering the cave as a whole See back off aga
tried making the cave out of chicken wire and papier Fig.2. Towards the back of the scene we see the entrance wiring:
mch, but all I ended up with was tangling myself up to the cave. The mountains and sky are being presented
in chicken wire and covered in papier mch. on a flat-screen computer monitor about six inches be-
Then my wife introduced me to Mike Mittlebeeler, hind the entrance. Currently this is just a still image, but
an ex-Apache helicopter pilot whose hobby is making in the fullness of time we intend to model the outside
model railways and military dioramas. For more than a world using 3D software and generate this scene on the
year now, Mike and I have been meeting up in my office fly. This will allow us to do all sorts of things, like hav-
on Saturday mornings to work on the caveman diorama. ing a volcano erupt at noon each day, and having the
A few weeks ago, although its not yet finished, we de- weather in the diorama match the weather in the real
cided to enter it in a local modeling competition as a world outside my office.
work in progress. When we arrived at the competition, In the middle of the cave in the foreground we have
we established a base station in the corner of the exhibi- our fire (Fig.3). Were really rather proud of this. At the
tion area, as seen in Fig.1. bottom are 19 tri-coloured LEDs. Then we have a cone of
As an aside, the large image of the caveman hold- crunched glass bound with clear epoxy, which provides
ing the stone bowling ball in the background was myriad internal reflections and refractions. Twigs that
created by CG artist Jeroen Cloosterman (http://bit. have been burnt at the ends surround this. The whole
ly/2dUNlJP). Jeroen kindly gave us permission to use effect is extremely realistic when the LEDs are randomly
this image the full-size version is truly spectacular flickering away.
On the left-hand side of the cave is a pool (of clear ep-
oxy) with tiny fish in it. Theres also a small wooden rack
with drying fish hanging from it. This is probably a good
point to note that we have tri-coloured LEDs hidden all
over the place, including about 30 at the bottom of the
pool, which allow us to introduce a nice ripple effect.
On the floor at the foot of the entrance we find a pile
of logs. It was only after wed glued these down that
a friend pointed out that the ends were too smooth to
have been cut with stone axes, and instead they ap-
peared to have been cut with a chain saw. Fortunately,
we have a time portal (Fig.4) to explain my presence
sitting around the fire with the cavemen (when we get
around to adding the figures as discussed below), so
we added a chainsaw to the scene. Also, note the three
wooden ladders one located behind the logs and the
Fig.2. Home sweet home... ca. 10,0000 BC other two near the floodlights. These are tied with white

64 Everyday Practical Electronics, February 2017

Cool Beans (MP 1st & Max) FEB 2017.indd 64 13/12/2016 06:10
end of the series.
School of Architecture among others. based in London. He teaches interaction
We have a couple of copies of this design and prototyping at the
book to give away. To enter please COLUMN:ARDUINO ARDUINO
Goldsmiths PROJECTS
College l 37 l 37
and the Bartlett
if (brightness == 0 || brightness == 255) supply REGULAR
{ your name, address REGULAR
l Make
pin numbers PROJECTS
are l
being 37
l 37
School of Architecture among others.
fadeAmount = -fadeAmount ; email to the Editor at svetlanaj@
l Check the LEDWINisTHE
WIN THEpositioned,
FOR aits
couple of copies of 37
Figure 2: Figure
Layout 2: WINdiagram
Layout THE
connected byFOR
to 9BOOK
and BOOK
the short leg connected via please
book to give away. To enter
Figure 2: Layout Thefor
diagram the project BY JOHNBY NUSSEY
Figure 2: Layout winner
diagram for be
will thedrawn
// wait for 30 milliseconds to see the dimming effect resistor and a wire to GND. supply your name, address and Figure 2: Layout diagram
for the project
for the project
random and announced at the WIN THE
Nussey FOR
JohnisNussey is DUMMIES
a creativeatechnologist BOOK
creative technologist
delay(30); l Check
the code to on the breadboard.
the connections email to Ifthe
the jumper wires for the project
Figure 2: Layout diagram end of the series. John Nussey is aBY
John Nussey JOHN
creative at svetlanaj@
in London.
inHe teaches
based London. Heinteraction
teaches interaction
} for the project or components
based inbased transition
in He teaches
London. are
the not connected
He teaches prototyping using
at the
interaction the correct rows in the
design and prototyping at the REGU
Upload this sketch to the board, and if everything has uploadeddesign design
Nussey will
the isat
Goldsmiths not work.
the l Bartlett
and the
College The
and winner will be drawn at
displayed on
ightness == 0 || brightness the == LED
255) fades
{ from off to full brightness
l Make sureand thethen
correct Goldsmiths College
pin numbers based
being the
ofthe He teaches
School interaction
of Architecture others.
randomamongand others.
announced at the REGULAR COLUM
back off again. If you dont see any fading, double-check
theis correctly
of Architecture among
have others.
aWe couple of
37 ofendthis
Amount = -fadeAmount ; l Check the LED School
positioned, design
onof this
tals screen, and
its prototyping
long among
leg have at
Arduino a theprojects
couple of can
copies be
of found
of the series.Figure in the WIN THE ARDUINO FO
2: Layout diagram BY
wiring: connected by a wire toWe pinhave We a couple
and have
thebut of copies
Goldsmiths thisbook
leg of
Dummies of
part give
bookto give Toaway.
by enter
Figure please
To 2:enter
Nussey. Layout please
diagram project2: LayoutBY
for the Figure JOHN
the resistor and a wirebook tobookFOR
give to DUMMIES
givethe To
supply BOOK
enter name,
please address and
it for 30 milliseconds to see the dimming effect to GND. of
School of diora-
Architecture supply your
among for
name, the
others. project
Figure 2:and
Layout diagramfor the project BY JOHN NUSSEY John
Figure 2: Layout diagram BY JOHN NUSSEY your
y(30); l Check the connectionssupply on thesupply name,
breadboard. address
name,If still
the and
jumper a
the Editor
We have a couple of copies of this the project
email wires
to at
the svetlanaj@
Editor for
at svetlanaj@ John Nussey is a creative base te
for the project if (brightness == 0 || brightness ==Editor255) {svetlanaj@ l Make sure the correct pin numbers are being used.
or components are notemail toemail
connected the work
usingtheat in
the prog-
at svetlanaj@
correct rows in the based John
in Nussey
London. is
He a creati
book to give away. To enter please
oad this sketch to the board, and if everything has uploaded
fadeAmount = John Nussey is a creative
breadboard, they will not work.
l ress (hence
The winner The will be drawn
winner will
l Check
at drawn
be at
the LED is correctly positioned, designbasedwith
and in
its long He
leg te
at th
based in London. He teachesthe supplyfact
interaction your name, address and Golds
sfully, the LED fades from off to full brightness and then } The winner
The will
winner be drawn
will be at
random that
drawn and at announced at
random and announced at the the connected by a wire to pin 9 and the short leg
design College
Goldsmiths connected
and prototyping
design and prototyping at thewe email to the Editor at svetlanaj@
ff again. If you dont see any fading, double-check the // waitMore for on 30thismilliseconds to see
random andthe
random dimming
and atdidnt
announced of effect
the the
atin of the series. the resistor and a wire to GND. School
the Goldsmiths College
and other Arduino projects
Goldsmiths College and the Bartlett have
can be
found to
end the of Architecture Weand
amon h
: Fig.4. Maxs time
delay(30); portal end ofbythe
end series.
of the series. l Check the connections on the breadboard.
School If
of the jumper
Arduino For Dummies book John
School of Architecture amongpaint
others. the por- We have a couple of booka
The winner will be drawn at
cotton thread that was dyed } in tea (each We ofhavethese
a couple of copies oftal
knots this or and mount or components are not connectedbook using
We theaway.
to give correct
a couple rows
of co
To enter
if (brightness == 0 || brightness == 255) { random l Make announced
sure at the
the correct
took me about seven if (brightness
minutes Upload ==
to 0tie).|| brightness
this sketch to ==board,
the 255) {and if everything
the screen has l
for Make
uploaded sure thepin numbers
correctbreadboard, are being
pin numbers they used.
are being
will not used.
work. lsupplybookyourtoname,
give away.
address To e
book to give away. To enter please
if (brightness
We also == 0have
if (brightness ||==brightness
bunch ===
brightness of255) = {-fadeAmount
== 255) {; LEDs
tri-coloured ;fades
at l Make
the l sure
back Make theend
the of
the the pinseries.
lcompeti- numbers
l the
pin LED
Check are
numbersthe being
is correctly is positioned,
correctly with its long
used.positioned, withleg its long legemailsupply to theyour
Editorname, add
at svetlan
successfully, the LED from off
supply your name, address andto full brightness and then sjpbu
of the = -fadeAmount
tunnel } ;
}= -fadeAmount
located ;
half way up theemail left-hand l Check l the
wall, CheckLED theisLED
tion), correctly
connected positioned,
is correctly bypositioned,
a wire with toits
by apin long
wire 9 and
to leg
long leg
and the legshort
connected via
leg connected via
email to the Editor at sv
back off again. If you dont
to thesee anyatfading,
Editor svetlanaj@ double-check the the short legMore on this and other Arduino projects can be found The in th w
} along with // another
wait for 30
// wait 155 for of30the
milliseconds little
milliseconds scamps
to see the seehidden
to dimming connected
the dimming by
effect share
a wire
effect by to aall
wire that
9toand theand
pin a wire
and theand toconnected
short aGND.
if leg
wire via
(brightnessGND. via== 0 || brightness The
== will be
255) { drawn at
wiring: More LEDs
Arduino inbeing
For the tunnel
Dummies and by
book theJohn Nussey.
// wait the
for 30ceiling
wait for (Fig.5).
== 0 || Inseethe
delay(30); the
to fullness
255)of time,
{ effect well have athe l
the resistor in
Make al
a wire
and future
sure GND.
a wirethelthe to connections
Check on the
the connections breadboard.
on the If the jumper
breadboard. If thewires
jumper wires
Theand winner will beend draw
waterfall coming out of the tunnel and The winner will down
splashing be drawn at column. sky is generated fadeAmount by a PC =monitor
-fadeAmount ;random announced at tho
delay(30); }
fadeAmount = -fadeAmount } ; l Check
l the
l the
Check or
theon the
LED breadboard.
or the are
components not
breadboard.If the jumper
positioned, If the
are not connected wires
with the correct
its long
using leg
the rows
correctin the
rowsendinof the
random and announced
the series.
onto the rocks in this
the sketch
center of poolrandom and announced at the } rows in the
} }} Upload Upload this thethe
tosketch board,
to theand
if everything
board, or
and if everythinguploaded
components are notbreadboard,
connected connected
are notaconnected
by using
wire toto the
9 and work.
will correct
the lshort
not rows
work. linconnected
leg the via end of the series.
this sketch to the
to the board, floodlights
andLEDif everythingand the
has time
end of portal
the the
will notwill
l do // wait for 30 milliseconds to see the dimming eff
// wait this successfully,
for 30 side to the the
milliseconds fades
to see ifLED from
everything off
thecase to
dimming full
has brightness
off to full and then
brightness breadboard,
and then they not work. l
successfully, the LED fades
of the
from off
to full
In the of the effect
floodlights, the resistor
and so little andtime aifwire totodo
(brightness all == in.0 Weve
|| brightnessstill got ==to 255)
get{the l Mak
back off brightness and then
which will the
back from
to If again.
off you dont
to If
illuminate full see
you aany
dont fading,
caveman anydouble-check
and then
standing the
on liftime
the More on More
Checkportal ==
up and
the connections || brightness
on other
fadeAmount ifon Arduino
running theother ===and 255)
Arduino == {0can
breadboard. add || be; found
If brightness
the the can be
in found
wires lin Make
plus {
the sure the correct l Chec pinl
back off again.
back off If you dont
again. If yousee
wiring: anysee
wiring: fading,
any double-check
fading, the
double-check the More on Morethison and
a other
this ifand
lot Arduino
of other
other For projects
Arduino ==
-fadeAmount 0
little can
projects be
For ;can
book } by
Dummies in
beJohn ==the
book but 255)
in { main
by the
John Nussey. ;
thing is l
to l
Check Make sure the
the LED correc
is correctl l
a ladder creating
if (brightness ==}0 || brightness == 255) { a cave painting, were running
l Make sure Arduinothe pow-
the correct pin numbers or components are beingare }
used. not connected using the correct rows in the conn
er, ground, and control signals up their legs. The 3D For Dummies
print ForfadeAmount
} add the
Dummiesbook by
figures. bookJohn
= // by Nussey.
John} now
Nussey. ;Upload this
thinking of sketch
modeling to the board,
these and
l if everything
connected theaLED
by wire ishascor
tothe ur
fadeAmount = -fadeAmountUpload this; sketch to the board, and if everything l Check hastheuploaded breadboard,
LED is correctly positioned, with they wait
will leg
its long for
not work. l 30 milliseconds to see the dimming effect
files for these were created by my chum, Steve Manley, //using } for
wait a 30 programmilliseconds called
// wait to Daz
see the 3D
successfully, (
dimming the LED
effect fades from offtheto full brightness
resistor and by
a a and
l Chect
wire to
} successfully, the LED fades from off to full brightness connected
and thenby a wire to pin 9 and the short leg connected delay(30); via for 30 milliseconds to see the dimming effect
in the UK (you can access a ZIP file containing the 3D delay(30); and // then
wait for 3D30 printing
delay(30); to
back which
see off the means
again. If you that
dont we see now
l Check the
fading, resistor
the and
double-check aorwir
// wait for 30 milliseconds to see the dont
dimming effect the resistortheand
back off again.
floodlight Iffiles
you here see any fading, double-check; and thea 3Dwire toMore GND.on this and other
} need to learn how Arduino
delay(30); to} use Daz projects3D. Ican tellbeyoufound there in the sim-
Check the connection
orlcomponents are not co
delay(30); l CheckMeanwhile,
the connections on the breadboard. Upload
If the jumper this
wires wiring:
sketch to the board, and if everything has uploaded brea
time portal files here ply
Arduino }
arentFor enough
Dummies hours
book byand in
John the day! Until
Nussey. next time, breadboard,
} or components
Upload this sketch successfully,
to the board, Upload thethis
in the LEDif everything
fades to from has
the uploaded
off to full and if everything
brightness andorthencomponents
has they will
uploaded arenotno
another chum, Daniel Whiteley, has been workingareon not connected
have ausing
good theone!
correct rows
sketch to the board, and if everything has uploaded breadboard,
Upload this sketch to the board, and if everything has uploaded breadboard, they will not work. l
successfully, the LED fades
back off from off
successfully, to
again. If you full brightness
LEDsee fades and
anyfrom then
fading, to full brightness
double-check the and then they More willo
backsuccessfully, the LED
off again. If you dontfades
wiring: from
backany off toIf
again. full
double-check and fading,
dont see any then double-check
More on this the
and other Ardu
successfully, the LED fades from off to full brightness and then
back off again. If you dont
wiring: see any fading, double-check the
wiring: MoreFor
Arduino on this and other
Dummies book
back off again. If you dont see any fading, double-check the More on this and other Arduino projects can be found in the
wiring: Arduino For Dummies
wiring: Arduino For Dummies book by John Nussey.

LAMBDA GENESYS PSU GEN100-15 100V 15A Boxed As New 325 Tektronix TDS3012 Oscilloscope 2 Channel 100MHZ 1.25GS/S 450
LAMBDA GENESYS PSU GEN50-30 50V 30A 325 Tektronix 2430A Oscilloscope Dual Trace 150MHZ 100MS/S 350
HP34401A Digital Multimeter 6.5 digit 275-325 Tektronix 2465B Oscilloscope 4 Channel 400MHZ 600
HP33120A Function Generator 100 microHZ-15MHZ 260-300 Cirrus CL254 Sound Level Meter with Calibrator 40
HP53131A Universal Counter 3GHZ Boxed unused 500 Farnell AP60/50 PSU 0-60V 0-50A 1KW Switch Mode 195
HP53131A Universal Counter 225MHZ 350 Farnell H60/50 PSU 0-60V 0-50A 500
Farnell B30/10 PSU 30V 10A Variable No Meters 45
HP54600B Digital Oscilloscope 100MHZ 20MS/S from 75
IFR 2025 Signal Generator 9kHz - 2.51GHZ Opt 04/11 900 Farnell B30/20 PSU 30V 20A Variable No Meters 75
Marconi 2955B Radio Communications Test Set 800 Farnell XA35/2T PSU 0-35V 0-2A Twice Digital 75
R&S APN62 Syn Function Generator 1HZ-260KHZ 195 Farnell LF1 Sine/sq Oscillator 10HZ-1MHZ 45
Fluke/Philips PM3092 Oscilloscope 2+2 Channel 200MHZ Delay etc 250 Racal 1991 Counter/Timer 160MHZ 9 Digit 150
HP3325A Synthesised Function Generator 195 Racal 2101 Counter 20GHZ LED 295
HP3561A Dynamic Signal Analyser 650 Racal 9300 True RMS Millivoltmeter 5HZ-20MHZ etc 45
HP6032A PSU 0-60V 0-50A 1000W 750 Racal 9300B As 9300 75
HP6622A PSU 0-20V 4A Twice or 0-50V 2A Twice 350 Black Star Orion Colour Bar Generator RGB & Video 30
HP6624A PSU 4 Outputs 350 Black Star 1325 Counter Timer 1.3GHZ 60
HP6632B PSU 0-20V 0-5A 195 Ferrograph RTS2 Test Set 50
HP6644A PSU 0-60V 3.5A 400 Fluke 97 Scopemeter 2 Channel 50MHZ 25MS/S 75
HP6654A PSU 0-60V 0-9A 500 Fluke 99B Scopemeter 2 Channel 100MHZ 5GS/S 125
HP8341A Synthesised Sweep Generator 10MHZ-20GHZ 2,000 Gigatronics 7100 Synthesised Signal Generator 10MHZ-20GHZ 1,950
HP83731A Synthesised Signal Generator 1-20GHZ 1,800 Panasonic VP7705A Wow & Flutter Meter 60 www.electronicsworl
HP8484A Power Sensor 0.01-18GHZ 3nW-10uW 75 Panasonic VP8401B TV Signal Generator Multi Outputs 75
HP8560A Spectrum Analyser Synthesised 50HZ - 2.9GHZ 1,250 Pendulum CNT90 Timer Counter Analyser 20GHZ 750
HP8560E Spectrum Analyser Synthesised 30HZ - 2.9GHZ 1,750 Seaward Nova PAT Tester
HP8563A Spectrum Analyser Synthesised 9KHZ-22GHZ 2,250 Solartron 7150 6 1/
Digit DMM True RMS IEEE 65
Solartron 7150 Plus as 7150 plus Temp Measurement 75
HP8566B Spectrum Analsyer 100HZ-22GHZ 1,200
HP8662A RF Generator 10KHZ - 1280MHZ 750 Solatron 7075 DMM 7 1/2 Digit 60
Marconi 2022E Synthesised AM/FM Signal Generator 10KHZ-1.01GHZ 325 Solatron 1253 Gain Phase Analyser 1mHZ-20KHZ 600
Marconi 2024 Synthesised Signal Generator 9KHZ-2.4GHZ 800 Tasakago TM035-2 PSU 0-35V 0-2A 2 Meters 30
Marconi 2030 Synthesised Signal Generator 10KHZ-1.35GHZ 750 Thurlby PL320QMD PSU 0-30V 0-2A Twice 160-200
Marconi 2305 Modulation Meter 250 Thurlby TG210 Function Generator 0.002-2MHZ TTL etc Kenwood Badged 65
Marconi 2440 Counter 20GHZ 295
Marconi 2945
Marconi 2955
Communications Test Set Various Options
Radio Communications Test Set
Marconi 2955A Radio Communications Test Set 725 17A King Street, Mortimer, near Reading, RG7 3RS
Marconi 6200 Microwave Test Set 1,500
Marconi 6200A Microwave Test Set 10MHZ-20GHZ 1,950
Telephone: 0118 933 1111 Fax: 0118 9331275
Marconi 6200B Microwave Test Set 2,300 USED ELECTRONIC TEST EQUIPMENT
Marconi 6960B with 6910 Power Meter 295
Check website

Everyday Practical Electronics, February 2017 65

Cool Beans (MP 1st & Max) FEB 2017.indd 65 13/12/2016 04:19

Windows 8.1 is the latest version of Microsofts operating This book is written to help users get to grips, quickly and This book is intended for the new user of the Nexus 7, al-
system. It is installed on all new Windows Desktop. Laptop easily, with the amazing Kindle Fire HDX tablet. You will be though much of it will also apply to the Nexus 10. It is easy to
and X86 tablet computers and is also available as a free guided through the configuration and use of the Kindle Fire understand being written in plain English and avoiding tech-
upgrade. Whether you choose to use the touch screen Tile HDXs facilities and functions. This book was written using the nical jargon wherever possible.
interface or the mouse operated Desktop interface, a good 7 HDX but it is also applicable to the 8.9 model. Among the many useful topics covered are: An overview of the
working knowledge of the operating system is essential to Among the many topics covered are: An overview of the Kin- main features of the Nexus 7; setting up the Nexus 7; charg-
get the most from your computer and this book will help you dle Fire HDX. Charging and setting up, connecting to a Wi-Fi ing the battery; connecting to the Internet and signing up for
to do just that. network, registering the device and connecting to Social Net- Gmail; touch-screen operation and navigating around the vari-
The book applies to Windows 8.1, Windows 8.1 Pro and the works; setting up and using the 1-Click Amazon account for ous screens; installing Apps from the Google Play Store; set-
vast majority of Windows 8.1 Enterprise. Also parts of the buying and downloading books, music and other content that ting a password and other precautions to keep your files safe;
book should be applicable to windows RT 8.1 which is built you have searched for. Explaining the use of the Carousel. connecting accessories such as a USB Drive, mouse and key-
on the same foundation as Windows 8.1 but is a restricted Starting screen Apps. Web and Device settings and the May- board; enjoying entertainment such as eBooks, games, mu-
version designed specifically for ARM tablets. day facility; browsing the web with Silk Internet explorer, us- sic and videos; searching the Internet, including speaking in
ing Bookmarks and History, printing web pages, documents keywords; using e-mail, Skype and social networking; install-
Among the many topic covered are: An overview of the Tile
and messages; connecting to a server to send and receive e- ing the free Google Drive app to save your documents in the
Interface, Desktop, Taskbar, Tray Notification Area, Charms
mail messages, using and saving attachments. Creating and cloud; using Google Docs free word processing and spread-
bar and running Apps; managing Windows settings, per-
organising your Contacts and Calendar appointements; us- sheet software; printing a document using Google Cloud Print,
sonalising your PC and creating User Accounts; using the
ing the Kindle Fire camera to take photos and videos. Watch- Exporting Nexus 7 files to laptop and desktop computers; and
Desktop File Explorer, SkyDive, Internet Explorer and the
ing TV, listening to music you bought, imported and from the much more besides.
E-mail App; working with and organising digital photo-
radio. Using the X-ray feature with books and other media; Even if you are a complete beginner, this book will help you
graphs, using Media Player to play and store music and to
Using the OfficeSuite to view your documents, upgrading to to easily acquire the skills needed to understand and make
burn CDs and installing Media Center to play DVDs; con-
OfficeSuite Professional 7 to allow both viewing and creation the most of the Nexus 7.
necting to wireless networks, setting up a HomeGroup,
of Word documents. Excel spreadsheets and PowerPoint
sharing a printer and networked PCs; using mobility tools to
presentations. And more besides...
keep your laptop running while away from home; accessibil- 118 Pages Order code BP744 8.99
ity features should you have dexterity or eyesight problems; This book will help you acquire the skills needed to under-
keeping your computer healthy and backing up important stand and make the most of your Kindle Fire HDX.
files; And much more besides..
118 Pages Order code BP743 8.99
180 Pages Order code BP747 10.99

R.A. Penfold
128 pages Order code BP705 8.49 120 pages Order code BP702 8.49


P.R.M. Oliver and N. Kantarris Jim Gatenby

120 pages Order code BP703 8.49 18 pages Order code BP701 8.49


Full name: ....................................................................................................................................... HANDBOOK
Address: .......................................................................................................................................... ALAN WINSTANLEY
The No.1 resource to learn all the basic aspects
......................................................................................................................................................... of electronics soldering by hand.
With more than 80 high quality colour photo-
......................................................................................................................................................... graphs, this book explains the correct choice
of soldering irons, solder, fluxes and tools. The
techniques of how to solder and desolder elec-
.............................................. Post code: ........................... Telephone No: .................................... tronic components are then explained in a clear,
friendly and non-technical fashion so youll be
Signature: ........................................................................................................................................ soldering successfully in next to no time! The
book also includes sections on Reflow Soldering
and Desoldering Techniques, Potential Hazards
I enclose cheque/PO payable to DIRECT BOOK SERVICE for .............................................. and Useful Resources. Plus a Troubleshooting
Please charge my card ....................................... Card expiry date......................................... Also ideal for those approaching electronics
from other industries, the Basic Soldering Guide
Card Number ....................................................................... Maestro Issue No.............................. Handbook is the best resource of its type, and
thanks to its excellent colour photography and
Valid From Date ................ Card Security Code ................ (The last three digits on or just below the signature strip) crystal clear text, the art of soldering can now be
learned by everyone!
Please send book order codes: .......................................................................................................
86 Pages Order code AW1 9.99
Please continue on separate sheet of paper if necessary

Everyday Practical Electronics, February 2017 67

Books1 2 PAGES.indd 67 14/12/2016 13:26

Electronic Building Blocks
By Julian

Quick and easy Great results on

Construction a low budget

Four-Channel Car Sound Amplifier

Large complex projects are fun, but However, rather than
they take time and can be expensive. start with the bare ICs,
Sometimes you just want a quick we use two prebuilt,
result at low cost. Thats where this two-channel modules
series of Electronic Building Blocks from eBay. Note that
fits in. We use cheap as chips com- the selected modules
ponents bought online to get you require a 28V DC
where you want to be... FAST! They supply, rather than
represent the best value we can find the AC transformer
in todays electronics marketplace! supply that most of
these modules are con-
Heres a four-channel, car sound am- figured for. Therefore,
plifier with a maximum output of 68W when sourcing these
per channel. Thats more than enough modules, ensure they
even with relatively inefficient car are exactly as pictured.
speakers to give you plenty of vol- Youll pay about
ume and punchy bass. Even better, if 10 for each of the
youre happy to do some of your own two required mod-
metalwork and you already have some ules. To find them,
hardware like fasteners and spacers, search under Assem-
the cost is very low. Quality? Far better bled LM3886TF Dual
than the vast majority of similar car channel Stereo Au-
power amplifiers! dio Amplifier Board The completed four-channel, 12V amplifier the power supply
68W+68W 4 50W*2 module is on the left, and the two 2-channel amplifier modules on
Starting points 8. (At the time of the right. When the lid is placed on top, it locates the fan above the
The heart of the amplifier comprises writing, look for eBay amplifier modules. (A similar-sized vent hole to the fan is located
four LM3886 ICs. This venerable audio item 172274154282.) under the power supply module.)
amplifier IC is an oldie but a goody. Next up, youll need
Each is capable of 68W into 4 at a a power supply capable of driving 20-90oC DC 12V Thermostat Digital
maximum distortion of 0.1%. these modules. Previously, develop- Temperature Control Switch Temp
ing such a supply would have been Controller New, and costs a mere 2.
expensive and time consuming but (At the time of writing, look for eBay
now one is available off the shelf. Its item 152234681961.)
called 1PC Switching boost Power
Supply board 350W DC12V to Dual Wiring
20-32V for auto and costs only The electronics aspect of building the
about 18, including delivery. (At the amp is dead easy. The power supply
time of writing, look for eBay item board input GND, K and 12V terminals
321406996228.) are connected as follows GND to
While the output of the power supply chassis ground, and the 12V terminal
is 32V as it arrives (the on-board pot directly to the positive of the car bat-
This view shows the six switching transis-
allows adjustment), the LM3886 is tery. Use a high-current fuse in this bat-
tors used by the power supply module. The
eBay module is supplied complete with the happy with up to 42V, so thats fine. tery supply eg, 20A. The K terminal
insulating washers and pads for heatsink I also chose to use a fan for heatsink requires 12V to switch on the power
mounting. However, you need to supply cooling and triggered it via another supply normally its connected to the
your own board-mounting stand-offs. eBay module. This module is called power aerial output of the head unit.

68 Everyday Practical Electronics, February 2017

EBB (MP 1st & JE) FEB 2017.indd 68 13/12/2016 04:11

connected to the OUT
terminal blocks (again
observe correct polarity).
And thats it for wiring!

You need to provide plen-
ty of heatsink capacity
either by the use of
substantial heatsinks, or
This tiny module triggers the cooling fan by using smaller heatsinks
on the basis of the temperature selected
but adding a fan. The
with the DIP switches. In this case, the
temperature for fan activation was set at majority of heat is gener-
40oC. The remote temp probe is located ated by the four LM3886
between two of the LM3886 amplifier ICs modules despite appear-
on one of the heatsinks. ances, the power supply
module heatsink require-
ments are more modest. This prebuilt stereo amplifier module is available on eBay
I wanted a compact for just 10, with two of the modules needed for this am-
plifier. The module requires at least 28V DC to run and,
box, so I made one from in use, plenty of cooling capacity (good heatsinks and/or
aluminium sheet specifi- fan) is also required.
cally to suit the required
dimensions. The overall dimensions Obviously the type of housing you
of the box were about 250 x 140 x place the components in is up to
75mm. Using 8mm-thick aluminium you you could even use a discarded
plate for two walls of the box formed car sound amplifier enclosure that
the heatsinks. A salvaged 12V fan was incorporates its own heatsink. But
placed in the top panel (and there is a remember, whatever approach you
matching size hole in the bottom pan- take, youll need either quite sub-
el). The temperature-sensing module, stantial heatsinks, or a fan quite
Only recently released, this power supply
set to turn on at 40oC, triggers the fan. possibly both.
module generates 32V DC from 12V DC The power supply module comes
and can be directly connected to the am- with the required insulating washers Results
plifier modules. and collars for mounting the transis- The only financial outlay I had was for
tors to the heatsink, while the amplifier the eBay amplifier and power supply
(Or, if you dont have this, you could modules uses plastic encapsulated ICs modules so, 38. And for that money,
connect it to any ignition-switched and so do not require any extra insula- this is an unbeatable amplifier. The
12V supply.) tion. To mount the boards, youll need sound is excellent better than com-
The power supply boards output to provide the insulated standoffs and mercial car sound amplifiers costing
terminals (VCC+, GND and VCC) are, screws, washers and nuts. two or three times much, and so much
respectively, connected to the (+), GND Rather than place connectors for the better than the typical four-channel
and () terminals of the two amplifier inputs and speakers on the box, I chose amplifier built into a head unit that
modules. to directly wire these connections its not even funny!
The line level inputs from the head to the boards. These leads were run Note this amplifier is also appro-
unit are connected to the IN amplifi- through rubber grommets that slide up priate for anywhere you need quality
er module terminal blocks (observe appropriate channels when the lid is four-channel sound and youre limited
correct polarity), and the speakers screwed into place. to a 12V supply. That includes, boats,
caravans and houses working off a
low-voltage solar system.

Next month
In Marchs issue we have something a
little different Five eBay essentials
to stock up on. Intrigued? then you
definitely do not want to miss the
next super Electronic Building Block

One of the requirements was that the amplifier be reasonably compact and light. The final
item has a mass of 1.75kg and dimensions of 250 x 140 x 75mm.

Everyday Practical Electronics, February 2017 69

EBB (MP 1st & JE) FEB 2017.indd 69 13/12/2016 04:11


LED Party Strobe 16101141 9.80
Speedo Corrector 05109131 12.00
Basic printed circuit boards for most recent EPE constructional projects are
available from the PCB Service, see list. These are fabricated in glass fibre, and
are drilled and roller tinned, but all holes are a standard size. They are not silk- OCT 16
screened, nor do they have solder resist. Double-sided boards are NOT plated Arduino-Based USB Electrocardiogram 07108151 9.79
through hole and will require vias and some components soldering to both 100W Switchmode/Linear Bench Supply Part 2 18104141 20.83
sides. NOTE: PCBs from the July 2013 issue with eight digit codes have silk
screen overlays and, where applicable, are double-sided, plated through-hole, NOV 16
with solder masks, they are similar to the photos in the relevent project articles. Fingerprint Access Controller Main Board 03109151
Switch Board 12.88
All prices include VAT and postage and packing. Add 2 per board 03109152
for airmail outside of Europe. Remittances should be sent to The PCB
Service, Everyday Practical Electronics, Wimborne Publishing DEC 16
Ltd., 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU. Universal Loudspeaker Protector 01110151 12.88
Tel: 01202 880299; Fax 01202 843233; Email: orders@epemag.wimborne. 9-Channel Infrared Remote Control 15108151 16.42 On-line Shop: Cheques should be crossed and made Revised USB Charger 18107152 5.36
payable to Everyday Practical Electronics (Payment in sterling only).
NOTE: While 95% of our boards are held in stock and are dispatched within JAN 17
seven days of receipt of order, please allow a maximum of 28 days for High-performance Stereo Valve Preamplifier 01101161 17.75
delivery overseas readers allow extra if ordered by surface mail. High Visibility 6-Digit LED Clock 19110151 16.42

FEB 17
PROJECT TITLE ORDER CODE COST Solar MPPT Charger/Lighting Controller 16101161 17.75
Turntable LED Strobe 04101161 7.60
OCT 15
Digital Effects Processor For Guitars
And Musical Instruments 01110131 16.40
Courtesy LED Lights Delay For Cars 05109141 8.55
Teach-In 2015 Part 9 909 10.70
* See NOTE left regarding PCBs with eight digit codes *
NOV 15 Please check price and availability in the latest issue.
The Currawong Part 1 A large number of older boards are listed on, and can be ordered from, our website.
Main Board 01111141 47.20
Front Panel 01111142 Boards can only be supplied on a payment with order basis.
Rear Panel 01111143
48V Dual Phantom Power Supply 18112141 9.37 Back numbers or photocopies of articles are available if required see the
Programmable Mains Timer With Remote Switching Back Issues page for details. WE DO NOT SUPPLY KITS OR COMPONENTS
Main Board 19112141 11.80 FOR OUR PROJECTS.
Front Panel 19112142 16.40

DEC 15
TDR Dongle For Oscilloscopes 04112141 7.20 EPE SOFTWARE
High-Energy Multi-Spark CDI For Where available, software programs for EPE Projects can be downloaded free
Performance Cars 05112141 11.80 from the Library on our website, accessible via our home page at:
JAN 16
Isolating High Voltage Probe For Oscilloscopes 04108141 11.80
The Currawong Part 3
Remote Control Board 6.95
01111144 PCB masters for boards published from the March 06 issue onwards are
available in PDF format free to subscribers email fay.kearn@wimborne.
FEB 16 stating which masters you would like.
Spark Energy Meter Main Board 05101151 20.75
Zener Diode Board 05101152
Calibrator Board 7.50


Appliance Insulation Tester 04103151 11.80
Front Panel 04103152 11.80 Order Code Project Quantity Price
Low Frequency Distortion Analyser 04104151 7.50
MAY 16 Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-Channel Balanced Input Attenuator for Audio
Analysers and Digital Scopes Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Main Board 04105151 16.40
Front Panel 04105152
20.75 ..............................................
Rear Panel 04105153
Appliance Earth Leakage Tester Tel. No. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Main Board 04203151
Insulation Board 04203152 I enclose payment of . . . . . . . . . . . . . . (cheque/PO in sterling only)
Front Panel 04203153 16.40
4-Output Universal Voltage Regulator 18105151 7.50 to: Everyday Practical
JUNE 16 Electronics
Infrasound Snooper 04104151 7.48
Audio Signal Injector and Tracer 04106151 9.64
Sheild Board 04106153 7.48
Demodulator Board 04106152 5.36
Card No. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Champion Preamp 01109121/22 8.29
Valid From . . . . . . . . . . . . . . Expiry Date . . . . . . . . . . . .
JULY 16 Card Security No. . . . . . . . . Maestro Issue No. . . . . . . .
Driveway Monitor Detector Unit 15105151 11.80
Receiver Unit 15105152 7.50
USB Charging Points 18107151 5.00 Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AUG 16 Note: You can also order PCBs by phone, Fax or Email or via the
Low-cost Resistance Reference 04108151 5.36
Shop on our website on a secure server:
USB Power Monitor 12.00

70 Everyday Practical Electronics, February 2017

PCB Service.indd 70 14/12/2016 10:05

Free delivery on UK orders over 25.00
Plus view our new extended range of
Electronic & Hardware components

Dec 2016 issue

on sale 3rd Nov 2016

If you want your advertisements to be seen by the largest readership at the most economical price our classified page
offers excellent value. The rate for semi-display space is 10 (+VAT) per centimetre high, with a minimum height
Just found more
of 25cm. All semi-display adverts havevintage
a widthelectronic
of 5.5cm. The prepaid rate for classified adverts is 40p (+VAT) per
word (minimum 12 words). FOR THE RENOVATOR
All cheques, postal orders, etc., to be made payable to Everyday Practical Electronics. VAT must be added.
Advertisements, together with remittance, should be sent to Everyday Practical Electronics Advertisements, 113
Lynwood Drive, Merley, Wimborne, Dorset, BH21 1UU. Phone: 01202 880299. Fax: 01202 843233. Email: For rates and information on display and classified advertising please contact our
Jan 2017 issue
Advertisement Manager, Stewart Kearn as above.
on sale 1st Dec 2016
Suppliers of Electronic
Everyday Components
Practical Electronics reaches more UK readers than any other UK monthly hobby electronics
magazine, our sales figures prove it.
We have been the leading monthly magazine in this market for the last twenty-seven years.
Unit 10, Boythorpe Business Park, Dock Walk, Chesterfield,
Derbyshire S40 2QR. Sales: 01246 200 222
Send large letter stamp for Catalogue


Suppliers of Electronic Components Visit INSTRUMEX PLANS offers lab grade test equipment for the electronic hobbyist.
Unit 10, Boythorpe Business Park, Dock Walk, Chesterfield,
Derbyshire S40 2QR. Sales: 01246 200 222
Send large letter stamp for Catalogue OUR NEW YEAR GRAND

SPRING SALE OF ALL modules, CTCSS Encoder and Decoder/
steve@weardale- STOCK. Phone for free list. Valves, books and magazines wanted. Geoff Davies
(Radio), tel. 01788 574774.
UK manufacturer of toroidal transformers on sale(10VA 5th Jan 2017
to 3kVA)
weardaleelectronics All transformers made to order. No design fees. KITS, TOOLS, COMPONENTS. S.A.E.
No minimum order.
PERSONAL SERVICE Severn Road, Clacton, CO15 3RB, http://
01227 450810

CCS INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 QUASAR ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2/3

CRICKLEWOOD ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . 62 STEWART OF READING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
ESR ELECTRONIC COMPONENTS . . . . . . . . . . . . . . . . . . . . . . 6 TAG-CONNECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
HAMMOND ELECTRONICS Ltd . . . . . . . . . . . . . . . . . . . . . . . 19
iCSAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
JPG ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 ADVERTISEMENT OFFICES:
LABCENTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (iv)
LASER BUSINESS SYSTEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
PHONE: 01202 880299
MICROCHIP . . . . . . . . . . . . . . . . . . . . . . . . . Cover (iii), 10 & 63 FAX: 01202 843233
PEAK ELECTRONIC DESIGN . . . . . . . . . . . . . . . . . . . . Cover (ii) EMAIL:
PICO TECHNOLOGY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 WEB:
POLABS D.O.O. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 For editorial address and phone numbers see page 7

Everyday Practical Electronics, February 2017 71

EPE Classifieds_100144WP.indd 71 20/12/2016 17:28

Next Month Content may be subject to change

Speech Timer For Contests & Debates

If you are involved in school or university debating contests you will be aware of the
importance of a speech timer. It keeps meetings and events on time and also prevents
individual speakers from droning on past their allotted time. This Timer has a large 3-digit
display and a buzzer. Plus, it has a tiny infrared remote control.

Solar MPPT Charger & Lighting Controller Part 2

Our new Solar MPPT Charger/Lighting Controller uses solar panels to charge a 12V or 24V
battery and then works with LDR/PIR sensors to run 12V DC lighting or an inverter. Next
month, well show you how to build it and describe the setting-up procedure.

Arduino-Based Fridge Monitor and Data Logger

Keep tabs on your fridge with this temperature and humidity Monitor the Data Logger will even
let you know about midnight raids!

Meet the mighty Micromite Part 2

The Micromite is an amazing device. A low-cost microcontroller programmed in a Microsoft-
compatible version of BASIC with floating point, arrays and extensive string handling. In Part 2 we
examine its powerful and flexible input/output and interfacing abilities.

All your favourite regular columns from Audio Out and Circuit Surgery to Electronic Building Blocks,
PIC n Mix and Net Work.


Welcome to JPG Electronics Get the

Get the answer
the answer youve
answer youve been
youve been
Selling Electronics in Chesterfield for 29 Years looking for
looking for
Open Monday to Friday 9am to 5:30pm
And Saturday 9:30am to 5pm Can
Get ?
the answeranyone
anyone been
Cs?? anyone
Aerials, Satellite Dishes & LCD Brackets P
PIC s looking for
Audio Adaptors, Connectors & Leads
BT, Broadband, Network & USB Leads Get the answer youve been
Can Pro
Computer Memory, Hard Drives & Parts
for help P
so lem
DJ Equipment, Lighting & Supplies PIC me? sourcin ing
ssso uw
o ftwrcainregg?
Extensive Electronic Components so ftw a
are re?
Can ?
- ICs, Project Boxes, Relays & Resistors anyone help
? Problem
Raspberry Pi & Arduino Products PICs me?
Replacement Laptop Power Supplies software?
Batteries, Fuses, Glue, Tools & Lots more... Problem
Geen neerarall
T: 01246 211 202
Gle ora
ecntr nlic
n icss
c s
E: E lec tr
Ele cch hattic
JPG Electronics, Shaws Row, chGaetneral ics
Electron I Can
Old Road, Chesterfield, S40 2RB chat IIhelp!
W: Generaicl help!
s I Canhelp!
chat help!
Shaws Row

JPG Electronics I Can

Britannia Maison Mes Amis help!
Old Road

Vist the
Vistthe EPE
theEPE ChatZone
EPE Chat Zone

Rose & Crown

all Ro
Vist the EPE Chat Zone
oa d
th R
Old H


Retail & Trade Welcome Free Parking Google St View Tour: S40 2RB

Published on approximately the first Thursday of each month by Wimborne Publishing Ltd., 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU. Printed in England by Acorn Web Offset Ltd., Normanton,
WF6 1TW. Distributed by Seymour, 86 Newman St., London W1T 3EX. Subscriptions INLAND: 23.50 (6 months); 43.00 (12 months); 79.50 (2 years). EUROPE: airmail service, 28.00 (6 months); 52.00
(12 months); 99.00 (2 years). REST OF THE WORLD: airmail service, 37.00 (6 months); 70.00 (12 months); 135.00 (2 years). Payments payable to Everyday Practical Electronics, Subs Dept, Wimborne
Publishing Ltd. Email: EVERYDAY PRACTICAL ELECTRONICS is sold subject to the following conditions, namely that it shall not, without the written consent of the Publishers first
having been given, be lent, resold, hired out or otherwise disposed of by way of Trade at more than the recommended selling price shown on the cover, and that it shall not be lent, resold, hired out or otherwise
disposed of in a mutilated condition or in any unauthorised cover by way of Trade or affixed to or as part of any publication or advertising, literary or pictorial matter whatsoever.

CarryOver FEB 2017.indd 72 19/12/2016 09:43

EMI Hardened Zero
Drift Amplifiers
Providing Excellent Precision in an
Interference Environment

With the world expanding their wireless capabilities, the presence of

Electromagnetic Interference (EMI) poses a greater challenge to circuit designers.
EMI results in signal degradation by increasing DC errors and current consumption,
along with introducing unwanted tones at the output. In addition to employing
proper circuit/PCB design techniques, you can choose Microchips zero-drift
amplifiers integrated EMI protection to eliminate additional external components
that increase system cost, design complexity and footprint.

Why wait? Harden your design today using Microchips zero-drift operational
amplifiers to increase performance, reduce cost and extend battery run time!

The Microchip name and logo and the Microchip logo are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. All other trademarks are the property of their registered owners.
2016 Microchip Technology Inc. All rights reserved. DS20005671A. MEC2127Eng11/16

FEB 2017 Page IBC.indd 1 15/12/2016 10:40


Schematic Capture
PCB Layout
Gridless Autorouting
3D Visualization
M-CAD Integration
SPICE Simulation
MCU Co-simulation
Built in IDE
Visual Programming

Tel: +44 (0)1756 753440

Labcenter OCT 2016.indd 1 19/08/2016 13:59