Silicon ChipMay 2017 - Silicon Chip Online SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Going off-grid could be a bad idea
  4. Feature: Technorama – a Community Radio Station Initiative by John Maizels
  5. Feature: Industrial Robots – coming to a workplace near you! by Dr David Maddison
  6. PartShop
  7. Project: Turn your 10MHz counter into a 6GHz+ counter by Nicholas Vinen
  8. Feature: Micromite Tutorial, Part 3: strings and arrays by Geoff Graham
  9. Product Showcase
  10. Feature: Check your tyre pressures from inside the car by Leo Simpson and Nicholas Vinen
  11. Project: The Microbridge: universal PIC32 programmer plus! by Geoff Graham
  12. Subscriptions
  13. Serviceman's Log: Getting sucked in by a vacuum cleaner by Dave Thompson
  14. Project: New Marine Ultrasonic Anti-Fouling Unit by John Clarke
  15. Project: Micromite BackPack V2 with touch-screen and USB by Geoff Graham
  16. Review: The latest digital hearing aids from BlameySaunders by Ross Tester
  17. Vintage Radio: HMV’s 64-52 Little Nipper by Charles Kosina
  18. PartShop
  19. Market Centre
  20. Advertising Index
  21. Outer Back Cover: Hare&Forbes MachineryHouse

This is only a preview of the May 2017 issue of Silicon Chip.

You can view 39 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "Turn your 10MHz counter into a 6GHz+ counter":
  • 1000:1 6GHz+ Prescaler PCB [04112162] (AUD $7.50)
  • 1000:1 6GHz+ Prescaler PCB pattern (PDF download) [04112162] (Free)
  • 1000:1 6GHz+ Prescaler panel artwork (PDF download) (Free)
Articles in this series:
  • Getting Started with the Micromite (February 2017)
  • Getting Started with the Micromite (February 2017)
  • Getting Started with the Micromite, Part Two (March 2017)
  • Getting Started with the Micromite, Part Two (March 2017)
  • Micromite Tutorial, Part 3: strings and arrays (May 2017)
  • Micromite Tutorial, Part 3: strings and arrays (May 2017)
  • Getting Started with the Micromite, Part 4 (June 2017)
  • Getting Started with the Micromite, Part 4 (June 2017)
Items relevant to "The Microbridge: universal PIC32 programmer plus!":
  • Microbridge PCB [24104171] (AUD $2.50)
  • PIC16F1455-I/P programmed for the Microbridge [2410417A.HEX] (Programmed Microcontroller, AUD $10.00)
  • MCP1700 3.3V LDO (TO-92) (Component, AUD $2.00)
  • Microbridge complete kit (Component, AUD $20.00)
  • Software for the Microbridge (Free)
  • Microbridge PCB pattern (PDF download) [24104171] (Free)
Items relevant to "New Marine Ultrasonic Anti-Fouling Unit":
  • New Marine Ultrasonic Anti-Fouling Unit PCB [04104171] (AUD $15.00)
  • PIC16F88-I/P programmed for the New Marine Ultrasonic Anti-Fouling Unit [0410417A.HEX] (Programmed Microcontroller, AUD $15.00)
  • One 40kHz 50W ultrasonic transducer (Component, AUD $55.00)
  • ETD29 transformer components (AUD $15.00)
  • IPP80N06S4L-07 high-current N-channel Mosfet (TO-220) (Component, AUD $2.00)
  • New Marine Ultrasonic Anti-fouling unit lid panel artwork (PDF download) (Free)
Articles in this series:
  • New Marine Ultrasonic Anti-Fouling Unit (May 2017)
  • New Marine Ultrasonic Anti-Fouling Unit (May 2017)
  • New Marine Ultrasonic Anti-Fouling Unit, Part 2 (June 2017)
  • New Marine Ultrasonic Anti-Fouling Unit, Part 2 (June 2017)
Items relevant to "Micromite BackPack V2 with touch-screen and USB":
  • Micromite LCD BackPack V2 PCB [07104171] (AUD $7.50)
  • PIC16F1455-I/P programmed for the Microbridge [2410417A.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC32MX170F256B-50I/SP programmed for the Micromite Mk2 plus capacitor (Programmed Microcontroller, AUD $15.00)
  • 2.8-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $25.00)
  • MCP1700 3.3V LDO (TO-92) (Component, AUD $2.00)
  • Micromite LCD BackPack V2 complete kit (Component, AUD $70.00)
  • Matte/Gloss Black UB3 Lid for 2.8-inch Micromite LCD BackPack (PCB, AUD $5.00)
  • Clear UB3 Lid for 2.8-inch Micromite LCD BackPack (PCB, AUD $5.00)
  • Gloss Black UB3 Lid for 2.8-inch Micromite LCD BackPack (PCB, AUD $4.00)
  • Software for the Microbridge (Free)
  • Firmware (HEX) file and documents for the Micromite Mk.2 and Micromite Plus (Software, Free)
  • Micromite LCD BackPack V2 PCB pattern (PDF download) [07104171] (Free)

Purchase a printed copy of this issue for $10.00.

MAY 2017 ISSN 1030-2662 05 9 771030 266001 INDUSTRIAL ROBOTS 9 PP255003/01272 $ 95* NZ $ 12 90 INC GST INC GST They don’t take lunch breaks, smokos or sickies – and they’ll even work where no human would dare to go! 112 PAGES! Ultrasonic Boat Anti-Fouling Unit New design keeps siliconchip.com.au barnacles at bay! 1000:1 Prescaler Goes to 6GHz + ! Use with your old MHz May 2017  1 counter to measure into GHz! PROJECT OF THE MONTH Our very own specialists are developing fun and challenging Arduino®-compatible projects for you to build every month, with special prices exclusive to Nerd Perks Club Members. DUINOTECH GAME MACHINE CREATE YOUR OWN GAMES We found a sweet little game project online http://gamebuino.com http://gamebuino.com,, and being open-source, made our own version of it using duinotech parts. What’s more, there’s already a heap of games that have been created at https://github.com/Rodot/Gamebuino-Games-Compilation Arduino based means you can create your own games too. To get you started, we’ve built a Tic-Tac-Toe game for it, now the choice is yours. There’s a bit of soldering and wiring involved. SP-0601 XC-4414 RR-0596 VALUED AT $70.90 WM-4516 XC-4424 XC-4616 HP-9550 RR-0588 Finished Project HM-3211 WHAT YOU WILL NEED: NERD PERKS CLUB OFFER BUY ALL FOR $ SEE STEP-BY-STEP INSTRUCTIONS AT jaycar.com.au/game-machine 4995 SAVE 29% 1 X ARDUINO® COMPATIBLE NANO BOARD 1 X 84X48 LCD DISPLAY MODULE 1 X BUZZER MODULE 7 X MICRO TACTILE PUSHBUTTON SWITCH 1 X PRE-PUNCHED EXPERIMENTERS PROTOTYPE BOARD 1 X PACK OF 10KOHM RESISTORS 1 X PACK OF 4.7KOHM RESISTORS 1M X RAINBOW RIBBON CABLE 1 X HEADER STRIP XC-4414 XC-4616 XC-4424 SP-0601 HP-9550 RR-0596 RR-0588 WM-4516 HM-3211 $29.95 $19.95 $3.95 $0.95 $4.50 $0.55 $0.55 $3.95 $0.85 MAKE IT PORTABLE Add this battery and charger pack plus battery holder. PANASONIC NI-MH BATTERY CHARGER WITH 4 AA ENELOOP BATTERIES MB-3563 $ 42 95 • Charges both AA and AAA batteries • Plug in style wall charger • Approx. 10 hour charge time 4AA SWITCHED BATTERY ENCLOSURE PH-9282 Slide on/off switch • 150mm long tinned leads • 69(L) x 65(W) x 19(H)mm 2017 CATALOGUE OUT NOW! FREE CATALOGUE* FOR NERD PERKS MEMBERS WITH PURCHASES OF $30 OR MORE. Applies to new and existing members for purchases made in-store or online. Valid 24 April to 23 May 2017. * Catalogue Sale 24 April - 23 May, 2017 $ 249 ULTRASONIC ANTI-FOULING KIT FOR BOATS KC-5535 3 $ 75 This is an improved design from our popular kit (KC-5498) from 2010 that helps reduce marine growth on the boat hull. This new design has a second channel option for larger boats up to 14m, soft-start feature, low current drain during shut-down and LED & Neon operation indicators. Kit includes all specified parts to make a single channel version for boats up to 8m, including one transducer. ALSO AVAILABLE: ADD-ON SECOND CHANNEL WITH TRANSDUCER KC-5536 $169 EARN A POINT FOR EVERY DOLLAR SPENT AT ANY JAYCAR COMPANY STORE• & BE REWARDED WITH A $25 JAYCOINS GIFT CARD ONCE YOU REACH 500 POINTS! Conditions apply. See website for T&Cs * REGISTER ONLINE TODAY BY VISITING: www.jaycar.com.au/nerdperks To order phone 1800 022 888 or visit www.jaycar.com.au Contents Vol.30, No.5; May 2017 SILICON CHIP www.siliconchip.com.au Features & Reviews 17 Technorama – a Community Radio Station Initiative Did you know there are 440 Community Radio Stations in Australia? They’re always on the lookout for technical volunteers to keep them on the air – and they’re even providing assistance via “Technorama” – by John Maizels 18 Industrial Robots – coming to a workplace near you! Industrial robots can take over tasks which are too difficult, too repetitive, too dangerous or too arduous for humans – by Dr David Maddison 40 Micromite Tutorial, Part 3: strings and arrays It has become one of the great micro success stories – not just in Australia but around the world. This series will help you understand all the excitement about the Micromite – by Geoff Graham 48 Check your tyre pressures from inside the car Correct tyre pressure is vital but most people forget them! Now you can keep a constant check on tyre pressure and temperature inside the car, with the data sent by wireless from your wheels – by Leo Simpson and Nicholas Vinen 90 The latest digital hearing aids from BlameySaunders With this 1000:1 prescaler your frequency meter can measure up to 6GHz and beyond – Page 30 Keep tabs on your tyre pressures! Just look at the readout inside the car – Page 48 The Opus 96 represent the state-of-the-art in digital hearing aids. We compare them to earlier models – and hear the difference! – by Ross Tester Constructional Projects 30 Turn your 10MHz counter into a 6GHz+ counter If you have an old, low frequency counter (even in a DMM) you can dramatically extend its range – up to 6 gigahertz and more – with this neat little scaler. Instead of reading MHz, you’ll be reading GHz! – by Nicholas Vinen 61 The Microbridge: universal PIC32 programmer plus! Manipulate the PIC32 from your PC or program any PIC32 – plus you get a USB/serial converter. It can be used with many other processors including those on Arduino or Raspberry Pi – by Geoff Graham The Microbridge lets you program a PIC32 from your PC and also gives you a USB/serial converter – Page 61 74 New Marine Ultrasonic Anti-Fouling Unit Marine growth hates it – but you’ll love it . . . maximise the “out of water” intervals and minimise the growth of algae, weeds, barnacles and coral. Suits boats moored or berthed in salt or fresh water – by John Clarke 84 Micromite BackPack V2 with touch-screen and USB This revised version of the Micromite LCD BackPack incorporates the Microbridge (see above) adding a USB interface and the ability to program/ reprogram the PIC32 chip while it’s onboard – by Geoff Graham Your Favourite Columns 68 Serviceman’s Log Own a boat? Fitting an Ultrasonic Anti Fouling Unit can save you a boatload of money – Page 74 Getting sucked in by a vacuum cleaner! – by Dave Thompson 94 Circuit Notebook (1) Using the GPS Analog Clock as a 1pps signal source (2) Atmel-based digital clock and stopwatch (3) Using a CAN bus to monitor individual solar panels 98 Vintage Radio HMV’s 64-52 Little Nipper – by Charles Kosina Everything Else! 2 Publisher’s Letter    4 Mailbag – Your Feedback siliconchip.com.au 46 Product Showcase 103 Ask SILICON CHIP 108 SILICON CHIP Online Shop 111 Market Centre 112 Advertising Index 112 Notes and Errata New Micromite LCD BackPack V2 with touch screen – Page 84 May 2017  1 www.facebook.com/siliconchipmagazine SILICON SILIC CHIP www.siliconchip.com.au Publisher & Editor-in-Chief Leo Simpson, B.Bus., FAICD Editor Nicholas Vinen Technical Editor John Clarke, B.E.(Elec.) Technical Staff Ross Tester Jim Rowe, B.A., B.Sc Bao Smith, B.Sc Photography Ross Tester Reader Services Ann Morris Advertising Enquiries Glyn Smith Phone (02) 9939 3295 Mobile 0431 792 293 glyn<at>siliconchip.com.au Regular Contributors Brendan Akhurst David Maddison B.App.Sc. (Hons 1), PhD, Grad.Dip.Entr.Innov. Kevin Poulter Dave Thompson SILICON CHIP is published 12 times a year by Silicon Chip Publications Pty Ltd. ACN 003 205 490. ABN 49 003 205 490. All material is copyright ©. No part of this publication may be reproduced without the written consent of the publisher. Printing and Distribution: Derby Street, Silverwater, NSW 2148. Subscription rates: $105.00 per year in Australia. For overseas rates, see our website or the subscriptions page in this issue. Editorial office: Unit 1 (up ramp), 234 Harbord Rd, Brookvale, NSW 2100. Postal address: PO Box 139, Collaroy Beach, NSW 2097. Phone (02) 9939 3295. E-mail: silicon<at>siliconchip.com.au ISSN 1030-2662 Recommended & maximum price only. 2  Silicon Chip Publisher’s Letter Going off-grid could be a bad idea Back in June 2015, I wrote about the “anti-islanding” feature of grid-tied solar inverters and how it meant that during blackouts, particularly in the aftermath of major storms and floods, those home-owners with roofmounted solar panels still had no power even though the Sun could be seen shining brightly. How frustrating! Two years later, the east coast of Australia has experienced a very severe cyclone which has meant that tens of thousands of people have again been without electricity for long periods while power was being restored. No-one is to blame for this; it’s just the consequence of very bad weather. Of course, now that battery-backed solar installations are being promoted, it is possible to have continuous power while thousands of homes around you are without. But that is a very expensive investment. Nevertheless, we often receive emails from people who are contemplating going “off-grid” so that they don’t have to contend with blackouts, rising electricity tariffs and daily service charges. Now while the above three aspects are certainly food for thought, I would be very cautious about going entirely off-grid. For a start, if your system breaks down, you won’t be able to have the power restored quickly and cheaply by your electricity retailer. The further you are from major population centres, the more isolated you would be. Secondly, while those daily service charges have increased far too much, the typical customer’s daily charge of about $1 (or $365 per annum) is small bikkies compared to the investment you will need to go off-grid. Thirdly, if you already have a grid-tied solar installation, you can be a lot smarter about the way it is employed. You already have a “smart meter” but you must become a “smart user”, particularly now that most states have drastically reduced those generous feed-in tariffs to a measly 6¢/kWh or thereabouts. That means you must use as much of the power generated by your solar panels as you can. (By the way, you must also ensure that your smart meter has been reprogrammed for “net” metering). If you have a pool pump and salt-water chlorinator, using power generated on-site is a no-brainer: simply run the pump during the day when solar power is available. Or operate appliances such as washing machines and dishwashers at the same time, if at all possible. To some extent, you should also run your aircon in the hot summer afternoons (before solar generation cuts out). Now while these strategies are quite easy if you always have someone at home to make decisions about running pumps and appliances while solar power is available, it is not easy if no-one is at home during the day or you go on holidays. Of course, you can set the timer to run your pool pump and chlorinator during the peak solar generation times but that can go badly amiss when the weather is bad or a blackout subsequently causes the timer to turn on the pump during peak tariff times – that gets really expensive. You always need to be vigilant about checking that the timer is correctly set. This is such a tricky issue that we are considering the design of a project which would operate a pool pump and solar chlorinator only while adequate solar generation was available. The system will also need to run the pump at off-peak times after a day or so, when bad weather has reduced the available solar power. That means it would also need GPS and to keep track of daylight saving so that it was never likely to run the pump in peak tariff times. There are other wrinkles to consider in this concept but I think it is an easier approach, if you do have solar panels and a pool, than the far more expensive alternative of going off-grid. What do you think? Leo Simpson siliconchip.com.au MAILBAG – your feedback Letters and emails should contain complete name, address and daytime phone number. Letters to the Editor are submitted on the condition that Silicon Chip Publications Pty Ltd may edit and has the right to reproduce in electronic form and communicate these letters. This also applies to submissions to “Ask SILICON CHIP”, “Circuit Notebook” and “Serviceman”. Necessity is the mother of invention Thank you again for another issue of Silicon Chip that is worth reading. I am always amazed at the quantity and variety of articles in the magazine. I hope my comments are of interest to you. On the question of "Where does innovation come from?" as posed in the Publisher's Letter in the January 2017 issue, I think the common driver behind innovation is necessity. If a person or nation is literally given everything and has little need of anything, where is the drive to seek something better? Also, what are the rewards for effort if someone decides to pursue a goal and expend a large amount of time, effort and money? The majority of kids are not stupid. They know that they do not need to exert themselves. As well, most simple problems have been solved. Thousands of patents are the proof. Dave Thompson's solution highlights one of the conditions for innovation and that is a person must be aware of the problem. I am quite sure Dave would never have created his solution had his friend not asked for help. The answer to the question of why bright young minds do no innovation is that they are not aware of a lot of problems. To be fair, had Dave's friend asked many young people (and older), it is unlikely that anyone would have produced the same solution. It is highly likely that it is Dave's combination of training and experience that caused his brain to offer the possible solution. It is one of the most amazing aspects of neural networks that a neuron representing a particular subject or action can be activated by the summation of a lot of loosely associated inputs that represent subjects with no apparent connection. The result is that anyone with a large amount of training and experience will always have the problemsolving advantage over someone with less because of the difference in both 4  Silicon Chip the quantity and type of neural associations in his or her brain. Of course, that is not all there is to innovation. There must be motivation, money, fame, prestige, survival, love etc. On a related topic, recently my nephew brought my attention to a company and the unusual games that they sell. I had just implemented the A* pathfinding algorithm in PowerBasic and MMBasic and explained how it worked and how it was used in computer games for the non-player characters (NPCs). This prompted him to show me the company, Zachtronics, and their game, Shenzhen-IO. The game requires players to solve electronic/computer design problems and compete against each other. Almost instantly I recognised the game for what it is. It is designed to attract Submarines are not obsolete and Alinta power was not overpriced Reading the Mailbag section in the February issue, I am concerned by the misapprehensions of David Tuck (from Victoria) and especially Cliff Hignett (significantly, from South Australia). Firstly, let me respond to Mr Tuck. He takes the view that submarines were obsolete after WWII. He fails to mention that the greatest development in submarines, nuclear propulsion, was developed well after the end of WWII – in the 1950s and 1960s. Mr Tuck pulls together a hodgepodge of unrelated “factoids” to support his claim. He is certainly wrong if he thinks a submarine could not sink an aircraft carrier. He claims that “Australia should develop its own, cheap innovative weapons, such as a camera drone carrying a pistol.” A pistol! And 100,000 of them! Mr Hignett decided not only to criticise nuclear submarines and incorrectly claim there is signifi- and hopefully identify those with good electronic/computer skills. I could be mistaken but an unusual comment from Zachtronics seems to support my belief. The game page is: www. zachtronics.com/shenzhen-io/ The holding company has a description on their media page: http:// alliancemediaholdings.com/newsreleases/ The question then arose as to whether Zachtronics management was doing the head-hunting for themselves or for a client. Regardless, the concept is not bad. I have had to vet job candidates and something like this would have been so helpful. I was going to suggest that Silicon cant danger in decommissioning them. He also makes further spurious claims about their vulnerability. He also claims that wholesale electricity at 8¢/kWh is unacceptably high. 8¢/kWh is not abnormally high for coal-fired electric power. I know of a generator in Queensland who charges this and has plenty of customers. I don't know whether the Alinta power station is “past it” but it is probably near the end of its working life. I also don’t know whether the coal supplying Alinta was almost exhausted but I do know that NSW and Queensland have the best quality steaming coal in the world so Mr Hignett is absolutely wrong when he claims that NSW and Queensland have similar problems to South Australia and Victoria. Both Mr Tuck and Mr Hignett are entitled to their opinions but their muddled thought processes do not further the debate on Australia's selfdefence or its power needs. Gary Johnston, Submarines for Australia. siliconchip.com.au The Opus-96 $2635 per hearing aid $4990 per pair Introducing the Opus-96™ Effortless sound in any environment. The Opus-96 is our new, next generation hearing aid. It uses 96 output channels on one of the world’s most sophisticated sound processors to deliver you comfortable, high definition sound. Intelligent multi-channel adaptive directional microphone technology lets you easily separate important information from background noise. Especially speech. • • • • • • • • • • 96 output channels Leading core technologies Advanced feedback canceller Advanced wind-noise manager Ultra-low delay Multi-channel adaptive directional microphone Microphone-Telecoil mode Long battery life IHearYou® compatible Free ongoing audiology & technical support Debbie from New South Wales says: “These hearing aids are wonderful. I can hear the ticking of the clock from a distance. My feet crunching on the gravel. Rain on the roof and my dog crunching her food.” David from Victoria says: “After 3 days, I almost don’t notice them on my ears. I can hear everything said around the table, or in meetings.” siliconchip.com.au Take control of your hearing today Visit blameysaunders.com.au or call 1300 443 279 May 2017  5 Mailbag: continued Adjustable trip current for Electronic Fuse My first reaction to the Electronic Fuse project in the April issue was that it could have helped me out on numerous occasions as a faultfinding tool. But then I thought about what values would I use for R1 & R2 if I built it (to set the trip current). I don't have any faults to diagnose at the moment, but in the past they have involved a variety of fuse ratings: 2, 5, 7.5 and 10A. I think if I built the eFuse, I'd need to move R1 and R2 off the board, so they could be changed on demand. I'm considering a plug in module, or maybe a dual-gang rotary switch. I'm just a little miffed that variable current wasn't considered in the original design. Any other sugges- Chip should devise a challenge like this but when I tried to think of suitable challenges, I could not think of a project that would appeal to both hobbyists and professionals. The best idea that came to mind is to assemble a list of core components/modules and issue a challenge to create something novel from them and only them with the exception of discrete components. Regarding the letter on "Electricity grid stability without rotational inertia" by Kenneth Moxham in Mailbag, February 2017 (pages 12-13), I found it quite interesting and it has prompted me to pose a question with a possible solution. I can understand integrating wind and solar power into the existing grid system with the desire to make as few changes to it as possible. I can also understand the difficulties of maintaining stability on a large grid with multiple sources and sinks. But why do we adhere to an AC backbone for our network? On a much smaller scale, we use switchmode power supplies in which the AC is rectified to DC and this is switched at high frequency through a transformer to produce power at a different voltage either higher or lower. In some systems that I have seen, the 6  Silicon Chip tions for methods of changing those two resistors? Phil Porritt, Inverell, NSW. Editor's response: Glad you like the circuit (in principle). As you have already concluded, the circuit could cater for different fuse ratings by having R1 & R2 switchable. Assuming that you wanted the 10Acapable version with two sensor ICs, the easiest option would be to use a 2-pole 6-position rotary switch. We did realise that a variable trip current would be useful in many circumstances but it would involve a somewhat more complex circuit and larger PCB. So we decided publish the simple eFuse project in the April issue, with plans to follow up with a more capable (and complex) version in the future. AC is rectified to produce a common DC supply rail to multiple converters. Why doesn't the power grid have a DC backbone? We can easily convert the DC into AC for local distribution. It is only a matter of how to connect multiple sources to the backbone. The answer to connecting multiple sources in parallel to the grid lies with the nature of switchmode power supplies and that is that they are all current sources. Firstly, the backbone voltage would be allowed to vary about a nominal voltage. This would not be a problem for switchmode converters taking power from the grid. Secondly, the sources would all use switchmode converters to inject current into the grid at their maximum possible rate with the only limits being over-current and grid overvoltage. The voltage of the grid would not only be controlled by the loading of the switchmode converters taking power from the grid but also by energy storage units which would effectively act like huge zener diodes. Plus, simple energy dumps would provide backup protection. One of the nice things about this system is that it should degrade gracefully with the failure of power sources. It is the power sinks that would need to disconnect when there is insufficient supply and human controllers would have to make the decision as to who gets the remaining power. The power generators would continue supplying power even if there was only one small one operating with the result that the backbone voltage would drop until the loading was reduced to match the available power. All the aspects of this scheme have worked separately in low power systems. There is good reason to believe that the combination would work for grid operation. George Ramsay, Holland Park, Qld. Using fans instead of air-conditioning I am surprised that there has been little discussion about the form of air-conditioning I have used for decades. This, in its simplest form, consists of running fans in windows and doorways through the night in hot weather to draw cool night air from outside. By the morning, these drop the inside temperature to one or two degrees above the minimum night temperature. Then, first thing in the morning, you turn off the fans and close all the windows and the 6°C lower inside temperature (compared with outside day temperature) lasts much of the day. By about 5pm, the inside temperature is usually still 3°C lower than outside. In fact, we do more than run fans in doorways and windows. Years ago we installed a one-metre fan in the ceiling – this came with neat shutters which are normally closed but these open when the fan operates. This draws air from inside the house, replaced by cool night air drawn in through windows and doors. It also cools the roof cavity. And my pièce de résistance, unique as far as I know: having noticed how hot the roof cavity became on hot days, I installed large fans in the gables. These operate automatically during the day in hot weather, lowering the temperature of the roof cavity and the ceiling (we have an iron roof). Most of the heat which gets inside during the day is radiated by the ceiling. These fans reduce the roof cavity temperature to near ambient. I have never measured siliconchip.com.au silicon-chip--msb.pdf 1 3/21/17 10:09 AM C M Y CM MY CY CMY K siliconchip.com.au May 2017  7 Mailbag: continued Neutralisation is a complex subject Thank you for featuring the TR-712 in your March editorial. I notice that you described the TR712 as the first transistor set using neutralisation. You may get some mail on this. Regency's TR-1 (the first trannie) also used neutralisation, as have most of the sets I've reviewed for Silicon Chip. I'm also not sure about your comparison between NPN and PNP. Why did Texas Instruments supply NPNs to Regency, while Philips/ Mullard/Grundig used PNPs? The first generation of junction transistors from TI used the grownjunction technique. Semiconductor chemistry/physics dictated that the NPN structure was the easiest and most successful grown-junction device to produce. Philips had considered grownjunction but rejected it for its poor performance (as I noted in the Grundig article) in favour of alloyedjunction construction. And yes, for alloyed-junction transistors, PNP is the most practical construction. NPN had always offered the theoretical advantage of higher operating frequencies, relying as it it but anyone who has entered a roof cavity during a hot day will have noticed the temperature build-up. Ceiling insulation is supposed to stop heat migrating into the house but it has the opposite effect if the roof cavity is consistently hot. The temperature of the insulation increases and the nature of the material means that it takes a long time to cool down. The cost of running all these fans is negligible compared with the cost of refrigerated air-conditioning. In very hot spells, I supplement the ceiling and roof fans by placing fans in doorways. It takes a few minutes to switch them on. And each morning it takes five minutes to switch off fans and close windows. Ken Kerrison, Pialligo, ACT. Comment: your approach is valid of course and some of our staff use a 8  Silicon Chip does on electron majority carrier operation due to the higher mobility of electrons (compared to holes) in the emitter and collector regions that form the major bulk of a transistor. You also state that "neutralisation is essentially a positive feedback arrangement which gives a boost to the high frequency gain". This is not so; in the absence of neutralisation, capacitive feedback commonly (but depending on circuit reactances) provides positive feedback. It's this positive feedback that produced the "howling" effect that so bedevilled Lee de Forest and that was capitalised on by Edwin Armstrong when he finally tamed it and lodged his regeneration patent. As with Hazeltine's "Neutrodyne" patent, transistor neutralisation allows transistors to operate at maximum theoretical gain, without the potentially destabilising effect of feedback. There's more to this – consider the effects of feedback on input impedance and thus on tuned circuit performance, for example. Ian Batty, Harcourt, Vic. similar approach at certain times of year. But in Sydney's coastal areas, we suffer through several very humid months each year; fans and insulation do little to solve this. Even on days where the temperature does not exceed the mid-20s, high humidity can make sleeping very uncomfortable. Running an aircon for even half an hour in the evening can dehumidify the indoors until the next morning and costs little. Regenerative braking with DC motors This letter is in response to Herman Nacinovich's letter in the Mailbag section of the March 2017 issue, regarding the need in some applications for regenerative braking with a DC motor. True regenerative braking, ie, energy flowing back into the battery, does occur in most electric wheelchairs. I used to design their controllers. Back in those days, before the 'net, I stumbled on this simple technique. The trick is in the output architecture where another Mosfet is provided and wired in the familiar "half-bridge" configuration. A full "bridge" also works and offers the extra feature of reversing without a relay. This technique uses the inductance of the motor itself to form part of a DC/ DC converter and I can assure you that the effect is to very strongly brake the motor to whatever speed setting is chosen. So half throttle means braking to half speed. Currents of 20A back into a 24V battery are not uncommon. The other aspect is that the switching frequency must be fairly high; above 20kHz, which is also done to prevent audible noise from the motor windings. It also means that the magnetic field doesn't entirely collapse between cycles. This technique also can work with 3-phase brushless motors, with three half-bridges. Bruce Steer, Peterhead, SA. On a flexible mental outlook The saying "there are none so blind as they who will not see" may relate to the letter by Ian Paterson in the March issue of Silicon Chip magazine. The political versus technical pingpong of Climate Change facts and union superannuation funding for green projects is not logical behaviour. When the facts change what does Mr Paterson do? I change my stance! The danger of technical facts is that they can be demonstrated as facts, while opinions do not relate to reality of the fact that since green energy was introduced, doubling energy prices are crippling the poor and manufacturers have suffered, leading to job losses – all possibly heading us into a recession. See www.thegwpf.com/greenenergy-costs-to-double-committee-onclimate-change-reveals/ Aluminium producers, steel manufacturers and growth industries are now hesitating with their investments, all the while we, the lucky country, ignore the facts that Australia has no major pollution problems but India, China and Turkey do and we are trying to save the world from environmental collapses. Japan, Germany and the others just siliconchip.com.au The improved C5100B Single Bay Battery Analyser Featuring: QUICKSORT™ 4: Rapid 4 Minute Testing of 3.6/3.7V Lithium Ion batteries of 500-4000mAh capacity. On-the-spot battery testing is easier and faster than ever thanks to the new and improved Cadex C5100B Lithium Ion battery analyser. Designed to provide accurate anaylsis of Lithium Ion batteries, the C5100B allows you to monitor your battery fleet to maintain optimum performance and to identify future replacements for when battery performance is nearing its end of life. Identifying dying batteriers before they fail greatly reduces down time and keeps your equipment functioning as it should. 1 2 3 CONNECT SELECT PRESS THE BATTERY THE RATING PROGRAM KEY The C5100B features FOUR programs to choose from: • Test: 4 Minute QuickSort™ 4 test for LiIon batteries • Charge: provides full charge in approximately 3 hours • Cycle: Charge / Discharge / Charge to determine true capacity with capacity readout in mAh • Boost: Revive overdischarged batteries TEST CHARGE CYCLE BOOST Checks the battery in just 4 minutes Charge the battery in approximately 3 hours Charge / discharge / charge and readout in % Revive over-discharged batteries Cadex's patented QuickSort™ 4 technology provides a battery's state of health in a matter of minutes. How can Cadex C5100B help you? Quickly determine the State of Health (SoH) of batteries: • In a new batch to verify quality • In an existing fleet for effective fleet maintenance • In the shopfront for fast, conclusive problem resolution Capable of testing LiIon batteries from 500mAh up to 4,000mAh - a versatile range which easily covers most batteries for Smartphones, digital cameras, bluetooth & wireless headsets, two-way radios, barcode scanners, digital test equipment, medical applications and many more. Options and accessories Purchase the C5100B kitted with a Universal RigidArm™ adaptor (pictured above) or choose the C5100B unit only and select from a great range of optional adaptors to suit a specific battery model. The BOOST function also revives batteries you may have had in storage - saving you even more! Available for free download is the BatteryStore™ software which unlocks functions to test 7.2V/7.4V LiIon batteries. Master Instruments Pty Ltd siliconchip.com.au Sydney: Perth: WEB: www.master-instruments.com.au (02) 9519 1200 (08) 9302 5444 EMAIL: Melbourne: Brisbane: (03) 9872 6422 (07) 5546 1676 May 2017  9 sales<at>master-instruments.com.au May 2017 Mailbag: continued Motor controllers with dynamic braking ideal for ride-on locomotives I refer to a letter in the March 2017 issue of Silicon Chip suggesting the use of regenerative braking for a large-scale model locomotive. It would seem to this correspondent that it is not a practical solution for several reasons. The first is that it would be unnecessarily complicated and not really effective for an emergency stop and unless the motor type is precisely matched to the braking electronics, the amount of recoverable energy directed to the battery would be quite small. Secondly, under the operating guidelines issued by the Australian Association of Live Steamers, the body covering activities and insurance of most miniature railways in Australia and New Zealand, passenger cars require adequate braking. mentioned are still building new power stations. And we are running out of gas and power by shutting them down? Where is the logic? Of course, technology is the answer and the politics behind all this fear mongering must be questioned, as it is not helping us go in the right direction. John Vance, Wangaratta, Vic. Neutralisation relies on multiple signal phase shifts I refer to the letter on page 4 of the April 2017 issue where D. H., asks the question about neutralisation. In effect, he asks whether his thinking is incorrect. Well perhaps not; it may be a matter of semantics although I doubt it. First of all, let us define what neutralisation is with reference to a triode tuned-anode and tuned-grid amplifier. In a triode valve, some capacitance exists between the anode and grid of the order of a few picofarads. This capacitance forms a feedback path for the amplified signals to the input of the valve. In the case of an RC-coupled amplifier, the feedback will be degenerative or negative as the frequency increases due to the falling 10  Silicon Chip Trains are limited to a maximum speed and must be separated by a specified distance. If these requirements are followed, the need for a sudden stop is basically avoided and, if it cannot be, emergency regenerative braking would not be the solution. Having had experience over a number of years with battery operated locomotives in five inch gauge in my local club, the use of dynamic braking would be a far simpler alternative. As a very satisfied user, with no connection to the firm, a controller produced by Alian Electronics, an Australian company based in Victoria, is suggested. Their model SM263 Motor Controller would possibly be suitable for your correspondent’s application and is described on their website: reactance of the feedback capacitance. Triode-based RF amplifiers normally employ an input parallel tuned circuit between grid and chassis common and the anode also employs a similar tuned circuit; normally, it is connected between the anode and HT but decoupled to chassis as far as RF is concerned. When both tuned circuits are resonant at the desired frequency, each circuit will retard the phase of the signal by 90°, making the total phase shift 180° and changing the feedback from negative to positive, thus causing the circuit to oscillate. By reversing the phase of the feedback and applying it to the input of the circuit, the positive feedback is neutralised by the use of negative feedback. Note that the same tuned circuits that change the unwanted negative feedback from anode to grid to positive also change the reversed feedback from positive to negative. Reversal of phase is normally accomplished by the use of a suitable secondary or tertiary winding in the anode tuned circuit; other systems can be employed but amount to the same thing. Tetrode and pentode neutralisa- www.alianelectronics.com.au/ sm263-motor-controller.html The unit is a general-purpose motor controller for 12 or 24V DC with a steady output of up to 80A. This unit has the facility for dynamic braking and many very useful features. Having noted comments concerning the Publisher’s Letter and articles by Dr David Maddison, this writer is fully supportive of the policy of including comments and articles not strictly associated with electronics. If nothing was ever questioned in science, progress would virtually come to a standstill. Dr Maddison has proved insight in some interesting topics and one that quickly comes to mind was the description on the horizontal drilling of oil wells. Peter Brown, Orange, NSW. tion is quite another subject. Positive feedback is employed to increase the sensitivity of simple valve or transistor radios where as you mention, the positive feedback reduces the losses of the tuned circuit by increasing the circuit's Q and in so doing, increases both sensitivity and selectivity. It is normally only used in the detector circuit and is commonly called reaction and controlled by the radio operator. Victor G. Barker, Gorokan, NSW. Switching high-voltage DC requires special equipment In your comments on “Utilising solar power when the grid is down” in Ask Silicon Chip (April 2017), you mention using a 230VAC to 12V DC SMPS connected to the DC output from the solar panels. I have previously thought of building a 12V to 200-300V DC inverter to run small devices with SMPSs in them (eg, phone chargers etc). However, I baulked at the idea when I thought about simply connecting and/or switching several hundred volts of DC; not easily done, lots of arcs & sparks. siliconchip.com.au siliconchip.com.au May 2017  11 Mailbag: continued If one were to use an SMPS from a set of solar panels, special highvoltage DC switches/isolators would be needed, similar to what is normally incorporated with the solar installation. NOTE: these voltages are lethal, as you well know. Brian Playne, Toowoomba, Qld. Modern wind generators feed the mains grid directly Having read Tom George’s letter in the Mailbag section of March’s issue, I would like to comment on a couple of points. Firstly, the heading “wind turbines don’t affect grid frequency” is plain wrong. In any AC grid system, at any point in time, the grid’s total generation must exactly equal the grid’s total loading for the system frequency to be exactly 50 Hertz. Too little generation or too much load and the frequency will fall. Conversely, too much generation or too little load, the frequency will rise. Remember that supply authorities go to great lengths to keep the frequency stable, usually within tenths of one Hertz. A loss of any type of generation, be it wind generation or otherwise, will therefore result in the grid frequency dropping. Under normal conditions, the loss of wind generation will be picked up quickly by other generators ramping up load rapidly to overcome the shortfall. However, if the net generation loss is great enough and sustained for long enough, automatic load-shedding equipment should operate to remove successive “blocks” of load from the grid until the frequency normalises back to 50 Hertz. Your correspondent further writes that as he understands it, wind turbines produce AC, then rectify the output to DC and convert it back to AC for connection to the grid. This may have been true for the earlier, smaller wind turbines but this system is not practical for the larger machines of today since the rectification and conversion equipment would need to be too large to carry the full output. These days, doubly-fed, asynchro12  Silicon Chip nous generators are used. These are wound-rotor, induction machines where the generator’s AC winding is connected directly to the grid. A second supply is taken from the grid connection, rectified, then converted back to AC at variable frequency before being fed back to the wound rotor of the generator (hence the term doubly-fed). By constantly manipulating the rotor frequency in response to wind speed and grid parameters, the machine will generate across a wide range of wind speeds. The other advantage is that the rotor supply is of a much lower current rating than the output, so the conversion module is much smaller. Further, another one of your correspondents, Cliff Hignett writes “most small generators produce DC which needs to be converted back to AC to be synchronised with the grid.” I do not believe this is the case. In my twentyfive odd years as a power system operator, I have not been aware of such machines. Certainly, all of Tasmania’s small mini-hydro and wind generators are AC machines. Terry Ives, Penguin, Tas. Leo comments: we had a feature article on Australia's first wind farm at Crookwell, NSW, in the January 1999 edition. It employed Vestas' wind turbines which has a system called Opt-sync which, as we understand it, is a variant of a doubly-fed asynchronous generator. See www.siliconchip. com.au/Issue/1999/January/4.8MW++Blowing+In+The+Wind SenseFET resistor value affects current split I read the description of the operation of SenseFETs (April 2017, page 40) and I believe it doesn't tell the whole story. Clearly the current split cannot be 1000:1 using the resistor values in the table. For instance, the sense resistor for 1A is 120W. A 1000:1 split would result in approximately 1mA flowing in the resistor, resulting in a voltage drop of 120mV. However, the main FET has a resistance of up to 37mW so would only have a maximum drop of 37mV. Since the sense resistor is in parallel with the main FET channel, the maximum voltage drop has to be 37mV or less, so the current flowing through it is less than 1mA. If the resistors are chosen so that limiting occurs when the voltage across the sense resistor is a certain value, it is clear that the current split is not 1000:1 and also is not a constant. If it were constant, the resistors would be in inverse proportion to the main FET current. A rough calculation implies that the sense resistor is in series with some internal resistance of more than 80W that varies with the current. The voltage drop across the sense resistor may be as small as 10mV and I would suggest this would be amplified internal to the chip to be useful. Perhaps there is the basis for an "understanding how a SenseFET works" article. John Clarke comments: In practice, the sensing voltage developed using low values of sense resistance (to preserve the current split) is very small and so larger values of Rsense are normally used. These larger values do affect the total resistance in the mirror leg and so alter the current mirror ratio but the resulting error may not be terribly significant at the sort of current levels used in practice; it really depends on the application. You can see a more complete description in an application note by ON Semiconductor; AND8093/D, Current Sensing Power MOSFETs – see www.onsemi.com/pub/Collateral/ AND8093-D.PDF A happy little Micromite Little did I know, when I purchased my first Micromite chip from the Silicon Chip online store in 2014, how far that journey might take me. Soon afterwards, I bought the next generation chip, with new BASIC functions; one of those empowered me to play happily with temperaturehumidity sensors. I hesitated before buying an LCD BackPack (February 2016), and was rewarded when I purchased it to find siliconchip.com.au Distributors of quality test and measurement equipment. Signal Hound – USB-based spectrum analysers and tracking generators to 12GHz. Virtins Technologies DSO – Up to 80MHz dual input plus digital trace and signal generator Nuand BladeRF – 60kHz– 3.8GHz SDR Tx and Rx Bitscope Logic Probes – 100MHz bandwidth mixed signal scope and waveform generator Manufacturers of the Flamingo 25kg fixed-wing UAV. Payload integration services available. Australian UAV Technologies Pty Ltd ABN: 65 165 321 862 T/A Silvertone Electronics 1/21 Nagle Street, Wagga Wagga NSW 2650 Ph 02 6931 8252 contact<at>silvertone.com.au www.silvertone.com.au Mailbag: continued Conventional current flow makes calculations easier I agree with Col Hodgson (Mailbag, April 2017) that the current convention should not be changed. I started work as a Technician in Training with the Postmaster General many years ago. Our lecturers used the negative to positive convention, presumably because conventional current flow was confusing for their students when electrons flow in the opposite direction. For example, when explaining how a valve works, they had to say that the electrons flow from the cathode to the anode. Some years later, I did an engineering degree and graduated with a degree in Electronic and Communication Engineering. The engineering lecturers and text books used conventional flow. The direction is largely irrelevant because, as Col Hodgson stated, the direction of flow depends upon the charge carrier. Positive charges flow from positive to negative and vice versa for negative charges. However, the deciding factor for me was when I realised that, when analysing a circuit, it is easier and less confusing to write down the maths using conventional flow. Len Cox, Forest Hill, Vic. 14  Silicon Chip that I had the latest firmware and the latest component set, as used in the Super Clock project. In order to test my finished project, I downloaded the clock software from your online store, and I so like the Super Clock that I am still using it! In the following months, I was delighted to see the newer Micromite versions and capabilities emerging, but I am not quite ready to “bite the bullet” of soldering SMD ICs. The three chip capacitors on the BackPack were enough for me at this stage (but I do accept the reliability argument). When I need those additional capabilities, I will probably buy assembled kits. But the Micromite and the BackPack are the gifts that just keep giving. I was absolutely thrilled when I received my April 2017 issue, to find an article describing the control of an AD9833 DDS to produce a Signal Generator, and another by Jim Rowe about the AD9833 DDS, including more information about controlling it using a Micromite BackPack. I recently purchased a couple of these amazing DDS boards and was already contemplating control with a Micromite BackPack! I don’t know how I missed Dan Amos’ article in Circuit Notebook in June 2016 but it deserves special mention as well. I should also say that I was also delighted to see the article in the previous month about the ATtiny85 (another candidate for controlling the AD9833), and I have found the series of articles by Jim Rowe on El Cheapo Modules to be very interesting and useful. Thank you Silicon Chip. I love your publication, and your online store. Lew Whitbourn, Hunters Hill, NSW. High-current terminal strips with integral wire clamps are superior In January 2017, Lyndon Dyer made some interesting comments in the Mailbag section about the use of terminal tunnels (or as some may know them, tunnel connectors). These are the typical connection strip where brass tunnels with grub screws are encased in plastic for insulation and are typically made in groups of 12 connectors. The BP535 connector strip, rated at 30A with 4mm tunnel, is one example; see www.clipsal.com/Trade/ Products/ProductDetail?catno=BP535 Lyndon is absolutely correct that when the grub screw is tightened, it typically breaks some of the copper strands, so degrading the integrity of the connection. A friend and I used many of these when we were manufacturing Fire Warning Systems (FWSs) and the reason for using the connectors was to allow the simplest possible connection into a Fire Indicator Panel. We adopted a variety of approaches to prevent damage to the cables. After a time, the standards were modified and any tunnel connectors in FWSs had to have an internal leaf or wire protector. This is where an inbuilt flat leaf is pushed down by the grub screw, trapping the wire, similar to the operation of many PCB-mounting terminal blocks. This permits many insertions and removals with no damage to strands. siliconchip.com.au The initial type arranged like this were from Clipsal/RingGrip and had a nickel-plated leaf, at a significant cost premium over the normal type. Subsequent versions had a copper leaf and it appeared to be inserted in the plastic moulding in a different way (to my mind, upside-down) and they frequently fell out, making a costly connector useless. I referred it to the manufacturer with a description of the earlier version and called to follow up but the person I spoke to on the phone had no grasp of what I was talking about, so it was a waste of time. In the end, we bought similar devices from Cabac which were excellent. This type of connector has useful applications in automotive electrics, particularly in vintage cars as restoration can involve a bit of discovery and re-work and this connector makes that very easy. I have also used them extensively in high-quality loudspeaker construction, for example, in passive crossovers as they make internal connection to drivers easy and simple crossovers can be made without a PCB. Ranald Grant, Brisbane, Qld. More discussion on valve neutralisation If you read the reference you provided on page 4 of the April 2017 issue (http://siliconchip.com.au/l/ aacn), you will see that it states that neutralisation is negative feedback at the frequency at which BC capacitance causes oscillation of the amplifier, thus stopping the oscillation. Ray Hooper, Albury, NSW. Editor's response: the reference also states that "There are some special cases in which CBC can cause regenerative (positive) feedback". The crux of the issue here is that whether a capacitance between base and collector provides (effectively) negative or positive feedback depends on the phase shift across the transistor and this depends on both the type of transistor and the applied frequency. So the same component can give either negative or positive feedback, depending on the situation. Perhaps therefore it isn't terribly useful to consider whether neutralisation is positive or negative feedsiliconchip.com.au back in general but only in a specific circumstance. Support for climate change scepticism and free discussion of ideas I disagree with the comments of Ian Paterson from Fullarton, SA published in the March 2017 issue. Firstly, I disagree with most of his assertions and secondly, I find his disrespect for the Publisher disturbing. On the latter point, does Mr Paterson have any understanding of the challenge of producing a magazine for an audience with interests from across the electronic spectrum? Personally, I congratulate the Publisher for producing a publication with content which is appropriate, interesting and stimulating. I am an electronics enthusiast, both as a hobby and a vocation, and find the breadth of the content very appropriate. Ian Paterson’s statement suggesting that the Publisher is belittling scientists and researchers is bizarre, to put it politely. Particular areas of science are wellresourced financially but regretfully there are often political agendas also running in the present era. Needing a salary as a scientist does not mean that lesser-resourced scientists are not contributing to knowledge. All results and arguments need to be listened to. I have come to believe that it is arrogant for anyone to believe that we can control the Earth’s temperature. The outputs from the climate modelling programs are far too simplistic and to base our economic future on these predictions is folly. Let us not overlook also that China is building two new coal-fired power stations each week. Significant climate events in recent history, such as the Medieval Warm Period and the Little Ice Age, raise serious questions which form by thinking outside the mind-set that has developed. I ask Ian Paterson to ponder the following to get some perspective: • Located at the centre of our solar system, the Sun contains more than 99.8% of the total mass within the solar system (Jupiter contains most of the remaining mass). • The Sun has a diameter of 1.392 million kilometres. • Inside the Sun, you could fit 1.3 million Earths. Helping to put you in Control Capacitive Oil Level Sensor 1000mm 4-20mA out. Level Sensor for non conductive liquids such as oil and diesel. The 1000mm probe can be cut to suit tank depth and easily calibrated. SKU: FSS-232 Price: $449.00 ea + GST 60W Ultra Slim DIN Rail Supply Meanwell HDR-60-12 measures only 53W x 90D x 55Hmm it supplies 12VDC 45A. SKU: PSM-0181 Price: $45.00 ea + GST H685 Series 4G Cellular Router H685 4G router is a 4G cellular serial server and Ethernet and Wi-Fi gateway. It can act as an RS-232 serial cable replacement over the mobile phone network or as a serial server on the internet. It also shares the cellular internet connection out over an RJ45 port and Wi-Fi. SKU: OCO-002 Price: $495.00 ea + GST Waterproof Digital Temperature Sensor DS18B20 digital thermometer comes with waterproof 6 × 30 mm probe with 3 metre cable. -55 to 125 °C range with ±0.5 °C accuracy from -10 to 85 °C. SKU: GJS-003 Price: $16.00 ea + GST Pressure Transducer 0 to 25 Bar Firstrate FST800-211 pressure sensor features IP67, 3 wire connection, 0-5VDC output ¼” BSP process connection. ±0.3% F.S. accuracy. 0 to 25 Bar. SKU: FSS-1530 Price: $159.00 ea + GST Heating/Cooling Self Adaptive PID Controller 1/16 DIN Panel mount Heating and Cooling self adaptive PID controller. Features universal input 2 Relays, 2 Digital Input/Output and 24 VAC/DC powered. SKU: PID-048 Price: $299.00 ea + GST Eight 12VDC Relay Card Eight-way relay card on DIN rail mount allows driver direct connection to many logic families, industrial sensors (NPN or PNP) dry contacts or voltage outputs. Relay output load 10A(240AC) SKU: RLD-128 Price: $109.95 ea + GST For Wholesale prices Contact Ocean Controls Ph: (03) 9782 5882 oceancontrols.com.au Prices are subjected to change without notice. May 2017  15 Mailbag: continued • Every second, about 700 million tonnes of hydrogen is converted through nuclear fusion into 695 million tons of helium. The remainder is energy which makes its way to the Sun’s surface. • The Sun’s core temperature is 16,000,000°C, while the pressure is approximately 100 billion times the atmospheric pressure on Earth. Under these conditions, hydrogen atoms come so close together that they fuse. • The Sun sheds 100 million tonnes of matter per second. • The solar wind is a stream of charged particles (plasma) that are ejected from the upper atmosphere of the Sun. It consists mostly of electrons and protons. • These particles are able to escape the Sun’s gravity, in part because of the high temperature of the corona, but also because of the high kinetic energy that particles gain through a process that is not well understood at this time. It was 50/50 that current flow would match electron flow I’ve been following the discussion on the conventional definition of current flow with some amusement. It is a classical case of Murphy’s Law that if there are two ways to connect a plug and socket without a clear specification, they will typically be connected incorrectly. So in the absence of an understanding of the underlying basis of charge carriers, there was an even chance that the definition would be opposite to the reality. You can put it all down to Benjamin Franklin (see Wikipedia – https://en.wikipedia.org/wiki/ Electric_charge), who posited a one-fluid theory of electricity (well before understanding the atomic structure) in which if matter contained two little of this fluid it was negatively charged and too much, positively charged. But he got it the wrong way round, if you consider electrons to be the fluid! 16  Silicon Chip The atmospheric layers separating us from the Sun are amazing and briefly described below: • The Troposphere extends from ground level to between 8 and 16km, depending on the amount of solar radiation reaching the Earth. • The next layer, the Stratosphere, extends to about 50km where the temperature slowly increases to 4°C. • The Ozone layer is located in the stratosphere at about 24km above the Earth. It absorbs most of the Sun’s harmful ultraviolet rays. • Above the Stratosphere lies the Mesosphere, with the temperature falling as low as -90°C. At about 80km above the Earth, the temperature stops decreasing at the Mesosphere. • In the next layer, the Thermosphere (or Ionosphere), temperature rises dramatically reaching 1480°C under some circumstances. The irony is that this definition has permeated all facets of the physical sciences, so that if you want to change the definition of current, you would have to convince the whole scientific community to change with you. So accept the paradox and get on with enjoying your electronics. Or maybe swap to an alternate universe where Benjamin got it right! Interestingly, early telephone engineers selected positive as their ground reference and all telephone exchange equipment has since been built to operate with a -48V DC supply rail, but this was primarily to reduce corrosion of the old cable sheaths (lead) when exposed to the ground. It is not so relevant today with plastic sheaths and optical fibre but I don’t think you will find them changing as there is too much invested in the current infrastructure. Chris Lewis, Menora, WA. • The last layer is the Exosphere, which has a variety of gases, including helium, nitrogen, oxygen and argon. These gases are present in small quantities because the lack of gravity at these heights allows molecules to escape into space. Temperatures in the Exosphere range from 300°C to 1,650°C. Bear in mind that there is absorption and reflection through these layers, as well as some degree of chaos added in and all the other influences, both unknown and known. To my mind, after much reflection on the climate models, their results are interesting at best, but of little significant value in determining our future. It is amazing how stable our climate is, considering the variables beyond our control. On a personal note, I spent many years using sophisticated models of the ionosphere developed by the generous American taxpayer to predict signal levels between two points on the surface of the Earth and comparing the predictions with real measurements. I found the correlation to be poor. These programs produce nice graphs and figures that give a person a warm inner feeling until the realisation dawns that they merely give an indication of what happens in the real world. Climate models are no better; they serve only as a tool to understand some aspects of climate. Never forget that the Sun’s heat is the source of all weather. It causes air masses to form and circulate in our atmosphere. This movement creates differences in air pressure which in turn creates wind but the whole process is highly complex, and far from adequately understood. To my mind, Mr Paterson is far too accepting of a status quo that has developed, which is a serious mindset among some "scientists". A true scientist would welcome the contents of Silicon Chip to stimulate thought. In my opinion, honest, competent climate scientists would demur from stating that they can accurately predict future temperature. Ian Williams, SC Kyneton, Vic. siliconchip.com.au TECHNORAMA Your local Community Radio Station wants B roadcasting is a technology business. It needs people who can build things, fix things and solve problems. That would be someone like you, because if you’re reading SILICON CHIP you’re probably that person already. But did you know there’s a whole country full of radio stations, known as Community Radio Stations who would welcome your help – and give you an outlet for your passion for electronics? Hey, you could even have fun. Australia has arguably the strongest Community Broadcasting service in the world. There are over 440 Community Radio Stations spread across the country, some very big and supporting major cities, down to the smallest which serve remote communities of just a few thousand people. All of them rely on volunteers to present, manage and provide technical backup. It’s a lot of fun talking into a microphone, but if you want listeners it’s really important to have a studio, some wiring, a bit of a network, a server or two and some streaming or a transmitter. That’s where technologists come in. Well, they would if we could find by John Maizels President, Technorama Inc. Community radio station 3CR in Melbourne has over 400 volunteer programmers and last year celebrated their 40th anniversary on air. them. Like all volunteer processes, connections need to be made, and technologists need to come from somewhere. Some of us have the hobby urge, some from industry, quite a few from ham radio, many from SILICON CHIP reading and kit building… and quite a lot of folk from “well, I don’t know much but I’ll have a go”, which is how we are in Australia. Trust me – having a go in commu- Technorama 16 brought together volunteers from all over Australia to network, to learn from other Community Radio Stations and from industry leaders. siliconchip.com.au YOU! nity radio was how I found out about transmitters and got my ham licence. Made a lot of mates along the way too. Being part of a volunteer team is a great way to gain and hone skills. Many of us have moved from hobby into career, and employers know the value of technical skills picked up from the hobby. In 2008 a passionate group of techs formed “Technorama”, as a grass-roots experiment in bringing together – and growing – the technology skill base for community broadcasting. We exist to help stations, to encourage more people to engage in Broadcast technology, to facilitate training opportunities, get people talking, create the tech community, and do whatever it takes to make that happen easily. Technorama runs an annual get-together, and this year it’s in June. You can find all about this year’s Technorama – TR17 – at: www.technorama.org.au Intrigued? Find your local community station and offer your help. Tell them you have an interest in technology – if they don’t treat you like longlost family, let me know! Contact info<at> technorama.org.au There’s a gaggle of stations just waiting for your call. SC May 2017  17 by Dr David Maddison INDUSTRIAL ROBOTS Industrial robots are used to increase manufacturing efficiency, speed and precision and to remove people from repetitive and dangerous tasks. They can even perform jobs that a human would find impossible to do. T he word “robot” was coined by the Czech play- Babbage’s Difference Engine but these do not fit the above wright Karel Capek (1880-1938) who introduced it criteria. By this definition, many commonly consider that the in his hit play of 1920, R.U.R. or Rossum’s Universal Robots. It is derived from an old Slavonic word meaning first industrial robot that was actually built (which was “servitude,” “forced labour” or “drudgery.” You can listen also regarded as the first “pick and place” robot) was by an to a recording of this play at siliconchip.com.au/l/aaap Australian/Canadian “Bill” Griffith P. Taylor using a MecA student production of the play can also be seen at cano set in 1935-1937, the basic description was published “Rossum’s Universal Robots – Karel Capek - English Sub- in The Meccano Magazine of March 1938 (see opposite). The robot would pick up wooden blocks and then set them titles” siliconchip.com.au/l/aaaq An industrial robot is defined by the International Organi- down in a programmed sequence in certain patterns such as zation for Standardization in ISO 8373 as an “automatically a wall, dam or breakwater. The program was stored in the controlled, reprogrammable, multi-purpose manipulator, form of a punched paper tape and when electrical contact programmable in three or more axes, which can be either was made through a hole it operated a control to move in a fixed in place or mobile for use in industrial automation certain direction. The robot could also be controlled manually via control levers which were effectively what are operapplications”. (See siliconchip.com.au/l/aaax). There are other definitions for various robots but they ated when the machine is under automatic control. There were no electronall emphasise the characteric components apart from istics of multi-functionality SHORT LINKS five solenoids. It used 4000 and reprogrammability. In this feature, we have converted all the URLs to washers, 300 collars, 200 There have been other pro- “SILICON CHIP Short Links” to save you the hassle of gears and 100 pulleys from grammable machines such typing out website or YouTube names up to three lines long! as the Jacquard loom first Clicking on these short links when viewing SILICON CHIP online Meccano, along with a very small number of non-Mecdemonstrated in 1801, mu- (or entering the short link into your browser) will take you cano parts. sic boxes, the pianola and directly to the appropriate website. 18  Silicon Chip siliconchip.com.au A description of “Robot Gargantua”, accepted by some as the first industrial robot, designed by a Canadian/Australian. This page is reproduced from the March 1938 “Meccano Magazine”. siliconchip.com.au May 2017  19 Robot Gargantua’s control unit. Note the counters which indicate the number of driveshaft revolutions and which are used when programming the robot. Note also the punched paper tape holding the program. Photo by Peter Haigh. Robot Gargantua, as reproduced by Chris Shute of Wem, Shropshire, England. The control unit is at the left. Photo by Peter Haigh. Program sequences could be up to three hours long. The programmer had a number of counters which indicated the number of drive shaft revolutions – this number defined the position of the crane when writing the programs. Griffith P. Taylor submitted detailed documents to Meccano about this robot in 1938. They were also published much later (in 1995) in a 70-page book called “The Robot Gargantua (A Constructor Quarterly Special Publication)”. It was available (used) from Amazon at the time of writing or as a much cheaper digital download at siliconchip. com.au/l/aaas A detailed account of the robot was published by Chris Shute and can be accessed at siliconchip.com.au/l/aaay An early spray-painting robot was patented by Willard Pollard Jr. The patent was filed in 1934 and granted in 1942. Programming was done on a perforated film, the hole density of which was proportional to the speed of the controlling motors. The patent for this can be seen at siliconchip. com.au/l/aaaz This machine was licensed to the DeVilbiss company in 1937, before the patent was granted and in 1941 they completed the first prototype machine under the leadership of Harold Roselund. He also patented a robot in 1944 using the control mechanism of the Pollard machine but not the mechanicals. See “Means for moving spray guns or other devices through predetermined paths” at siliconchip. com.au/l/aab0 However, there seems to be no evidence that these machines were ever commercialised. Another early robot, described in a patent, is for a programmable arm for spray painting. This was invented by Willard L.V. Pollard (the father of the above inventor) and 20  Silicon Chip Illustration from US Patent 2286571 (1942) for Willard L.V. Pollard’s “Position-Controlling Apparatus” for spray painting applications. It seems odd seeing an old style car body being spray painted by a modern-looking industrial robot. However this machine was never built. siliconchip.com.au Build your own robot arm An open source robot arm for Arduino or Raspberry Pi called MeArm is available at siliconchip.com.au/l/aab2 Another open source robotic arm called uArm for Arduino is available at siliconchip.com.au/l/aab3 There are huge numbers of other commercial robot arm kits available, including from Australian suppliers such as Jaycar at siliconchip.com.au/l/aab4 or look on Google and Ebay. Illustration from Cyril Walter Kenward’s patent showing an implementation of the device with two robot arms mounted on a carriage. It was a remarkably advanced idea for the time. ence and synchronisation signals. The device was hydraulically operated and also had grippers which could be replaced with other fittings to suit the job at hand, just like modern robots. The patent even talked about using the robot to reproduce itself “The apparatus may be set up to assemble parts used in its construction and substantially or partially reproduce itself in this manner provided it is supplied with its component parts and tools required for the assembly operations.” Details of Kenward’s patent can be seen at siliconchip. com.au/l/aaav The first commercial industrial robot the patent was filed in 1939 and granted in 1942. The desired motion was recorded on a grooved cylinder and read by phonograph pickups. This robot was never built. The patent can be viewed at siliconchip.com.au/l/aaax British inventor Cyril Walter Kenward filed a patent in 1955 (awarded in 1957) entitled “Improvements in or relating to positioning, assembling or manipulating apparatus”. This device seemed very advanced for its time but there were no backers for it and it was not commercialised. Kenward’s robot could be taught by moving it through the desired motions which were recorded. One of the proposed recording methods was magnetic tape and the patent mentions the signal modulation techniques that could be used to record multiple channels of data, along with refer- The first commercially produced general-purpose industrial robot is credited to George Devol. He applied for a robotics patent in 1954 (awarded in 1961). Entitled “Programmed Article Transfer”, it can be seen at siliconchip. com.au/l/aaaw In the patent, Devol wrote that “The present invention makes available for the first time a more or less general purpose machine that has universal application to a vast diversity of applications where cyclic control is to be desired; and in this aspect, the invention accomplishes many important results. It eliminates the high cost of specially designed cam controlled machines; it makes an automatically operating machine available where previously it may not have been Described as the world’s first commercially produced general-purpose industrial robot, the Unimate serial #001 by Unimation Inc., photographed in 1961 as it was being prepared for shipment from the manufacturer to the GM die-casting plant in Trenton, New Jersey. It shows Unimation president Joe Engelberger (in bowtie) and engineers George Munson and Maurice Dunn. However, in the author’s opinion, this might be a prototype from 1959 as other versions of this robot look slightly different. The robot on the right appears to be the one that was actually installed in the GM die-casting plant. It is now at the Ford Museum, Greenfield Village, Michigan (see siliconchip.com.au/l/aab1). It is assumed that the picture from the museum is authoritative. siliconchip.com.au May 2017  21 Robot safety Industrial robots are powerful, fast-moving and possibly unpredictable machines. Like any industrial or other machine, special precautions need to be made to protect the safety and lives of people working close by. An August 2014 article in Wired magazine cited a New York Times article that said that over the last 30 years, 33 people had died in industrial accidents in the US associated with robots. While any death is tragic, these accidents are not really any different to a wide variety of other industrial accidents and result from similar mistakes and oversights. The first person to be killed in an accident with a robot was Robert Williams of the USA, in 1979. Some typical precautions to prevent accidents with industrial robots involve safety fences, with switches on gates and light beams to shut the machine down if there is an intrusion into the robot’s space as well as limit switches and software to prevent the robot moving into forbidden areas. As with all safety systems, there should be multiple levels of redundancy. The robot should also have safety systems to prevent its own destruction even economical to make such a machine with cam-controlled, specially designed parts; it makes possible the volume manufacture of universal automatic machines that are readily adaptable to a wide range of diversified applications; it makes possible the quick change-over of a machine adapted to any particular assignment so that it will perform new assignments, as required from time to time. It can be seen that cyclically operated machines heretofore controlled manually can now be made automatic; and universal transfer machines can be supplied and adapted readily for special applications of the purchaser, and the purchaser, in turn, can stock such machines which he can adapt quickly and easily to new requirements from time to time.”. The Unimate (UNIversal autoMATION) robot was developed out of Devol’s patent. It followed instructions stored on a magnetic drum, to move and stack pieces of hot die-cast metal. Die-cast work was the first “killer app” for industri- if there are software errors in its programming. Such systems would include those that prevent it picking up an excessively heavy load or trying to move into a position that it is not physically possible. Some safety videos on robot safety can be seen at: “ABB Robotics - Safe human robot interaction – SafeMove” via siliconchip.com.au/l/aab5 “Robot Safety: Robot Reality 1990 National Institute for Occupational Safety and Health” siliconchip.com. au/l/aab6 (from 1990 but entertaining). al robots as it involved the movement of hot, often heavy pieces of metal in a potentially dangerous environment. The first Unimate worked in a polar coordinate system and had five axes of control. A number of technologies had to be developed for this robot, including digital control, non-volatile memory, optical encoders to determine shaft position, digital servo control, hydraulic servo control and electrical and hydraulic power supplies. Both Unimate and another company, AMF, were later found to have infringed Cyril Walter Kenward’s patent (which was never commercialised) and the matter was settled with a cash payment. Industrial robot applications Typical applications for industrial robots are assembly, coating, deburring, die casting, laboratory automation, moulding, material handling, picking, palletising, packaging, painting, picking and placing parts, selecting and sort- (Above): basic elements of a serial robot and a parallel robot A serial robot is the most common type of industrial robot and it has just one kinematic chain that connects the base to the end effector. A robot arm, the classic type of industrial robot is an example of a serial robot. The movement of any actuated joint controls the whole remaining arm beyond that joint in the direction toward the end effector. (Right): a representation of a typical serial robot in the form of a manipulator arm or articulated robot showing six axes. Axes A1 through A3 allow motion in space similar in human terms to a shoulder, bicep and forearm and axes A4 through A6 allow for motion, known as pitch, roll and yaw equivalent to that of the wrist. 22  Silicon Chip siliconchip.com.au Mechanical elements of a parallel robot supporting a platform. U-joint stands for universal joint and P-joint stands for prismatic joint, a type of sliding linkage. This example has three kinematic chains but a flight simulator contains six. ing, transportation, warehousing and welding. Among the ultimate objectives are to lower costs, to increase flexibility in manufacturing processes and the variety of end products, improve quality of manufactured products and to enable work to be done that is hazardous, difficult or impossible for a human to do. Configurations of industrial robots A majority of industrial robots are considered “manipulators” which are roughly equivalent mechanically to a combination of the human arm and hand, along with a sensory and control system. All robots generally have three main sub-systems: a motion system which is the physical structure to enable the robot to move; a recognition or sensory system to keep track of the robot’s motion and position in space and to also sense and track objects it may be required to manipulate and a control system in the form of a programmable computer (or other type of controller on earlier robots). A number of parameters are used to describe, control and The four basic types of serial robot arm configurations, their range of movement and representations of the work spaces they can access. There are some variations of these basic layouts. Even though the cartesian robot is a serial type, it is also called a linear robot by some. siliconchip.com.au One type of end effector of an industrial robot. In this case it is a gripping device to pick up coloured blocks. Note the camera for the vision system of the robot. program a robot. These include the number of axes (usually the same as the degrees of freedom), the kinematics or physical arrangement of the robot structure that gives it motion, the working envelope of the robot, ie, what physical space it can reach, how much weight the robot can carry or lift, how fast the robot can move and accelerate and how accurately the robot can be located in space and how reproducible its positioning is. Other parameters are the type of motion control (which might be simple such as picking up an object in one place and placing it down in another or it might require continual control of motion such as in welding or spray painting operations), its power source (electric or hydraulic) and its drive mechanism (gears or direct drive). At the highest level of robot architecture, robots are also classified as either serial or parallel in nature. Regardless of which group the robot is a member of, it has three main mechanical parts. It has a stable, usually fixed base, a “kinematic chain or pair” which is made of a series of rigid bodies called “links” connected by a number of actuated “joints” and an “end effector”, which is the part of the robot that interacts with the environment and may be a gripping mechanism to pick up parts or a welding head, for example. A serial robot is the most common type of industrial robot and it has just one kinematic chain that connects the base to the end effector. A robot arm ( the classic type of industrial robot) is an example of a serial robot. The movement The ONExia ONEreach cartesian robot. May 2017  23 The four basic configurations are cartesian, cylindrical, spherical (also known as polar) and articulated (also known as revolute). The robot end effector The end effector is the tool at the end of a robot arm that enables it to interact with the work piece it is intended to manipulate. It could be something to lift up a work piece such as a gripping device or suction device or it could be a tool to do work on a piece such as a welding head or a device to apply sealant or paint. The Hudson Robotics PlateCrane EX cylindrical robot for laboratory use. It moves test plates from the black structure on the right and places them in the analyser on the left. of any actuated joint controls the whole remaining arm beyond that joint in the direction toward the end effector. A parallel robot, or parallel manipulator, has more than two kinematic chains connecting the base to the end effector. This robot can have either an end effector at its working end or be terminated as a platform. The spray painting robot described above in US Patent 2213108 is an early example of a parallel robot. A modern example of a parallel robot architecture is the hexapod positioning system as used on a flight simulator which is supported by six kinematic chains or actuators. One estimate is that there are one million industrial robots in use in the world, most of them being of a serial nature, with about 50,000 parallel robots in use. There are four basic configurations or geometries of a serial industrial robot plus additional variations of these. Robot vision Robot vision is an increasingly important part of a robot’s senses. Vision enables a robot to detect randomly oriented and located parts and pick them up, rather than the alternative method of parts being kept in precise locations with fixtures, guides and jigs. Examples of robot vision can be seen at “ABB Robotics - Integrated Vision” siliconchip. com.au/l/aab7; “Robotic Vision” via siliconchip.com.au/l/ aab8; “Vision Guided Robot – Universal Robots UR5” at youtu.be/w7-KGaYGuMA;“Vision Guided Robot System” siliconchip.com.au/l/aaba (silent) and “Small company, big vision – robotics help to keep Dutch bakery profitable and flexible” at siliconchip.com.au/l/aabb Although not discussed in the last video, it shows how robot vision is used to pick up randomly located cookies from a conveyor belt. Some current examples of industrial robots A cartesian robot moves its axes in a linear manner at right angles to each other rather than by rotation. These An advanced dual arm articulated robot. This is ABB’s YuMi. It is a “collaborative” robot, designed to work alongside humans in assembly processes. It does not need a cage or other barriers as it is inherently safe with a soft body covering and numerous sensors to detect the presence of humans. For a video of this robot, see “Introducing YuMi, the world’s first truly collaborative robot - ABB Robotics” at siliconchip.com.au/l/aabe 24  Silicon Chip siliconchip.com.au A Mitsubishi SCARA robot. Mechanical representation of SCARA robot. It has two axes of rotation plus a range of vertical motion in the Z direction. Inset at top is the kidney-shaped work envelope of SCARA robot. (Diagrams: Project Lead the Way.) types of robot are often used as milling machines and 3D printers (although some would argue whether those are true robots or not). Another application for a cartesian robot is picking items such as boxes off a conveyor belt and stacking them. A video of the ONExia ONEreach cartesian robot can be seen at “No Programming Required – ONEreach Cartesian Robot” siliconchip.com.au/l/aabc An example of cylindrical robot is the Hudson Robotics PlateCrane Ex which according to the manufacturer is optimised for loading and unloading automated lab instruments, such as readers, microplate washers and reagent dispensers. A video of the robot in action can be seen at “PlateCrane with HyperCyt.wmv” siliconchip.com.au/l/aabd Spherical or polar robots are similar to cylindrical robots but use polar coordinates rather than cylindrical coordinates to describe their range of motion. They have two rotary joints and one linear actuator. They are not in common use now and an important example was the Unimate OC Robotics snake arm robot. siliconchip.com.au robot which was the first commercial industrial robot and which was mentioned above and the Stanford arm from 1969. This early type of geometric configuration was good for being able to be programmed with the control hardware available at the time. Articulated or revolute robots are among the most common and familiar type of industrial robot. They mimic the form of the human arm. They have at least three rotary joints plus typically three additional rotary joints for a “wrist”, “hand” and “forearm” where fitted. Pitch moves the wrist up and down, yaw moves the hand left and right and roll rotates the forearm. See earlier diagram of a typical serial robot. SCARA SCARA stands for “Selective Compliance Articulated Robot Arm’” and a SCARA robot has two axes of rotation plus linear motion (usually vertical) in one direction. When fitted with a wrist joint, it can also have additional ranges of motion. Typical applications are “picking and placing” of parts, many types of assembly operations, application of sealant and handling of machine tools. Their basic range of motion through their two rotational axes is equivalent to the motion of one’s shoulder and elbow with the arm held parallel to the ground. They are good for high speed assembly operations, repeatability of positioning, good payload capability and large workspace. The black snake-like object is OC Robotics snake arm robot used for inspection of a nuclear power plant. May 2017  25 Fanuc “flying robots” in action. They are considered to be seven-axes robots. They were developed in Japan and they were announced in 1981 by Sankyo Seiki, Pentel and NEC. For videos of SCARA robots in action see “MITSUBISHI ELECTRI SCARA ROBOT RH-6SH RH-6SDH” at siliconchip.com.au/l/aabf and “Adept Cobra SCARA” at siliconchip.com.au/l/aabg Snake robots A snake arm robot is a new type of robot that is in the form of a continuously curving manipulator arm and is equivalent to a snake or elephant’s trunk in terms of its mechanical behaviour. These robots are primarily used for access to confined spaces such as in industrial inspection applications or surgery. They are driven by a system of “tendons” or multiple actuators. For videos of some snake arm robots in action see “OC Robotics – Snake arm 101” at siliconchip.com.au/l/aabh and “OC Robotics – Introducing the Series 2 - X125 system” at siliconchip.com.au/l/aabi An example of a parallel architecture robot in current use is the Adept Quattro s650h parallel robot. Claimed to be the world’s fastest industrial robot, it is designed for packaging, manufacturing, assembly and material handling. It is said to be the only parallel robot or “delta robot” with a four arm design. Some videos of this robot in action can be seen at “Adept Quattro Robot” siliconchip.com.au/l/aabj and “Omron Adept Quattro Confection Application” at siliconchip. com.au/l/aabk and also at siliconchip.com.au/l/aabl Flying robots The Fanuc “flying robot” is a conventional robotic arm or arms mounted on a rail system to enable them to move up and down an assembly line. They can, for example, pick up a part from one machining centre and take it to the next machining centre. A flying robot can be seen in operation in a camshaft manufacturing operation at “FANUC R-2000iB “Flying Robots” in Camshaft Machining Center – Courtesy of TranTek Automation” siliconchip.com.au/l/aabm and siliconchip. com.au/l/aabn Mobile industrial robots The MiR100 robot doing its rounds in a healthcare setting to deliver medical products to nurses and patients. Inset: the MiR100 can be controlled from a tablet computer. 26  Silicon Chip Mobile industrial robots have applications in healthcare where they can be used to deliver drugs or other supplies from a central storage; in aircraft maintenance for painting siliconchip.com.au Robot languages The first industrial robot described in the patent by George Devol in 1954 did not have a programming language as such, but was programmed by moving it to desired positions in the desired sequence and having the controller record those positions in memory. In operation, the controller could replay the desired sequence of positions from memory, faithfully replicating the original movements. Most industrial robots today can also be programmed in this manner if desired. This is a particularly useful method for, say, recording and replicating a spray painting pattern, from a master painter. There are two main generations of robot programming languages. The first genera- Programming with ABB RobotStudio, a high level graphical programming tion was characterised by “programming by and simulation software for ABB robots. Also see video “ABB robot teaching”, the second generation by “robot- studio for beginners” at siliconchip.com.au/l/aabs oriented programming”. In the 1970s, industrial robots were programmed with first generation industrial roEnglish, as follows: bot languages, some of which were derivatives of traditional languages first developed in the 1950s such as ALGOL or FORTRAN Move to P1 (a general safe position) that interfaced with the robot at a low level. Move to P2 (an approach to P3) There were also proprietary languages such as SIGLA (SIGma Move to P3 (a position to pick the object) LAnguage by Olivetti, 1974), ROL (RObot Language, 1976), Funky Close gripper (by IBM, 1977) and SERF (Sankyo Easy Robot Formula, 1978) as Move to P4 (an approach to P5) well as a language developed at Stanford University called VAL Move to P5 (a position to place the object) (VicArm Language from 1973, later to be adopted by Unimation Open gripper in 1977). Move to P1 and finish These first generation languages were mainly oriented toward “programming by teaching”. As with the first UNIMATE, the proThe English description is translated to an early generation grammer guides the robot arm by hand or with a control box to language VAL: the desired position and the computer records these movements. PROGRAM PICKPLACE The computer then generates the appropriate code which can 1. MOVE P1 later be modified as necessary. These languages were suitable 2. MOVE P2 for robot applications involving spray painting, spot welding and 3. MOVE P3 stacking of items. 4. CLOSEI 0.00 In the 1980s a second generation of industrial robot languag5. MOVE P4 es was developed. These were high level languages with a struc6. MOVE P5 tured programming environment. Typical instructions of high 7. OPENI 0.00 level languages are present such as logical branching and loops. 8. MOVE P1 This second generation of languages included much more so.END phisticated control of the robot, opportunities for sensor inputs, the ability of robots to communicate with one another and some Here the program is translated into a later generation language artificial intelligence. Stäubli VAL3. Note the instructions for speed and absence of The languages also included mathematical models of the ropoints P2 and P4. These intermediate locations are unnecessary bot to ensure it can be moved in the most efficient and smooth since the trajectory from the start to the end point is computed manner possible. The second generation languages can program by the software: sophisticated applications such as where sensor input is required and coordination and cooperation with other robots. begin There is not yet any real third generation of languages but rather movej(p1,tGripper,mNomSpeed) new ideas in programming, such as task oriented-programming to movej(appro(p3,trAppro),tGripper,mNomSpeed) give instructions similar to what would be given in object-oriented movel(p3,tGripper,mNomSpeed) programming like “move that box over here” without the details of close(tGripper) how this is to be done. To do these sort of tasks the robot would movej(appro(p5,trAppro),tGripper,mNomSpeed) have to understand its environment. movel(p5,tGripper,mNomSpeed) Most robot manufacturers have their own proprietary languages open(tGripper) but they are roughly similar to one another. movej(p1,tGripper,mNomSpeed) A simple program (from Wikipedia) might be described in end siliconchip.com.au May 2017  27 and repairs; and in industrial production where they can be used for materials transport around warehouses and from production lines, which may themselves be automated. MIR (siliconchip.com.au/l/aabo) makes a popular mobile industrial robot called the MiR100. It navigates by being able to identify its driving area with a variety of laser, ultrasonic and 3D visual sensors or by using a 3D model of the building in which it operates. It weighs 62.5kg, can operate for about 10 hours or move a distance of 20km on a charge, carry 100kg or tow 300kg and it has WiFi, Bluetooth, USB and ethernet communications. The robot can be operated by any smartphone, tablet or PC. Here are some videos of MiR100 in action: firstly, at a power supply company “Magna-Power” siliconchip.com. au/l/aabp and secondly in a healthcare application where it is used to deliver pharmaceuticals to patients “MIR Sønderborg Case (English)” siliconchip.com.au/l/aabq Air-Cobot (Aircraft Inspection enhanced by smaRt & Collaborative rOBOT) is a robot under development by French companies. It is intended for visual inspection of aircraft on the runway before take-off or in a hanger. Its computers (one running Linux and the other Windows) contain a virtual model of a given aircraft model and navigate to preset points to inspect them. The robot employs autonomous navigation based on GPS and sensors such as laser range-finders to create situational awareness, as well as a virtual model of the environment (eg, airport parking area or hangar). The robot uses image analysis to detect defects in items such as turbine blades or tyres. A video of this robot can be seen at: “Air-Cobot” See siliconchip.com.au/l/aabr Now becoming much more widely used, surgical robots are associated with minimally invasive surgery through a small incision, high accuracy, a moderation of any unwanted movements of a surgeon’s hand and the possibility of remote control of surgical procedures. Air-Cobot about to perform an inspection on an Airbus A320. Inset at top is a possible inspection pattern around the aircraft. Note that special precautions need to be made against hackers and issues of internet latency. The first surgical robot was introduced in 1985. SC Want to build a bridge? Let your robots do it for you, as this footbridge in Amsterdam shows during construction in this artist’s conception” (See siliconchip.com.au/l/aabv). 28  Silicon Chip siliconchip.com.au SAD HAPPY To discover that the elusive bit that you want is stocked in the Silicon Chip ONLINE SHOP! There's a great range of semis, other active and passive components, BIG LEDs, PCBs, SMDs, cases, panels, programmed micros AND MUCH MORE that you may find hard to get elsewhere! Because you can't find that difficult-to-get special project part at your normal parts supplier. . . Or perhaps they've discontinued the kit you really want to build. . . If it's been published in a recent Silicon Chip project and your normal supplier doesn't stock it, chances are the SILICON CHIP ONLINE SHOP does! HERE ARE JUST SOME EXAMPLES (oodles more on our website!) Stationmaster hard to get parts Micromite LCD BackPack V2 complete kit Includes PCB (green), 2.8-inch TFT touchscreen, programmed micro, SMD Mosfets for PWM backlight control laser-cut case lid and all other onboard parts (May 2017) …… $70.00 ea Pack of 10 Ultra-bright SMD LEDs Red/amber/yellow/green/blue; diffused lens 3216/1206 size ……………….…… 75c/10 2012/0805 size ………………….… 60c/10 SC200 Amplifier hard-to-get parts Includes all power transistors, diodes D2-4, 150pF 250V C0G capacitor, 4 x 0.1W and a 6.8W 3W SMD resistors (no PCB) (Jan 17) ………….... $35.00 Micromite Plus LCD BackPack kit Includes PCB, 2.8-inch TFT touchscreen, programmed micro, 20MHz crystal, laser-cut case lid and other onboard parts (Nov 2016) ………… $70.00 ea Micromite Plus Explore 100 kit Includes PCB, programmed 100-pin SMD micro, and all other non-optional onboard parts except the LCD panel (Sept-Oct 2016) ……………… $69.90 ea Micromite Plus Explore 64 kit Includes PCB, programmed 64-pin SMD micro, crystal, connectors and all other onboard parts (Aug 2016) ……… $30.00 ea GPS MODULE Onboard antenna, 1pps output, operation to 10Hz, cable included VK2828U7G5LF GPS/GLONASS ……………..... $25.00 DS18B20 waterproof digital temperature sensor Steel-encapsulated digital temperature sensor fitted with 1m lead ………………… $5.00 Includes DRV8871IC, SMD 1µ F capacitor and 16mm linear potentiometer with centre dent (no PCB) (Mar 2017) ……………………… $12.50 AD9833 DDS module A Direct Digital Synthesis module using the AD9833 IC and a 25MHz crystal oscillator. with programmable attenuator (green) ….… $25.00 without attenuator (blue) …………………... $15.00 Isolated High-Voltage Probe Pack of hard-to-get parts including HCNR201-050E linear optocoupler, op amps and HV capacitors & resistors (Jan 2015) ……………………… $35.00 Multi-spark Cap. Discharge Ignition Pack of hard-to-get parts for the CDI including transformer core, bobbin and clips, SMD ICs, Mosfets & HV capacitor (Dec 2014) ………… $50.00 Mini 12V USB regulator All SMD parts (July 2015) With low battery cutout ………… $15.00 Without low battery cutout …… $10.00 SiDRADIO parts 125MHz crystal oscillator, mixer, dual gate Mosfet, 5V relay and more ……… $20.00 RF Coil Former pack (Oct 2013) …… $5.00 Currawong stereo valve amplifier Hard-to-get parts including 5 x 39µF 400V capacitors, HV transistors, regulator and blue LEDs (Nov 2014) ………… $50.00 40V/5A Hybrid Switchmode Supply All SMD parts including switchmode controller IC, inductor, Mosfets, Schottky diodes plus bobbin inductors (Apr 2014) …… $50.00 Ultra Low Voltage Bright LED Flasher kit Includes PCB, LDR, high-brightness blue LED, all SMD parts, an extra capacitor plus extra resistors to change flash frequency and duty cycle (Feb 2017) …….… $35.00 High Power DC Motor Speed Controller parts Includes 2 x IPP023N105A Mosfets, an IPD30E65D1 diode and an IRS21850S Mosfet driver (PCB and micro not included) (Jan 2017) …….… $35.00 CP2102-based USB/TTL serial converter Includes a micro-USB socket and 6-pin right-angle header (top) …………. $5.00 Includes a USB Type-A socket and 5-pin header with a 5-way female Dupont cable (bottom) …………………. $5.00 Low-Cost, Accurate Voltage/ Resistance/Current Reference All SMD Parts (2.5V or 1.8V version), including reference IC (Aug 2015) … 12.50 DS3231-based RTCC module Real-time clock & calendar module w/ 4KB EEPROM, I2C interface & mounting hardware with LIR2032 cell ………...… $7.50 with CR2032 cell …………... $6.00 no cell ……………………….. $5.00 Logic-level Mosfets Pair of CSD18534KCS N-channel …… $5.00 Or complementary pair of N & P-channel Mosfets (as used in Burp Charger) … $7.50 Don't forget: Silicon Chip Subscribers qualify for a 10% discount on all these items! YES! We also stock most Silicon Chip project PCBs from 2010 and even earlier! Log on now: www.siliconchip.com.au/shop Measure frequencies up to 6GHz and higher with this High Performance RF PRESCALER by NICHOLAS VINEN Would you like to measure frequencies up to 6GHz or more . . . but your frequency counter is not in the race? Well, if you already have frequency counter which will measure up to 10MHz or so, you can add this prescaler to provide a dramatic increase in performance. And it has selectable frequency division ratios of 1000:1, 200:1, 100:1 or 10:1 to make it especially versatile. A frequency counter is a very handy tool, even if it’s just one that’s built into a Digital Multimeter (DMM). Some DMMs contain frequency counters that will work up to 10MHz or more. If you have one of those, or any other frequency counter (perhaps you built our low-cost 50MHz frequency meter from the February 2007 issue) – you can now have the facility to measure frequencies far above that range. After all, there are lots of devices these days that operate at high frequencies – for example 433MHz, 900MHz, 2.4GHz or even 5.6GHz – so it’s quite likely that you will soon want to measure the frequency of a signal and your cheap counter just won’t be able to 30  Silicon Chip handle it. But now you can combine your existing frequency meter with our new RF prescaler and you can get up into the Gigahertz range. The new prescaler is housed in a tiny diecast aluminium case with two BNC output sockets and one SMA input socket. It also has a tiny 4-position slide switch to select the division ratio of 1000:1, 200:1, 100:1 or 10:1. Set it to 1000:1 and connect it between the signal source and your meter and the 2.4GHz signal becomes 2.4MHz; easy for your meter to read and easy to convert in your head, since you just need to swap the units. Operating principle The basic arrangement of the Prescaler is shown in the block diagram of Fig.1 opposite. The source signal is applied to the 50Ω input connector at left and then AC-coupled to IC1. This monolithic amplifier IC is essentially just a high-frequency Darlington transistor with biasing resistors and its input and output are both matched to 50Ω. 3.4V DC is fed to its collector via an inductor. The output signal from the collector of IC1 is then AC-coupled to IC2, an identical amplifier, giving 22-34dB of signal boost in total, depending on frequency. The two amplifier stages are included to help make up for any signal loss in the input cabling and give the prescaler good sensitivity. The output from IC2 is then fed to siliconchip.com.au one of the differential inputs of a highperformance divide-by-five counter, IC3. The other differential input of IC3 is AC-coupled to ground since we don’t actually have a differential signal at this point. IC3 is the most critical part of this circuit as it must reduce the very high frequency input signal down to something more manageable, ie, it gives a 1.2GHz output for a 6GHz input. The output of IC3 is AC-coupled to another counter IC, IC4. This is programmable and can divide the frequency by a value anywhere between two and 256. Four different ratios are available, selected by slide switch S1: two, 20, 40 and 200. These give overall division ratios (including the divide-by-five action of IC3) of 10, 100, 200 or 1000. The output of IC4 is also differential so these signals are fed to the bases of two PNP transistors which form a longtailed pair. Their emitters are connected to the two output BNC connectors via impedance matching resistor networks, which give an output impedance of 75Ω. Either or both outputs can then be fed to a frequency counter with a 50Ω or 75Ω input impedance. Or you could use one output to drive a frequency counter while the other drives an oscilloscope. To handle the high frequencies involved, IC4 is an ECL (emitter-coupled logic) device with a maximum recommended operating frequency of 1.2GHz although it will typically work up to 1.4GHz. IC1, IC2 and IC3 must all handle the full input frequency; these all use heterojunction bipolar transistors (HBTs) to achieve operation up to around 8GHz. IC1 and IC2 are made from indium gallium phosphide (InGaP) semiconductor material, rather than silicon, because electrons move through it more quickly. IC3 also uses InGaP together Fig.1: block diagram of the Prescaler. The signal passes through two amplification stages, then a INPUT differential divide-by-five prescaler, followed by a programmable counter and then a dual voltage conversion stage to a pair of BNC outputs. siliconchip.com.au Features & Specifications Input frequency range:.........5MHz-6GHz; typical operation to 7GHz Input: ....................................SMA, 50Ω Input sensitivity: ................. <12mV RMS 6-3500MHz; <130mV RMS 5MHz-7GHz (typical; see Fig.6) Division ratio: ......................selectable; 1000:1, 200:1, 100:1 or 10:1 Outputs: ................................2 x BNC, 50/75Ω, 180° out of phase Output amplitude: ................typically 300mV peak-to-peak into 50Ω Output duty cycle: ...............approximately 50% (10:1), 5% (100:1), 2.5% (200:1), 0.5% (1000:1) Output overshoot: ................<10% Power supply: ......................9V DC/500mA plugpack or 5V DC/500mA (microUSB); typically 375-450mA, quiescent ~375mA with gallium arsenide (GaAs) semiconducting material. The use of different semiconductor materials for the emitter-base and basecollector junctions allows the base to be much more heavily doped without creating excessive hole injection from the base to emitter. The heavier doping reduces the base resistance while maintaining gain. This is what the term “heterojunction” refers to; ie, the fact that the transistor junctions are made from two different types of semiconductor. The operation of the circuit is shown in the scope grab labelled Fig.2. The prescaler has been set to its minimum 10:1 overall division ratio to better illustrate its operation. A 20MHz, 35mV RMS signal was applied to the unit and the output of amplifier stage IC2 is shown at the bottom of the screen in blue, with an amplitude of a little over 1V RMS. Overall gain is therefore 29dB [20log10(1000÷35)], within the range expected. The output of divide-by-five prescaler IC3 is shown just above it in pink and this is a fairly clean 4MHz square wave with an amplitude of about 500mV peak-to-peak. The signal from output connectors CON2 and CON3 +3.4V are shown in green and yellow above, with the expected frequency of 2MHz and a peak-to-peak voltage of around 300mV. With a division ratio of 100:1, 200:1 or 1000:1, the duty cycle of the outputs drops below 50%. The output pulse width is normally five times the input signal period, ie, with a 5GHz input, the output pulses are at least 1ns. Fig.3 shows the unit operating with a 1000:1 division ratio and a 100MHz, 10mV RMS input signal. The mauve trace shows the output of amplifier IC2, with an RMS amplitude of 300mV, indicating a gain of around 29.5dB. As you can see, the output pulses are around 50ns and the output frequency is 99.99kHz, indicating that the input is actually just a little below 100MHz (ie, around 99.99MHz). Circuit description The complete circuit of the 1000:1 RF Prescaler is shown in Fig.4. Input SMA connector CON1 is shown at left; depending on the exact model used, this can handle signals up to 20GHz. Low-capacitance schottky diodes D1 and D2 clamp the signal amplitude to no more than a few hundred millivolts to protect the rest of the circuit +3.4V +5V SET RATIO S1 +5V IC1 IC2 IN IN IC3 ÷5 OUT +3.4V IN OUT IC4 OUT IN OUT OUTPUT 2 FIRST GAIN STAGE (+11-17dB) SECOND GAIN STAGE (+11-17dB) DIVIDE BY FIVE OUTPUT 1 PROGRAMMABLE DIVIDER May 2017  31 Fig.2: the amplified 20MHz input signal is shown at bottom in blue, followed by the 1/5th (4MHz) frequency signal above in pink and the 1/10th (2MHz) output signals at top, in yellow and green. from a signal with too much amplitude. The signal is then AC-coupled via a 10nF C0G capacitor to the first amplifier, IC1. IC1 is an ERA-2SM+ which provides around 16dB of gain at 1GHz, falling to 10.7dB at 6GHz. Its input impedance is 50Ω so no termination resistors are required. DC power is fed in via RF inductor L1, an ADCH80-A+, which maintains significant inductance up to 10GHz. It isolates the DC power supply from the AC signal present at output pin 3. The 10nF bypass capacitor connected immediately adjacent to L1 helps to prevent any residual RF signal which may be coupled across L1’s small inter-winding capacitance from passing into the DC power supply. As the output impedance of IC1 is also 50Ω, we can feed its output signal directly to IC2 via another 10nF capacitor. The amplification stages comprising IC1 & L1 and IC2 & L2 are identical. Both amplifiers have a snubber network at their output comprising 33Ω resistors and 100pF capacitors. These help prevent instability when operating at around 4-4.5GHz. The output from IC2 is fed to pin 3 of IC3 via another 10nF AC-coupling capacitor. IC3 is the HMC438MS8GE RF divide-by-5 counter and its differential input pins 2 and 3 each are internally biased and matched to 50Ω. As mentioned earlier, the other input terminal at pin 2 is connected to ground via an identical 10nF capacitor. Thus this pin will sit at a DC level determine by IC3’s internal biasing network. IC3 runs from a 5V supply which is smoothed by a low-pass filter compris32  Silicon Chip Fig.3: the pink trace shows the output of amplifier IC2 when fed with a 100MHz sinewave, and at top, the two outputs at 1/1000th the frequency, ie, 100kHz. The output pulses are around 50ns long. D3 SM 4004 1 +5V OUT IN K REG 1 TPS73701 FB1 REG2 78M05 GND 1 F 5 TP5V X7R A POWER 1 F OUT IN EN GND GND 3 X7R FB 2 1.8k 4 1 F X7R 6 1k CON5 POWER TPGND 1 2 3 X 4 IC1, IC2: ERA-2SM+ INPUT AMPLIFIERS X7R L3 47 H C0G C0G CON4 10 F +3.4V 10nF 10nF +5V 3 K L1 ADCH80A+ D2 INPUT CON1 A 10nF C0G K 1 4 IC1 3 6 3 10nF C0G 2 4 IC2 6 3 2 33 D1 1 C0G 33 100pF A 10nF L2 ADCH - C0G 80A+ 10nF 100pF C0G C0G D11 P4 K S1 DIVISION RATIO IN 1 VCC 100nF C0G 6 IC3 OUT HMC438MS8GE 7 100nF OUT C0G NC GND GND 10nF 8 4 5 TAB D5 DIVIDE BY FIVE A1 P1 A2 K D4 A2 A1 1/10 P2 K 1/100 1/200 2 IN X7R C0G A1 D1, D2: 1PS70SB82 3 10 F A2 VH2 A1 1/1000 P4 K D7 A2 A1 D10 D6 A1 P5 K P67 A2 K D9 A1 A2 A1 K A2 K A2 D8 SC 20 1 7 6GHz+ 1000:1 PRESCALER siliconchip.com.au ing a 47µH inductor and parallel 10µF and 10nF capacitors. The 10µF capacitor provides bulk bypassing while the 10nF C0G capacitor has a much lower effective series inductance (ESL) and thus will be more effective at filtering out higher frequencies. This filter helps prevent any highfrequency signals which may be present in the 5V power supply from upsetting the operation of IC3 and also prevents any modulation of its own supply current from being fed back into other components. IC3 can operate from very low frequencies (practically DC) up to around 7.5GHz, as shown in Fig.5. The upper limits shown here are not an issue since the “saturated output power” of IC2, which provides the input signal for IC3, is 14dBm at 100MHz, 13dBm at 2GHz and 12dBm at 4GHz. Hence, IC2 is incapable of producing a signal with an amplitude above that which IC3 can handle; we don’t have data above 5GHz but it seems probable that its output power is no more than 10dBm above this frequency. The lower signal limit shown in Fig.5, combined with the gain from IC1 and IC2, means that the theoretical sensitivity of the prescaler is around -49dBm at 1GHz, which equates to an input signal of well under 1mV A SM4004 K FB A GND Fig.5: the recommended input power level for prescaler IC3 based on signal frequency. Keep in mind that IC3 is preceded by two amplifier stages for improved sensitivity. 1 IN K Recommended Operating Window TPS73701 LM78M05 AZ431LAN TP3.4V HMC438 Input Sensitivity Window, 25°C 5 OUT HEATSINK TAB (PIN 6) CONNECTED TO PIN 3 +5V L4 47 H +3.4V 10 F 10nF C0G 29 30 31 2 3 4 5 6 Q2 Q3 Q4 Q5 Q6 Q7 1 Q0 Q1 13 VCC VCC 8 32 VCC VCC 24 22 23 26 27 28 2x 51 VBB TCLD IC4 MC100EP016A CLK CLK COUT COUT CE TC MR PE VEE VEE P0 P1 P2 P3 P4 P5 P6 P7 21 20 19 18 17 16 15 14 330 X7R 300 DIVIDE BY 2/20/40/200 A VH2 POWER 82 Q1 VH1 7 1.1k B 10 11 2x MMBT3640 E E C C  LED1 K Q2 B 12 25 VH1 9 100 3x 51 OUT1 CON2 100 VH1 300 300 OUT2 CON3 VCC – 2V (1.4V) K D1, D2: 1PS70SB82 C B E D4–D11: BAT54C NC A1 A2 1.1k ADCH-80A+ K K A 300 X7R FB A Q1,Q2: MMBT3640 1 F 150 REF1 AZ 431 LA IC1, IC2 BEVELLED END 6 1 3 IC3 4 3 1 2 DOT 8 1 4 IC4 MC 100EP 016A 1 Fig.4: complete circuit for the Prescaler. The diode logic network comprising slide switch S1 and dual diodes D4-D11 configures IC4 for the selected division ratio. siliconchip.com.au RMS. However, keep in mind that some of the input signal will be lost in the cabling and due to the 50Ω termination of the input, so in reality a 1mV signal would be marginal. IC3 produces two output signals at one fifth its input frequency, with opposite phases, from pins 6 & 7. At low frequencies these are fairly square although inevitably they become more sinewave-like at higher frequencies. These are coupled to another divider, IC4, via two 100nF capacitors. We’re using higher value capacitors in these positions, due to the lower frequency here compared to the input signal. By extending the low frequency response of the unit, we reduce the need to constantly bypass the unit if you’re measuring signals over a wide range of frequencies. Programmable counter IC4 is an eight-bit counter, counting from 0 up to 255 (by default) and then rolling back over to zero again. If left in this default configuration (with most of the digital inputs opencircuit since they have internal pulldowns), the differential outputs COUT and COUT will produce pulses at a frequency 1/256th the input frequency (256 = 28). However, as noted earlier, you can set IC4’s division ratio to any value between two and 256. To do this, we set the states of input pins P0-P7 to an 8-bit digital value and pull the TCLD input high. Now every time the counter rolls over, rather than being reset to zero, it’s loaded with the digital value from the P0-P7 pins. Say we want an overall division ratio of 100. Since IC3 divides the input May 2017  33 1000 6GHz+ 1000:1 Prescaler Input Sensitivity (blue=with snubbers, red=without) 500 200 Input Sensitivity (mV RMS) Fig.6: minimum input sensitivity for the Prescaler. Signal levels above this, up to about 1V RMS, should not be a problem. Below the level specified, it may operate with some jitter, or not at all. The blue curve is for the circuit as published while the red curve shows its performance without the two snubber networks at the outputs of IC1 and IC2. 100 50 20 10 5 2 1 5M 10M 20M frequency by five, IC4 must divide the frequency by a factor of 20. To do this, we set P0-P7 to the binary value of 236 (256–20). Since counting now starts at 236, after 19 pulses, it reaches 255 (236+19) and so requires just one more pulse to roll over. Hence, it divides its input frequency by 20. Selection of division ratios As noted above, we’re using a miniature 4-position horizontal slide switch, S1, to select the division ratios. This particular switch is a little unusual in that it has six pins and it works by bridging two of the pins, depending on the position of the switch, as depicted in the circuit diagram. For example, when in the 1/1000 position, the fourth and sixth pins are bridged. We have arranged diodes D4-D11 so that in this position, the VH2 voltage on the middle two pins of the switch (which we’ll explain in more detail later) is applied to input pins P5 (via D8) and P4 (via D6), pulling those inputs high. Input P3 is permanently tied high. As a result, with P3, P4 and P5 high, the counter’s initial binary value is 00111000 or 56 in decimal. Since 256 – 56 = 200 and 200 x 5 = 1000, we have the correct division ratio. If you perform the same calculations for the other three switch positions, you will find that the pre-load counter values are 216 (256 – 40), 236 (256 – 20) and 254 (256 – 2). ECL voltage levels As mentioned earlier, IC4 is an ECL (emitter-coupled logic) device; a technology which has been used for decades for very high speed logic. ECL devices are bipolar transistors made 34  Silicon Chip 50M 100M 200M 500M Input Frequency (Hz) 1G 2G 5G 7G from plain old doped silicon. Despite this, these transistors are arranged in such a way to allow operation at frequencies over 1GHz. This is because the transistors are biased so that they are always conducting, with their conductance being varied to produce different digital states, rather than being switched on and off. In a sense, this means that they process digital information in an analog manner. As a result, ECL input and output voltages swing over a much more limited range than CMOS or TTL. In the case of the MC100EP016A, the supply voltage is 3.0-3.6V and the average signal level is around 1V below this, ie, 2.0-2.6V, depending on the exact supply voltage. When a pin state changes between one and zero, typically its voltage will shift by around 0.7V. Assuming a 3.3V supply, a logic high level may be around 2.65V while a logic low would be around 1.95V. Pin 24 on IC4 is labelled “VBB” and provides a reference voltage which is almost exactly halfway between the low and high stage voltages and may be used for comparison, to convert an ECL output to CMOS/TTL. We aren’t using this pin though; we’re using a Fig.7: if you want to feed the output of the Prescaler to a device with a high input impedance (eg, 1MΩ or 10MΩ), here is the best way to do it. The signal must be terminated with a low impedance to get accurate results. different technique to produce the output signals, as will be explained later. The somewhat unusual ECL levels do slightly complicate providing the correct input voltage levels for IC4. To achieve this, we have connected a resistive divider between the +3.4V rail and the 1.4V (VCC – 2V) rail to generate two additional voltage levels, VH2 and VH1. VH2 is approximately +2.5V while VH1 is approximately +2.3V. VH1 is therefore in the middle of the specified “input high voltage” range for IC4 (with VCC=3.4V) of 2.14-2.49V and so pins which are permanently tied high are held at this voltage, ie, TCLD (terminal count load; mentioned above), PE (the chip enable pin) and P3 (also mentioned above). However, pins P1, P2 and P4-P7 are pulled high via a series of schottky diodes and switch S1, so VH2 is connected to the anodes of these diodes rather than VH1. This compensates for the voltage drop across the diodes, so that 2.3V is also applied to those pins when they are pulled high. IC4’s data sheet does not explain whether these inputs must be within the “input high voltage” range so we have played it safe and keep them within that range, rather than just tie them high (to +3.4V) and hope it works reliably. The VCC-2V (1.4V) rail which is used to derive VH1 and VH2 is generated by shunt regulator REF1. Its nominal voltage is 1.24V and the 150Ω/1.1kΩ resistive divider between its cathode, feedback input and anode sets its the gain to 1.136 for an output of 1.41V (1.24V x 1.136). This rail is also used to terminate the three main counter outputs of IC4 (COUT, COUT and TC) via 51Ω resistors, in line with how the data sheet suggests they should be terminated to achieve the specified performance. REF1 can sink up to 100mA which is more than enough for this application. OSCILLOSCOPE/FREQUENCY COUNTER INPUT 50 W or 75 W BNC TERMINATOR BNC “TEE” ADAPTOR CABL CA BLE E FROM FROM PRES PRESCA CALE LER R siliconchip.com.au Apart from the four-position switch which selects the division ratio, there are no actual controls on the Prescaler. One edge has the SMA input socket (left), the division switch and the two BNC output sockets, one of which is 180° out of phase with the other. On the opposite side are the two power sockets – a 9V DC barrel socket (which we prefer) and a 5V micro USB socket (only one is used at any time) – if you only intend to use the 9V socket or the micro USB, the other can be left off the PCB, saving you a bit of drilling or filing. Besides, drilling a round hole is a lot easier than cutting/filing a square hole! The voltage across it is stabilised despite a high-frequency AC component to the current due to the 1µF bypass capacitor. This same VCC-2V rail is also used to DC-bias and terminate the CLK and CLK input signals for IC4 (at pins 22 and 23), via 51Ω resistors. Such low value termination is done to ensure there’s no overshoot or ringing overlaid on the signals from IC3 which might upset the operation of IC4. tor signal voltage by 25% at output connectors CON2 and CON3, while providing an output impedance of 75Ω (ie, 100Ω || 300Ω). This results in an output voltage swing of around 2V peak-to-peak. However, when the output(s) are terminated with 50Ω or 75Ω, this is reduced to about 300mV peak-to-peak; sufficient to drive an external oscilloscope or frequency counter. Output stage For the power supply we recommend using a regulated 9V 500mA DC plugpack, plugged into DC barrel connector CON5. This feeds 5V linear regulator REG1 via reverse polarity protection diode D3, which in turn provides the 5V rail for IC3 and the output stage (Q1 & Q2) via a ferrite bead, FB1. FB1 prevents any high frequency modulation in the current draw of IC3 from radiating from the power supply lead. The 5V rail is also applied to linear regulator REG2, which generates a 3.4V rail for IC1, IC2 and IC4. REG2 can either be an adjustable TPS73701 with 1.8kΩ and 1kΩ resistors connected to its feedback (FB) pin 4, as shown in Fig.4, or it can be a TPS73734 fixed 3.4V regulator. If using the fixed regulator, omit the 1.8kΩ resistor and replace the 1kΩ resistor with a 10nF SMD capacitor, which gives it superior ripple rejection. While we could have used a 3.3V fixed regulator which is much more common than 3.4V, 3.4V is the ideal operating voltage for IC1 and IC2 (3.23.6V allowed) and is also suitable for IC4 (3.0-3.6V). Depending on tolerance, the output of a 3.3V regulator may be too low for proper operation of IC1 and IC2. It’s also possible to power the unit The differential output from IC4 is at pins 10 and 11 (COUT and COUT) and being ECL outputs, these swing between about 1.95V and 2.65V. However, there is another output, TC at pin 12 which has a similar waveform to that at pin 11. We found its average DC voltage level more stable than that at pin 11, so we are using pins 10 and 12 as the differential outputs instead. These are connected to a differential-to-single-ended conversion stage comprising 500MHz PNP transistors Q1 and Q2 which are arranged in a long-tailed pair. Since their emitters are joined together and supplied with current with a 330Ω fixed resistor from the 5V rail, the emitter voltage is determined by whichever base voltage is higher at the time. The bases of Q1 and Q2 are connected directly to the two outputs of IC4 mentioned above, pins 10 & 12. Hence, whichever output is lower, the transistor it is driving is switched on harder, as it has a higher base-emitter voltage than the other. So when pin 10 of IC4 is lower, Q1 is switched on while Q2 is basically off and when pin 12 is lower, Q2 is switched on while Q1 is basically off. The collectors each have a total load resistance of 400Ω, arranged as a divider which reduces the collecsiliconchip.com.au Power supply from a USB supply, via optional USB socket CON4. If both CON4 and CON5 are fitted, CON4 is automatically disconnected if a DC plug is inserted, by the switch integral to CON5. While our unit successfully operated from a USB supply, because this supply is used to run IC3 directly, any significant high-frequency hash could interfere with its operation. Since many USB chargers have quite poor regulation and high levels of hash, it’s probably better to stick with the 9V supply option. Frequency limits We’ve rated this prescaler at “6GHz+” because as presented, it will definitely operate to at least 6GHz and probably up to 7GHz. The actual upper limit depends on the exact properties of ICs1-4 which are fitted to your board. The signal first passes through amplifiers IC1 and IC2. These are rated to operate to 6GHz with a typical gain of 10.7dB at 6GHz; down from a peak of 16.4dB at lower frequencies (10-100MHz). Presumably, they will also provide gain for signal just above 6GHz but this is not specified in the data sheet. Our guess is that they will operate to at least 6.5GHz with at least some gain will probably pass signals to at least 7GHz. IC3 can normally operate to at least 7.5GHz with no reduction in performance (see Fig.5) but sensitivity rapidly falls off above that and it’s unlikely to work at 8GHz. The data sheet for IC4 indicates that at standard room temperature, it will typically handle signals up to 1.4GHz and definitely up to 1.2GHz. That translates to 7GHz (1.4GHz x 5) typical input frequency and 6GHz (1.2GHz x 5) minimum guaranteed input frequency. May 2017  35 1.1kΩ 100pF 10nF 33Ω D2 10nF 10 µF D9 D8 S1 Construction The Prescaler is built on a doublesided PCB coded 04112162, measuring 89 x 53.5mm. This is mounted in a diecast aluminium case. Almost all the components are SMDs, the exceptions being connectors CON-CON3 and CON5, switch S1 and power LED1. Use PCB overlay diagram Fig.8 as a guide during construction. Start with IC4. You can use a standard soldering iron, as long as the tip is not too large but we recommend that you purchase a small tube or syringe of flux paste and some solder wick if you don’t already have some. Good light and a magnifier are also important. Place a small amount of solder on one of the corner pads for IC4 and then orientate the part on the board as shown in Fig.8. Pin 1 goes towards lower left – this should be indicated on the PCB silkscreen. Once the IC is orientated correctly, heat the solder you applied to the corner pad and then carefully slide the IC into place and remove the heat. This process should take no more than a few seconds. D10 5V 1 µF REG2 300Ω 51Ω 82Ω 100Ω Q1 D4 K A D1 SM4004 1 µF 51Ω 330Ω 300Ω D7 LED1 D11 So you can see that with a bit of luck, the Prescaler should work up to 7GHz, albeit with reduced sensitivity. Note that that you could replace the two ERA-2SM+ amplifiers with ERA-1SM+ amplifiers. These have a specified gain of 7.9dB at 6GHz and 8.2dB at 8GHz. However note that it’s possible that IC4 won’t handle these higher frequencies; after all, it’s only guaranteed to work up to 1.2GHz. And the ERA-1SM+ has less gain at lower frequencies, for example, 12.1dB at 1GHz compared to 15.8dB for the ERA2SM+. Hence our recommendation to use the ERA-2SM+ devices. 36  Silicon Chip 300Ω 1 1 10nF 100pF D1 D6 D5 CON 1 0V IC4 1 D1,D2 1PS70SB82 IC1 51Ω REG1 100Ω CON3 SILICON CHIP6GHz+ 1000:1 Prescaler IC2 FB1 1 µF Q2 300Ω 1.1kΩ 1 L1 51Ω IC3 100nF 33Ω 1kΩ 1.8kΩ 150Ω 1000:1 200:1 100:1 10:1 L2 100nF 1 µF CON5 CON 4 1.4V 3.4V 1 10nF 10nF 1 10nF REF1 10 µF 10 µF 10nF © 2017 04112162 RevC L4 47 µH 51Ω L3 47 µH 10nF Fig.8: use this PCB overlay diagram as a guide to build the Prescaler. Start with IC4 and IC3 are these have the smallest pin spacings. Most of the remaining components are pretty easy to solder. CON2 Now carefully check that the IC pins are centred on their pads. Check all four sides. Use magnification to make sure that all pins are properly centred on their pads. If not, re-heat the solder on that one pad and gently nudge the IC towards the correct position. Repeat this process until you are happy that the IC is correctly located and check that its pin 1 is in the correct position before tack soldering the diagonally opposite pin. Re-check that all the pins are correctly located; you can re-heat either solder joint at this point to make slight adjustments. Now apply a thin layer of flux along all the IC pins and then apply solder to all the pins. Make sure you apply enough to get proper fillets. It’s difficult to avoid bridging the pins at this point; what’s most important is getting the solder to flow onto each pin and pad on the PCB. Once all the pins have been soldered, apply another thin layer of flux paste and then use a piece of solder wick to remove any excess solder, especially where adjacent pins are bridged. Proceed carefully and re-apply flux paste if necessary. When you have finished, clean off the flux residue (using either a proper flux solvent or ethyl alcohol/methylated spirits and a lint-free cloth) and examine the solder joints under good light and magnification to ensure they are all good and there are no more bridges left. Following soldering IC4, you can fit IC3 in the same manner. IC3 has smaller, more closely-spaced leads but there are only eight of them, on two sides of the IC. One additional thing you will have to take into consideration is that IC3 has a thermal pad on the underside and ideally, this should be soldered to the matching pad on the PCB. If you have a hot air reflow system (lucky you!) this is quite easy, as it’s just a matter of spreading some solder paste on the nine pads for this IC, putting it in position and then gently heating it until all the solder paste melts and reflows. However, if you are just using a regular old soldering iron, you should spread a thin layer of solder paste on the large central pad, then drop the IC down into position and tack solder it in position. After checking that its orientation and position are correct, solder the remaining leads using the same technique as for IC4. Then flip the board over and squirt some flux paste into the hole directly under IC3. Melt some solder into this hole and heat it for several seconds. Remove heat and carefully check that IC3 is hot by quickly touching it with your finger. This indicates that the solder has conducted enough heat through the hole to melt the solder paste you placed under it earlier. If you’re fitting microUSB connector CON4, do so now since its pins are hard to access once the other components are in place. This one is a little tricky because its pins are quite close together and despite the plastic locating posts, it’s a little difficult to get the connector to sit in just the right position. Start by putting a little flux paste on all the pads and pins for this device, then drop it into place. Use a magnifying glass to check whether the pins are in the right location, then hold the device down with something heatproof (like a toothpick – not your finger!) and solder one of the large mounting lugs. This will take a few seconds as it will heat up the whole metal body while doing so. Once you’ve formed a good solder joint on one of the mounting lugs, recheck that the signal pins are still located correctly. If they aren’t, you will need to hold the socket with tweezers and nudge it into place while heating the solder. You can then solder the remaining mounting lugs, followed by the signal pins and clean up any bridges between the pins using solder wick and a little extra flux paste. Use a magnifier to verify that all the signal pin solder joints are good before proceeding. siliconchip.com.au Parts list – 1000:1 6GHz+ Prescaler 1 double-sided PCB, coded 04112162, 89 x 53.5mm 1 diecast aluminium case, 111 x 60 x 30mm (Jaycar HB5062) 1 high frequency SMD ferrite bead, 3216/1206 size (FB1) (eg, Bourns MH2029-070Y, Digi-Key MH2029-070YCT-ND) 2 Mini-Circuits ADCH-80A+ Wideband RF choke (L1,L2) (available from www.cseonline.com.au or the SILICON CHIP Online Shop) 2 47µH 6x6mm SMD inductors (L3,L4) (eg, Taiyo Yuden NR6028T470M, Digi-Key 587-2104-1-ND) 1 SMA right-angle through-hole or edge-mounting connector, 50Ω, >6GHz (CON1) (eg, Molex 0733910320, Digi-Key WM8554-ND) 2 PCB-mount right-angle BNC sockets (CON2,CON3) (Jaycar PS0661) 1 SMD microUSB socket (CON4) (eg, Jaycar PS0922, Altronics P1309) AND/OR 1 PCB-mount 2.1mm or 2.5mm ID DC barrel socket (CON5) 1 C&K SK-14D01-G 6 PCB-mount right-angle SP4T micro slide switch (S1) (Digi-Key CKN10368-ND) 1 SMA male to BNC female adaptor (optional, for connecting BNC-equipped signal sources) 1 BNC T adaptor and 50Ω or 75Ω termination plug (optional, for driving high-impedance equipment) 1 9V DC regulated supply with plug to suit CON5 OR 1 5V USB supply with Type-A to microUSB cable (see text) 4 M3 x 10mm pan-head machine screws and nuts 8 3mm ID 6mm OD 1mm thick Nylon washers 4 M3 Nylon nuts 4 small rubber feet (optional) Semiconductors 2 Mini-Circuits ERA-2SM+ wideband RF amplifiers [Micro-X] (IC1,IC2) (available from www.cseonline.com.au or the SILICON CHIP Online Shop) 1 HMC438MS8GE 7GHz divide-by-five prescaler [MS8G] (IC3) (Digi-Key 1127-1041-1-ND) 1 MC100EP016A 3.3V ECL 8-bit synchronous counter [LQFP-32] (IC4) (Digi-Key MC100EP016AFAGOS-ND) 1 TPS73701DCQ (adjustable) or TPS73734DCQ (fixed) 1A low-dropout linear regulator (REG1) (Digi-Key 296-27066-1-ND or 29624574-1-ND) 1 78M05 5V 0.5A linear regulator [D-PAK] (REG2) (Digi-Key MC78M05CDTRKG) 1 AZ431LANTR-G1DI 100mA 1.24V adjustable shunt reference [SOT-23] (REF1) (Digi-Key AZ431LANTR-G1DICT-ND) 2 MMBT3640 12V 200mA 500MHz PNP transistors [SOT-23] (Q1,Q2) (Digi-Key MMBT3640CT-ND) 1 3mm blue LED (LED1) 2 1PS70SB82 Schottky diodes [SOT-323/SC-70] (D1,D2) (Digi-Key 1727-5340-1-ND) 1 S1G or equivalent 1A diode [SM-1/SMA] (D3) (Digi-Key 1655-1504-1-ND) 8 BAT54C Schottky dual diodes [SOT-23] (D4-D11) (Digi-Key BAT54CLT1GOSCT-ND) Capacitors (all SMD ceramic 3216/1206 size unless otherwise stated) 3 10µF 16V X7R 4 1µF 16V X7R 2 100nF 50V X7R 9 10nF 50V NP0/C0G, 2012/0805 size (one unused when REG1=TPS73701) 2 100pF 50V NP0/C0G, 2012/0805 size Resistors (all SMD 3216/1206 size, 1%) * only required when REG1=TPS73734 ** may be required to trim REG1 output voltage 1 68kΩ** 1 30kΩ** 1 1.8kΩ* 2 1.1kΩ 1 1kΩ* 1 330Ω 4 300Ω 1 150Ω 2 100Ω 1 82Ω 5 51Ω 2 33Ω (2012/0805 size) Remaining SMDs The rest of the parts are quite easy to install as they have more widely spaced leads. Solder IC1 and IC2 next, making sure their “pointy” pins are soldered to the pads marked for pin 1. Follow with L1 and L2, both of which are in six-pin packages. Their pin 1 dot should be orientated as shown in Fig.8. Next on the list is REG1. This has one large pad and five small ones. The regulator itself has considerable thermal inertia, so spread a thin layer of flux paste on the large pad with a little extra paste on the smaller pads, drop REG1 in position and then tack solder siliconchip.com.au one of the smaller pins (you can pre-tin the pad and heat it while sliding the part into place, if you like, as you did with IC4). You can clean these joints up with some additional flux paste and an application of solder wick. Now for the large tab. Apply some solder to this tab and hold your iron in contact with both the regulator tab and PCB pad. You may need to hold it there for some time before the whole assembly heats up enough for the solder to flow down onto the board. Keep adding solder until the tab is covered and looks shiny, then remove the heat. Use a similar technique to fit REG2. Inductors L3 and L4 are similarly quite large, so again, spread flux paste on each of their pads before soldering. You can then add some solder to one of the pads and slide the inductor into place while heating that solder. Again, you may need to wait some time before the inductor heats up enough to slide fully into place and you can then add more solder until a nice, shiny fillet has formed. Let that cool down a little, then solder the opposite end, again waiting until it’s hot enough to form a good joint (this should be quicker as both the inductor and PCB will retain significant heat). May 2017  37 The next components on the list are REF1, Q1, Q2 and diodes D4-D11. These are all in small 3-pin SOT-23 packages so don’t get them mixed up. The eight diodes are all the same type. In each case, tack solder one pin, check that the pins are properly aligned, solder the other two pins and then refresh the initial pin. It’s easier if you spread a little flux paste on the pads before soldering each part. Now fit diodes D1 and D2, which are in similar but slightly smaller packages than D4-D11, followed by diode D3, which is in a two-pin rectangular or cylindrical package. Make sure its cathode stripe faces towards REG2 (indicated with a “k” on the PCB). You can then fit all the ceramic capacitors and resistors to the board, as well as SMD ferrite bead FB1, where shown in Fig.8. Orientation is not critical for any of these. Remember that if you’re using a TPS73734 regulator, rather than the suggested TPS37301, you will need to omit the 1.8kΩ resistor and replace the 1kΩ resistor with a 10nF capacitor. Through-hole components With all the SMDs in place, you can now proceed to solder slide switch S1, SMA connector CON1, barrel connector CON5 (if being fitted) and BNC sockets CON2 and CON3. In each case, ensure the part is pushed down fully onto the PCB before soldering the pins. The larger metal connectors such as CON1 require quite a bit of heat to form good solder joints. Note that the pads for CON1 are designed to allow either a right-angle or edge-mounting (“end launch”) connector, however, we recommend using a right-angle connector like we did in our prototype, so that it lines up with BNC sockets CON2 and CON3. Power indicator LED1 was not fitted to our prototype but we decided it would be handy and so have added it to the final version, located just to the left of output connectors CON2 and CON3. Bend its leads through 90° close to the base of the lens, so that the longest lead will go through the hole towards the right-hand side of the board, marked “A” in Fig.8 and on the PCB. Solder it with around 6mm of lead length above the PCB, so that its lens lines up with CON1-CON3. Initial testing and use Ideally, you should connect an am38  Silicon Chip 10.5 28.75 B 19 C 14 C 12 A 3 8 7.5 FRONT OF JAYCAR HB-5062 BOX CL (111 x 60 x 30) 29.75 12 HOLE A: 3.0mm DIAMETER HOLES B: 7.0mm DIAMETER HOLES C: 13.0mm DIAMETER 15.75 B 3.5 9 11.5 REAR OF HB-5062 BOX ALL DIMENSIONS IN MILLIMETRES Fig.9: drilling detail for the diecast box. You don’t need both the 7mm hole and the micro USB slot on the rear if you only intend to use one power source. meter in series with the DC power supply the first time you fire the Prescaler up. Quiescent current should be close to 380mA (or 370mA on the 10:1 divider setting). Less than 350mA suggests that at least one device in the circuit is not getting sufficient voltage, while much more than 400mA possibly indicates a short circuit. If the initial current drain is in not the range of 325-425mA, switch off immediately and carefully check the PCB for assembly faults, such as adjacent pins being bridged, bad solder joints, incorrectly placed or orientated components etc. Use good light, a magnifier and if necessary, clean flux (or other) residue off the board using methylated spirits or another similar solvent so that you can see it properly. Assuming the current is in the right range, use a DMM to check the voltages at the three test points provided, labelled 1.4V, 3.4V and 5V. These are the voltages you should expect at each point. The 1.4V test point should be between 1.35V and 1.45V, the 3.4V test point between 3.35V and 3.45V and the 5V test point around 4.75-5.25V (possibly slightly higher or lower if you’re using the USB supply option). If the 1.4V test point is off, that suggests a problem with REF1. If the 3.4V test point is off, you may have fitted incorrect divider resistors for REG2. On our prototype, we use a TPS73701 (adjustable version of REG2) and found the 3.4V rail was a little low at around 3.328V, presumably due to resistor tolerances. We solved this by soldering a 30kΩ resistor across the top of the 1kΩ resistor, bringing the 3.4V rail up to 3.399V. We’ve added 30kΩ and 68kΩ resistors to the parts list. If your 3.4V rail is below 3.34V, solder the 30kΩ resistor in parallel with the 1kΩ resistor, while if it’s between 3.34V and 3.37V, use the 68kΩ resistor instead. Between 3.37V and 3.5V should be OK. An output from REG1 above 3.5V is unlikely. If you use the fixed version of REG2, TPS73734, its output should be between 3.36 and 3.44V so it should not require any trimming. Assuming the voltages seem OK, the next step is to hook the output(s) of the prescaler up to your frequency counter or scope. If this device has an option for (or a fixed) 50Ω input impedance, select this. If your counter/scope only has a high impedance input, you will need to terminate the cable at its input using a 50Ω or 75Ω resistor. Assuming this device has a BNC input, you can do this by connecting a BNC T adaptor to that input, with a termination plug on one end and the cable from the Prescaler on the other; see Fig.7. You also need a signal source which can produce a signal of at least 5MHz (and ideally higher) into a 50Ω load. Connect this up to the Prescaler’s input, power it up and check the reading from the output(s). Confirm that it is steady and in the expected range. Move switch S1 and check that the frequency reading is as expected on each setting; its left-most position is 1000:1 and right-most is 10:1. Ensure that your signal generator can produce sufficient amplitude for correct operation, as shown in Fig.6, siliconchip.com.au POWER 9V DC 5V (USB) Swww.siliconchip.com.au ILICON CHIP + 5MHz – 6GHz 1000:1 PRESCALER INPUT DIVISION 1/1000 1/200 1/100 1/10 OUTPUT 1 OUTPUT 2 Fig.10: same-size artwork for the Prescaler front panel. There are no holes in the top panel to be drilled. We used only the inner portion of the artwork as you can see from our photos. You can photocopy this artwork without breaking copyright – or if you prefer, it can also be downloaded (as a PDF) from siliconchip.com.au – search for “prescaler”. keeping in mind that the higher the frequency, the less signal you need for the prescaler to operate. Note also that it will operate with signal levels a few dB below the sensitivity curve shown in Fig.6 with increasing jitter (and thus possibly decreasing accuracy in the reading) the further below the curve your signal is. Putting it in a case While we found the prescaler operated reasonably well without a case, it’s usually a good idea to shield RF equipment, both to prevent interference from affecting its operation and to prevent it from producing too much EMI which might affect other equipment. Hence, our Prescaler is designed to fit in an inexpensive diecast aluminium case measuring 111 x 60 x 30mm (Jaycar HB5062). If you have a drill press and are reasonably experienced with machining aluminium, it should take you about one hour to install it in the case. Start by printing out the drilling templates, shown in Fig.9 and also available for download as a PDF from the SILICON CHIP website. Cut these out and glue/tape them onto the front and back of the case, centred as well as possible. Centre punch the holes and drill each one using a 3mm pilot hole. For the rectangular cut-out on the front panel, drill three 3mm holes inside the outline, one at either end and one in the centre. The rectangular cut-out on the rear is only necessary if you’re using a USB power supply. The rectangle shown is siliconchip.com.au large enough to expose the microUSB connector however you will probably have to expand it considerably to get the plug to fit in. Alternative, if using a DC plugpack (as recommended), you can drill the adjacent hole instead. Once each pilot hole has been drilled, using either a stepped drill, series of larger drill bits or tapered reamer to enlarge each hole to its final size. File any rectangular cut-outs flat and then enlarge them to size. Make sure each hole is clean (ie, no swarf) and get rid of all the aluminium shavings, then remove the nuts and washers from the BNC connectors and test fit the PCB in the case. You will need to angle it in. The front panel holes are slightly oversize to give you enough room to do so. Don’t force it in if it won’t go in easily; if you do, you may not be able to get it out! Simply enlarge the holes slightly and it should pop in with only modest force and you can then drop it down to be parallel with the base. We suggest that you put switch S1 in one of the centre positions initially, then once the PCB is in the case, make sure the slot is wide enough to allow all four positions to be used. Make sure that you check that the rear panel hole(s) are large enough to make a good power supply connection to the PCB. Most barrel plugs should be long enough to fit through the hole and into the connector. If yours isn’t, you may need to cut it off and solder a longer one onto the plugpack. With the PCB in the case, you can now use it as a drilling template to drill four 3mm holes in the base. Remove the PCB by lifting the rear and then pulling it out, then clean out the aluminium dust and blow off the PCB. Now, feed a 10mm machine screw up through one of the holes in the base and place two of the 1mm thick Nylon washers over its shaft, then screw on a Nylon nut until the screw thread is just about poking through the nut. Repeat for the other three holes. If you’re using screw-on rubber feet, you should pass the 10mm machine screws up through the feet before feeding them into the case. If you lift the case up, the screws should drop down, leaving just the two Nylon washers and nut sitting on the bottom of the case in each corner. This should give you enough room to lever the PCB back in. Press down on one corner of the PCB and rotate that screw clockwise until its shaft is just poking through the PCB, then hold an M3 nut down on the shaft and continue tightening until the screw has gone all the way into the base and the nut is holding the PCB down. Repeat for all four corners. You can now place the washers back over the BNC connectors and screw the nuts back on. SC Fitting the completed PCB into the case is very much a “shoehorn” affair, but it does fit! Don’t force it – a bit of judicious “jiggling” should get it in place. May 2017  39 Getting Started with the Micromite, Part 3 by Geoff Graham So far, we have covered some of the basic concepts involved with programming in MMBasic such as input/output commands, making decisions, looping and drawing graphics. Now we will move on to more advanced subjects such as data types, arrays and drawing text on the LCD screen. S o far in this series, all the numbers and variables that we have used were floating point types. Just to re-cap, a floating point number can contain a decimal point. For example, 123.45 is a floating point number; so is 17.0 (or even 17). Often the term “floating point” will be abbreviated to just “float” and MMBasic uses that abbreviation also. Most numbers that we use in everyday life (and programming) can be expressed as floats and so they are the default in MMBasic if you do not specify a number’s type. However, the limitation of floating point is that it stores numbers as an approximation with an accuracy of only 6 or 7 digits. For example, if you stored the number 1234.56789 in a floating point variable then printed it out, you would get 1234.57. You can try it out for yourself: a = 1234.56789 PRINT a 1234.57 Usually this is not a problem but there are some cases where you need to accurately store large numbers. Examples include tracking a GPS latitude/longitude to specify a location 40  Silicon Chip on the planet’s surface, the number of seconds since midnight on January 1st 1970, or interfacing with digital frequency synthesisers. As another example, say you want to store a colour value in a variable. We covered LCD panels and colours last month but as a quick reminder, MMBasic uses a 24-bit number to represent colour. The top eight bits are the intensity of the red colour (decimal 0 to 255), the middle eight bits represents the intensity of green and the bottom eight the blue colour. Any one of the 16 million possible colours can be specified using this single 24-bit number. Last month, we also described the RGB() function which can be used to generate this 24-bit number. It looks like this: RGB(red, green, blue) Where red is the intensity of the red colour (0 to 255) and similar for green and blue. Also, as explained last month, you could fill the screen with a colour by using the CLS command. For example: CLS RGB(255, 0, 255) Fills the screen with purple (generated by mixing red and blue but not green): All well and good but you might want to store this colour in a variable called “purp” and then use that variable instead of the long RGB function. So now your program is: purp = RGB(255, 0, 255) CLS purp If you run this program, you will find that the screen is filled with a funny pink colour, not purple. Try it yourself, type in the above two fragments of code and see. What is going on here? The answer is that we tried to store a 24-bit number (which has eight decimal digits) in a floating point variable which is only good for holding six or seven significant digits. The floating point variable “lost” the least significant four or five bits which are part of the eight bits that define the intensity of the blue component. This is where integer variables come in. Integer variables An integer variable in MMBasic takes up 64 bits (8 bytes) of RAM siliconchip.com.au and can accurately hold numbers up to 9,223,372,036,854,775,807 (or 19 digits), which is a very large number indeed – roughly the number of grains of sand on planet Earth. So an integer in MMBasic is big enough to hold a 24-bit number representing colour. It is easy to create integer variables; just add the percent symbol (%) as a suffix to a variable name. For example, “purp%” is an integer variable. So the above program to fill the screen with purple becomes: purp% = RGB(255, 0, 255) CLS purp% This works perfectly. The downside of an integer is that it cannot store fractions (ie, numbers after the decimal point). Any calculation that produces a fractional result will be rounded up or down to the nearest whole number when assigned to an integer. You can mix integers and floating point values within a program and MMBasic will make the necessary conversions, but if you want to maintain the full precision of integers you should avoid mixing the two. Strings Strings are another variable type (like floating point and integers). Strings are used to hold a sequence of characters. For example, in the command: equal), < (less than), etc. Comparisons like less than or greater than test for string sort order, so for example, “Abc” < “Abd” will test as true. Another example: IF Car$ = "Audi" OR Car$ = "BMW" OR Car$ = "Mercedes" THEN PRINT "German" String handling is one of MMBasic’s strengths and there are many ways to join, pull apart and generally manipulate strings using specialised string functions. For example, INSTR() will search a string to see if it contains a particular sub-string, MID$() will extract part of a string from another and VAL() will convert a string of digits into a numeric value that can be stored in a float or integer variable. For more details on these functions, refer to the Functions section of the Micromite User Manual. Displaying text on an LCD Last month we explained how to draw lines, circles etc on an LCD screen but equally important is the ability to display text on screen. This is done with the TEXT command which has the following syntax: TEXT x, y, string, justification, font, scale, colour, back-colour This has a lot of parameters and the following description might sound confusing but we will go through it in stages. First, x and y are the coordinates (in pixels) of where the text is to be positioned on the screen and string is the text that you want to display. justification is a two-letter code which specifies how to align the text, eg, whether it is left justified, centred, right justified etc (more on this later). Editor’s Note: left and right justified are not the correct terms. The proper terms would be left aligned or ragged right and right aligned or ragged left. These terms describe which side of the text is flush and which is “ragged”. font is the font number that should be used (the Micromite can have up to 16 fonts installed) and scale is the magnification factor applied; 1 is the normal font size, 2 doubles its height and width, 3 triples it etc. The last two parameters should be obvious; colour is the colour of the text itself and back-colour is the background colour for the text, ie, the colour for the pixels surrounding the letters. Most of these parameters are optional so you can just use the following to print the word “Hello” near the centre of the screen: TEXT 160, 120, "Hello" PRINT "Hello" “Hello” is a string constant. Note that string constants are always surrounded by double quotes. String variables names use the dollar symbol ($) as a suffix to identify them as a string instead of a normal floating point variable and you can use ordinary assignment to set their value. Here are some examples: Greeting$ = "Hello there" Car$ = "Holden" You can also join strings using the plus symbol (operator): Word1$ = "Hello" Word2$ = "World" Greeting$ = Word1$ + " " + Word2$ PRINT Greeting$ As you may have figured out, this will print “Hello World”. Strings can also be compared using operators such as = (equals), <> (not siliconchip.com.au Fig.1: when you run the demonstration text program, this is what you should see. The word “Hello” is displayed in all four corners of the screen using font 1 (the default built-in font) doubled in size. It demonstrates how the justification parameter can be used to position text. May 2017  41 The justification defaults to left-top (as explained below), the font defaults to font #1, the scale to 1, the colour to white and the background to black. Note that the current default font and colours can be changed in your program to avoid you needing to provide them to every TEXT command. The justification code consists of zero, one or two letters. The first letter can be L, C or R. These specify that the text should be horizontally positioned such that the left edge, centre or right edge is at the specified x coordinate. The second letter is the vertical placement around the y coordinate and can be T for top, M for middle or B for bottom. For example, to perfectly centre the text on a 320x240 pixel screen you can use: TEXT 160, 120, "Centred", CM The 28 and 44-pin Micromite each come with one default font installed while the 64-pin and 100-pin Micromite Plus come with eight fonts. On all of these devices, you can embed additional fonts in your BASIC program, up to a maximum of 16 total. The fonts are numbered from 1 to 16 and this is the number that you use in the TEXT command. The standard font on the 28-pin Micromite (font 1) is rather tiny so you will normally scale it by two or three times. For example, this is the previous example with the text tripled in size: TEXT 160, 120, "Centred", CM, 1, 3 Just to bring this together, the following will print the word “Hello” in all four corners of the screen using font 1 doubled in size (see Fig.1): TEXT 0, 0, "Hello", , 1, 2 TEXT 320, 0, "Hello", R, 1, 2 TEXT 0, 240, "Hello", B, 1, 2 TEXT 320, 240, "Hello", RB, 1, 2 Note that the TEXT command only accepts a string parameter for the text, so if you want to display a number (integer or float), you most convert it to a string first. The most convenient way to do this is with the STR$() function. For example, the following will display 123 in the centre of the screen: spd = 123 TEXT 160, 120, STR$(spd), CM You can always join strings together using the plus character (+) and this is handy when you want to build a string 42  Silicon Chip for the TEXT command. For example: spd = 123 TEXT 160, 120, "Speed: " + STR$(spd), CM Arrays Arrays are something which you will probably not think of as useful at first glance but when you do need to use them, you will find them very handy. An array is best thought of as a large number of variables which are created at the same time with each variable being identified by a number, which is called the index. A good way to think of an array is like the mailbox for an apartment building, where each box is numbered starting from one and each box is identical. An array is created by the DIM command, for example: DIM n(300) This creates an array of 301 elements. Note that in MMBasic, array elements are numbered starting at zero, so this is why there seems to be an extra element, making the total 301. If you want to set element number 100 in this array to (say) the number 876, you would do it this way: n(100) = 876 Arrays can contain floating point numbers, integers or even strings. The index used to access elements of the array need not be a constant number as shown above, it can be a variable which is changed to access different array elements. As an example of how you might use an array, consider the case where you would like to record the temperature for each day of the year and, at the end of the year, calculate the overall average. You could use ordinary variables to record the temperature for each day but you would need 365 of them and that would make your program very unwieldy indeed. Instead, you could define an array to hold the values like this: DIM daily_temp(365) Every day you would need to save the temperature in the correct location in the array (“day” is variable set to the day number): daily_temp(day) = temperature At the end of the year, it is simple to calculate the average for the year: sum = 0 FOR day = 1 TO 365 sum = sum + daily_temp(day) NEXT day PRINT "Average is: " sum/365 This is much easier that adding up and averaging 365 individual variables! The above arrays have a single dimension but you can have multiple dimensions if you wish. Going back to the mailbox analogy, this is similar to each row of mailboxes being for the apartments on a single floor and then having multiple rows, one for each floor. This is similar to a two-dimensional array, where you can identify a single mailbox using two numbers; the floor number and the apartment door number. For example, if you wished to record the temperature over five years you could dimension the array like this: DIM daily_temp(365, 5) The first index is the day in the year and the second is a number representing the year, between 1 and 5. The first element in an array You may note that above, we explained that MMBasic arrays start with element 0 but in the last example, we started indexing the array at index number one. Traditionally, in BASIC, the first element of an array is number one. But in more advanced programming languages, for many good reasons, the first element is normally numbered 0 instead. You can ignore element 0 and use only elements starting with 1, as we did above. However, this is a little wasteful as memory is allocated for element 0, whether or not you use it. If you consistently access array elements starting with index 1, you can save this memory by using the command “OPTION BASE 1” at the top of your program. Accessing element 0 in your program will then cause an error. The DIM command We have mentioned the DIM command above for defining arrays but it can also be used to create ordinary variables. For example, siliconchip.com.au Sample Program: Twinkle Twinkle Little Star The following is a fun little program that fills the LCD screen with a thousand and one twinkling multicoloured points of light (like twinkling stars). It is also a useful demonstration of how arrays can be used. The idea is that we want to fill the screen with lots of illuminated pixels but not too many. If we kept turning on pixels, eventually all of them will be turned on and the screen would look a mushy grey. This means that we must limit the number of pixels on at any time by turning off old pixels to make way for the new ones. And that in turn means that we must track the location of each pixel that we have turned on; a perfect job for arrays. Here it is: CLS DIM X(1000), Y(1000) DO FOR idx = 0 TO 1000 PIXEL X(idx), Y(idx), RGB(BLACK) X(idx) = RND * 320 Y(idx) = RND * 240 R = CINT(RND) * 255 G = CINT(RND) * 255 B = CINT(RND) * 255 PIXEL X(idx), Y(idx), RGB(R, G, B) NEXT idx LOOP We track the coordinate of each pixel that has been turned on using two arrays, “X” for the horizontal coordinates and “Y” for vertical. The variable “idx” is used to step through the elements of each array. The program first turns off the pixel identified by “idx” (sets its colour to black) and then it generates a new pair of random coordinates which are stored in the same location Fig.2: this the result of running the program described in the text, which in the arrays (ie, it overwrites the old pair). fills the LCD screen with a thousand and one twinkling multicoloured These coordinates are then used to turn points of light (like twinkling stars). It is a useful demonstration of how on the pixel at those coordinates with a ran- arrays can be used. dom colour. The method of generating the random coordinates and colours was described in last month’s tutorial. The FOR loop will increment “idx” from zero to 1000, stepping through all the elements (ie, stars) in the arrays. When the FOR loop has finished, the endless DO-LOOP which encapsulates it will then restart the process, erasing the last 1001 pixels set (one at a time) and turning on a new pixel as it erases an old one. This means that the program will run forever turning on and off pixels (remember that you can use CTRL-C to halt the program). When an array is created, MMBasic will automatically set each value to zero. Accordingly, for the first run through the FOR loop, the program will repeatedly set the pixel at coordinates 0, 0 (upper left corner) to black. However, that is not an issue because it was already black and with subsequent loops the program will run as expected, turning off pixels that were previously illuminated. Refer to Fig.2 to see what the result looks like. you can create a number of string variables like this: DIM STRING Car, Name, Street, City Note that because we defined these variables as strings using DIM, we do not need the $ suffix; the definition alone is enough for MMBasic to identify their type. When you use these variables in an expression you also do not need the type suffix, for example: City = "Sydney" You can also use the keyword INTEGER to define integer variables and FLOAT to do the same for floatsiliconchip.com.au ing point variables. This type of notation can also be used to define arrays. For example: DIM INTEGER seconds(200) The advantage of defining variables in this way is that they are clearly defined (generally at the start of the program) and their type (float, integer or string) is not subject to misinterpretation. You can strengthen this by using the following commands at the very top of your program: OPTION EXPLICIT OPTION DEFAULT NONE The first specifies to MMBasic that all variables must be defined using the DIM command before they can be used. The second specifies that the type of all variables must be specified when they are created. Why are these commands important? They avoid common programming errors, for example, if you accidentally misspell a variable’s name. Say your program has the current temperature saved in a variable called Temp but at one point you misspell it as Tmp. This will cause MMBasic to automatically May 2017  43 Now that you know how to write text on the touchscreen, next month we’ll explain how to create on-screen buttons and how to build graphical user interfaces using what you’ve learnt so far. This, plus what you’ve already learnt, will allow you to build projects with more intuitive controls. create a variable called Tmp and set its value to zero. This is obviously not what you intended and it could introduce a subtle error which could be hard to find – even if you were aware that something was not right. On the other hand, if you used the OPTION EXPLICIT command at the start of your program, MMBasic would refuse to automatically create the variable and instead would throw an error, thereby saving you from a probable headache. For small, quick and dirty programs, it is fine to allow MMBasic to automatically create variables but in larger programs you should always disable this feature with OPTION EXPLICIT. When a variable is created, it is set to zero (for float and integers) or an empty string (ie, contains no characters – “”) for a string variable. You can set its initial value to something else when it is created using DIM. For example: DIM FLOAT nbr = 12.56 DIM STRING Car = "Holden", City = "Adelaide" Subroutines A subroutine is a block of program code that is treated as a module and can be called from anywhere within your program. This is effectively equivalent to copying and pasting that code to the location where it is called, except that if you did that, you would have to maintain multiple copies of the code 44  Silicon Chip (and it would waste valuable flash space). A subroutine acts like a builtin command and can be used in the same manner. For example, let’s say you need a command that would drive pin number 14 high for 10ms and then return it to a low state. MMBasic already has a command for this (called PULSE) but let’s say that, for the sake of argument, it didn’t. You could define the subroutine like this: SUB PulsePin14 SETPIN 14, DOUT PIN(14) = 1 PAUSE 10 PIN(14) = 0 END SUB This first command sets the I/O pin as an output (which defaults to being low), then sets it high, waits for 10ms, sets it low again and the subroutine terminates. It does not matter that pin 14 might have already been set to an output (SETPIN will not complain) so this subroutine can be used multiple times without error. In your program, you just use the command PulsePin14 whenever you want to, like a built in MMBasic command. For example: IF A > B THEN PulsePin14 The definition of the PulsePin14 subroutine can be anywhere in the program but typically it is at the start or end. If MMBasic runs into the definition while running your program, it will simply skip over it. This is handy enough but it would be better if you could use it on any I/O pin rather than being limited to pin 14. This can be done by passing a number to the subroutine as an argument (sometimes called a parameter). In this case, the definition of the subroutine would look like this: SUB PulsePin PinNbr SETPIN PinNbr, DOUT PIN(PinNbr) = 1 PAUSE 10 PIN(PinNbr) = 0 END SUB Now, when you call the subroutine, you can supply the pin number on the command line. For example: PulsePin 3 PulsePin 14 PulsePin (x + 1) * 2 This way, the subroutine becomes more generalised and you can use it on multiple I/O pins as we did above. A subroutine can have any number of arguments which can be float, integer or string, with each argument separated by a comma. To define an integer argument, add the suffix % to the argument name and $ for a string (just like when you define variables). Within the subroutine, the arguments act like ordinary variables but they exist only within the subroutine and vanish when the subroutine ends. If any variables with the same name have been defined in the main program, they are simply hidden while siliconchip.com.au LOOKING FOR A PCB? PCBs for most recent (>2010) SILICON CHIP projects are available from the SILICON CHIP On-Line Shop – see the On-Line Shop pages in this issue or log onto siliconchip.com.au/PCBs You’ll also find some of the hard-to-get components to build your SILICON CHIP project, back issues, software, panels, binders, books, DVDs and much more! the subroutine is running (effectively overridden by the parameters) and they re-appear with their previous values when it finishes. Variable name clashes like this are best avoided, however, as it may confuse you and make debugging more difficult. By the way, if you pass a variable to a subroutine and the subroutine changes its value, the change occurs for the calling code too (this is known as “passing arguments by reference”). Local variables Inside a subroutine, you will need to use variables for various tasks. You do not want to accidentally change the value of a variable in the main program if you have forgotten that there is a variable with that name already. To this end, you can define a LOCAL variable within the subroutine. The syntax for LOCAL is identical to the DIM command, which means that the variable can be an array, you can set the type of the variable and you can initialise it to some value. For example, taking our PulsePin command defined above, we might extend it so that it will generate a number of 10ms pulses, each separated by 20ms. Using a local variable, the new subroutine could look like this: SUB PulsePin PinNbr, NbrPulses LOCAL count SETPIN PinNbr, DOUT FOR count = 1 TO NbrPulses PIN(PinNbr) = 1 PAUSE 10 PIN(PinNbr) = 0 PAUSE 20 NEXT count END SUB The variable “count” is declared as local within the subroutine, which siliconchip.com.au means that (like the argument list) it only exists within the subroutine and will vanish when the subroutine exits. You can have a variable called “count” in your main program and its value will not be affected when you use the PulsePin subroutine. Using this new version of our subroutine is similar to the previous examples: IF A > B THEN PulsePin 14, 5 This will generate five pulses on I/O pin number 14 if the value of A is greater than B. You should always use local variables for operations within your subroutine because they help make the subroutine self-contained and portable and you avoid accidentally “clobbering” (unintentionally changing the value of) “global” (ie, non-local) variables. Functions Functions are similar to subroutines with the main difference being that a function can be used in an expression as it evaluates to something (returns a value, such as a number or string). For example, if you wanted a function to select the maximum of two values you could define: FUNCTION Max(a, b) IF a > b Max = a ELSE Max = b ENDIF END FUNCTION Then you could use it in an expression: x = 21 y = 25 PRINT "The highest number is " Max(x, y) The rules for the argument list in a function are similar to that for subroutines. The only difference is that brackets are required around the argument list when you are defining or calling a function (they are optional for subroutines). To return a value from the function, you assign that value to an implicit variable with the same name as the function. If the function’s name is terminated with a type suffix (eg, $ or %) the function will return an integer or string respectively, otherwise it returns a float. For example, if you wanted a function to return the word “high” or “low” for the current state of an I/O pin configured as an input, you could define a function like this: FUNCTION PinState$(PinNbr) IF PIN(PinNbr) = 0 THEN PinState$ = "low" ELSE PinState$ = "high" ENDIF END FUNCTION As you can see, the function name is defined like a string and is used as an ordinary string variable inside the subroutine. It is only when the function returns that the value assigned to the function name is made available to the expression that called it. For example: TEXT 160, 120, "Pin 14 is " + PinState$(14) If pin 14 was low, this would display on the LCD screen the message “Pin 14 is low”. “Black Box” components The above code examples illustrate one of the important benefits of using subroutines and functions – ie, when written and fully tested, they can be treated as a trusted “black box” which does not need to be opened. For example, once you have tested the PulsePin subroutine, you can ignore what is going on inside it and simply use it. Even better, you can copy it to another program and use it there without concern. Subroutines and functions have one entry point and a limited number of exits so they are much easier for a programmer who is not familiar with the program to understand. Remember that after just a few months, this programmer could be you! So you should use subroutines and functions to “package up” portions of code, even if they are only called once in the program. A good example of this is the code needed to set up everything before the maim program starts. If you put this in a subroutine called SetUp it would be obvious to another programmer what it does and he/she can more easily verify that the code in the subroutine is doing what is required. By now you should be well on your way to writing your own programs for the Micromite but we still have a little more to explain. Next month, we delve into creating on-screen buttons, interrupts and introduce some special but handy features of the Micromite. SC May 2017  45 PRODUCT SHOWCASE R&S RTB2000 entry-level oscilloscope for education, R&D and manufacturing The Rohde & Schwarz RTB2000 is the first low-cost oscilloscope to offer touchscreen operation as well as 10-bit vertical resolution. The R&S RTB2000 includes a proprietary 10-bit ADC with 1024 vertical positions, four times the resolution of any other oscilloscope in this segment. The increased resolution enables users to make more precise measurements and can be particularly useful for detecting small signals in the presence of large-amplitude signals. After bandwidth and sample rate, memory depth is the most important attribute that determines an oscilloscope’s ability to handle a large range of troubleshooting tasks. The R&S RTB2000 oscilloscopes feature an industry-leading 10 Msample acquisition memory on each oscilloscope channel, and 20 Msample per channel in interleaved mode. This means ten times more memory than leading instruments in the segment. Users benefit from longer time captures for testing and troubleshooting, providing additional insight into electronic devices. Furthermore, this large standard memory can optionally be further extended to 160 Msample of segmented memory. The R&S RTB2000 series sports an impressive 10.1” capacitive touchscreen. It comes in two and four channel models and offer bandwidths of 70MHz, 100MHz, 200MHz and 300MHz. Base prices start at $1,899 for the 2-channel 70MHz model. Several upgrade Contact: options to extend Rohde & Schwarz (Aust) the instrument’s ca- Unit 2, 75 Epping Rd, North Ryde NSW 2113 pabilities is avail- Tel: (02)8874 5100 able. Website: www.rohde-schwarz.com/au BBC micro:bit compact microcontroller If you’re looking to learn about the world of coding, electronics and creating your own interactive devices – or wanting to give a youngster a head start in the fields of technology and engineering – then order the new BBC micro:bit from Tronixlabs Australia. The micro:bit is a compact microcontroller board with LED matrix, compass, Bluetooth, USB and an accelerometer that can be programmed for all sorts of interactive fun. Originally designed to be distributed to every Year 7 child in the UK, the micro:bit is now available to all – and offers an inexpensive introduction to writing software and electronics. Users create code in one of several web-based environments – or even a smartphone – and then upload the code to the micro:bit for fun and education. They can also create code to have two micro:bits interact with each other, and adding extra sensors or hardware is easy thanks to the contact points on the bottom of the micro:bit. Measuring only 50 x 40mm the micro:bit is the new standard in port46  Silicon Chip able, inexpensive and fun technology education devices. Getting started is easy thanks to numerous tutorials, lessons, videos and a growing global user group. A full range of BBC micro:bit boards and accessories is available in Australia from Tronixlabs, who also welcome education orders – and volume discounts apply. Jaycar’s Duinotech “Green Thumb” garden kit A do-it-yourself Duinotech project especially for garden enthusiasts: it reads soil moisture, temperature and humidity in your garden and sends the data wirelessly to a display, so you can see when your garden needs watering. A range of other sensors is also available. See step-by-step instructions at jaycar.com.au/wireless-garden-monitor Contact: Contact: PO Box 313, Mooroolbark Vic 3138 Fax: (03) 8456 6477 Website: www.tronixlabs.com.au Head Office: 320 Victoria Rd, Rydalmere 2116 Tel: (02) 8832 3100 Web: www.jaycar.com.au Tronixlabs Australia Jaycar Electronics (all stores) siliconchip.com.au How simulation tools and virtual prototypes are helping design engineers lower costs by reducing the need for physical prototypes Many design engineers already know that PSpice® from Cadence is a powerful mixed signal SPICE simulator that lets them create simulation-ready designs faster; with the 35,000+ parts library it ships with including a vast collection of vendor-verified sensors and precision electronics devices. PSpice offers several tools for accurately modelling and simulating these parts using various levels of abstraction; whether architectural, functional, behavioural, gate level, circuit level or physical. One major benefit is that you can explore more ‘what if’ scenarios more quickly and accurately, before committing to a PCB layout or making a prototype board. Recently Cadence has partnered with MathWorks to create an integrated modelling environment in which both a product’s mechanical AND electrical blocks can be simulated simultaneously? This ‘co-simulation’ functionality is of special interest to designers of complex devices (eg medical, IoT, wearable, automotive or aerospace) who need to explore more design options and who would otherwise need to make multiple prototypes of not only every PCB variant, but every product variant containing those PCBs. At the heart of these co-simulation capabilities are two options for PSpice that create the integrate MathWorks/PSpice environment. ‘PSpice SLPS Option’: Lets a PSpice circuit behavioural block run in a Simulink system-level model; and ‘PSpice Systems Option’: Allows full bi-directional data exchange between MATLAB and PSpice, with outcomes including leveraging MATLAB™ Visualization capabilities (such as polar plots) from PSpice, perform PSpice ON SALE NOW! PSpice Designer (PO1520) 80% OFF until June 30 Now only AUD$1,650 (GST incl) PSpice SLPS Option (PO1336) 20% OFF until June 30 Redback Audio gets a new (online) home With the ongoing success and loyal industry support of its “Redback” professional audio/public address equipment, Altronics Distributors, the Perth-based manufacturers of Redback, have decided to give the brand its own web presence, launching the website www.redbackaudio.com.au While many of Altronics’ competitors have shifted production offshore, they take pride in supplying the pro audio industry with innovative, Australian-made product. Initially, the brand was called “Redford”. The brand was relaunched as “Redback” in 1974 as a new, third-generation of amplifier was manufactured. Since the very beginning, the Redback brand has offered innovative solutions for PA contractors, with a strong focus on solving common installation problems that cost considerable time. For instance, the Redback One-Shot speaker, first devised in the late 1990s, has changed the way speakers are installed into ceiling tiles and saved countless hours of installers’ time and money. Redback Audio Contact: products will con- Altronics Distributors/Redback tinue to be available (Head Office): 174 Roe St, Perth WA 6000 through, and backed Tel: 1300 797 007 by, Altronics stores. Web: www.redbackaudio.com.au siliconchip.com.au DC sweeps at multiple temperatures, or doing ‘Hardware in the Loop’ testing for critical new functions in completely reliable simulation environments. Prior to this integrated approach, customers had to simulate their design blocks independently, with no ability to input feedback from one system into the other. However, this partnership now means engineers can simulate complete products within an integrated debug environment. Is this trend playing out locally? In Australia, there’s growing uptake of PSpice and the ‘co-simulation’ options by commercial, research and defence industry groups; with a growing number of universities now offering advanced simulation courses using the Cadence and MathWorks software suites and the PSpice ‘co-simulation’ options. Learn more: www.ecadtools.com.au/specials.html Freeview FV app now available on Android Tablet Watching your favourite TV programs on-the-go has never been easier with Freeview FV and the world-first free-toair TV live streaming app is now available for download on Android tablets. The Android tablet app is available through the Google Play store and adds to the existing iOS iPhone, iPad, and Android phone versions which launched in November last year. Freeview FV delivers live streaming of 20 free-to-air TV channels and the catch-up content from all networks with just one click. Available channels include: ABC, SBS, Seven, Channel 9, TEN, ONE, Eleven, ABC2/ABC KIDS, ABC ME, ABC News 24, SBS VICELAND, Food Network, NITV, 7TWO, 7Mate, 7Flix, Racing.com, 9Gem, 9Go! and 9Life. More live channels will be added as they become available. Meanwhile, Freeview reported 1.2 Billion minutes of TV was streamed last month (March), with free video on demand eclipsing subscription video on demand. More than five million Australians Contact: are now streaming Freeview Australia Ltd free video on de- 44 Avenue Rd, Mosman NSW 2088 mand (FVOD) con- Tel: (02) 8968 7100 tent. Web: www.freeview.com.au SC May 2017  47 Keeping track of your TYRE PRESSURE ...without leaving the car! Do you take the tyres on your car for granted? Being the sole connection between your vehicle and the road, correct inflation is vital for good road holding. If you get a nail or screw in your tyre, how soon will you notice the deflation? By the time it’s obvious, it may already be too late. We review two tyre pressure monitors that will alert you before it becomes too serious. by Nicholas Vinen & Leo Simpson I f you have to take evasive action while driving, the last thing you want is for one of your tyres to lose traction due to under-inflation. In the worst case, this could cause you to spin or fail to avoid an obstacle, leading to a costly and perhaps very dangerous crash. So you need to make sure that you have good tyres on your car, that the tread is not overly worn and that they 48  Silicon Chip are all properly inflated at all times. There are a few different scenarios which lead to either gradual or sudden tyre deflation. Picking up a nail or screw is an obvious one but there are other ways that they can fail such as cracks or tears in the sidewall due to age, impacts with the kerb or manufacturing faults. We’ve seen tyres from what you might consider a reputable brand blow out siliconchip.com.au their sidewalls after just a few days, without any obvious impact or other damage! The key point is that regardless of the reason for the tyre deflation, you need to know right away so that you can pull over and either replace it with your spare tyre (we hope you have a proper one and not one of those silly donut emergency spares!) or have your car towed to a workshop where it can be repaired. Besides avoiding a serious accident, another advantage of finding out early that your tyre is going flat is that it maximises the chance that it can be repaired. Some tyres cost $500 or more to replace, which is something you’d obviously like to avoid, especially if it’s still quite new! If you doubt that figure, take a look online at the price of a high-performance road tyre such as the Michelin Pilot Super Sport in larger sizes. Larger off-road tyres also carry an inflated price tag (pardon the pun!). And we haven’t even mentioned the likely damage to alloy wheels – some fancy/performance types can cost up to $1000 each and even more! Of course, even if none of the above scenarios ever occur with your car, it is still most important that your tyres are always correctly inflated. Even a modest degree of under-inflation will seriously affect your car’s fuel economy. So how will you know a tyre is going flat? If you’re perceptive, you may notice that your vehicle’s handling has become worse but that will only happen once the tyre is already pretty flat. And you probably won’t notice sound or vibration from the tyre until it’s quite far gone. You need a Tyre Pressure Monitoring System (TPMS). Not all TPMSs are created equal Many newer vehicles list a TPMS as one of the features of the car in the brochure but our experience with two such vehicles is that these systems are often very limited in their capabilities. Some have a proper TPMS which will display the four (or even five) tyre pressures in PSI or bar on the dashboard. If your vehicle has this, then you can rest easy, knowing that siliconchip.com.au it should alert you pretty quickly if one starts going flat. But many other vehicles have a much more crude TPMS which works based on wheel rotation sensors (which are also used by the traction and stability control systems). Basically, these work on the principle that if one tyre has much lower pressure than the others, it will rotate at a different rate on average since its circumference has effectively changed. And eventually, by keeping track of the average rotation rate of each wheel, the vehicle should be able to warn you that your tyre pressure is low. You can be pretty sure that you have one of these systems if your vehicle’s feature list includes “tyre pressure monitoring” but you have no pressure readout, only the ability to “reset” the TPMS. These systems have multiple drawbacks, including false warnings if they are not reset periodically, an ill-defined low tyre pressure threshold and an ill-defined time delay between the tyre pressure being low and you receiving an alert. If this is the case, you will be much better off with a proper TPMS which actively monitors the pressure of all wheels and alerts you as soon as any tyre drops below a set threshold. Both of the units we’re reviewing here have this capability (and others) and both cost less than $100. How they work There are two basic types of after-market TPM systems. They work similarly and the main difference is how the sensors are installed. The type we are reviewing here are the easiest to install and these consist of four units that replace the dust caps on the valve stems on your tyres. They are a bit larger and heavier than the dust caps (a few grams each) and they just sort of hang off the stems, so they are best used with tyres that do not have especially long stems. When fitted, they press in the centre of the valve so that the pressurised air is applied to the underside of the sensor. The sensor has a “rubber” O-ring on its underside that May 2017  49 The second model is “solar powered” and sits on the dashboard of the vehicle. This one has been set to read PSI but is otherwise essentially the same. Its sensors (one shown fitted to the valve stem below) are slightly different but operate the same way. forms a seal with the top of the valve stem so that the tyre does not deflate. It has pressure and temperature sensors on its underside and an internal battery for power. These sensors are activated by the g-forces they experience when your wheel rotates, thus consuming no power when the vehicle sits idle. Once activated, they periodically measure the tyre pressure and temperature and transmit it wirelessly (at 433MHz) to a base unit inside the vehicle, where it is displayed. The base unit is programmed to sound an alarm (flash display and beep) if any tyre pressure drops too low or if continuous deflation is sensed. There is another type which we are not reviewing but which is available for a similar price. These work basically the same way except for the way the sensors are fitted. Rather than being screwed onto the valve stems, they are fitted inside the wheel and replace the valve stem. This is a neater solution but it has two major drawbacks: the need to remove the tyres from the wheels to fit the sensors; and the fact that the units are often sealed for life and need to be replaced when the internal cell goes flat after a few years. If you’re going to replace your tyres anyway, or you have the tools to remove and replace the tyres from your rims, then you may want to order a TPMS with internal sensors. They are no more difficult to obtain, the cost is similar and you don’t have to worry about your valve stems or sensors being damaged due to g-forces at high speeds or from damage from impact with kerbs/stones/etc. 1) remove the dust cap 2) screw the security lock nut all the way onto the valve thread 3) place the synthetic rubber O-ring provided over the valve stem until it rests on the lock nut 4) find the sensor labelled for that wheel (FL = front left, etc) 5) screw the sensor tightly onto the valve. You will notice air escaping once the sensor has been screwed in sufficiently to operate the valve but it should stop once you screw it on further and it forms a seal. 6) using the provided spanner, “unscrew” the lock nut behind the sensor until it compresses the O-ring between the nut and sensor. This makes it difficult to remove the sensor (or have it vibrate off) without loosening the nut using that tool. Once all four sensors have been fitted, store the spanner in your vehicle where you can easily find it (in case you need to remove a sensor to reinflate a tyre etc) and then plug the receiver unit into the cigarette lighter socket. In the case of the solar-powered version, simply place it on top of the dashboard where you can see the display clearly and where it will be exposed to sunlight while driving during the day. The system will automatically power up the next time you go for a drive and you can check its operation then. Once you’ve confirmed that it’s operating normally, you can set the over/under pressure warnings and so on, using the two buttons on the unit and the instructions provided. Fitting the TPMS Setting the limits Assuming you’ve purchased one of the models we’ve reviewed (with the external sensors), installation should take less than half an hour. Essentially, the process for each wheel is as follows: The units we purchased had a default setting in “Bar”. If you prefer to think in kPa, conversion is easy: 1 Bar = 100kPa. If, though, you’re like the vast majority of people At left are the four valve “caps” (sensors) from one of the two TPMS sets we purchased online. They are clearly labelled as to which wheel they need to go on (otherwise the cabin display, shown at right, will not show the right wheels). The display, which plugs into the car’s cigar lighter, is quite small, as shown in the dimensions alongside the pic. 50  Silicon Chip siliconchip.com.au Got a mobile phone? The cigar-lighter model incorporates a handy USB (5V) socket so you don’t need a separate phone charger. It even supports fast charging. and haven’t yet been “metric converted” when it comes to tyre pressure, conversion to PSI is a tad more difficult: 1 Bar = 14.5038 PSI. A rough conversion, usually good enough, is 1:15. Fortunately, most systems can be set to read out in PSI. By default, the systems we purchased sound an alarm if the pressure of any tyre drops below 2 bar (29 PSI) or rises above 3 bar (43.5 PSI). These are reasonable limits however if you have high-performance tyres, because they’re quite stiff, you may find the pressure rises significantly on a hot day after some driving and could easily exceed 3 bar if set at cold to say 2.5 bar (36 PSI). You will find that the front tyres get hotter and thus rise in pressure more than the rear tyres while driving, partly because the front brakes do most of the work and thus dissipate more heat than the rear brakes and partly because of the hot air flowing out from the radiator and engine and out from under the engine bay (mid-engined and rear-engined vehicles excepted!). This is normal. Both settings are adjustable using the two pushbuttons on each unit and it’s relatively simple to change the limits to suit your tyres. We found that on our test AWD vehicle with Continental ContiSportContact 3 tyres, the cold pressure (from the dealership) was 2.4 bar (35 PSI) per tyre, rising to around 2.7 bar (~38 PSI) after a long trip on a hot (35°C+) day. So the default pressure limits worked fine on that car. On the other hand, the low-profile Michelin Pilot SuperSport tyres on our rear wheel drive test car started out around 2.6 bar (37 PSI) but the front tyres rose over 3 bar (44 PSI) even during relaxed driving. We put this down both to the type of tyre as well as to the prodigious heat output of the rather large engine in this vehicle but once we had adjusted the upper alarm limit, we had no false alarms. In addition to over- and under-pressure alarms, the unit will also sound an alarm if it detects the pressure in a tyre continuously dropping, indicating a likely puncture. There are also alarms for high tyre temperature (>65°C), indicating imminent tyre failure or low sensor battery. because it lets you see how the tyres warm up as you drive. As they warm up, the pressure will normally rise. There may be a situation where your tyre has a slow leak but because it’s warming up as you drive, the pressure won’t initially drop. So if you notice the temperature of a tyre increasing, without an associated increase in pressure, that might be a sign that you need to pull over and check it. While the cell powering each wheel sensor is necessarily small, due to the efficient design, they should last several years of typical use. Each TPMS unit comes with a tool which allows you to open the waterproof housing of the sensors and replace the cells if and when required (see photo). They use fairly standard button cells (CR1225) which should not be difficult to obtain. One side-benefit of fitting a TPMS is that it seems to greatly reduce the rate at which air leaks out of tyres. On some older vehicles, you may find you need to “top up” your tyres every month or even more frequently to keep them inflated to a proper pressure. We have always assumed this was due to pinholes in the tyres or air leaking around the bead but after fitting a TPMS to an older (~10-year-old) vehicle, we noticed that the tyres held their pressure month after month, suggesting that air was actually leaking out past the valves and the dust caps. Because the TPMS sensors seal the valve stem, you are no longer relying on the integral valve to keep the air in and this appears to be a big (and unexpected) advantage. Another bonus feature we should mention is that the cigarette-lighter powered TPMS we tested has a USB charging port, so you don’t need to unplug it to charge your phone (or whatever). That’s quite handy and it also saves you the cost of purchasing a car charger. It even supports fast charging, while many cheap car chargers don’t. The cigarette-lighter powered TPMS also shows battery voltage which we feel is very handy as it may give you advance warning of an ailing battery or alternator and also makes it easier for you to determine whether you’re driving a “weekend” car often enough to keep its battery charged. Using it Disadvantages Each unit generally also includes a temperature sensor so the tyre temperature is also displayed. This is very handy One of the few disappointments of fitting the systems reviewed here is that neither of them monitor the pres- siliconchip.com.au May 2017  51 sure of your fifth wheel, ie, the spare tyre. This may seem pointless but it isn’t. If you’ve ever had a flat tyre and gone to swap it with your spare, only to find out that it too has gone flat, you will understand! Of course, it’s a good idea to check that your spare tyre is inflated on a regular basis but let’s be honest, how many people actually do that? Most people don’t even check their oil level or windscreen washer reservoir level on a regular basis. So monitoring the spare tyre pressure would be a plus. You could do this with a second monitoring set-up but that’s expensive and inconvenient since you would have to use a double adaptor to power it and where would you put it? The only other criticism we have, really, is that the cigarette lighter powered displays are hard to read during the day. They aren’t that bright and there can be a lot of glare, depending on where you install it; with the type which plugs into the cigarette lighter/accessory socket, you don’t get a lot of choice in that department. We fitted ours with an anti-glare coating that we cut down from one designed for a mobile phone screen, however, this provided limited (albeit visible) benefit. Having said that, since you only really need to check the display periodically (after all, it should make a noise if something is really wrong), you can simply wait until you are stopped and then place your hand over the unit as a shade when you want to read it. It’s quite easy to read at night, though. On the other hand, the solar-powered unit is quite bright and only difficult to read if you are wearing polarised sunglasses. And another advantage of the solar-powered unit is that it will “wake up” with the slightest vibration of the car. That means you can check the tyre pressures without even getting into the car! While the solar-powered unit is sound-activated and its battery always seems to have sufficient charge, the 12Vpowered unit is normally switched on with the ignition. If your accessory socket is always powered, the unit goes into “sleep” mode when not in use and wakes up automatically, or with a button press. Changing the battery or adding air As mentioned earlier, the button cells in the sensors are rated to last for a few years. Their life will depend on how much you drive; if you’re a courier, a taxi driver or have a long commute they might not last for one year but if you only drive on weekends, they may last longer than five years. Happily, changing them is quite easy. The TPMS is supplied with a plastic spanner-like tool which clips into the rear of the sensors and a few rotations will have it apart. As we said, CR1226 batteries (12mm diameter, 2.6mm thick) are a common type of button cell so finding replacements should not be difficult. You will want to keep the metal spanner in your car since if you need to add air to a tyre, you need to undo the anti-theft/anti-vibration nut and then you can simply unscrew the sensor with your fingers. You can then add air as usual and reverse the process to re-attach the sensor. Then again, since the sensors form such a good seal, you probably won’t have to do that very often. Rotating tyres If you rotate the tyres, you can simply remove the four 52  Silicon Chip Included in the TPMS kit you should find a pair of “keys” used to pull the sensor apart to replace the battery. This might not be needed for a few years, so remember where you put the keys! sensors and re-attach them to the correct wheels. However, if you wish to avoid this, you can also use the unit’s pushbuttons to swap the location where two of the sensors are shown on the display. So the “FL” sensor may end up on the front right-hand side of the vehicle and you can then set the display to show the output of that sensor in that position, saving you from physically moving the sensors. Conclusion Given the low cost and ease of installation, we strongly recommend either of these units. If you like the sound of the vehicle-powered device, check that your car has the accessory socket in a position where it won’t get in the way of the controls (eg, gear shift lever) and that there is sufficient clearance to plug the unit in. The solar-powered version should suit just about all vehicles. We also suggest that you check how long your tyre valve stems are and how flexible they are. If you can easily push the valve cap over so that it’s nearly in contact with the rim, you may risk rim and/or sensor damage under hard acceleration/braking if you fit a TPMS as described here. In that case you have three main options: (1) purchase an in-wheel system and have it fitted by your tyre retailer; (2) find or make a stiff (but not totally rigid) tube or foam section to fit over each stem to reduce how much it flexes, or cushion the sensor should it contact the rim or (3) have your valve stems replaced with shorter, more rigid versions. Pricing and availability The two TPMS we have reviewed here are not the only ones available but we think they are among the best. You can find plenty of options, including multiple vendors selling both these systems, on ebay and Ali Express. Most of them are sent from China and are available under $75 including delivery (but note that the free delivery option may take more than four weeks). You can purchase them via the following shortlinks (they will automatically expand in your browser): 12V-powered version: siliconchip.com.au/l/aabt Solar-powered version: siliconchip.com.au/l/aabu SC siliconchip.com.au SIGHT & SOUND TUNE UP YOUR AV ADD SOUND TO YOUR WORKSHOP Just add speaker cable and enjoy listening to your tunes in the workshop. $ 1. 4" INDOOR/OUTDOOR SPEAKERS CS-2475 • Wall or ceiling mountable • Rotates 180° for perfect sound projection • Sold as a pair • 210(H) x 140(W) x 120(D)mm $ 69 95 pr 44 PIECE WALL MOUNTED STORAGE HB-6340 Provides various methods for storage. 28 storage bins in various sizes, 4 assorted tool holders, and 10 pegs for hanging items. • Flexible mounting configuration • 1080(W) x 450(H) x 15(D)mm 1 2. 2 X 50WRMS STEREO AMPLIFIER AA-0488 • Inputs: RCA / 3.5mm stereo • Quality sound delivery of a Class AB amplifier • Includes power supply, two sets of banana plugs, 3.5 to 6.5mm headphone adaptor, 3.5mm to 2 x RCA cable and coiled 3.5mm audio input cable • 78(W) x 150(D) x 50(H) mm Due early May 16 BIN TABLETOP STORAGE ORGANISER 2 3 HB-6341 Provides support for 12 small storage bins, and 4 large storage bins to hold your components, spare parts, small tools, etc. • Magnetic strip for tools • 660(H) x 640(W) x 31(D)mm NERD PERKS CLUB OFFER 15 95 189 $ 3. 3-WAY AUDIO SELECTOR AC-1655 • Three stereo RCA inputs / single RCA output • Easy-to-use pushbutton front panel • 133(W) x 42(H) x 85(D)mm 39 95 $ BUY ALL FOR $ 229 SAVE $45.90 BUNDLE DEAL VALUED AT $274.90 Due early May VGA TO HDMI CONVERTER & UPSCALER AC-1718 DUAL CHANNEL WIRELESS UHF MICROPHONE SYSTEM AM-4132 Ideal for devices with a VGA output (i.e older laptops) to display on a HDMI device. Also converts analogue audio source into HDMI digital stream. • Plug and play • HDMI upscaling up to 1080p • Analogue audio encoding • Power: 5VDC, 500mA • 60(L) x 54(W) x 20(H)mm $ 49 95 WIRELESS INFRARED HEADPHONES TWIN PACK AA-2037 Provides XLR and 1/4” unbalanced outputs for use in any audio desk. Power switch. Low battery indicator. • Channel 1: 525.1MHz/ Channel 2: 645.9MHz • Up to 60m transmission range • Each microphone requires 2 x AA batteries Excellent for listening whilst TV-watching or gaming. Two sets of headphones supplied running from the same transmitter. • 3.5mm connection • Up to 6m tranmission range • No configuration required Due early May $ 89 95 129 $ $ 2 OUTLET 10A POWER GARDEN STAKE - IP44 MS-4097 9 $ 95 $ 29 95 MAINS PLUG AND SOCKET PROTECTOR - IP44 HB-6172 OUTDOOR POWERBOARD ENCLOSURE - IP54 HB-6173 Protect the mains plug and socket from the weather. • Water resistant • Suitable cable: 6.5mm - 9.0mm Dia • 251(W) x 76(H) x 85(D)mm Takes your average mains powerboard. Comes with optional drill holes for M20 or M25 cable glands. • Weather resistant • Suitable cable: 6.9mm - 10.5mm dia • 330(W) x 125(H) x 210(D)mm 4 OUTLET 10A POWER BLOCK - IP44 MS-4086 Versatile and safe way to distribute power in your garden. Spring loaded socket covers. • Water resistant • 1.8m cable length • 395(H) x 147(W) x 70(D)mm 19 95 $ 99 95 Spring loaded outlet covers. Integrated overload protection. • Water resistant • 1.8m cable length • 264(H) x 185(W) x 183(D)mm $ 29 95 NOW AVAILABLE ON OUR WEBSITE Catalogue Sale 24 April - 23 May, 2017 To order phone 1800 022 888 or visit www.jaycar.com.au MAKE YOUR OWN FM RADIO WITH ARDUINO® AUDIO SHIELDS & MODULES This project boasts amazing functionality from just 6 parts, some wires and a little bit of soldering. ACTIVE BUZZER MODULE XC-4424 The easy way to add sound to your project. Hook up a digital pin and ground, and use the tone() function to get your Arduino® beeping. 3 $ 95 MICROPHONE SOUND SENSOR MODULE XC-4438 XC-4629 Includes a small built in amplifier capable of directly driving an 8 Ohm speaker. Ideal if you need to play back a specific sound. Records up to 10 seconds. NERD PERKS CLUB OFFER XC-4482 BUY ALL FOR 74 95 $ SAVE OVER $15 7 XC-4595 SP-0722 SEE STEP-BY-STEP INSTRUCTIONS AT www.jaycar.com.au/duinotech-fm-radio SI4703 FM TUNER BREAKOUT BOARD XC-4595 Based around one of the IC’s commonly used to add FM radio reception to mobile phones and other gadgets, this small module provides a stereo 3.5mm socket for output and is capable of driving headphones directly. LEONARDO MAIN BOARD XC-4430 $29.95 FM RADIO MODULE XC-4595 $24.95 PROTOTYPING SHIELD XC-4482 $15.95 128X128 COLOUR LCD DISPLAY MODULE XC-4629 $15.95 2 X SNAP ACTION KEYBOARD SWITCH SP-0722 $1.45 4.7K OHM RESISTOR PACK RR-0588 $0.55 If you want to build a project that turns MP3s or MIDI files into audio, this is the module you need. Pair with an SD card reader module and Arduino to create your own MP3 player. 24 95 $ $ 34 95 $ 59 95 $ 1695 MUSIC SHIELD XC-4544 Combines all the components you need to build an MP3 player in one shield. Includes MP3 decoder IC (which also does WAV and MIDI), micro SD card slot and control buttons. If you have a MIDI enabled musical instrument, then this shield will let your Arduino control it. You could even use it to build a programmable sequencer. VALUED AT $90.25 $ 95 MP3 RECORDING MODULE XC-4516 MIDI SHIELD XC-4545 WHAT YOU WILL NEED: 9 $ 95 RR-0588 4 $ 95 RECORD & PLAYBACK MODULE XC-4605 Great for any project that needs to detect sounds, XC-4438 has both analogue (for waveform) and digital output with adjustable threshold for simple sound detection. XC-4430 AMPLIFIER MODULE XC-4448 For more volume than XC-4424, connect this module to drive a small speaker (up to 3W). The high efficiency Class D amplifier runs happily off 5V. $ 44 95 LCD & LED DISPLAY MODULES 8 X 8 DOT MATRIX DRIVER MODULE XC-4532 8 X 8 LED DOT MATRIX MODULE XC-4499 Show 1 or 2 digits or a small graphic. Can be daisy-chained for larger displays without using more pins. Display area 32mm x 32mm. Uses 3 pins for data plus 2 for power. Use this module to drive an 8x8 dot matrix display. Driven by shift registers it requires only three inputs, and a power supply. 7 $ 95 FROM $ 2995 LARGE LED DOT MATRIX DISPLAYS Large 32 x 16 pixel LED display for your Arduino to create message boards, clocks, spectrum analysers, games for the home, office, shop, etc. Use a 5V 3A power supply (MP-3480) for full brightness. • 10mm LED pitch • 320(W) x 160(H) x 30(D)mm RED XC-4621 $29.95 WHITE XC-4622 $39.95 BLUE XC-4623 $49.95 5V 3A Power Supply MP-3480 $24.95 also available. Page 54 84 X 48 DOT MATRIX LCD DISPLAY MODULE XC-4616 Monochrome graphical LCD with controllable backlight. Can show up to 6 lines of text or any combination of graphics. Display area 32mm x 22mm. Uses 5 pins for data, 2 for power and 1 for backlight. Ideal for battery powered applications. 16 X 16 LED DOT MATRIX MODULE XC-4607 Can be daisy-chained for larger displays without using more pins. Display area 64mm x 64mm. Uses 8 pins for data plus 2 for power. Good for a small numeric readout or a small graphic. $ 19 95 $ 29 95 128 X 64 DOT MATRIX LCD DISPLAY MODULE I2C RGB DOT MATRIX DRIVER MODULE XC-4498 XC-4617 Monochrome. Shows 4 rows of 16 characters in text mode. Bright but compact display. Display area 71mm x 37mm. Can be run from just 3 Arduino® pins in serial mode, plus 2 for power and 1 for LED if you need to control it. Suitable for the desk or the car. Full colour RGB display driver designed to drive a tri-colour 8 x 8 dot matrix. Driven by an ATMega328p, this module communicates with your project via I2C. $ 29 95 Follow us at facebook.com/jaycarelectronics $ 44 95 Catalogue Sale 24 April - 23 May, 2017 ARDUINO® PROJECT OF THE MONTH MAKE A PICTURE FRAME USING ARDUINO® Impress your friends with this slick home-made digital picture frame using Arduinocompatible parts. It uses just an Uno board and LCD Touch Shield so it's easy to construct. It can then play BMP files from your SD card at your predefined slideshow speed. KIT VALUED AT $72.85 XC-4410 Finished project XC-4630 NERD PERKS CLUB OFFER SEE STEP-BY-STEP INSTRUCTIONS AT www.jaycar.com.au/picture-frame BUY ALL FOR $ 59 95 8 $ 95 Board not included ESP-13 WI-FI SHIELD XC-4614 Uses the powerful ESP8266 IC and has an 80MHz processor. An excellent way to get into the Internet of Things. • Integrated TCP/IP stack • Simple AT command interface with Arduino main board • Can be programmed directly with Arduino IDE (separate programmer needed) • 68 x 52 x 12mm 7 $ 95 FROM 4 $ 50 PC BOARDS - VERO TYPE STRIP Alphanumeric grid, pre-drilled 0.9mm, 2.5mm spacing. 95MM(W) X 75MM(L) HP-9540 $4.50 95MM(W) X 152MM(L) HP-9542 $7.95 95MM(W) X 305MM(L) HP-9544 $11.50 ARDUINO® COMPATIBLE BREADBOARD PB-8820 Mid-sized prototyping breadboard with 400 tie points. • 300 tie points in centre section • 100 tie points on power rails • 83(W) x 55(H)mm 4 8 ECONOMY BREADBOARD JUMPER KIT WH-3032 Solid core hookup cable, ideal size for breadboards. Cut it to required lengths and strip the ends. • 2m each of 5 colours FLEXIBLE LIGHT DUTY HOOK-UP WIRES WH-3000 Quality 13 x 0.12 tinned hook-up wire on plastic spools. 8 different colours available. • 25 metre roll Has 2 x 5V servo ports connected to the Arduino's high-resolution dedicated timer to ensure jitter-free operation.Control up to four DC motors or two stepper motors. • 5V to16VDC • 70(L) x 53(W) x 20(H)mm $ 50 $ 95 $ 49 95 $ 34 95 $ 12 95 MOTOR SERVO CONTROLLER MODULE XC-4472 0.25W CARBON FILM RESISTORS RR-1680 Includes five of virtually each value from 1 Ohm to 10 Meg. Sixty different values. • 300 pieces UNO MAIN BOARD XC-4410 $29.95 240X320 LCD TOUCHSCREEN SHIELD XC-4630 $29.95 8GB MICRO SD CARD AND ADAPTER XC-4983 $12.95 DUINOTECH MEGA XC-4420 Our most powerful Arduino™ compatible board. Boasting more IO pins, more memory, more PWM outputs, more analogue inputs and more Serial ports. • 256kb program memory • ATMega2560 Microcontroller • 108(W) x 53(L) x 15(H)mm ARDUINO® ESSENTIALS TD-2461 Designed to neatly remove copper track on strip type prototyping boards. • 110mm long WHAT YOU WILL NEED: SAVE OVER 15% SEE OTHER PROJECTS AT www.jaycar.com.au/arduino SPOT FACE CUTTER FOR STRIP BOARDS XC-4983 Colours may vary from time to time 5 /roll $ 50 To order phone 1800 022 888 or visit www.jaycar.com.au FREE STACKABLE HEADERS FOR NERD PERKS CARD HOLDERS* Valid with purchase of XC-4614 or XC-4472 * HM-3208 VALUED AT $4.50 See terms & conditions on page 60. Page 55 WORKBENCH ESSENTIALS There has been an obvious resurgence in people getting back to the workbench and reviving skills involving manual dexterity. As you will see across the following pages, Jaycar has all the DIY tools you'll need to equip your workbench so you can create projects from the power of your brain and your hands. $ 1. DESKTOP PCB HOLDER TH-1980 WAS $19.95 • 200(L) x 140(W)mm max holding size • 300(L) x 165(W) x 125(H)mm PCB not included 2. SOLDER FUME EXTRACTOR TS-1580 WAS $69.95 • Designed to remove dangerous solder fumes from the work area • ESD safe • 260(H) x 200(W) x 170(D) 3. 60W SOLDERING STATION ESD SAFE WITH LED DISPLAY TS-1640 • Vented soldering iron stand with integrated sponge and tray • Celsius or fahrenheit temperature display • 60W heating element • 160-480°C temperature range • 160(L) x 104(W) x 124(D)mm NOW 59 95 $ NOW 34 95 SAVE $10 SAVE $10 2 6 4. MAGNIFYING LENS WITH LEDS QM-3537 • Clear 90mm lens illuminated by two LEDs • Requires 2 x AAA batteries 5. 15 PIECE MICRO DRIVER SET TD-2069 • Ergomonic handles • Colour coded for easy identification • 192(L) x 130(W) x 26(H)mm 3 149 $ 6. 12 COMPARTMENT STORAGE CABINET HB-6301 WAS $44.95 • "Double lock" closure on each storage box • 2 x large, 4 x medium & 6 x small compartments • 300(W) x 310(H) x 145(D)mm 5 $ 24 13 95 $ 1 NOW 95 4 9 $ 95 SAVE $10 SAVE UP TO 25% ON THESE WATCH TOOLS FOR NERD PERKS CLUB MEMBERS WATCH BRACELET LINK REMOVER TH-1923 Remove and reinstall the fiddly little bracelet pins. 1.0mm and 0.8mm pin removal insert included. NERD PERKS 29 95 $ 29 95 SAVE $5 NERD PERKS NERD PERKS RRP $14.95 RRP$24.95 1195 19 95 $ $ SAVE $3 SAVE $5 WATCHMAKERS MALLET TH-1927 6 different heads. Ball pein on the opposite end. 185mm long. TWO PIECE WATCH CASE OPENER SET TH-1929 Can open cases 6-50mm dia. NERD PERKS NERD PERKS RRP$24.95 RRP$15.95 SAVE $7 SAVE $4 17 $ 1195 95 49 95 RRP$34.95 Includes case retainer with 18 retaining lugs, a large dusting bulb pump, No. 7 tweezers and fine dusting brush. SAVE $10 NOW SAVE $10 NERD PERKS FOUR PIECE WATCHMAKERS KIT TH-1932 RRP $39.95 $ $ 8 PIECE SCREWDRIVER AND TOOL SET TD-2031 WAS $59.95 Features quality rubber-moulded insulation for in-hand comfort. Includes two Phillips, two slotted, long nose pliers, side cutters, mains test-lamp, and a small roll of PVC electrical tape. • VDE approved to 1000V • Insulated right to the tip BONUS LEATHER TOOL BELT BAG FOR NERD PERKS CARD HOLDERS* Valid with purchase of TD-2031 * HB-6373 VALUED AT $19.95 6 PCE JEWELLER'S SCREWDRIVER SET TD-2023 All metal precision screwdrivers for watchmakers, jewellers, modelmaking or just fixing the sunnies. • Slotted: 1.0, 1.2 & 1.6mm • Phillips: #00, #0 & #1 9 $ 95 $ WRIST WATCH STRAP SPRING BAR ASSORTMENT TH-1928 360 pieces. WATCH CASE HOLDER TH-1934 Adjustable frame. 5 PIECE TORX SCREWDRIVER SET TD-2070 Swivel head for easy use. 20mm blade length. • Torx sizes: T6, T7, T8, T9 & T10 Watch not included Page 56 Follow us at facebook.com/jaycarelectronics $ 12 95 Catalogue Sale 24 April - 23 May, 2017 SPEAKER POLARITY TESTER WITH TONE GENERATOR AA-0414 WAS $29.95 Ideal for troubleshooting and testing audio systems. • Output Range: 0V-8V • Tone generator, speaker polarity and RCA cable tester • 9V speaker popper • RCA or alligator clips • 9V battery required • 100(H) x 65(W) x 23(D)mm SOUND LEVEL METERS $ Measure dB levels, hassle free. Easy operation. NOW 24 95 SAVE $5 $ NOW 39 95 NOW 109 $ SAVE $10 $ SAVE $20 NOW 329 SAVE $50 ROADIES CABLE TESTER AA-0405 WAS $79.95 Simply plug the cable in, turn the rotary switch and test. Faster and much easier than a multimeter. Suitable for any technician working with cables. • Requires 1 x 9V battery • 190(L) x 98(W) x 35(H)mm $ NOW 64 95 SAVE $15 COMPACT DIGITAL PRO SOUND LEVEL METER SOUND LEVEL METER WITH CALIBRATOR QM-1592 WAS $379 MICRO SOUND LEVEL METER QM-1591 WAS $49.95 Ideal for environmental, safety and sound system testing. Extremely compact. ENVIRONMENT METER NOW QM-1591 114 $ QM-1594 WAS $129 Combines the functions of a sound level meter, light meter, humidity meter and temperature meter to help get the job done faster. • 600V, 4000 count • AC/DC voltages up to 250V • AC/DC current up to 10A • Resistance, non-contact voltage measurement • 170(H) x 78(W) x 48(D) QM-1589 WAS $129 Great for car audio installers, clubs and PA. Supplied with carry case and wind sock. Special Features SAVE $15 Pocket sized, min / max hold, backlit LCD Ideal for vehicle traffic or aircraft noise testing, race scrutineering, or any evidence-based noise testing. Includes a calibrator to verify your results. QM-1589 Max hold, data hold, backlit LCD QM-1592 Max hold, Min/Max measurement, AC & DC analogue outputs, Backlit LCD Display 3.5 Digit 3.5 Digit 3.5 Digit Frequency Range 31.5Hz to 8kHz 31.5Hz to 8kHz 31.5Hz - 8kHz Range 40-130dB (±3.0%) 30-130dB (±1.5%) 30-130dB (±1.5%) Weighting A weighted A & C weighted A & C weighted Dimensions 150(L) x 55(W) x 32(D)mm 210(L) x 55(W) x 32(D)mm 278(L) x 76(W) x 50(D)mm 50% OFF SPARE TIP FOR NERD PERKS CARD HOLDERS* Valid with purchase of TH-1862 * TH-1863 VALUED AT $4.95 16 95 $ 1195 $ METAL DESOLDER TOOL TH-1862 12ML SOLDER FLUX PEN NS-3036 Made of lightweight metal and has strong suction. A quick drying, no-clean flux for use when removing or replacing surface mount components. • Dries in 5 to 10mins 200GM DURATECH SOLDER 60% Tin / 40% Lead. Resin cored. 0.71MM NS-3005 $15.95 1.00MM NS-3010 $15.95 250G DUST REMOVER SPRAY CAN NA-1018 14 95 $ Non-CFC, non-flammable. No residue. Non-toxic and non-conductive. 19 95 $ FROM 15 95 ea $ 9/m $ 95 SECURE CORD CARPET CABLE COVER Conceal unsightly cords and eliminate trip hazards. Re-usable over 1000 times, machine washable. Use on any nylon based carpet. 100mm wide. PER METRE: BLACK HP-2000 $9.95/m YELLOW HP-2002 $9.95/m 14 95 ea $ 10M FLUORO STYLUS GAFFER TAPE 25ML J-B WELD EPOXY NA-1518 Bonds to almost any surface. 175G CONTACT CLEANER LUBRICANT NA-1012 Non-CFC. Safe on most plastics. To order phone 1800 022 888 or visit www.jaycar.com.au 11 $ 50 5M ROLL: BLACK HP-2004 $46.95 YELLOW HP-2006 $46.95 High quality waterproof tape with high visibility matte finish. • 24mm wide GREEN NM-2813 $14.95 PINK NM-2815 $14.95 $ 15 95 FLOOR OR WALL CABLE DUCTING HP-1226 Helps conceal messy cables across doorways, along skirting boards or walls. Great for offices or home. • 50mm wide • 1.80m long See terms & conditions on page 60. Page 57 $ NOW 74 95 NOW SAVE $10 HDMI UPSCALERS AC-1741 WAS $84.95 Extract audio from HDMI and output to a 3.5mm socket or S/PDIF for connection to a set of speakers, home theatre audio system or amplifier. • Input: 1 x HDMI • Output:1 x HDMI, 1 x 3.5mm audio socket, 1 x S/PDIF socket • HDCP support • 5V 1A power supply included • 60(L) x 70(W) x 20(H)mm Upscale your analogue VGA or composite AV input to 4K UHD resolution. • 93(D) x 84(W) x 28(H)mm VGA & RCA AUDIO TO HDMI AC-1774 WAS $149 • Inputs: 1 x VGA, 1 x Earphone, 1 x mini USB • Output: 1 x HDMI COMPOSITE AUDIO VIDEO TO HDMI AC-1776 WAS $149 • Inputs: 1 x RCA (Yellow, White, Red), 1 x S-Video, 1 x Mini USB • Output: 1 x HDMI $ NOW 29 95 $ SAVE $10 $ SAVE $30 SAVE $30 HDMI AUDIO EXTRACTOR 4K HDMI TO VGA AND STEREO AUDIO CONVERTER AC-1770 WAS $149 Convert digital 4K UHD HDMI video and audio signal from your Blu-ray player or computer to standard VGA and RCA stereo audio signal for connection with your older style CRT/LED/LED monitors or projectors. • Multiple output resolution setting in OSD menu • Plug and play NOW NOW 59 95 $ SAVE $5 3 WAY OPTICAL SWITCH WITH REMOTE AC-1594 WAS $39.95 99 SAVE $10 DIGITAL TO ANALOGUE AUDIO CONVERTER Connect up to three TOSLINK sources to one TOSLINK input. • Remote control or pushbutton operation • Supports common digital audio formats • 60(W) x 54(D) x 20(H)mm NOW 119 119ea $ AC-1715 WAS $64.95 Converts your digital signal into analogue (RCA) stereo audio. • Accepts either TOSLINK (optical) or digital coaxial input • 63(W) x 42(D) x 26(H)mm ALSO AVAILABLE: ANALOGUE TO DIGITAL AUDIO CONVERTER AC-1716 WAS $64.95 NOW $59.95 SAVE $5 WIRELESS 2.4GHZ DIGITAL AUDIO SENDER AA-2102 WAS $109 Uses a 34 channel frequency hopping transmission so you get seamless crystal clear audio. • Up to 30m range • Includes two audio cables BUILD YOUR OWN SPEAKERS 19 95 $ $ FROM 39 FROM 12 95 $ FROM 1/m 95 $ 20 SPEAKER CABLE BY THE METRE 25MM TITANIUM DOME TWEETER PAPER CONE WOOFERS CT-2007 Produces very crisp and clear high frequencies. Titanium dome with phase shield. • 50WRMS • Nominal impedance: 8 ohms • Frequency response: 2-20kHz Excellent for replacement or for new speaker design constructions. 8” 90WRMS CW-2196 $39.95 10” 225WRMS CW-2198 $64.95 12” 225WRMS CW-2199 $79.95 2 12 50 $ 95 $ LARGE ROUND SPEAKER TERMINAL PT-3004 Top quality speaker terminal. • Up to 16AWG cable • Cut out 50mm 650GSM ACRYLIC SPEAKER DAMPENING MATERIAL AX-3694 • Ideal for speaker boxes • Effective for acoustic treatment in sound rooms and studios • 700(W) x 1000(L) mm LIGHT DUTY WB-1703 $12.95 14/0.14mm.Grey with black trace. HEAVY DUTY WB-1709 $32.95 24/.20mm. Clear with black trace. EXTRA HEAVY DUTY WB-1713 $74.95 79/0.2mm. Clear with white trace. HEAVY DUTY WB-1708 $1.20/m or $89/roll Suited for speaker systems above 150W, 24/0.2mm. Clear with black trace. PRO AUDIO WB-1754 $1.95/m or $165/roll Super flexible. 41/0.16mm OFC. Separate colour-coded 18AWG red and black conductors. JUMBO WB-1732 $4.10/m or $340/roll Top quality. 259/0.12mm strands in each side. Clear with blue trace. NON-POLARISED CROSSOVER CAPACITORS POLYSWITCHES PTC FUSES - SPEAKER PROTECTION Ideal for crossover networks. 100VDC. 1μF RY-6901 $2.10 2.2μF RY-6902 $2.10 3.3μF RY-6903 $2.20 4.7μF RY-6904 $2.20 6.8μF RY-6906 $2.50 10μF RY-6908 $2.50 15μF RY-6910 $2.65 FROM Low cost speaker protection. Polyswitches will protect against electrical (current) overload and will protect speakers in most situations. Other values available. RXE075 60V 1.5A Trip RN-3460 $2.95 RXE250 50V 5.0A Trip RN-3470 $4.50 30M ROLL SPEAKER CABLES See our website for the Speaker Crossover primer. NERD PERKS CLUB MEMBERS RECEIVE: FROM 2 $ 95 EARN A POINT FOR EVERY DOLLAR SPENT AT ANY JAYCAR COMPANY STORE• & BE REWARDED WITH A $25 JAYCOINS GIFT CARD ONCE YOU REACH 500 POINTS! 20% OFF SPEAKER CABLES Conditions apply. See website for T&Cs * * REGISTER ONLINE TODAY BY VISITING: www.jaycar.com.au/nerdperks *Applies only to cables listed on this page. Page 58 2 $ 10 See online or catalogue for trip wattage. Follow us at facebook.com/jaycarelectronics Catalogue Sale 24 April - 23 May, 2017 TECH TIP AMPLIFY, COMBINE OR SPLIT UNDERSTANDING DECIBELS: We often hear about sound being expressed in dB, but did you know there are two common dB variants seen in antenna installation. db (Decibel) A dB figure expresses how a signal changes in strength as it moves through an installation. For example, a Masthead Amplifier might provide a 30dB gain, or a run of coaxial cable might be specified to have a loss of 20dB per 100m. Even devices like splitters will have a dB loss rating because it has to ‘share’ the signal out. The dB values are simply added up along the length of the installation. $ 59 95 $ 89 95 4 OUTPUT TV SIGNAL BOOSTER LT-3253 26dB masthead amplifier suitable for digital, analogue, or HDTV reception. • UHF gain: 26dB • VHF gain: 18dB • 125(W) x 102(H) x 45(D)mm Supports all analogue and digital TV signals. 4 outputs to boost the antenna signal. Includes AC power injector. • UHF gain: 16dB, VHF gain: 12dBB • 105(W) x 90(H) X 35(D)mm 7 $ 95 dbµV (Decibel Microvolt) FOR MORE INFORMATION VISIT THE LINK BELOW: http://bit.ly/jaycardecibels 69 95 UHF/VHF DIGITAL DIGIMATCH VHF/UHF/HDTV TV MASTHEAD AMPLIFIER LT-3275 MASTHEAD AMPLIFIER LT-3270 FROM Whilst dB measures ‘changes’, dbµV is an absolute measure of signal strength (based around 0 dBµV being equal to 1µV). Typically a TV needs a strength of at least 50dBµV at the wall socket. Working backwards through the antenna installation (including boosters, cables and splitters) you can work out the signal strength you need at the antenna itself to account for losses along the way. For example, a simple coaxial cable run of 25m might have a loss of 5dB, meaning at least 55dBµV is needed at the antenna. $ F CONNECTORS DIE CAST TV SPLITTERS Ideal for digital, analogue or HDTV reception. • Adjustable interstage gain on UHF & VHF • AC power adaptor with F-type connection • 112(W) x 108(H) x 35(D)mm FROM 24 95 $ INDOOR AMPLIFIERS/SPLITTERS Split and amplify UHF, VHF or FM signals to Sealed and in a metal case with mounting 4 or 2 other units with these handy amplifier bracket. Suitable from 5-900MHz, VHF, UHF splitters. Features high gain and low noise to ensure the signal is of a high quality. TV and FM radio. • Mains adaptor included 2 WAY LT-3044 $7.95 2 WAY LT-3282 $24.95 4 WAY LT-3045 $9.95 4 WAY LT-3284 $29.95 4 $ 50 14 95 $ $ 54 95 TV AMPLIFIER WITH 4G FILTER LT-3289 Ideal for improving reception on a single TV whilst simultaneously eliminating intereference from mobile phone signals. • Adjustable Gain 20dB • Low Noise 3dB • RF shielded internal metal housing • For indoor use only 19 95 $ INDOOR TV BALUN 75 OHM TO 300 OHM LT-3022 4G/LTE FILTER FOR DIGITAL TV RECEPTION LT-3062 TV ANTENNA SIGNAL FILTER F TYPE LT-3067 Allows connection of any 75 ohm output (video, TV games etc) to a TV with an older style 300 ohm input. Blocks unwanted signals giving you uninterrupted TV reception. In-line coax connection. Designed to fit in-line with an F-type coaxial cable. FL694LP 4G LTE. Fits inside a masthead amp. F59 CRIMP PLUG FOR RG59 PP-0702 INSTALL WITH THE RIGHT GEAR As used by cable TV installers. Foxtel approved. 1 $ 95 1/m $ 80 RG6 75OHM COAX TV CABLE WB-2009 Used by all Pay-TV installers. Quality U.S made Belden brand. 100m roll length. • 18AWG steel centre conductor • Copper plated ALSO AVAILABLE: 30M RG6 COAX CABLE WB-2014 $44.95 9 $ 95 $ 29 95 COMPRESSION CRIMPING TOOL FOR F-TYPE PLUGS TH-1803 Accurately positions the plug, and a spring-loaded clamp holds the cable in position. Ensures easy F-type compression crimps can be performed quickly and easily. • 143(L) x 22(W) x 45(H)mm 14 $ 50 ULTIMATE HEATSHRINK PACK 16PC MIXED HOOK & LOOP CABLE TIES HP-1232 WH-5520 Keep your cables neat and tidy. Assorted sizes from 125 to 180mm. HANDHELD REMOTE 1 length each - 7 different colours in 7 different sizes (1.5mm dia - 20mm). • Sizes: 1.5, 3, 5, 6, 10, 16 & 20mm To order phone 1800 022 888 or visit www.jaycar.com.au CONTROLLER LR-8827 Now you can afford more than one remote for garage door, gates, alarms, etc. 19 95 $ ROTARY COAX STRIPPER TH-1820 Handy stripper that will strip the outside jacket and inner conductor in one operation. Simply rotate the stripper clockwise around the cable 3 to 6 times. Quality stripper suited to installers. • Suitable for RG58/59/62/6 and 3C2V 75 ohm cable FROM 2 $ 45 CABLE CLIPS - PK25 • High-density polyethylene plastic • Galvanised high carbon steel nails 3MM(H) X 5MM(W) HP-0680 $2.45 5MM(H) X 7MM(W) HP-0692 $2.95 See terms & conditions on page 60. 1 $ 95 F-59 WATERPROOF COMPRESSION PLUG PP-0708 F-59 line plug for RG6 quad shield cable. Foxtel approved. 75 OHM TV FLOOR SOCKET WITH F59 CONNECTION LT-3063 Designed to mount on the skirting board or floor. Mounting screws included. 3 $ 95 6 $ 95 TV WALL PLATE FOXTEL®APPROVED LT-3041 Splits foxtel signal to two outlets. Page 59 CLEARANCE Limited stock. Not available online. Contact store for stock availability. NOW 9 $ 95 $ SAVE $5 NOW 29 95 $ SAVE $5 NOW 49 95 $ NOW 64 95 SAVE $15 SAVE $10 SECURE CLIP ON EARPHONES COAXIAL TO TOSLINK DIGITAL AUDIO CONVERTER 5 INPUT HDMI SWITCHER WITH REMOTE CONTROL AA-2023 WAS $14.95 AC-1599 WAS $34.95 AC-1706 WAS $59.95 RECHARGEABLE HEADPHONES WITH NFC AND BLUETOOTH®TECHNOLOGY AA-2124 WAS $79.95 $ NOW 69 95 $ SAVE $20 NOW NOW 79 95 $ SAVE $20 UHF WIRELESS GUITAR TRANSMITTER AND RECEIVER CS-2462 WAS $89.95 AM-4109 WAS $99.95 NOW NOW 129 129 $ $ SAVE $30 HDMI TO 3G SDI CONVERTER AC-1729 WAS $109.00 ALSO AVAILABLE: 3G SDI TO HDMI CONVERTER AC-1727 WAS $109 NOW $89 SAVE $20 NOW 149 $ SAVE $40 SAVE $20 $ SAVE $20 IN-CEILING 2 WAY 6.5" SPEAKER IN CAN HOUSING NOW 119 89 6X9" KEVLAR COAXIAL SPEAKER WITH SILK DOME TWEETER CS-2403 WAS $149 $ SAVE $50 NOW 449 SAVE $70 HDMI DISPLAY RECEIVER PORTABLE 8" AMPLIFIED 2 WAY PA SPEAKER 2 X 75WRMS COMPACT STEREO AMPLIFIER 2 CHANNEL DUAL DIVERSITY UHF MICROPHONE AR-1914 WAS $149 CS-2482 WAS $169 AA-0505 WAS $199 AM-4170 WAS $519 AUSTRALIAN CAPITAL TERRITORY HEAD OFFICE 320 Victoria Road, Rydalmere NSW 2116 Ph: (02) 8832 3100 Fax: (02) 8832 3169 ONLINE ORDERS Website: www.jaycar.com.au Email: techstore<at>jaycar.com.au FREE CALL ORDERS: 1800 022 888 JAYCAR ALTONA 300 MILLERS RD (OFF CABOT DRIVE), ALTONA NORTH VIC PH: 03 9399 1027 Belconnen Fyshwick Ph (02) 6253 5700 Ph (02) 6239 1801 Tuggeranong Ph (02) 6293 3270 NEW SOUTH WALES Albury Alexandria Ph (02) 6021 6788 Ph (02) 9699 4699 Bankstown Blacktown Bondi Junction Brookvale Campbelltown Castle Hill Coffs Harbour Croydon Dubbo Erina Gore Hill Hornsby Hurstville Maitland Mona Vale Newcastle Penrith Port Macquarie Rydalmere Shellharbour Smithfield Sydney City Taren Point Tuggerah Tweed Heads Wagga Wagga Warners Bay Ph (02) 9709 2822 Ph (02) 9672 8400 Ph (02) 9369 3899 Ph (02) 9905 4130 Ph (02) 4625 0775 Ph (02) 9634 4470 Ph (02) 6651 5238 Ph (02) 9799 0402 Ph (02) 6881 8778 Ph (02) 4367 8190 Ph (02) 9439 4799 Ph (02) 9476 6221 Ph (02) 9580 1844 Ph (02) 4934 4911 Ph (02) 9979 1711 Ph (02) 4968 4722 Ph (02) 4721 8337 Ph (02) 6581 4476 Ph (02) 8832 3120 Ph (02) 4256 5106 Ph (02) 9604 7411 Ph (02) 9267 1614 Ph (02) 9531 7033 Ph (02) 4353 5016 Ph (07) 5524 6566 Ph (02) 6931 9333 Ph (02) 4954 8100 Warwick Farm Wollongong Ph (02) 9821 3100 Ph (02) 4225 0969 QUEENSLAND Aspley Browns Plains Burleigh Heads Caboolture Cairns Caloundra Capalaba Ipswich Labrador Mackay Maroochydore Mermaid Beach Nth Rockhampton Redcliffe Strathpine Townsville Underwood Woolloongabba Ph (07) 3863 0099 Ph (07) 3800 0877 Ph (07) 5576 5700 Ph (07) 5432 3152 Ph (07) 4041 6747 Ph (07) 5491 1000 Ph (07) 3245 2014 Ph (07) 3282 5800 Ph (07) 5537 4295 Ph (07) 4953 0611 Ph (07) 5479 3511 Ph (07) 5526 6722 Ph (07) 4922 0880 Ph (07) 3554 0084 Ph (07) 3889 6910 Ph (07) 4772 5022 Ph (07) 3841 4888 Ph (07) 3393 0777 VICTORIA Altona Brighton Cheltenham Coburg Ferntree Gully Frankston Geelong Hallam Kew East Melbourne City Melton Ph (03) 9399 1027 Ph (03) 9530 5800 Ph (03) 9585 5011 Ph (03) 9384 1811 Ph (03) 9758 5500 Ph (03) 9781 4100 Ph (03) 5221 5800 Ph (03) 9796 4577 Ph (03) 9859 6188 Ph (03) 9663 2030 Ph (03) 8716 1433 Mornington Ringwood Roxburgh Park Shepparton Springvale Sunshine Thomastown Werribee Ph (03) 5976 1311 Ph (03) 9870 9053 Ph (03) 8339 2042 Ph (03) 5822 4037 Ph (03) 9547 1022 Ph (03) 9310 8066 Ph (03) 9465 3333 Ph (03) 9741 8951 SOUTH AUSTRALIA Adelaide Clovelly Park Elizabeth Gepps Cross Modbury Reynella Ph (08) 8221 5191 Ph (08) 8276 6901 Ph (08) 8255 6999 Ph (08) 8262 3200 Ph (08) 8265 7611 Ph (08) 8387 3847 WESTERN AUSTRALIA Belmont Bunbury Joondalup Maddington Mandurah Midland Northbridge O’Connor Osborne Park Rockingham Ph (08) 9477 3527 Ph (08) 9721 2868 Ph (08) 9301 0916 Ph (08) 9493 4300 Ph (08) 9586 3827 Ph (08) 9250 8200 Ph (08) 9328 8252 Ph (08) 9337 2136 Ph (08) 9444 9250 Ph (08) 9592 8000 TASMANIA Hobart Kingston Launceston Ph (03) 6272 9955 Ph (03) 6240 1525 Ph (03) 6334 3833 NORTHERN TERRITORY Darwin Ph (08) 8948 4043 TERMS AND CONDITIONS: REWARDS / NERD PERKS CARD HOLDERS FREE GIFT, % SAVING DEALS, DOUBLE POINTS & MEMBERS OFFERS requires ACTIVE Jaycar Rewards / Nerd Perks Card membership at time of purchase. Refer to website for Rewards/Nerd Perks Card T&Cs. PAGE 1: Nerd Perks Card holders receive the Special price of $229 for Add Sound To Your Workshop deal, applies to CS-2475, AA-0488 & AC-1655 when purchased as bundle. PAGE 2: Nerd Perks Card holders receive the Special price of $74.95 for the make Your Own FM Radio Project, applies to XC-4430, XC-4595, XC-4482, XC-4629, SP-0722 & RR-0588 when purchased as bundle. PAGE 3: Nerd Perks Card holders receive the Special price of $59.95 for the Picture Frame Project, applies to XC-4410, XC-4630, & XC-4983 when purchased as bundle. Nerd Perks Card holders receive double points with the purchase of WH-3000, TD-2461, HP-9540, HP-9542, HP-9544, RR-1680, PB-8820 & WH-3032. Nerd Perks Card holders receive FREE HM-3208 Stackable Headers valid with purchase of XC-4614 or XC-4472. PAGE 4: Nerd Perks Card holders can SAVE UP TO 25% on Selected Watch Tools, applies to TH-1923, TH-1927, TH-1928, TH-1932, TH-1929 & TH-1934. Nerd Perks Card holders receive BONUS Leather Tool Belt Bag valid with purchase of TD-2031. PAGE 5: Nerd Perks Card holders receive 50% OFF Spare Tip TH-1863 valid with purchase of TH-1862. Nerd Perks Card holders receive double points with the purchase of TH-1862, NA-1518, NS-3036, NA-1018, NA-1012, NS-3005, NS-3010, NM-2813 & NM-2815. PAGE 6: Nerd Perks Card holders receive 20% OFF on Selected Speaker Cables applies to WB-1703, WB-1709, WB-1713, WB-1708, WB-1754 & WB-1732. Arrival dates of new products in this flyer were confirmed at the time of print but delays sometimes occur. Please ring your local store to check stock details. Occasionally there are discontinued items advertised on a special / lower price in this promotional flyer that has limited to nil stock in certain stores, including Jaycar Authorised Stockist. These stores may not have stock of these items and can not order or transfer stock. Savings off Original RRP. Prices and special offers are valid from Catalogue Sale 24 April - 23 May, 2017. Build the Microbridge a cheap universal PIC32 programmer combined with a USB/serial converter The Microbridge is primarily intended for use with the Micromite and includes the necessary USB/serial converter. You can manipulate the PIC32 from your PC, program any PIC32 microcontroller and the USB/serial converter can be used with many other processors including those on Arduino or Raspberry Pi. By Geoff Graham T he Micromite microcontroller, which has featured many times on our pages, requires a USB/serial converter to load, edit and run the program (unless you purchased a preprogrammed chip). We previously recommended devices based on the CP2102 for this job. They are cheap and convenient yet you still needed a PIC32 programmer so that you could update the Micromite firmware. Firmware updates for the Micromite are released regularly and usually Microbridge credits The Microbridge is the result of an international collaboration. • Peter Mather in the UK wrote the firmware for the PIC16F1455 and wrote the BASIC program for programming a PIC16F1455 using a Micromite (see panel on programming). • Serge Vakulenko in the USA wrote pic32prog. • Robert Rozee in New Zealand wrote the ASCII ICSP interface for pic32prog. • MicroBlocks (a company in Thailand) developed the original concept of using the PIC16F1455 as both a USB/serial converter and programmer but did not publish their code for copyright reasons. siliconchip.com.au provide worthwhile new features and bug fixes so it is definitely an advantage having access to a PIC32 programmer. But now you don't need the separate PIC32 programmer. Instead, the Microbridge combines the USB/ serial interface and PIC32 programming features in a single package. It is easy to build and uses a low-cost 14-pin chip. In fact, the Microbridge is so economical and convenient that it makes sense to permanently attach it to your REG 1 MCP1700-3302E +5V GND 10 F +3.3V OUT IN 10 F POWER AND SERIAL CON2 100nF +3.3V MINI USB TYPE B CON1 1 2 3 X 4 +5V +3.3V RX TX 1 +V 5V 12 13 4 8 9 1k 10 MODE S1 D–/RA1 11 IN CIRCUIT SERIAL PROGRAMMER (ICSP) CON3 5 RC5/RX IC1 PIC16F PIC 1 6F1 14 4 55 6 D+/RA0 MCLR/RA3 RC4/TX RC2/SDO/AN6 AN7/RC3 RC1/SDA PWM2/RA5 RC0/SCL/AN4 A LED1 VUSB3V3 GND  AN3/RA4 7 1 MCLR 2 VDD 3 GND PGD 0V PGC 14 K MC P1700 LED1 SC  20 1 7 MICROBRIDGE K A IN OUT GND Fig.1: the Microbridge consists of a Microchip PIC16F1455 microcontroller, a voltage regulator and a few passive components. The PIC16F1455 is ideally suited to this task because it requires few external components and can automatically tune its internal clock to the host's USB signal timing. May 2017  61 1 13 28 21 CON2 PC OR LAPTOP, ETC. 16 22 17 2 18 3.3V 15 5V RX TX MICROBRIDGE DATA FROM MICROMITE DATA TO MICROMITE GND CON3 MCLR USB CON1 VDD GND PGD PGC 25 4 5 3 23 28-PIN MICROMITE 24 6 7 9 26 10 20 11 14 12 Fig.2: how to connect the Microbridge to a 28-pin Micromite which is also powered by the Microbridge. The Microbridge works as a USB-to-serial converter by emulating a standard serial port over the USB connection to a desktop or laptop computer. Micromite. With that in mind, we have designed a new version of the Micromite LCD Backpack with the Microbridge integrated which is featured on page 84 of this issue. The development of the Microbridge and the associated software was a truly international effort with contributions from New Zealand to the USA (see the side box for the details). Circuit details Referring to Fig.1, you can see that the Microbridge consists of just a Microchip PIC16F1455 microcontroller, a voltage regulator and a few passive components. The PIC16F1455 is ideally suited to this task because it requires few external components, since it includes the USB transceiver and it does not require a crystal oscillator. Many devices with a USB interface require a crystal oscillator to ensure that the timing of the USB signals meets the strict timing requirements of the USB standard. However, the PIC16F1455 has a feature that Microchip calls Active Clock Tuning. This allows the PIC16F1455 to use the host's USB signals (which presumably are derived from a crystal oscillator) to automatically tune its internal R/C oscillator to the precision required by the standard. As a result, a crystal is not required and this helps keep the circuit simple and the cost down. The PIC16F1455 can run on a supply voltage of 2.3-5.5V and also 62  Silicon Chip includes its own 3.3V regulator for powering its USB transceiver (USB uses 3.3V signal levels). This means that we could directly power the PIC16F1455 from the USB 5V supply but then we would need level converters for the signal lines that go to the PIC32 processor (which runs from 3.3V). For that reason, we've included a lowcost 3.3V regulator (REG1, MCP1700) for powering the PIC16F1455 and we are ignoring its internal regulator. A side benefit of this approach is that this 3.3V supply has spare current capacity so it can also be used to power an attached Micromite chip. The serial interface is made available on CON2 and includes the 5V USB power and the 3.3V from our onboard regulator. By default, the serial interface runs at 38400 baud which is also the default used by the Micromite's console interface. The programming interface is on CON3 and this provides the six standard I/O pins used for In-Circuit Serial Programming (ICSP) on Microchip products. These are: Pin 1: MCLR/Vpp – this is the reset pin for the PIC32 chip and is driven low by the Microbridge. It is also used to force the PIC32 into programming mode. On other PICs, this pin is also used as a programming voltage source of around 15V but the PIC32 generates this internally. Pin 2: Vdd – normally, this is used to detect the power supply voltage 47 F 16V TANT 8 19 27 for the PIC32 but on the Microbridge it is not used. Pin 3: GND – the ground connection which must go to Vss (ground) on the PIC32. Pin 4: PGD – the programming data pin which is bidirectional so that data can be sent to the PIC32 then read back by the Microbridge's firmware to verify that programming has been successful and no errors have been introduced. Pin 5: PGC – the programming clock signal, generated by the Microbridge to synchronise the transfer of data on the PGD line. Pin 6: NC – not connected in most ICSP devices. The Microbridge is switched into programming mode by using pushbutton switch S1 and LED1 flashes to indicate serial traffic or it lights up continuously when in programming mode. USB/serial mode USB/serial mode is the default when power is applied. In this mode, the Microbridge works as a USB to serial converter in that it emulates a standard serial port over USB and converts the signal to a standard TTL level serial interface for the Micromite or another processor. From an operating system viewpoint, the Microbridge imitates the Microchip MCP2200 USB/serial converter. Windows 10 is delivered with the correct driver for this device already installed but for other operating systems, you may need to load a driver siliconchip.com.au 13 10k 28 16 1 CON2 PC OR LAPTOP, ETC. 3.3V +3.3V 21 17 22 18 2 15 5V RX 25 TX MICROBRIDGE GND CON3 MCLR USB CON1 VDD GND PGD PGC 4 3 28-PIN MICROMITE 23 5 24 6 7 9 26 10 20 11 14 12 Fig.3: how to program a 28-pin PIC32 chip using a direct connection from the Microbridge. In this example, the PIC32's 3.3V power supply is supplied separately but this power can also be provided by the Microbridge (from CON2). and these can be found on the Microchip website at www.microchip.com/ wwwproducts/en/MCP2200 With the correct driver loaded, the Microbridge appears as a standard serial port on your computer. For example, in Windows it will appear as COMxx where xx is some number allocated by Windows. To discover this number you can use Device Manager and look under "Ports (COM & LPT)" for the Microbridge which will be labelled "USB Serial Port (COMxx)", where xx is the serial port number (eg, COM6). You can then start your terminal emulator (eg, Tera Term) and specify this COM number in the setup menus. By default, the Microbridge operates at 38400 baud with 8-bit data, one stop bit and no parity, which are the standard settings used by the Micromite's console. However, you can change the baud rate to any standard speed from 300 to 230400 (ie, 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 76800, 115200 or 230400 baud) in the terminal emulator. Fig.2 shows how to connect the Microbridge to a 28-pin Micromite which is also powered by the Microbridge. When a character is sent or received by the Microbridge, LED1 flashes briefly. This is a handy visual clue that the device is working correctly. One point to note: TX (transmit) from the Microbridge must go to the RX (receive) on the Micromite and similarly the TX on the Micromite must connect to the RX on the siliconchip.com.au Microbridge. This is logical when you think about it as signals transmitted by one device must be received by the other. If you connect pin 1 of CON3 (the programming connector) to the MCLR (reset) pin of the Micromite, you can also use the Microbridge to remotely reset the Micromite. This is done by sending a serial break signal to the Microbridge. In Tera Term this is accomplished by pressing ALT-B or via the Tera Term menu. Another way of generating a reset is to press and hold the mode switch on the Microbridge for two or more sec- 47 F 16V TANT 8 19 27 onds. LED1 will flash and the MCLR line will be briefly driven low to effect the reset. Programming mode CON3 on the Microbridge (the ICSP socket) is compatible with the connector used on the Microchip PICkit 3 programmer so the Microbridge can plug into any programming connector intended for the PICkit 3. For example, the Microbridge can plug directly onto the programming connector on the original Micromite LCD Backpack (see the accompanying photograph on the next spread). Fig.4: This screenshot shows the complete operation of pic32prog. It uploads the hex file to the Microbridge, which programs it into the PIC32 and subsequently reads back the programmed data to verify that the programming operation completed correctly. May 2017  63 1 1 100nF 10 F Fig.5: PCB component overlay diagram for the Microbridge. The USB socket is the only SMD component. IC1 may be mounted in a socket. We prefer SMD ceramic capacitors to Tantalum due to their longer life however you can use through-hole (tag) Tantalum capacitors. REG1 Mode CON3 ICSP 1 CON2 24104171 A 10 F USB 1k IC1 PIC16F1455-I/P LED1 3V3 5V RX TX GND CON1 S1 1 Microbridge Alternatively, if you wish to program a 28-pin PIC32 chip using direct connections, Fig.3 shows how to do this. The PIC32's 3.3V power supply can be supplied separately or this power can be provided by the Microbridge via CON3. To enter programming mode, momentarily press and release mode switch S1 and LED1 will illuminate to indicate that programming mode is active. If you accidently pressed this switch and did not want to enter programming mode, cycle the power on the Microbridge or press and hold down S1 for two seconds; either way, this will return you to the default USB/ serial mode. To program a PIC32 via the Microbridge, use a program called pic32prog written by Serge Vakulenko in California. This is a Windows program and it can be downloaded from the Silicon Chip website or from GitHub (https://github.com/sergev/pic32prog). pic32prog must be run from the command prompt in Windows and the command line that you need to use is: pic32prog -d ascii:comxx yyyy.hex Where xx is the COM port number created by Windows for the Microbridge and yyyy.hex is the file containing the firmware that you want to program into the PIC32. For example, if your Microbridge was allocated the virtual serial port of COM12 and the file that you wanted to program was "firm.hex", the command line that you should use would be: pic32prog -d ascii:com12 firm.hex When you press enter, pic32prog will automatically upload the hex file to the Microbridge, program it into the PIC32 then read back the programmed data to verify that the programming operation was executed correctly. Fig.4 shows the output of this operation. At the completion of the programming operation, LED1 switches off and the Microbridge will revert to operating as a USB/serial converter. You can then start up your terminal emulator, connect to the Microbridge and run your program. A common cause of programming errors is that pic32prog cannot access the serial port on your computer because you have not closed the terminal emulator that you were previously using to access the Microbridge. So, make sure that you close your terminal emulator before you run pic32prog. Construction The Microbridge uses fewer than a dozen components and all except the USB socket are through-hole types so construction should take less than half an hour. The component overlay diagram is shown in Fig.5. Start with the USB socket as this is the only surface-mount component. On the underside of the socket, there should be two small plastic pegs which match corresponding holes on the PCB and these will correctly locate the socket. Once it is in place, solder the connector's mounting lugs first using plenty of solder for strength then, using a fine point soldering iron tip, solder the signal pins. Carefully check the pin soldering under a good light and with magnification and clean up any solder bridges using solder wick with a little added flux paste to make it easier. The remaining components are easy to fit and should be soldered starting with the low-profile items such as resistors and ending with the high profile components such as the connectors. Two of the capacitors and the LED are polarised so pay attention to their mounting orientation. We did not use an IC socket for IC1 because we had programmed and tested it beforehand but a socket is recommended and is handy if you suspect a fault and want to swap out the IC for testing. For CON2 (the serial I/O and power) connector, we mounted a five pin header on the underside of the board so that it could easily plug into a solderless breadboard for prototyping with the Micromite but you could use a different arrangement, for example, flying leads. The right-angle six pin socket used for the ICSP programmer output (CON3) can be difficult to find so you can do what we did and purchase a straight six pin socket intended for Arduino boards and bend the pins to Are Your S ILICON C HIP Issues Getting Dog-Eared? REAL VALUE AT $16.95 * PLUS P & P Keep them safe, secure & always available with these handy binders Order now from www.siliconchip.com.au/Shop/4 or call (02) 9939 3295 and quote your credit card number. *See website for overseas prices. 64  Silicon Chip siliconchip.com.au 90° so that the socket can mount flush to the PCB. See the parts list for suitable components. Testing There is not much to go wrong with the Microbridge, so if it does not work the first time you should first re-check the driver installation on your PC. Do you have the right driver, is it installed correctly and do you have the right COM port number? In normal USB/serial mode, the Microbridge will draw about 8mA and any reading substantially different from this indicates an assembly error. A handy test feature is that when you press a key in your terminal emulator, LED1 on the Microbridge should flash. Another test that you can make is to short the TX and RX pins on CON2 and as you type characters into the terminal emulator, you should see them echoed back to the terminal emulator. Parts List 1 double-sided PCB coded 24104171, 50mm x 22.5mm 1 Mini Type-B USB socket, horizontal SMD USB 2.0 (Altronics P1308) 1 PCB-mount SPST momentary tactile switch with 4.3mm actuator (S1) 1 14-pin DIL IC socket (for IC1) 1 6-pin 90° female socket, 2.54mm pitch OR 1 6-pin female socket, 2.54mm pitch, with pins bent through 90° (Altronics P5380, Jaycar HM3208) 1 5-pin vertical header, 2.54mm pitch Semiconductors 1 PIC16F1455-I/P* microcontroller programmed with 2410417A.HEX (IC1) 1 MCP1700-3302E/TO 3.3V linear regulator (REG1) 1 3mm red LED (LED1) Resistors (5%, ¼W) 1 1kW Capacitors 2 10µF 16V tantalum or X5R SMD ceramic (3216/1206 size) 1 100nF 50V multi-layer ceramic * PIC16LF1455-I/P or PIC16(L)F1454-I/P are also suitable CON3 on the Microbridge (the ICSP socket) is compatible with the connector used on the Microchip PICkit 3 programmer so the Microbridge can plug into any programming connector intended for the PICkit 3. For example, the Microbridge can plug directly onto the programming connector on the Micromite Plus LCD BackPack, as shown above. The Micromite Plus LCD BackPack plugged into the PICkit 3 for comparison is shown at right. siliconchip.com.au May 2017  65 Programming the PIC16F1455 The Microbridge uses a PIC16F1455 which acts as a PIC32 programmer to load the firmware into your blank PIC32 microcontroller, for example, to make it into a Micromite. This sounds great because now you do not need a PIC programmer. Or do you? The problem now is getting the Microbridge’s firmware into the PIC16F1455. One option is to purchase a pre-programmed PIC16F1455 from the Silicon Chip Online Shop. But if you already have at least one Micromite, you can program the PIC16F1455 yourself using just the Micromite and a standard 9V battery. It is easy to do and will only take 30 seconds. Then, once you have the PIC16F1455 programmed, you can use it to program as many other Micromites as you want! To get started, wire up the PIC16F1455, the Micromite and the 9V battery as shown in Fig.6. The best way to do this is on a solderless breadboard or a strip of perforated prototyping board. The battery can be a standard PP3 9V battery and this is used to provide the programming voltage for the PIC16F1455. Only a few milliamps will be drawn from it and as long as its terminal voltage is 8V or greater it will do the job. The switch used to connect the battery can be as simple as a lead with an alligator clip that can be clipped onto the battery’s positive terminal. +3.3V 1 +V 12 13 S1 4 5 9V BATTERY 6 10k 7 11 RESET VUSB3V3 D–/RA1 RC1/SDA D+/RA0 RC0/SCL 9 10 PIC16F PIC 1 6F1 14 4 55 RC2/SDO/AN6 RC4/TX PWM2/RA5 RC3/AN7 AN3/RA4 4 5 9 MCLR/RA3 RC5/RX 3 8 MICROMITE RUNNING MMBASIC V5.0 OR LATER 10 2 3 0V 14 Fig.6: if you already have a Micromite, you can program the PIC16F1455 for the Microbridge yourself using it along with a standard 9V battery. Connect them to the PIC16F1455 as shown in this circuit. The program running on the Micromite will prompt you when to connect and disconnect the battery. Fig.7: this screenshot shows the complete programming operation for a PIC16F1455 using a Micromite and a standard 9V battery. The program running on the Micromite is “MicrobridgeProg.bas”. 66  Silicon Chip The Micromite used for the programming operation can be any version of the Micromite family (ie, a 28-pin Micromite to a 100-pin Micromite Plus) so long as it is running version 5.0 or later of MMBasic. Pins 4 and 5 on the Micromite are used to load the firmware into the PIC16F1455 and all versions have these two pins free. If for some reason your one does not, you can edit the BASIC program to change the pin assignments (they are defined at the very start of the program). With everything connected, load the BASIC program MicrobridgeProg.bas into the Micromite. This program can be downloaded for free from the Silicon Chip website or the author’s website (geoffg.net/ microbridge.html). It will work with all chips that are supported by the Microbridge firmware (16F1455, 16F1454, 16LF1454 or 16LF1455). This program was written by Peter Mather of the UK who also developed the Microbridge’s firmware. Make sure that the 9V battery is disconnected and run the BASIC program on the Micromite. From there, it is just a case of following the program’s on-screen instructions which will tell you when to connect and disconnect the battery. The programming time is under 30 seconds and the software will report its progress as it goes. Fig.7 shows a typical programming session. When the programming operation has finished, you can disconnect the battery, remove the PIC16F1455 and install it in your Microbridge board. Then, you can use the Microbridge to program further PIC32 chips. The firmware loaded into the PIC16F1455 will be version 1.18 and this contains a bootloader which allows another Micromite to update it via the serial console interface. This updating is even easier than the initial programming described above and can be done with the Microbridge permanently connected to the Micromite. There will likely be no need to update the Microbridge’s firmware but, if there is, the current firmware can do it. SC siliconchip.com.au Subscribe to SILICON CHIP and you’ll not only save money . . . but we GUARANTEE you’ll get your copy! When you subscribe to SILICON CHIP (printed edition) in Australia, we GUARANTEE that you will never miss an issue. Subscription copies are despatched in bulk at the beginning of the on-sale week (due on sale the last THURSDAY of the previous month). It is unusual for copies to go astray in the post but when we’re mailing many thousands of copies, it is inevitable that Murphy may strike once or twice (and occasionally three and four times!). So we make this promise to you: if you haven’t received your SILICON CHIP (anywhere in Australia) by the middle of the month of issue (ie, issue datelined “June” by, say, 15th June), send us an email and we’ll post you a replacment copy in our next mailing (we mail out twice each week on Tuesday and Friday). Send your email to: missing_copy<at>siliconchip.com.au 4 4 4 4 4 Remember, it’s cheaper to subscribe anyway . . . do the maths and see the saving! Remember, we pick up the postage charge – so you $ave even more! Remember, you don’t have to remember! It’s there every month in your letter box! Remember, your newsagent might have sold out – and you’ll miss out! Remember, there’s also an on-line version you can subscribe to if you’re travelling. Convinced? We hope so. And we make it particularly easy to take out a subscription - for a trial 6-month, a standard 12-month or even a giant 24-month sub with extra savings. Here’s how: simply go to our website (siliconchip.com.au/subs) – enter your details and pay via Paypal or EFT/Direct Deposit. You can order by mail with a cheque/money order, or we can accept either Visa or Mastercard (sorry, no Amex nor Diners’). If mailing, send to SILICON CHIP, PO Box 139, Collaroy NSW 2097, with your full details (don’t forget your address and all credit card details including expiry!). We’re waiting to welcome you into the SILICON CHIP subscriber family! SERVICEMAN'S LOG Getting sucked in by a vacuum cleaner A recent vacuum cleaner repair had me asking myself the rhetorical question: How much of an imbecile am I? Sometimes repairs don’t quite go the way they should, and in this case it might not have even needed a repair! In my defence, I’d never worked on one of these particular models before, so it was very much a trial and error process. The housekeeping duties in our home are shared equally between Mrs Serviceman and myself. When anyone asks me for relationship advice (you’d be surprised how many people ask me how I’m able to spend so much time in my workshop without my marriage breaking down), I tell them this: helping out with the housework beats any bouquet of flowers or diamond ring. Nothing says “I love you” more than doing dishes, 68  Silicon Chip doing the vacuuming or cleaning the toilet! My point, as usual an age in coming, is that the other day I was doing the floors with one of our four vacuum cleaners, a battery-powered Bissell Air Ram (if I’m doing the floors, I need the best tools for the job, right?) when the machine suddenly made an alarming and nasty sound before stopping dead. This was accompanied by a very brief, high-pitched whine and the usually green battery-status LEDs suddenly started flashing red. I promptly hit the off switch and recalled the instruction manual (yes, I do read manuals) stating that if something got caught in the workings, the motor would automatically shut down and the LEDs would flash red as a warning. The manual also mentioned that once the jam was cleared and the lights stopped flashing, the device could be restarted. However, while the LEDs did stop flashing, any attempt to switch the cleaner back on resulted in the lights flashing again, indicating something else must be happening. I flipped the cleaner over and checked out the air intake and powered roller brushes but Dave Thompson* Items Covered This Month • • • Vacuum cleaner repair Faulty capacitors in Behringer active PA speaker CHIMEI LCD monitor *Dave Thompson runs PC Anytime in Christchurch, NZ. Website: www.pcanytime.co.nz Email: dave<at>pcanytime.co.nz couldn’t see anything obvious. As nothing else is visible from the outside, the only option was to dismantle the machine in order to get a proper look inside. Most battery-powered vacuum cleaners are underpowered and thus have the suction of an asthmatic mouse. This unit is powered by a 22V Li-Ion battery and has all the moving parts packed into the compact “head” of the cleaner down near the floor. The only thing in the handle is the battery, making the cleaner lightweight, manoeuvrable and very efficient, as it only has to suck the dust and dirt about 50mm into the dust collectors. The only complaint I would have with it is that the two dust reservoirs are small and fill quickly, meaning it has to be emptied frequently for it to perform at its best. I’d obviously sucked something disagreeable into the thing because the noise it made sounded terrible. I actually thought a fan might have come loose or perhaps it had run a bearing. Being a serviceman, this presented no real problem other than the fact I’d never had one of these apart before and so I wasn’t sure exactly what I’d find once I got in there, or even how to get in there! As usual, there was nothing remotely useful or service-manual-ish on the internet. I assumed only dealers and repair agents would be privy to that information. All I could do was grab my trusty screwdriver and set about stripping it down. siliconchip.com.au I took what I like to call the “shotgun” approach to stripping this machine down. That is, I started by undoing every screw I could find, simply because they all appeared to be holding the vacuum cleaner together. There are about two-dozen visible fasteners dotted around the outside of the case and as it is constructed from high-quality plastics, all the screws are classic PK types. However, instead of using straight blade or Phillips-style heads, the screws were all T10-sized Torx-style splined heads. Fortunately, a long time ago I invested in one of those multibit sets that included all these oddball types, along with a decent-sized driver handle. As such, I have yet to encounter a screw I cannot remove. Regular readers will be aware of my feelings towards those horrible antitamper or security type fasteners, however, Torx screws are growing beyond that use and have become quite popular among builders and constructors. One feature of Torx screws I find very useful is that the bits fit tightly into the heads of the screws and hold fast, making one-handed installation a breeze. This also means you can get away with not having to use a magnetictipped screwdriver because once engaged, the screw hangs on to the bit until you physically pull it off. Disassembly is also less stressful as I don’t have to mess around, fishing out screws that have been loosened but have fallen back into the screw cavity. After removing all the screws in the business end of the cleaner, I could only get a couple of small panels off; siliconchip.com.au one on the left side front and one opposite that on the right. Nothing else would give, no matter how I pushed or prodded it. These two panels provided access and anchor points for the rotating brushes at the front bottom of the cleaner. With the machine running, these brushes would turn briskly and sweep anything in the way rearwards into the path of the suction intake. On most cleaners I’ve seen, these rolling brushes are one-piece, beltdriven devices spanning the head of the cleaner. This model has two shorter rollers, one each on the left and right sides, driven by a centrally-mounted gearbox, like the differential on a car. When the side panels came off, the brushes came off with them, leaving the square metal drive-shafts exposed in the centre. Mounted in the side panels were bronze bushes for the rollers’ axles to run in. They looked very dry which wouldn’t help things but the axles still turned easily in them. While each roller brush had what appeared to be multiple hairs and threads wrapped tightly around it, none of these would have caught or choked the machine to a standstill. It took a good half-hour with a knife and tweezers to remove those threads from the rollers; no doubt after a few hours of use they will be just as bound up again. The bushes appeared to be oil-infused bronze types. I don’t possess a vacuum chamber, so there was no way to re-infuse them properly so I soaked them overnight in a cap of “3-in-1” oil, hoping they’d absorb enough to be lubricated for a while longer at least. Then it was back to stripping the head unit down. I could see the two rear side panels had clips on the bottom but the screws holding them on at the top were buried in behind lots of plastic, which meant the centre assembly would have to come out before I could undo those screws. Based on this, and a couple of other buried screws I could just see down inside if the viewing angle and light was right, I concluded there must be another way in. Perhaps there was something in the moulding that the handle mounts onto that was holding this centre piece in? After popping out the battery in the lower half of the handle, four screws were exposed. Once these were removed, the handle’s cover split apart and with that out of the way, I could see a couple of larger screws below the battery connector assembly that might be connected to something further down inside the body of the cleaner. Holding the handle just so, I had clearance enough to remove the top left screw. Twisting the handle back the other way, I similarly exposed the right-hand side screw and removed it. As I did, something inside the head let go with a loud click and a spring fell out - never a good sign! The centre assembly still didn’t move; it was as if I’d not removed any screws at all! This was becoming frustrating and as I now had to get in to re-fix that spring onto whatever mechanism it had fallen off from, I was past the point of no return. Tricky stuff, these vacuum cleaner repairs! Servicing Stories Wanted Do you have any good servicing stories that you would like to share in The Serviceman column? If so, why not send those stories in to us? We pay for all contributions published but please note that your material must be original. Send your contribution by email to: editor<at>siliconchip.com.au Please be sure to include your full name and address details. May 2017  69 Serr v ice Se ceman’s man’s Log – continued I then concluded there must be fasteners hidden behind the two closelyfitting plastic wheels. All I had to do was figure out how to remove them. There were covers over the entire surface of the wheel and I could see they were held on by two wide plastic clips mounted 180° apart. A thin metal spudger was strong enough to ease the clip off one side and this allowed me to lift that side up. I did the same on the other side and with a bit more persuasion, the hub cap came off. (So what’s a spudger? It is one of those plastic or metal tools one uses to pry open a smartphone or tablet. I have several different types and I have to say they are bloody handy things; I use mine for cleaning fingernails, scraping glue or paint off items and even for prying the wheel covers from Bissell Air Ram vacuum cleaners!) Underneath was a circlip holding the 90mm diameter plastic wheel onto a 12mm metal axle. I dusted off my circlip pliers – the first time I have used these in a very long time – and removed the clip. The wheel lifted off and a bigger bronze bush and steel washer came off along with it; I soaked these bushes along with the others. Sure enough, partially hidden behind the wheel was one very large stepped screw and one smaller screw. The smaller screw, when undone, wouldn’t come out but just wound around with apparently nothing on the other end. The corresponding screw on the other side did the same thing. As you can probably already guess, this made absolutely no difference to the centre assembly’s coming out. (These screws turned out to be holding simple cable clamps that didn’t have to be removed at all.) I felt sure the larger, stepped and specially-machined screws would, however, be holding this assembly in place; after all, it made sense that the larger screws would be doing the job and besides, I couldn’t see any other screws left to remove! I was confident the centre piece would fall out onto the bench once I took out these screws so I was extra careful to make sure everything was supported as I removed them. Once they were out, everything came apart. Well, when I say everything, I mean the handle mount separated from the head of the cleaner, 70  Silicon Chip leaving it dangling by a couple of wires from the battery enclosure. As for the centre assembly, it remained fixed in place! I just couldn’t see what was holding this darned thing on. At this point, I was starting to feel a bit of the “red mist”descending, so I walked away and spent an hour or so tidying up the workshop; nothing’s worth losing one’s cool over! On my return, refreshed and relaxed, I sat the unit on the bench and just looked at it. I concluded there was only one possible way it could go, and that was straight up. There seemed to be nothing mechanical holding it that I could see, and as no one part could come off before another, there could be no other way. I found a couple of large screwdrivers and found a leverage point on each side that could take a bit of pressure and gently started applying upwards force, testing to see what would give. As I put on a little more pressure, I could feel something starting to shift and with even more pressure applied, the centre assembly slowly worked free of the base unit. Vindicated, I silently heaved a sigh of relief; I really didn’t know where I was going to go if that hadn’t worked! It turns out that the centre assembly is held by just six small screws, meaning I didn’t have to take any of this other stuff apart at all. It was a classic waste of time and effort, due to lack of talent. A large, moulded electrical plug on the bottom of the vacuum unit pressed into a corresponding socket in the base of the cleaner, and this transferred battery power to the motor buried in the vacuum unit. The brushed electric motor, very similar to those used in electric model aircraft, is only 30mm in diameter and 60mm long and powers an 80mm hard-plastic impeller within a clear moulded air duct system. A shaft connected to the armature of the motor drives the two rotating front brushes through a differential system and I could see everything was designed for the most efficient use of the motor’s power. I could also now see what had jammed the impeller; a half-burnt incense stick had been ingested and had hit the fan at just the wrong angle, stopping it and causing the built-in circuit-protection system to activate. I’m glad they included such a system as I’m guessing that 22V Li-Ion battery could deliver some serious juice if put to the test and this would easily burn out the wiring or the motor if not disconnected. Splitting the vacuum assembly apart was a simple matter of removing two siliconchip.com.au Faulty capacitors in Behringer active PA speaker G. D., of Mill Park, in Victoria, managed to find a suitable circuit diagram for a PWM power supply to help him repair a pair of active PA speakers. He writes . . . I was recently asked if I could have look at my mate’s daughter’s speaker systems. The power LED and clip LEDs were flashing briefly but no sound would come out when her guitar was connected. Her diagnosis was that the fuse had failed, so could I help? So two “Behringer Eurolive B115D Active 1000W PA speakers with wireless option and integrated mixer”, both with the same fault, were loaded into the ute to make the journey to the workshop. After removing numerous screws, the power module was lifted clear of the speaker box and once the speaker connections were released, it was laid on the bench. Another six screws needed to be removed and the lid of the aluminium box housing the electronics could then be opened, only to reveal more screws holding the circuit board in place, plus several clamps that held the various active devices to the case which also acted as a heatsink. It was a messy task, with a copious quantity of the heatsink compound making its way to my fingers. The operator’s handbook was with the speakers but it contained no information about the actual construction and definitely no circuit diagram, so I was on my own. A search on the internet revealed a number of other people had experienced the same fault but offered no solution. However, I did find a circuit for a Eurolive B215D that I downloaded; my thinking being that there would be some commonality but once I started to compare the diagram with the actual circuit board, all hope vanished. Nothing seemed to be in common except the brand name. A visual examination of the faulty circuit board showed all solder joints to be good and there were no signs of any distress in any components. The board comprise three sections: the mains input to a rectifier via a common mode input filter, a PWM controller to derive the DC output voltages and an amplifier section that has two class-D amplifiers, one for the bass speaker and the second for the tweeter. So now what? A discussion with the workshop owner determined that the PWM chip (NCP1271) or one of its associated components was the most likely problem. A packet of 10 NCP1271 devices could be had for five dollars (including postage), so I placed an order and while waiting I noted down all the active component numbers and went looking for their datasheets. When the PWM chips arrived I swapped it but the fault persisted. I now concentrated my attention to long-ish screws and cutting through some clear tape sealing each top and bottom join. Once done, the stick fell out easily and to rub some salt in, if I had known what this looked like before this happened, I could probably have extracted it from outside using a pair of long-nosed pliers without taking out a single screw. Imbecile indeed! I reassembled the impeller assembly, replacing the cut tape and plugged everything together in order to test run the motor. After rigging up the battery, I pushed the button only to find the LEDs still flashing red. Concerned that the jam had burnt something out, I made sure the impeller was free to turn. I dragged one of my bench power supplies out and dialled in about 12V and set the current limit to about half (2A) before connecting the motor directly to it. siliconchip.com.au the NCP1271 datasheet and noted the example circuit shown on page 18. It matched what I was seeing on the Behringer circuit board. A note in the “operating description” section of the datasheet, under fault conditions, detailed a requirement for a 130ms time to allow a feedback signal to be received, or else a fault condition will be recognised and the PWM will not start. The example circuit shows two 100µF capacitors across pin 6 (VCC) but in the Behringer circuit they were 47µF and although they showed no signs of distress, they measured less than 20µF, with the worst being only 5µF. I had some 50µF caps handy and replaced them and with the power applied, the circuit responded in the correct manner. So I began the task of reassembly, trying to keep contact with that sticky white stuff to a minimum. Once the box was assembled with power on and a microphone was connected, a healthy amplified sound was produced. Since the second unit had the same fault the repair took only a few minutes, plus the hour and a bit getting it apart and back together. The example circuit diagram in the NCP1271 datasheet that is similar to the Behringer circuit board. The motor powered up fine, which was a relief, but why then was the protection circuit still activated? The only visible component (I assumed the rest of the electronics were up in the handle behind the LEDs) was a 1N400x series diode across the motor terminals, which I assumed to be a snubber diode to limit back-EMF from the motor. A quick in-circuit measurement with my Peak semiconductor checker showed the diode to be a dead short. May 2017  71 Serr v ice Se ceman’s man’s Log – continued No problem; I have a box full of these and I soon had it replaced. This time at switch on, the LEDs showed two greens out of four, indicating the battery was down to about half capacity. Even so the motor spun up at an alarming rate. Now all I had to do was reassemble all the bits I’d unnecessarily removed, including the two cable clamps and the spring-loaded detent for the handle assembly, which is where the spring sprang from during disassembly. The silver lining is that I now know a lot more about this device, so if I ever need to repair it again, I’ll be prepared. Job done! By the way, there is a good 3D look at the cleaner in question at: www. bissell.co.nz/air-ram Three different faults in a CHIMEI LCD monitor Sometimes you have to go back three times before the repair sticks, as A. C., from Sunnyvale in New Zealand experienced during a long saga with a CHIMEI CMV T38D LCD monitor. I recently acquired a 20-inch LCD monitor with a fault description that sounded like it could be due to bad capacitors: “takes several tries to turn on and is getting worse”. The prospect of a cheap 20-inch LCD was rather enticing and since I had repaired other equipment before simply by replacing dead electrolytic capacitors, I figured this would be just as easy. How wrong I was! This particular monitor is delight- fully easy to disassemble. A plastic shroud covers the stand hinge and mount, held in place by some plastic clips and this just pops off with little effort, by pulling on it from its bottom edge. This reveals the stand mount, held on with four screws in a standard 50mm VESA arrangement. There are just three screws left for the back cover, which comes off almost as easily (watch out for two clips in slots at the bottom – use a flat screwdriver). In retrospect, I wish all monitors were as easy to open. The overall structural design is basic but quite clever. The stand is attached to the back of a rigid metal cover which protects the circuitry and in turn, screws onto the back of the LCD panel assembly. The plastic case and frame are actually all clipped onto and held up by the panel assembly. I removed the metal circuitry cover plus the threaded hex bolts for the VGA and DVI input connectors and was greeted by the familiar sight of electrolytic capacitors bulging and leaking throughout the power supply. Ah-ha, I thought. I removed the lot, except for the primary filter capacitor (these generally last far longer). As I went, I noted down their capacitance, voltage and reference designators, as well as the brands and series in a spreadsheet. It’s also usually quite important to note down the diameter and height of the capacitors, as in a lot of equipment, space is at a premium and not Some of the electrolytic capacitors had begun leaking onto the power supply PCB. However, this wasn’t the only fault that was found in this particular monitor. 72  Silicon Chip all replacements will be the same size. Having all the data also means you don’t mix the values up, and makes ordering new capacitors easy, as well as a future reference which (hopefully) doesn’t require opening the equipment again. In my monitor, all the blown capacitors were CapXon brand, although there were a couple of Taicons in the PSU as well. Interestingly enough, the Taicons both looked and tested OK on my ESR meter, while even the CapXons which looked physically fine tested just as poorly as their bulging and leaking companions. This just goes to show that for the same thermal conditions and age, some brands of capacitor just cannot stand the heat. Next, I looked up the datasheets for the capacitors I had removed. They were standard low-ESR types. Replacements should have the same ESR or lower – not too low, as significantly lowering ESR can affect circuit operation, especially in a switchmode power supply (SMPS). The Ripple Current Rating (RCR) is like voltage – choose the same, or higher. Make sure the datasheets both specify ESR at the same frequency. Low ESR type capacitors typically specify it for 100kHz, while general purpose capacitors specify it at 60Hz, or not at all. Some quick work with element14’s parametric search and I soon had suitable replacements lined up (all high quality Japanese brands – Panasonic/ Nichicon etc). Upon receiving the new capacitors, I soldered them in and it was time to test the monitor. I plugged it in, turned it on, and was instantly greeted by a nice crisp image which stayed on the screen. It was then pressed into service as my primary computer display. But a mere three months later, more trouble emerged from the otherwise pixel-perfect paradise. This time all the control buttons stopped working, except the auto-adjust button. I immediately jumped to horrible conclusions about blown inputs on the main control chip (as one does), though as in all other respects the monitor was working just fine. Once again I disassembled the monitor and found that the buttons reside on a separate board, connected by a flat-flex ribbon cable. Unplugging this and running continuity checks on the siliconchip.com.au button board showed that none of the switches were faulty. This meant the fault had to be on the scalar board somewhere. The input handling for the buttons is a pretty simple affair. Each button is pulled up to the +3.3V VCPU rail via a 10kW resistor and inductor in series, bypassed with a small capacitor to ground. The output signal is tapped off between the resistor and inductor, then fed to the input of the main processor, so there’s not much which can go wrong. I started checking voltages at the buttons, and discovered that the auto-adjust button had a much lower voltage (0.86V) across it than all the rest (3.3V). My first guess was that the resistor had gone high in value but the resistors and capacitors in question are all part of two four-way SMD arrays. I managed to remove the RP1 resistor array with a flood-and-wipe method, tested it as OK, and managed to eventually get it back on the board without completely destroying the pads. I didn’t like the idea of trying to remove anything else, so I started probing around some more instead. It soon became apparent that the auto-adjust button line was also showing a low resistance to ground and this didn’t change even with the button board disconnected. Clearly, something was shorted to GND, either the debounce capacitor or the processor input itself. Given the difficulty of working on the resistor array, I didn’t want to attempt removing the capacitor array, as I could see myself lifting pads. Besides, even if I had a safe and easy way to replace it, I didn’t know its value. I saw no sense in risking damage. The monitor still worked, and I didn’t really need to use the buttons anyway, so I reassembled and continued using it. Unfortunately, the poor thing died completely a few months later, simply shutting down without warning and refusing to power up again; not even the power LED worked. This time I was not sure where to start, disheartened by the fact that the power LED is driven by the scalar board, and I felt as if my fears about the processor failing were confirmed. But I eventually got around to it, and for the third time, had it open on the workbench. The first thing to do was siliconchip.com.au figure out which board the fault lay on. A dead scalar board could explain the lack of a power LED but so too could a dead power supply. I removed the PSU and started with a visual inspection. There had been no noise when the monitor shut off, so I did not expect a blown switching transistor or such but I carefully eyeballed all the power semiconductors anyway. Nothing was obvious; no burnt parts or bad solder joints. I put the PSU back in the monitor and firmly screwed it back in, as I didn’t want the possibility of a mainspowered board scooting around the workbench while trying to test it. I first measured the voltage across the mains filter capacitor, and found it correct and steady at around 340V DC, so at least I knew the fuse and capacitor etc were OK. I went on to the secondary side. Despite having no schematic, the voltage rails were at least labelled, although they were supplied to the scalar board by a right-angled dual-row 0.1-inch pitch pin header, which was not easy to probe with a multimeter. I got creative. This involved plugging an old floppy drive cable onto the header, which basically broke out the connections to a convenient socket. I was then able to clip one multimeter probe to chassis ground, follow the connections to the other end of the cable, poke a short piece of wire into each socket position in turn, and measure the voltages there. I found that the +12V rail seemed OK but what was supposed to be a +5V rail was bouncing up and down around 2.4V. It certainly seemed as if the power supply was bad, but I didn’t want to assume anything straight away. I know some SMPSs do not run correctly without a load, and I wanted to be sure the scalar board still worked anyway. I tried the reverse approach, taking a standard ATX computer PSU and connected it to the scalar board. Upon powering it up, I was pleasantly greeted by a green power LED on the monitor, and a “No Signal” message on the screen. The scalar board was clearly still working, and this proved the PSU was at fault. Since I was getting something out of the PSU, it seemed then that the primary side was fine, and thus I focused my search on the secondary side. I decided to check all the output rectifiers first. These often fail open- circuit, shorted, or leaky, so they’re a good place to start. Some quick in-circuit testing revealed that D101 was a dead short and this was obviously putting the PSU into a protection shutdown-andretry loop, hence the fluctuating +5V rail. I’m glad the PSU controller was smart enough to do this – some supplies simply blow up when faced with a short on the output. D101 is an SB20200FCT dualschottky rectifier in a TO-220 package and the easily-obtained MBR20100CT from Jaycar was a suitable replacement, although I had to add an insulating thermal pad and washer as the original rectifier was an ITO-220AB insulated variant. With the new rectifier, the PSU sprang back to life with all rails steady and correct. Of course, while the monitor was now powering on again, the buttons were still not functioning. I decided to revisit that fault, armed with better tools, including a hot air rework station. I also got lucky with a schematic, by searching the PCB code (A190A2-HS1) on Google and discovered the same scalar board (and probably PSU) are also used in a Viewsonic VA1912w-1/ VA1912wb-1, for which I found the service manual easily. The shorted capacitor array, CP7, was listed as a 100pF 50V 0603*4 part. (As I later found out, this package is referred to as 0612, and is the same physical size as a 1206 component. For array components, it seems the dimensions are simply written swapped). The magic of hot air and tweezers made short work of removing the old array, and a quick test proved one of the capacitors in the array was indeed shorted. I was also able to confirm that the other three were about 100pF, as per the schematic. Another order later and I soon had some new capacitor arrays ready and waiting. After cleaning up the pads with solder wick and alcohol, I used tweezers to dab some tiny spots of solder paste onto them, before placing a new capacitor array on top and re-flowing the whole lot with hot air. I must say, it’s a marvellous thing to watch solder paste melt effortlessly before one’s eyes, instead of struggling with an oversized iron and solder wire. But the upshot of this long and arduous story? The monitor and all its buttons have been working ever SC since! May 2017  73 Improved circuit drives one or two transducers If you have a boat and keep it in a berth or on a mooring in salt or fresh water, it will be inevitably plagued with marine growth on the hull. Left unchecked, this slows down the boat considerably and leads to a huge increase in fuel consumption. It’s the same story for a yacht; marine growth slows it down and makes it less manoeuvrable. So your boat has to be hauled out of the water at least once a year so the hull can be water-blasted and coated in fresh anti-fouling paint. Unless, that is, you have ultrasonic anti-fouling fitted – it keeps the barnacles at bay much longer! A nti-fouling paint is the tried-and-tested method for preventing marine growth on the hulls of boats but it only works if you use the boat on a regular basis. Anti-fouling paint works by ablation. As the boat moves through the water (the faster, the better) the surface of the anti-fouling paint is worn away to expose fresh coating, which then continues to do its job of inhibiting marine growth. So anti-fouling is a sacrificial coating – it is meant to be worn away. If you don’t use your boat regularly, the anti-fouling quickly becomes ineffective and marine growth can become rampant. So what’s the answer? Ultrasonic anti-fouling! This may not entirely replace the need for anti-fouling paint but it can greatly increase the interval at which the boat must be pulled out of the water to have this essential maintenance. Furthermore, the closer you live to the equator (ie, warmer water), the more cost-effective ultrasonic anti-fouling be74  Silicon Chip comes. On the Queensland or northern New South Wales coast, you will need to have anti-fouling done far more frequently than if you live in the colder climes of Victoria and Tasmania. The worst situation for marine growth involves boats moored in canal developments, such as on the Gold and Sunshine Coasts, where the water is warm and has poor tidal flow. What sort of marine growth are we talking about? Everything from algal slime to marine plants and shellfish of all types . . . and coral. Coral on boat hulls? Isn’t coral a threatened marine life-form? Certainly not on seldom-used boats moored in relatively warm water! Salt or fresh water We originally envisaged that this project would be for boats which remained in salt water. While this is certainly true, one thing we hadn’t counted on was that boats which are permanently in fresh water also suffer from the problem. siliconchip.com.au Features By Leo Simpson & John Clarke • Suitable for boats up to 14m (up to 8m with on e transducer). • Ideal for boats with sin gle-skin glass-reinforce    or fibreglass, steel d plastic (GRP) or aluminium hulls. • Powered by the boat’ s 12V battery. • Adjustable low-battery shut-down. • Very low current drain during shut-down. • Soft-start feature red uces surge current. • LED indicators for powe r, low battery or fault. • Neon indicators for ult rasonic drive operation. Maybe it isn’t quite as bad as salt but Jaycar Electronics have told us that they sold significant numbers of the original Ultrasonic Anti-fouling kit, and their built-up version, apparently with great success to boat owners who kept their craft on the freshwater lakes of Canada. So there goes our theory of warm, salt water! OK, we know that it’s still true but Jaycar’s experience is that Ultrasonic Anti-fouling also works in cold, fresh water. You’ll still need to clean her bottom! We must emphasise that fitting an ultrasonic anti-fouling system to your boat will not eliminate the need to pull the boat out of water from time to time to clean it, but also to inspect and replace sacrificial anodes and to generally inspect the hull and running gear for any damage. Nor can ultrasonic anti-fouling provide complete inhibition of growth on propellers, rudders, trim tabs and in bow and stern thrusters. But compared with conventional anti-fouling measures, ultrasonic anti-fouling is far more effective on boats that are used infrequently. And Ultrasonic Anti-fouling has a very big advantage in that it does not pollute waterways. This new version of our popular ultrasonic anti-fouling system has an improved circuit which drives one or two ultrasonic transducers which are mounted inside the hull of the boat. It is suitable for boat hulls made of single-skin glass-re- Excessive fouling after a boat had been in the water for two years with minimal usage. There was no Ultrasonic Anti-Fouling fitted. This amount of growth would severely impact speed, handling and fuel use. siliconchip.com.au inforced plastic (GRP or fibreglass), aluminium or steel/ stainless steel. These materials provide good transmission of ultrasonic vibration throughout the hull. It vibrates the hull at frequencies around 20-40kHz, which makes marine creatures less likely to adhere to the hull. This is explained in more detail below. Ultrasonic anti-fouling does not work well on boats with timber hulls due to their poor transmission of ultrasonic vibration. Similarly, hulls that use a composite sandwich construction comprising a foam core with an outer skin (usually a styrene core and fibreglass skin) are generally not suitable. That’s because the foam core dampens the ultrasonic wave propagation throughout the hull. How ultrasonic anti-fouling works Ultrasonic vibration of the hull disrupts the cell structure of algae and this reduces algal growth on the hull. And because there is less algae on the hull, larger marine organisms have a lesser incentive to attach themselves to it. The principles of ultrasonic anti-fouling have been known for a long time. The effect was discovered a century ago by French scientist Paul Langevin, who was developing sonar for submarines. He found that ultrasonic energy from his sonar tests killed algae. Since he was working with high power transducers, it was assumed that cavitation was causing algal death. In recent times, though, it has been found that high Same boat, eighteen months after cleaning AND having the original SILICON CHIP ultrasonic anti-fouling unit fitted. This illustrates that boats still need to be taken out of the water periodically but it’s a whole lot better than the shot at left! May 2017  75 3A S1 CON3 0V +12V F1 ATO BLADE FUSE POWER SWITCH 76  Silicon Chip SC 20 1 7 TP1 GND TP1 HYSTERESIS 12k 100nF 22pF 3 2 8 1 16 15 100nF 100nF X1 20MHz TP2 GND TP2 47k 22pF GND OUT BATTERY MONITOR 16V 470 F IN 4 10 F +5V AN4/RA4 OSC1 OSC2 14 5 Vss 13 12 RB4 RB5 RB3 RB1 RA1 10 11 9 7 17 RA0 18 RB7 RB6/AN5 6 100nF +5V RB0/PWM Vdd IC1 PIC16F88 PIC1 6F8 8 –I/P AN3/RA3 RB2 MCLR/ RA5 AN2/RA2 10k REG1 LP2950AC Z -5.0 D7 1N4004 22 130k K A D Q5 D4 1N5819 +5V D3 1N5819 +5V D2 1N5819 +5V A K A K A K 100k D9 BAT46 1nF A K G S ULTRASONIC ANTIFOULING DRIVER MK2 LOW 5k BATTERY THRESHOLD VR1 1k VR2 5k 4.7k 20k WARNING! This circuit produces an output voltage of up to 800V peak-peak to drive the ultrasonic transducer(s) and is capable of delivering a severe electric shock. DO NOT touch any of the components or tracks on the board within the pink area shown on the PCB overlay when power is applied. All exposed leads must be covered with insulating tubing. To further ensure safety, the PCB must be installed in the recommended plastic case and the transducer(s) correctly housed and fully encapsulated in resin, ie, as supplied in the kit. siliconchip.com.au K A A K 10k 10k +5V 10k 1W ZD4 5.1V 10 1W ZD3 5.1V 10 1W ZD2 5.1V 10 1W A A A ZD1 5.1V 10 D1 1N5819 10k A K 470 470 470  A K A K A K A K LED3  LED2  LED1 K K K 100nF D10 1N5819 OUTPUT VOLTAGE MONITOR D8 BAT46 16V 10 F G G S D S D FAULT G G LOW BATTERY POWER L1 470 H/5A Q3 Q1 S D S D 47k 130k Q4 Q2 K A K 25V LOW ESR S3 T2 ETD29 F3 A 1.6kV 220k S3 F3 1.6kV 220k T1 ETD29 2200 F F1 F2 S1 S2 F1 F2 S1 S2 2200 F 25V LOW ESR V+ A A 130k 130k TO ULTRASONIC TRANSDUCER 2 CON2 NEON2 DRIVER 2 INDICATOR TO ULTRASONIC TRANSDUCER 1 CON1 DRIVER 1 INDICATOR NEON1 D OUT LP2950 COMPONENTS IN THIS SHADED AREA ARE ONLY REQUIRED FOR SECOND ULTRASONIC TRANSDUCER D6 UF4007 2kV 1nF D5 UF4007 2kV 1nF IN K GND K ZD1–ZD4 Q1–Q5: STP60NF06L OR HUF76423P3 G D S K A LEDS K 1N5819, BAT46 A 1N4004, UF4007 Fig.2; the yellow and green waveforms in each of these four scope grabs show the alternating gate signals to Mosfets Q1 & Q2, while the lower (blue) trace shows the the resulting high voltage waveform from the secondary of the transformer T1. This waveform is applied to the piezoelectric ultrasonic transducer. ultrasonic power and cavitation is not required to kill algae. Instead, ultrasonic vibrations cause resonance effects within algal cell structures and relatively low powers are still enough to cause cell death. So if the boat’s hull can be vibrated over a range of ultrasonic frequencies, algae will not be able to attach to it and so other more menacing marine growth will similarly be discouraged. Our first Ultrasonic Anti-fouling project for boats was published in the September & November 2010 issues and this has proved to be very popular with boat owners. We have also had lots of good feedback from boat users not only in Australia and New Zealand but from all over the world. Its popularity is partly due to the fact that the build-ityourself kit, exclusive to Jaycar stores, is much cheaper than any commercial unit and has proved to be effective in minimising marine growth. But feedback from boat owners has also indicated that improvements could be made to our original design and the first of these is the ability to use it on larger boats. Our recommendation for our first design was that it was suitable for boats up to 10 metres, with larger boats up to 14 metres or catamarans requiring two transducers and two drive units. Our experience is that one transducer is not quite enough for a 10-metre power boat. Used on a 10-metre fly-bridge cruiser with twin shaft drive, the prototype has performed well in inhibiting marine growth and considerably increasing the intervals at which the boat must be pulled out of the water for service. But a 2-transducer unit would do a much better job. So our MkII version can drive one or two ultrasonic transducers. With two transducers, it is ideal for larger boats and catamarans, up to about 14 metres. Fig.1 (facing): the PIC16F88 microprocessor provides alternating gate signals to Mosfet pairs Q1, Q2 & Q3,4. Each pair of Mosfets drives a step-up transformer (T1 & T2) and these drive separate ultrasonic transducers. The micro also monitors the battery voltage and shuts down operation if the battery drops below a threshold set by trimpot VR1. Neon indicators show the presence of high voltage at the secondary windings of the two transformers. siliconchip.com.au May 2017  77 Fig.3: taken at a low sweep speed of 200ms/div, this scope grab shows that the transducer is driven in two frequency blocks, as described in the text. Fig.4: taken at an even lower sweep speed of 500ms/div, this shows the gate drive for Mosfets Q1 & Q4, in the separate channels, and this demonstrates how each transducer is alternately driven with its bursts of frequencies. The single transducer version would be suitable for boats up to eight metres or perhaps a little larger. This latest version is also much easier to build, with the Jaycar kit utilising pre-wound transformers and alreadypotted ultrasonic transducers. Jaycar has funded the development of both the original and latest version of this project and so the kit is exclusive to that company. Other changes made to the MkII version include LEDs for power, low battery and fault indication while each ultrasonic driver output has a neon indicator which shows when a transducer is being actively driven. As well, the low-battery shut-down voltage is now adjustable. We have also reduced current consumption during lowbattery shut-down from 6.7mA down to 170A. That’s a worthwhile saving and this low current drain prevents any further significant discharge of the battery after low-battery voltage shut-down. The circuit also includes a soft-start feature, where the high-value supply decoupling capacitors are charged slowly when power is first applied. This prevents a high surge current that could cause the fuse to blow. Lights, (ultra)sound, action Our new Ultrasonic Anti-fouling project provides far more visual indication that something is happening while it is operating. When power is first applied, the green LED comes on and stays on for 30 seconds which is the initial power on delay and soft-start feature. Then it flashes very brightly, in unison with the alternating flashing of the two neon indicators which show that high voltage is being delivered to the ultrasonic transducers. If the micro shuts down operation because of low battery voltage, the red low battery LED will flash very briefly at full brightness – helping to conserve the low battery. And of course there is the fault LED which comes on (when there is fault!). Specifications • • • • • • • • • • • • • Operating supply voltage: 11-16V DC Average current drain: typically 320mA for one transducer, 640mA for two transducers Peak current: 2A Output frequency range: 19.08kHz to 41.66kHz in 14 bands Frequency steps: 12 steps in each band; 80Hz steps at 20kHz increasing to 344Hz steps at 40kHz Signal burst period: 1000 cycle bursts, ~600ms at 20kHz and ~300ms at 40kHz Burst interval period: between 300ms and 600ms Dual transducer drive: alternate Transducer drive voltage: 250VAC (about 700V peak-to-peak) Low-battery cut-out threshold: adjustable from 0-15V Low-battery cut-in threshold: 0-2.5V above cut-out threshold Low-battery shut-down quiescent current: 170 A Power-up delay: 30 seconds 78  Silicon Chip siliconchip.com.au The component parts of our new Ultrasonic Anti-Fouling project: centre is the driver, as described in the text. Plugging into this are one or two ultrasonic transducers, which are attached to the boat hull. The Jaycar kit will have these transducers already potted, as shown here. You can also listen to the unit operating with an AM radio. If you bring the radio near the driver unit or the transducers, you will hear it tweeting and buzzing away, giving you a clear indication that something is happening. And if you have very keen ears and very quiet surrounds (no water lapping on the hull) you might hear faint clicks from the ultrasonic transducers, in concert with the neon indicators. sulated in high-pressure plastic plumbing fittings. On the lid, there is an on/off switch, while the LED and neon indicators can be seen through the lid. The circuitry for the Ultrasonic Anti-fouling MkII is based on a PlC16F88-I/P microcontroller, power Mosfets and step-up transformers. It can be powered from a 12V battery or a 12V DC 3A (or greater) power supply if shore power is available. Operating principle Ultrasonic bursts Our Ultrasonic Anti-fouling system works in a similar manner to commercial systems – at a fraction of the cost. It uses high-power piezoelectric transducers which are attached inside the hull, driven with bursts of ultrasonic signal ranging between about 20kHz and 40kHz. The reason for using a range of frequencies is two-fold. First, so that various resonance modes of the hull are excited and secondly, a range of frequencies is required to kill the various types of algae. While a high-power transducer is used and we do drive it with very high voltages, the actual power level is not very great. So typical average current consumption from a 12V battery is around 320mA per transducer, with peak currents of around 2A. The Ultrasonic Anti-fouling system should be run continuously while ever the boat is moored. In fact, there is no reason to turn it off while the boat is in use, unless you have divers underneath – we have had reports that divers can find the ultrasonic energy immediately underneath the hull causes unpleasant sensations in the ears. You will need to make sure that the boat’s 12V battery is always kept charged. This is no problem for boats in berths which have shore power (ie, 230VAC mains). For boats on swing moorings, a solar panel and battery charge controller will be required. The Ultrasonic Anti-fouling MkII driver is housed in a sealed plastic IP65 case with a transparent lid. There is one cable gland on one side of the case for the power supply and one or two 2-pin IP67-rated sockets for connection of the transducers. The piezoelectric transducers are encap- Each piezoelectric transducer is driven with bursts of high-frequency signal ranging from 19.08kHz through to 41.66kHz. This is done over 14 bands, with each band sweeping over a small frequency range. The first band is 19.08-20.0kHz and comprises 12 frequencies with approximate 83Hz steps between each frequency. The other bands also contain 12 frequencies but with larger frequency steps. For example, in the middle band of 24.75-26.31kHz, the steps are about 141Hz. For the top band between 37.87-41.66kHz, the steps are 344Hz. Each band overlaps the following band by a few hundred hertz. This overlap ensures that the whole range of frequencies is covered from 19.08kHz to 41.66kHz. Each burst of signal comprises two separate frequency signals each for 500 cycles. The burst period for the total 1000 cycles depends on the actual frequencies that are being produced and ranges from 300-600ms. Each transducer is driven alternately to reduce peak current draw. The two frequency bands within each burst are varied in a pseudo-random way so that the entire range of frequencies is covered every 16 seconds. This sequence is repeated after about 64 seconds. Note that there is a concentration of signal about the resonant frequency of the transducer(s), between 35.21kHz and 41.66kHz. siliconchip.com.au Circuit description The complete circuit is shown in Fig.1. PIC microcontroller lC1 drives step-up transformer T1 in push-pull mode via N-channel Mosfets Q1 and Q2. If the circuit is built to drive two transducers, IC1 also drives transformer T2 via May 2017  79 With the obvious exception of the transducer/s (which mount on the boat hull) all components mount on one double-sided PCB, as shown here. Full construction details, along with information on mounting on the boat, will be presented next month. Mosfets Q3 and Q4 in the same manner. The microcontroller runs at 20MHz (using crystal X1) and this allows it to provide the small ultrasonic frequency shifts required. Mosfets Q1 and Q2 are driven from the RB1 and RB3 outputs of IC1, while Q3 and Q4 (if fitted) are driven from RB5 and RB4. Since these outputs only swing from 0V to 5V, we are using logic-level Mosfets, type STP60NF06L or CSD18534KCS. Their on-resistance (between the drain and source) is typically 10-14mΩ for a gate voltage of 5V. The current rating is 60A/73A continuous at 25°C. There are several other logic level Mosfets that are suitable, including the HUF76423P3. Mosfets Q1 and Q2 are driven alternately and in turn drive separate halves of transformer T1’s primary winding. The centre tap connection is from the battery via the fuse (F1) and soft start Mosfet Q5. When Q1 is switched on, current flows through its section of the primary winding for less than 50µs, depending on the frequency, after which Q1 is switched off. After 5µs, Q2 is then switched on for less than 50µs. Then, when Q2 switches off, there is another gap of about 5µs before Q1 is switched on again and so on. Dead-time The 5µs period during which both Mosfets are off is the “dead time” and it allows one Mosfet to fully switch off before the other is switched on. The alternate switching of the Mosfets generates an AC waveform in the primary of T1 and this is stepped up in the secondary winding to provide a voltage of about 250VAC, depending on the particular frequency being switched and the piezoelectric transducer impedance at that frequency. Mosfets Q1 and Q2 are rated at 60V. Should the drain voltage exceed this substantially, they will enter “avalanche breakdown”, acting a bit like zener diodes and clamp the voltage to around 80V. This is safe as long as the shunted current and conduction time are within the device’s ratings, which is the case for all recommended Mosfets. This is important since a highvoltage transient is generated each time the Mosfets switch off, due to the transformer’s magnetic field collapsing. Protection for the gates of the Mosfets is provided by 5.1V zener diodes ZD1 & ZD2 (and ZD3/ZD4 for Q3/Q4). This might seem unnecessary since the Mosfets are only driven from a 5V signal but the high transient voltages at the drains can be capacitively coupled to the gate. These 5.1V zener diodes also help prevent damage to the RB1 and RB3 outputs of IC1 due to coupled voltage spikes (RB5/ RB4 are similarly protected by ZD3 and ZD4). Further protection is provided for the outputs of IC1 by schottky diodes D1-D4. These clamp the voltages at these pins to about +5.3V. They are in parallel with the internal protection diodes of IC1. The SILICON CHIP READY RECKONER Gives you instant calculation of Inductance - Reactance - Capacitance - Frequency It’s ESSENTIAL For ANYONE in ELECTRONICS You’ll find this wall chart as handy as your multimeter – and just as useful! Whether you’re a raw beginner or a PhD rocket scientist . . . if you’re building, repairing, checking or designing electronics circuits, this is what you’ve been waiting for! Why try to remember formulas when this chart will give you the answers you seek in seconds . . . easily! Read the feature in the Januar y 2016 issue of SILICON CHIP (you can view it online) to see just how much simpler it will make your life! All you do is follow the lines for the known values . . . and read the unknown value off the intersecting axis. It really is that easy – and fast (much faster than reaching for your calculator! HU 420x59G4Em m Printed on heavy (200gsm) photo paper Mailed flat (rolled in tube) or folded Limited quantity available Mailed Folded: Mailed Rolled: $20.00 inc P&P & GST ORDER NOW AT www.siliconchi p.com.au/shop $10.00 inc P&P & GST on heavy 80  Silicon Chip siliconchip.com.au photo pa per Parts list – Ultrasonic Anti-Fouling for Boats (Mk2) 1 double-sided PCB coded 04104171, 158.5 x 110.5mm 1 panel label, 123 x 89mm 1 IP56-rated sealed polycarbonate enclosure with clear lid, 171 x 121 x 55mm (Jaycar HB-6248) 1 50W 40kHz ultrasonic transducer potted and wired (Soanar YS-5605) (2 for 2 transducers [T2]) 1 50mm BSP flanged backnut (2 for 2 transducers) 1 IP67-rated 2-pin panel mount socket (Jaycar PP-0542) (2 for 2 transducers) 1 IP68-rated cable gland for 4-8mm diameter wiring (Jaycar HP-0724) 1 pre-wound transformer using ETD29 3C85 bobbin and cores (Jaycar EM2791) (T1) (2 for 2 transducers) 1 IP65-rated 10A SPST push-on/push-off switch (S1) 1 470µH 5A toroidal inductor (L1) (Jaycar LF-1278) 1 PCB-mount ATO blade fuse holder 1 3A ATO standard blade fuse (F1) 1 3-way PCB mount screw terminals, 5.08mm pitch (CON1) (2 for 2 transducers [CON2]) 2 2-way PCB mount screw terminals, 5.08mm pitch (CON3) 1 18-pin DIL IC socket 1 20MHz crystal (X1) 1 NE2 pigtail neon indicator lamp (blue [Jaycar SL-2695] or orange [Jaycar SL-2690]) (NEON1) (2 for 2 transducers [NEON2]) 2 5kΩ top-adjust multi-turn trimpots (VR1,VR2) 4 M3 x 6mm pan-head machine screws 3 M3 x 10mm pan-head machine screws (5 for 2 transducers) 3 M3 star washers (5 for 2 transducers) 3 M3 nuts (5 for 2 transducers) 4 PC stakes (optional) 1 100mm cable tie 1 120mm length of 3mm diameter heatshrink tubing 1 20mm length of 6mm diameter heatshrink tubing 1 200mm length of 5A or greater rated wire (for S1) 1 200mm length of mains-rated wire (for transducer(s)) Semiconductors 1 PIC16F88-I/P microcontroller programmed with 0410417A.HEX (IC1) 1 LP2950ACZ-5.0 5V low dropout regulator (REG1) 3 STP60NF06L or HUF76423P3 60V N-channel logic-level Mosfets or equivalent (Q1,Q2,Q5) (5 for 2 transducers [Q3, Q4]) 1 high-brightness 5mm green LED (LED1) 2 high-brightness 5mm red LEDs (LED2,LED3) 2 5.1V 1W zener diodes (ZD1,ZD2) (4 for 2 transducers [ZD3,ZD4]) 3 1N5819 40V 1A schottky diodes (D1,D2,D10) (5 for 2 transducers [D3,D4]) 1 UF4007 1000V 1A ultrafast diode (D5) (2 for 2 transducers [D6]) 1 1N4004 400V 1A diode (D7) 2 BAT46 100V 150mA schottky diodes (D8,D9) Capacitors 1 2200µF 25V low-ESR PC electrolytic (2 for 2 transducers) 1 470µF 16V PC electrolytic 2 10µF 16V PC electrolytic 5 100nF 63V/100V MKT polyester 1 1nF 63V/100V MKT polyester 1 1nF 2000V ceramic (2 for 2 transducers) 2 22pF 50V ceramic Resistors (0.25W, 1%) 1 220kΩ 1600V (eg, Vishay VR25 1.5%) (2 for 2 transducers) 3 130kΩ (4 for 2) 1 100kΩ 2 47kΩ 1 20kΩ 1 4.7kΩ 1 1kΩ 3 470Ω 1 22Ω Additional parts for installation 1 long marine-rated 12V 2A+ twin core cable, to reach battery 1 pack J-B Weld 2-part epoxy (Jaycar NA-1518) 1 pack “Fix-A-Tap” waterproof lubricant 1 small jar petroleum jelly or vaseline 4 long M4 stainless steel machine screws, shakeproof washers and nuts various cable ties, etc. siliconchip.com.au 1 12kΩ 2 10Ω (4 for 2) 3 10kΩ (5 for 2) Jaycar Electronics will have available a complete kit for the Ultrasonic Anti-Fouling Unit within a few weeks. With one transducer, the kit will retail for $249 (Cat KC-5535). The add-on second transducer kit (with the parts shown in red above) will retail for $169 (Cat KC5536). Visit www.jaycar.com.au/ultrasonic for more info. May 2017  81 (Left): here’s the “business end” of the system, the Ultrasonic Transducer, which sets up the vibration pattern in the boat hull which marine vegetation doesn’t particularly enjoy! Because these operate at high voltage (~700-800V peakto-peak) they must be fully enclosed (“potted”) in a suitable enclosure, as shown above. (The Jaycar kit will have potted transducers). Neon relaxation oscillators The output from transformers T1 and T2 is a high-voltage 250VAC waveform; up to 700V peak-to-peak. We use neon indicators to show whenever the transformer is delivering its voltage. Note that the NE2 neon lamps are not fast enough by themselves for this job. They can flash at a maximum rate of 20kHz, while the transformer output frequency can be above 40kHz. So the neons are driven via a circuit comprising high voltage fast diode D5 (or D6), a high voltage 220kΩ resistor, a high voltage 1nF capacitor and 130kΩ current-limiting resistor. The diode and 220kΩ resistor charge the 1nF capacitor up over several cycles of ultrasonic signal until the voltage across the capacitor reaches the breakdown voltage of the neon lamp. The 1nF capacitor can charge because the neon draws very little current until breakover, at around 70V. When this voltage is reached, the neon conducts by a gas discharge between its electrodes and the voltage across it drops to around 50V. The series 130kΩ resistance limits the current, which must be kept under 300µA to prevent electrode erosion. Once the 1nF capacitor has discharged, it starts recharging on the next cycle. Hence, the neon and its associated components form a classic relaxation oscillator. Battery voltage monitoring In addition to driving Mosfets Q1-Q4, microcontroller IC1 monitors the battery voltage and if necessary, shuts down the drive signals to prevent the battery from discharging below a set threshold. This is done to prevent long-term damage to the battery and also to avoid discharging a boat’s main battery if it is also used to power automatic bilge pumps or to start the motor. Of course, larger boats will have multiple batteries but the circuit still needs low battery protection. The incoming 12V supply is monitored via a voltage divider consisting of 130kΩ and 47kΩ resistors and the resulting voltage is filtered with a 100nF capacitor and monitored by lC1 at pin 1, the AN2 analog input. The resistors reduce the battery voltage to a 0-5V range, suitable for feeding to IC1. So for example, if the battery voltage is 11.5V, pin 1 will be at 3.054V. IC1 converts this voltage into a digital value using its internal analog-to-digital converter (ADC) and this is compared against a reference voltage set by trimpot VR1. Trimpots VR1 and VR2 are fed with 5V from IC1’s RB2 82  Silicon Chip output at pin 8 which is held at 5V during normal operation. VR1 connects to pin 8 via a 1kΩ resistor and VR2 connects via a 4.7kΩ resistor, both of which limit their adjustment ranges. RB2 drops to 0V during low battery shut-down, to eliminate the current drawn through VR1 and VR2. VR1 is used to set the lower voltage threshold, below which the Anti-fouling Unit switches off. VR1 is adjusted so that the voltage at TP1 is 1/10th the desired cut-out voltage. TP1 is connected to VR1’s wiper via 20kΩ/12kΩ resistive divider. So say you set the low battery shut-down to 11.5V, by adjusting VR1 until TP1 reads 1.15V. Given that the division ratio is 0.375 [12kΩ÷(20kΩ + 12kΩ)], we can infer that the voltage at the wiper of VR1 (and thus IC1’s AN4 analog input) is 3.067V [1.15V÷0.375], which is very close to the 3.054V quoted above for the voltage at pin 1 with a battery at 11.5V, as you would expect. The 5V supply rail for IC1 comes from REG1, an LP2950ACZ-5.0 low quiescent current regulator. This has a factory-trimmed output that is typically within 25mV of 5V (ie, 4.975-5.025V). Quiescent current is typically 75µA and this is part of the reason that during low battery shutdown, the current drawn by the Ultrasonic Anti-fouling circuitry remains so low. When low-battery shut-down occurs, LED1 is switched off and the Low Battery indicator, LED2 flashes briefly about once every two seconds. Mosfets Q1-Q5 are all switched off and the 5V supply to VR1 and VR2 from output RB2 goes low, as the microcontroller goes into sleep mode, with the 20MHz oscillator also stopped. An internal watchdog timer then wakes the microcontroller up every two seconds to re-measure the battery voltage and flash LED2. One problem with this is that as soon as the unit goes into shut-down, the battery voltage is likely to rebound and then the circuit will restart normal operation, the battery voltage drops again, shut-down is reinstated and so on; not ideal. To prevent this, we have incorporated hysteresis into the shut-down function and this is set with trimpot VR2. It sets the increment of voltage by which the battery voltage must rise above the low battery threshold, for normal operation to be restored. The increment or difference between these two thresholds is known as the hysteresis. Typically, you might decide that the battery voltage must rise by 1.5V above the low battery threshold, ie, the battery should rise to 13V. To do this, you would set VR2 to 1.5V, measured at test TP2. So if the unit has shut down and the battery is subsequently charged to 13V, normal operation will resume, with siliconchip.com.au LED1 flashing in unison with the neon indicators. Soft start facility N-channel Mosfet Q5 provides soft starting, whereby the 2200µF bulk bypass capacitors are slowly charged at power-up to prevent high surge currents. If the capacitors were directly connected to the 12V supply, a high surge current of many amps is liable to blow the fuse. The high capacitor charging current will also momentarily exceed the current rating of the capacitor. The gate of Q5 is driven by a switched-capacitor charge pump comprising diode D8 and D9 together with 1nF and 10µF capacitors. The 1nF capacitor is connected to the pulse width modulated (PWM) output pin of IC1, pin 6. Initially, this pin is at 0V but shortly after power-up, it is set to produce a 4.88kHz square wave. Each time pin 6 goes high, the 1nF capacitor couples this voltage to the anode of D9 and thus current flows into the positive end of the 10µF capacitor, charging it slightly. Because the 10µF capacitor is 10,000 times the value of the 1nF capacitor, the increase in voltage across the 10µF capacitor is very small. When the PWM output is low, at 0V, any voltage across the 1nF capacitor is discharged via schottky diode D8. D8 is connected to the Mosfet source and so voltage developed across the 1nF capacitor is with respect to this source terminal, which is connected to the V+ rail powering transformers T1 and T2. The 10µF capacitor charges to a few volts above the source terminal after about 10,000 cycles, which at 4.88KHz is just over two seconds. It never quite reaches 5V though, in part because of the forward voltages of diodes D8 and D9 but also because the 10µF capacitor has a 100kΩ discharge resistor across it. In combination with the capacitor value, this gives a one-second discharge time constant. So there is a constant battle between the 1nF capacitor trying to charge the 10µF capacitor while the 100kΩ resistor is discharging at the same time. With a 4.88kHz PWM frequency, this tug-of-war results in a gate-source voltage of about 1.6V, insufficient for Q5 to reach full conduction. Higher PWM frequencies give a higher gate voltage, as there are more charge cycles per second to counter the slow discharge of the 10µF capacitor. For example, at 19.53kHz we get a 3.2V gate-source voltage. At this point, the Mosfet should be conducting sufficiently to charge the 2200µF capacitors. So the soft start feature is provided by increasing the PWM frequency from pin 6 to increase Q5’s conduction over the first few seconds of operation. Once Q5 is in at least partial conduction, the voltage across the 2200µF capacitors can be measured via the 130kΩ and 47kΩ voltage divider resistors at the AN5 analog input of IC1, pin 12. If there is a short circuit (eg, due to a faulty capacitor or Mosfet), the capacitor voltage will still be near zero. The gate drive can then be switched off and a fault indicated by Fault LED3 flashing. If there is no short circuit, the PWM is also switched off and pin 6 goes to 0V. The 10µF capacitor will start to discharge via its parallel resistor, switching Q5 off. However, there is no current draw as Mosfets Q1-Q4 remain off so the V+ voltage rail should remain at 12V, held up by the 2200µF capacitors. siliconchip.com.au If any of the 2200µF capacitors are leaky, the V+ rail will drop. IC1 can detect this by re-measuring the voltage at input AN5 and comparing it to the voltage while Q5 was switched on. If V+ has dropped by more than 2V, there is a problem and so the unit switches off and flashes the Fault LED. The slow charging of the 2200µF capacitors during power-up and the testing described above should prevent the fuse from blowing unless a fault occurs while the unit is running. In that, case the fuse will blow to protect the rest of the circuit. Once the checks have completed, Q5 is switched on fully by producing a 156kHz square wave at pin 6, giving a gatesource voltage of around 4.6V for Q5, giving a very low onresistance in order to feed the ultrasonic drive circuitry. Inductor L1 is included in series with Q5 to reduce high transient current flow through Q5 and the fuse from the 12V supply. Instead, any high current transients are drawn from the 2200µF capacitors. It also limits the peak current drawn from the input supply. This helps to prevent any nuisance blowing of the fuse and it also reduces the amount of hash radiated from the supply wiring. Reverse polarity protection for the circuit is provided by diode D7, which protects regulator REG1, its associated capacitors and microcontroller IC1. However, if the unit is hooked up with reverse supply polarity, current can still flow through the body diodes of Mosfets Q1-Q4, via the primaries of transformers T1 and/or T2, through Q5’s body diode and through fuse F1. The fuse will then rapidly blow, isolating the circuit and preventing further damage. That’s it for this month. In our June issue we will give SC the full assembly, set-up and installation details. LOOKING FOR PROJECT PCBS? PCBs for most* recent (>2010) SILICON CHIP projects are available from the SILICON CHIP On-Line Shop – see the On-Line Shop pages in each issue or log onto siliconchip.com.au/shop You’ll also find some of the hard-to-get components to complete your SILICON CHIP project, plus back issues, software, panels, binders, books, DVDs and much more! Please note: the SILICON CHIP OnLine Shop does not sell complete kits; for these, please refer to kit suppliers’ adverts in each issue. * PCBs for some contributed projects or those where copyright has been retained by the designer may not be available from the SILICON CHIP On-Line Shop May 2017  83 Micromite BackPack V2 with Touchscreen LCD and Onboard Programmer By Geoff Graham The Micromite LCD BackPack described in the February 2016 issue is probably the most popular project Silicon Chip has ever published in recent times. This revised version incorporates the Microbridge described in this issue. This adds a USB interface and the ability to program/reprogram the PIC32 chip while it's onboard. And the BackPack V2 also adds software control over the LCD backlight. T he Micromite LCD BackPack has been a huge hit with over a thousand built since it was introduced in February last year. For those who missed it, the BackPack combines the Micromite, which is a low-cost, highperformance microcontroller programmed in BASIC, with an equally low-cost LCD touchscreen. Together, the pair make a potent combination, allowing you to easily design a gadget with an advanced user interface. We have published quite a few examples of this, for example, the Boat Computer in April 2016 and the DDS Signal Generator in April 2017. While the original Micromite LCD BackPack was easy to build, it did require you to use an external USB/serial converter so that you could load and run programs. You also needed a PIC32 programmer to load and update the MMBasic firmware in the Micromite and many people felt that $65 (plus freight) for 84  Silicon Chip a genuine PICkit 3 programmer from Microchip was too expensive. This new design includes both the USB/serial interface and PIC32 programming capability in a single additional chip, dubbed the Microbridge; see the separate article describing its operation in this same issue. Because the Microbridge is so cheap, it has been designed to be a permanent part of the Micromite BackPack V2. So now you can update the firmware in the Micromite and edit your BASIC program without any extra hardware. We have also included the ability to control the LCD backlight brightness from within the BASIC program running on the Micromite. This requires just four additional components plus the use of an extra I/O pin on the Micromite. These components are optional; you can either include them or use the original brightness control arrangement with a trimpot (keeping the PWM pin free for other uses). Apart from the above additions, this new version of the Micromite LCD BackPack is exactly the same as the original. It is programmed in the same way, the I/O pins are the same and it will happily run programs written for the original version. It's the same basic formula but easier to use. Circuit details Fig.1 shows the complete circuit for the revised Micromite LCD BackPack, incorporating the Microbridge. IC2 is a Microchip PIC16F1455 microcontroller which is both a USB/serial converter and a PIC32 programmer – the Microbridge article which features on page 61 of this issue describes its function in more detail. When running as a USB/serial converter, pin 5 on the PIC16F1455 receives data (ie, data from the Micromite to the PC USB interface) and pin 6 transmits data (from the PC USB interface to the Micromite). These signals also run to the edge pins siliconchip.com.au Fig.1: complete circuit of the BackPack V2, incorporating the Microbridge (IC2) which acts as both a USB/serial converter and PIC32 programmer. Micromite chip IC1 runs the show while REG1 supplies both ICs with a regulated 3.3V. IC1 has an internal “core” regulator to provide itself with 1.8V which is filtered by the external 47µF tantalum or ceramic capacitor. for the console connection (CON1) in case you build this PCB but for some reason do not plug the Microbridge IC, IC2, into its socket. In this case, you can use an external USB/serial converter. The PIC32 programming interface from the Microbridge is on pins 7, 2 and 3 of IC2. These provide the reset function, program data and clock signals respectively. These connect to pins 1, 4 & 5 on the Micromite (IC1). The programming output on the Microbridge is only active when it is in programming mode, so the Microbridge does not interfere with the Micromite when it is using pins 4 & 5 as general purpose I/O pins. As described in the Microbridge article, switch S1 is used to select programming mode and LED1 indicates the mode (lit solid when in programming mode). CON2 is the main I/O connector for the Micromite and is designed so that it can plug into a solderless breadboard siliconchip.com.au for prototyping. The connector also makes it easy to add a third PCB to the LCD BackPack "stack" which can carry circuitry specific to your application (such as amplifiers, relay drivers etc). This connector is wired identically to the original BackPack. The Micromite communicates with the LCD panel using an SPI interface where pins 3 and 14 (on the Micromite) carry data to/from the LCD while pin 23 provides the clock signal. When the Micromite pulls pin 6 low, it is communicating with the LCD panel and when pin 7 is pulled low, the Micromite will be communicating with the touch controller on the display panel. The 28-pin Micromite has only one SPI port and so pins 3, 14 & 25 (SPI data and clock) are also made available on CON2 so that you can also use this SPI serial channel to communicate with external devices. Backlight control For controlling the brightness of the LCD's backlight you have two choices. The first is to fit Mosfets Q1 and Q2 to the PCB, along with their associated resistors (this area is marked with a box on the PCB). When you do this, PWM output 2A on the Micromite is used to control the backlight brightness from within your program. This is described in more detail later. Alternatively, as with the original BackPack you can fit VR1, which is a 100W trimpot. This is in series with the power to the backlight LEDs so it limits the current drawn by them and therefore sets the brightness. Note that you should install one set of components or the other (not both). In both cases, the LCD panel has a 3.9W resistor in series with the backlight so you will not burn out the backlight if you set the PWM output to 100% or wind VR1 all the way around to zero ohms. The power supply is derived from either the 5V connector pin on CON1 or if JP1 is installed, from USB May 2017  85 Firmware Updates The underside of the 2.8-inch ILI9341-based LCD panel we used in the Micromite BackPack V2. On the other side of the PCB to the top right of the LCD screen are the letters 2812C-SZ, which may prove useful when searching for this module. For firmware updates & manual please check the author’s website at: geoffg.net/micromite.html You should also check out the Back Shed forum at: www.thebackshed.com/forum/ Microcontrollers where there are many Maximite and Micromite enthusiasts who are happy to help beginners. connector CON4. Powering the Micromite LCD BackPack from USB power is handy during program development but for an embedded controller application, you would normally remove the jumper from JP1 and supply 5V power via CON1. Note that you should not try to power the BackPack from both CON1 and USB as you could cause damage to the USB interface on your computer. The 3.3V power supply for both the Micromite and the Microbridge is provided by REG1 which is a fixed output regulator with a low dropout voltage suitable for use with USB power supplies. This supply is also made available on CON2 so you can use it for powering external circuits (to a maximum of 150mA). Sourcing the LCD panel The ILI9341-based LCD panel used in the Micromite LCD BackPack comes in three sizes: 2.2", 2.4" or 2.8" diagonal. The PCB for the Micromite LCD BackPack V2 is designed to suit the mounting holes for the 2.8" version, however, compatible displays of any of these three sizes will plug into the PCB and will work perfectly. So your only issue with using a 2.2" or 2.4" display will be that you will need to use some other physical mounting arrangement. These displays also include an SD card socket but that is not supported by the Micromite due to memory limitations. The best place to find a suitable display is on AliExpress or eBay but other online markets also have them as well as some online retailers. There are many variations on offer so make sure that the display that you purchase matches the photographs in this article. This is important; the Micromite has been extensively tested with 86  Silicon Chip the photographed display so you can be sure that it will work. Make sure also that it has the touch controller installed. Other features to look out for in a compatible display are an orange PCB, a resolution of 320 x 240 pixels and an SPI interface. Often, the description will emphasise that the display is for use with the Arduino but that is not relevant; it will work just as well with the Micromite. On eBay, the best way to find a suitable display is to search for the phrase "ILI9341 LCD". You should find many displays from US$7.00 upwards. If you don't want to deal with any of that, you can purchase a kit from the Silicon Chip Online Shop which includes the LCD touchscreen, PCB, programmed microcontrollers and all the other bits you need to build the BackPack V2. It even includes a laser-cut acrylic lid in one of several different colours that you can use the mount the BackPack neatly in a UB3 jiffy box, along with the required mounting hardware to fit the BackPack to this lid. Construction Refer to the PCB overlay diagram, Fig.2. As usual, start construction with the low profile components such as resistors and work your way up to the bigger items such as the connectors. Begin with the USB socket as this is the only required SMD component. Match the two small plastic pegs on the connector with the corresponding holes on the PCB then solder the connector's mounting lugs using plenty of solder for strength. Finally, using a fine point soldering iron tip, solder the signal pins. Examine the pin solder joints carefully under good light with magnification and clean up any bridges with solder wick and a little flux paste. If you are installing the backlight PWM control components, you should mount Q1 and Q2 next as they are also surface mount types. They are not hard to solder as their pin spacing is quite wide. Don't get them mixed up as they look almost identical. We recommend using a socket for both IC1 and IC2 as that will enable you to swap out the chips if you suspect that you have damaged one or both. The 14-pin female connector used for CON3 (the LCD panel) is difficult to source so unless you've purchased a kit, the best approach is to cut down a longer header to size and then use a file to smooth the rough edge so that it looks presentable. The 10µF and 47µF tantalum capacitors are polarised (the longer lead is positive) so make sure that they are orientated according to the silk screen on the PCB. The 47µF capacitor is particularly critical and must be a tantalum or ceramic type, not electrolytic. Rather than using tantalum capacitors, we prefer to use SMD ceramic types with an X5R dielectric. In this case, you can use 10µF 6.3V capacitors in all three locations. They tend to be more reliable than tantalums but are not as easy to obtain. When soldering the pin headers for CON1 (power) and CON2 (input/ output), remember that the headers should be mounted on the underside of the board, as illustrated in the photos. Don’t mistakenly mount them on the top of the board because then they will then be impossible to reach when an LCD panel is attached. Before you plug the microcontrollers into their sockets, it is prudent to apply power and check that 3.3V is on the correct pins of IC1 and IC2 and 5V is on the correct pin of CON3. With that check made, remove power and plug in both microcontrollers and the LCD panel. siliconchip.com.au CON2 Mode If you have a blank PIC16F1455 microcontroller, it should be programmed with the latest Microbridge firmware (2410417A.HEX), which can be downloaded from the Silicon Chip website. This can also be done using another Micromite and a 9V battery; see the Microbridge article for details on how to do this. The BackPack PCB and the LCD panel can then be fastened together on all four corners with 12mm tapped spacers and M3 machine screws. Be careful when handling the LCD panel. The ILI9341 controller is sensitive to static electricity and can be easily destroyed with careless handling. Make sure that you are grounded when handling the display and avoid touching the connecting pins. Programming the PIC32 If you have a blank PIC32 chip, this needs to be programmed with the Micromite firmware via the Microbridge. This procedure is covered in detail in the Microbridge article so we will only provide an abbreviated description here. The first step is to get the Micro-bridge working as a USB/serial bridge. This involves installing the correct drivers (available from www. microchip.com/wwwproducts/en/ MCP2200) and launching a terminal emulator and connecting to the COM port created by the Microbridge. You can verify that everything is working correctly by typing characters into the terminal emulator and checking that LED1 on the BackPack flashes with each keystroke. siliconchip.com.au 10 F IC1 PIC 32 MX170F256B-50I/SP CON3 LCD 100nF 100nF 2N7002 Q1 Micromite LCD BackPack V2 PWM 07104171 Backlight The Micromite LCD BackPack V2 includes the Microbridge (the 14-pin chip at left) which incorporates a USB/serial converter and a PIC32 programmer. You can also control the LCD backlight brightness via the BASIC program running on the Micromite. This uses four components that can be seen below IC1. Note, this is an early prototype and the final PCB differs slightly (it includes an extra 10kW resistor above IC2). (UNDER) REG1 MCP1700-3302E DMP2215L Q2 1k S1 IC2 PIC16F1455-I/P USB CON1 + 100nF 1k CON4 10 F + A 10k 10k LED1 47F + (UNDER) 5V TX RX GND RESET 3 4 5 9 10 14 16 17 18 21 22 24 25 26 3V3 5V GND JP1 Manual Backlight VR1 100 Fig.2: follow this overlay diagram to build the Micromite LCD BackPack V2. CON4 is the only required SMD component; SMD ceramic capacitors can optionally be used in place of the tantalum types for better reliability. If fitting Q1 and Q2, to be sure to also install the two associated resistors and leave VR1 out. Note that CON1 and CON2 are fitted to the underside of the board. Now close the terminal emulator. This is important as the programming operation will fail if it is still open. You need a Windows computer for the next step. Run the program pic32prog (available for download from the Silicon Chip website) in a command prompt box with the command line: pic32prog -d ascii:comxx yyyy.hex Where xx is the COM port number created by Windows for the Microbridge and yyyy.hex is the file containing the latest Micromite firmware. For example, if your Microbridge was allocated the virtual serial port of COM6 and the file that you wanted to program was "Micromite_5.03.02.hex", the command line that you should use would be: pic32prog -d ascii:com6 Micromite_5.03.02.hex When you press Enter, pic32prog will automatically run through the programming sequence and then return to USB/serial mode. You can then launch your terminal emulator and when you press return you should see the Micromite command prompt (a greater than symbol “>”). Fault finding Your BackPack should work first time but if it does not, the first thing to do is check that the correct power voltages are on the IC1 and IC2 sockets and CON3 (the LCD connector). Then check the 5V current drain for the full module, including the LCD; it should range from 100mA to 200mA, depending on the setting of the backlight. If it is substantially lower than this, check that the PIC32 and the LCD are correctly seated in their sockets. With the LCD removed, the current drain should be about 30mA. If it is a lot less than this, it indicates that the PIC32 processor has not started up and in that case, the 47µF capacitor is the The underside of the prototype LCD BackPack V2 contains the pin connections for the Micromite. Note that the 10kW resistor soldered between pins 1 and 7 of the PIC16F1455 is soldered through-hole on the top layer of the final PCB. May 2017  87 displayed on the console. You also might get a message indicating that the calibration was inaccurate and in that case you should repeat it, taking more care to press steadily on the centre of each target. As before, these calibration details are saved in non-volatile memory and will be re-applied at power up. You can now test the touch facility with the command: GUI TEST TOUCH This will clear the screen and when you touch it, pixels will be illuminated at the touch point. This enables you to test the accuracy of the calibration. Pressing any key in the console will terminate the test. This is what the screen looks like when running “GUI TEST LCDPANEL” as it draws a series of coloured circles on top of one another. most likely culprit. It must be a tantalum or multilayer ceramic type; not an electrolytic. If the current drain is correct, check that the Microbridge is working correctly. Does your PC recognise it as a valid USB device? Do you have the correct driver installed? Do you have your terminal emulator configured correctly? You can check the Microbridge's operation by typing characters into your terminal emulator and watching for the LED to flash as they are received by the Microbridge. display by entering the following at the command prompt: Configuring the Micromite This allocates the I/O pins for the touch controller and initialises it. This option is also stored in non-volatile memory and automatically applied on power-up. Before you can use the touch facility, you need to calibrate it. This is done with the following command: The next step is to configure the Micromite for the LCD panel. To do this, type the following line at the command prompt (via the USB/serial connection and your terminal emulator software) and hit the enter key: OPTION LCDPANEL ILI9341, L, 2, 23, 6 This tells the Micromite that the LCD panel is connected and which I/O pins are used for critical signals such as reset and device select. This option only needs to be entered once because the Micromite will store the setting in internal non-volatile memory and will automatically recall it whenever power is applied. Following this command, the Micromite will initialise the display (which should go dark) and return to the command prompt. You can test the 88  Silicon Chip GUI TEST LCDPANEL This will cause the Micromite to draw a series of rapidly overlapping coloured circles on the display as shown in the photo above. This animated test will continue until you press a key on the console's keyboard and MMBasic will then return to the command prompt. To configure the touch feature, enter the following at the command prompt: OPTION TOUCH 7, 15 GUI CALIBRATE This will cause MMBasic to draw a target in the upper left-hand corner of the screen. Using a pointy but blunt (ie, not too pointy) object, such as a toothpick, press on the exact centre of the target. After a second, the target will disappear and when you lift your implement another target will appear at upper right. Continue pressing on the targets in this fashion until you have calibrated all four corners of the screen. The message "Done. No errors" should be Using the Microbridge Using the Microbridge interface is quite easy. If you have identified the COM number allocated by your operating system, you can enter this into the set-up of your terminal emulator (we recommend Tera Term for Windows). The Microbridge defaults to a speed of 38,400 baud so your terminal emulator will need to be set to a value of 38,400 baud to match the default speed used by the Micromite's console. You can change the interface to a higher speed if you wish and this makes program loading much faster and convenient. For example, at 230,400 baud the built in Micromite editor (the EDIT command) is blazingly fast. To make the change, you need to set the interface speed on the Micromite and then in your terminal emulator. First, change the speed of the Micromite by issuing the following command at the command prompt: OPTION BAUDRATE 230400 The Micromite will immediately switch to this speed so you will see some junk characters in your terminal emulator window. You then need to re-configure your terminal emulator for 230,400 baud. Press Enter and you should see the MMBasic command prompt (“>”). Both the terminal emulator and the Micromite will remember this new speed so you do not need to set it again. If you configure the Micromite to some other baud rate and forget what it is, you may be stuck with a Micromite that you cannot communicate with. If that happens, you can restore siliconchip.com.au the Micromite to its original defaults using the Microbridge. The reset can be performed by pressing the mode switch on the Microbridge for two or more seconds, while simultaneously sending a continuous stream of exclamation marks at 38,400 baud, via your terminal emulator. Then release the mode switch while still sending exclamation marks for another two or more seconds. This causes the LED to flash and the MCLR line is briefly driven low to cause the reset. This will completely restore the Micromite to its initial configuration of 38,400 baud and erase any program and options held in memory. As a result, you will need to re-configure the Micromite for the LCD panel as described earlier. Backlight control If you installed the 100Ω trimpot for manual backlight control, the brightness adjustment is as simple as tweaking VR1 to your preference. If you installed the components for the PWM-controlled backlight (ie, Q1, Q2 and the two associated resistors), the brightness is controlled via the PWM command in MMBasic. By default, the backlight will be at full brightness but it can be controlled with the following command: PWM 2, 250, xx where “xx” is the percentage of full brightness required. This can range from 0 to 100. For example, a brightness of 75% is a good compromise between visibility and power consumption and this can be set with the following command: PWM 2, 250, 75 Within a program, you can get a nice fade from full brightness to black by using the following program fragment: FOR i = 100 to 0 STEP -1 PWM 2, 250, i PAUSE 4 NEXT i The PWM output used for the backlight control appears on pin 26 so this pin is not available for general I/O if you installed the components for the programmed controlled backlight. Interfacing with other circuitry The Micromite LCD Backpack interfaces to the world using CON2, siliconchip.com.au Parts List 1 double-sided PCB, code 07104171, 86mm x 50mm 1 ILI9341-based touchscreen LCD panel, 320 x 240 pixels, 2.8-inch diagonal (2.2 or 2.4-inch displays will need special mounting) 1 PCB-mount SPST momentary tactile pushbutton with 4.3mm actuator (S1) 1 100Ω 0.5W vertical side-adjust trimpot (Altronics R2579, element14 9608044 or similar) (only fitted if Q1 & Q2 are omitted) 1 28-pin narrow low-profile DIL IC socket (for IC1) 1 14-pin low-profile DIL IC socket (for IC2) 1 2-pin male header, 2.54mm pitch and jumper shunt (JP1) 1 4-pin male header, 2.54mm pitch (CON1) 1 18-pin male header, 2.54mm pitch (CON2) 1 14-pin female header socket, 2.54mm pitch (CON3) 1 mini Type-B USB 2.0 socket, SMD mounting (CON4) (Altronics P1308) 4 M3 x 12mm tapped Nylon spacers 4 M3 x 6mm pan-head machine screws 4 M3 x 8mm pan-head machine screws 4 Nylon washers, 3mm ID, 6mm OD, 1mm thick 1 laser-cut lid (optional) Semiconductors 1 PIC32MX170F256B-50I/SP microcontroller programmed with Micromite Mk.2 firmware V5.2 or later (IC1) – a PIC32MX170F256B-I/SP can also be used but will be limited to 40MHz 1 PIC16F1455-I/P microcontroller programmed with Microbridge firmware (IC2) – the PIC16LF1455-I/P and PIC16(L)F1454-I/P are also suitable 1 MCP1700-3302E/TO 3.3V linear regulator (REG1) 1 3mm red LED (LED1) 1 2N7002 N-channel Mosfet, SOT-23 package (Q1) (optional, for PWM-controlled LCD backlight) 1 DMP2215L P-channel Mosfet, SOT-23 package (Q2) (optional, for PWM-controlled LCD backlight) Capacitors 3 100nF multi-layer ceramic 2 10μF 16V tantalum or SMD ceramic, X5R, 3216 (1206) size 1 47μF 16V tantalum or 10μF SMD ceramic, X5R, 3216 (1206) size Resistors (all 0.25W, 5%) 2 10kΩ (1 optional, for PWM-controlled LCD backlight) 2 1kΩ (1 optional, for PWM-controlled LCD backlight) the main I/O connector. This is designed so that you can plug it into a solderless breadboard or connect to a third board mounted on the back of the BackPack (eg, see the Touchscreen Voltage/Current Reference project in the October and December 2016 issues). The silk screen on the PCB identifies each pin on the connector. The GND, 5V and 3.3V pins can be used to power your external interface circuitry. The maximum current that can be drawn from the 3.3V pin is 150mA while the maximum 5V load will depend on your 5V supply. The RESET pin is normally at 3.3V, pulled up by the onboard 10kΩ resistor, and if you pull it low the Micromite will reset. The other I/O pins connect directly to the Micromite and are marked with the Micromite pin number. You should refer to the Micromite User Manual (available for download from the author's website http://geoffg.net/ micromite.html, or the Silicon Chip website) for details of what you can do with each pin. Three of the pins on CON2 (pins 3, 14 and 25) are also connected to the LCD panel for communicating with the display using the SPI serial protocol. For this reason, they cannot be used as general-purpose I/O pins, however, they can still be used by you for SPI communications if needed – this is why they are included on this connector. The user manual describes how to use the SPI interface simultaneously with the LCD and it is not hard to do. However, for normal operation, you should make sure that you do not use pins 3, 14 and 25 for general I/O. SC May 2017  89 Opus 96: The latest in digital hearing aids from by Ross Tester Readers, especially those with any hearing loss, would be aware of the considerable advances in hearing aid technology over recent years; most particularly over the past decade. W e’ve seen the transition from analog to digital devices, at the same time witnessing a dramatic reduction in size and weight. More importantly, we’ve seen performance getting better and better. It may be incremental but each new model offers the user more control and more “tailoring” to suit their particular needs. We first looked at modern hearing aids in our July 2011 issue. We commented at the time that it might be thought unusual for an electronics magazine to be “reviewing” hearing aids – but justified it with two main reasons. (1) a significant proportion of SILICON CHIP readers were in or getting into the age groups where hearing loss was becoming a problem and (2) we were cognisant of the fact that the advances in hearing aid technology also reflected advances in electronics as a whole. And that was a field that we at SILICON CHIP are vitally interested in, as are our readers. Since then, it has become apparent that there is a third, perhaps even most important, justification: various studies have produced ample evidence that even today’s younger audience already have significantly degraded hearing, brought about mainly by prolonged exposure to too-loud music and sadly, the use of those infernal in-ear “buds” which, once again, have been proven to do irreparable 90  Silicon Chip damage to hearing. (It’s not normally simply wearing the earbuds themselves which cause the problem, it’s just that 99% of users have them way, way too loud). That group of people will find that even if their hearing hasn’t deteriorated noticeably already, as the classic song says, “Just you wait, ’Enry ’Iggins, just you wait!” Juvenile and young adult hearing loss been described as one of the greatest epidemics Australia (and the world) has ever experienced (and will continue to do so for decades to come). The pity of it all is that it is self-induced. OK, we know there are extensive hearing problems now and these will not be getting any better in the future. So until someone comes up with a new “miracle”, hearing aids will be the only real answer. Aussie ingenuity Our first look at hearing aids came about through extensive consumer publicity at the time from an Australian company, based in Melbourne. BlameySaundersHears had opened up the hearing aid market with the introduction of state-of-the-art models at significantly lower prices than had been available earlier. More importantly, they also developed both software and hardware which enabled the user to “program” or tailor their hearing aids to suit the individual. No longer siliconchip.com.au Here’s what you get when you purchase a pair of Opus 96 hearing aids from BlameySaundersHears: the hearing aids themselves (in the green box), the Incus programmer (at right), a selection of ear tips and cleaners, the Sound-n-Dry storage container (centre) and instructions for the IHearYou software and the hearing aids. Not shown here are the tiny USB Bluetooth dongle nor the packs of “312” zinc-air hearing aid batteries. did that entail a visit to an audiologist with its attendant costs, followed by the hearing aids being adjusted in a factory before delivery and fitting by the audiologist – again, with more costs. You could easily spend $10,000 or more for a pair of advanced hearing aids! I have to admit that my interest was slightly less than altruistic. In a word, I was deaf! Even without having had a “proper” hearing check done, I knew one ear was way down in sensitivity, also finding some difficulty deciphering speech (particularly) from that direction. In my own case, being able to program the hearing aids for different profiles meant that the hearing aid for one ear could be adjusted to virtually match that for the other ear, which was nowhere near as damaged (incidentally, the damage to my ear came about some forty years earlier via an accidental over-exposure in the “Electronics Australia” laboratory – but took probably twenty years to really manifest itself. That’s just one insidious part of hearing loss – it sneaks up on you!). So we got in touch with BlameySaundersHears (they had a different name at the time) and arranged for a pair of their hearing aids, plus programmer, for review. They were understandably a bit hesitant (after all, we were talking a couple of thousand dollars!) so we agreed to buy them, at full price, which would be refunded when returned. Wow! To say that I was impressed with those first hearing aids is quite an understatement – they really did make that much difference. So much so that I never sent them back and have worn hearing aids ever since! New digital hearing aids A couple of years later (late 2012, actually) Blamey and Saunders approached me, this time, to review a pair of their new SIE-64 digital hearing aids. After my experience with the originals, I was happy to do so. siliconchip.com.au After swapping back and forth between the originals and the SIE-64s, I determined that the new models were better. As I said in that article, they had a crispness and clarity which was even more pronounced than the originals. Had I not known about the new ones, I’d have been quite happy to continue using the originals – but the SIE-64s quickly became the hearing aid of choice. As a bonus, they were about half the weight and slightly smaller than the originals, not that I particularly noticed that difference in use. We published a report of these hearing aids in March 2013. Even more advanced digitals After the very positive reaction BlameySaundersHears received from readers from the first two SILICON CHIP articles, they recently told us that they had a new model, the “Opus 96”, coming out shortly that was even better than previous models – and would we like to road-test a pair of these? Of course, we said yes! Apart from anything else, we wanted to see just what advances had been made in the past four years. Pointing out that my last true audiology test was done more than seven years ago, they also asked me to re-take their (free) online “Speech Perception” test. While it doesn’t replace a controlled audiology test, it gives a good indication of your hearing – or lack of it. This test consists of fifty words being read out, which you have to listen to via speakers or headphones, then enter the word via the keyboard as you hear each one. (They aren’t concerned about spelling, just the word identification). These words have been scientifically chosen to test your hearing on certain vowels and consonants and will give an audiologist a very good idea of your hearing limitations. I was not overly surprised to find that I correctly identified less than half of the spoken words (24/50) so my deteriorating hearing suspicions were confirmed. In later correspondence, Peter Blamey told me that the May 2017  91 They’re tough . . . but not indestructible! One night my partner and I were sitting watching TV and I had removed my hearing aids which I normally do just before bedtime. I put them on a table beside the lounge when, a short time later, she looked up and exclaimed “what is Tessie chewing on?” Tessie, by the way, is our 7-year-old Miniature Schnauzer. The accompanying photo shows the end result of what she was chewing on – one $2270 BlameySaunders SIE-64 hearing aid that had fallen on the floor! It could have only been a few minutes but she made a real job of it! Want to know what’s inside a hearing aid? Fortunately she hadn’t managed to dislodge the tiny battery from its holder. While zinc-air batteries are theoretically nowhere near as dangerous as lithium batteries when ingested (see panel at right), there are plenty of warnings on the ’net about the dangers of children (and pets?) swallowing them. Personally, I’d rather not take the chance! new hearing aids had been programmed with the results of the Speech Perception Test and these were quite different from the settings used on my earlier hearing aids. The new Opus hearing aids They’re called the Opus 96 – the 96 referring to the number of output channels being fed to the sound processor. Appearance-wise, there’s nothing to differentiate them from the SIE-64 aids. You can get them in different colours but mine are the same light grey (the other colour is flesh). The first thing you are supposed to do when you unpack your new hearing aids ‑is fine-tune the hearing aids to the acoustics of your ears; ie, set the volume levels to their optimum, using the loudness balancing procedure in BlameySaunders “IhearYou” software. The Speech Perception Test does not attempt to identify differences between your left and right ears, only the overall word identification. While BlameySaundersHears will pre-program your hearing aids before despatch according to either the online test or to a true audiologist report, that doesn’t usually give you optimum settings for each ear. So it’s pretty important to balance them before use. Did I do it? Of course not! Being of the genus “impatient”, I took them out of their case, whacked in the batteries and 92  Silicon Chip thought “hmm – these are different!” Different good or different bad I wasn’t sure of, so then I thought I should do the right thing (as requested!) and balance the hearing aids to my ears. This entails connecting the aids to the Incus programmer via a pair of flying leads. These are colour-coded red (for right) and blue (for left). These are not overly difficult to fit – you simply open the battery compartment slightly, insert the flexible connector and close the battery compartment. There is, however, a right way and a wrong way to insert the connectors (it’s explained in the instructions) – but if you get it wrong, the red and blue LEDs on the Incus programmer won’t light up. How do I know this? Guess! Connection to your PC (Windows Vista up, Android V4 up or iOS is via a Bluetooth dongle (supplied). Like other Bluetooth devices, it’s simply a matter of finding the Incus and pairing it. Mine didn’t even ask for a password (which incidentally is 0000). When connected, you use a series of sliders (at various frequencies) to adjust your left and right ear to be as balanced as possible, If I have any criticism to make, it’s of this procedure. You cannot do an “instant” A-B (or in this case L-R) comparison, so you’re really trying hard to remember what the other ear sounded like maybe 20 or 30 seconds ago. After years of evaluating speakers and amplifiers with an A-B switch going from one to the other instantly, I found this one area rather frustrating. It shouldn’t take much in the way of programming to be able to switch back and forth at each of the frequencies to really balance the hearing aids. But eventually I did manage to get them as balanced as I could and set about doing a comparison between these and the older SIE-64 hearing aids. And my reaction? Yes, there is a definite “edge” to the Opus hearing aids. Not dramatic (you wouldn’t really want it to be!) but at least noticeably better. Once again, if I had only the SIE-64 hearing aids and didn’t know anything about the Opus, I’d be happy with them. But having used the Opus models for a few days, I certainly have made them my hearing aids of choice. The SIE-64s will go back into their de-humifying (dessicant) storage containers just in case . . . The other thing that I noticed was that feedback, the bane of all hearing aid users, had been significantly better “tamed” with the new aids. I’m not sure if this is a function of better balancing using the Incus, or if it is a function of much greater control of the Opus 96 with double the number of channels. Telecoil feature Already programmed into my Opus hearing aids was a Telecoil function, accessed by pressing a tiny button. This (as its name suggests) was originally intended for use with a telephone but its use has been dramatically expanded so that it now works with hearing siliconchip.com.au loops found in many (most?) theatres, halls, churches, etc. It can be recognised by the international “hearing loop” logo being displayed wherever it is in use. You may not have noticed it but now we’ve mentioned it, you’ll see it everywhere (!). The Telecoil is an inductive pickup which receives a signal direct from either the telephone or a “hearing loop” built into the hall (or a section of it). The idea is that the hearing aid no longer relies on its inbuilt microphone to receive sound (especially speech, which could be muffled over distance) but receives a much higher quality direct signal. I haven’t had the chance (yet) to try out the Telecoil function so can’t report on its effectiveness. But rest assured I will be putting it to good use. One caveat! In some ways, I found the Opus hearing aids TOO good. I’ll explain why. Immediately below my office at SILICON CHIP is a kitchen bench fabricator, specialising in stone and similar benchtops. They have a polishing machine which, without hearing aids, I barely notice. With hearing aids, its constant whine is quite objectionable. But that’s not all! Every few days the guys throw out all their offcuts into a skip bin, ready for removal. And when I say throw, that’s an understatement! The sound of the stone smashing into the skip is also quite off-putting with hearing aids – so much so that I’ve made a setting which cuts back the level at the polishing and smashing frequencies. It’s not perfect but it’s a lot more bearable! In retrospect, I guess that is one of the biggest features of being able to program your own situation and preferences into the BlameySaundersHears hearing aids. You don’t need to pay an audiologist to do it for you; you do it yourself. And you can do it as many times as you like until you’re happy. Moreover, you can set up a number of “programs” which you can call on to suit various situations. The program to cut out the whine and smashing sounds is not really suitable for social listening – so I’ve set up a program for both. I’ve also set up another to tailor some TV programs to suit me – for example, I’ve found that many British “lifestyle” programs (eg, UKTV on Foxtel) sound quite muffled (apparently due to the way their audio is compressed). But with my BlameySaunders Opus 96 hearing aids, I can overcome that little problem quite easily. Conclusion So am I happy with the Opus 96 hearing aids? Very much so! And my partner is even happier – she no longer has to sit through a far-too-loud TV or radio program. Only this morning we were talking and I had to ask her not to shout. “Oh, you’ve got your hearing aids in!” For more information: To see the range of hearing aids available, including pricing, visit blameysaunders.com.au If you prefer to talk with a consulant, call BlameySaundersHears on (1300) 443 279. They also offer consulting rooms in Melbourne and Sydney. siliconchip.com.au About Zinc-Air Batteries Like most hearing aids, these BlameySaundersHears models use tiny zinc-air batteries. Specifcially, the Opus 96 use “312” batteries, as do the SIE-64 models. The LOF use an even thinner “13” size. But what is a zinc-air battery? Like all batteries, a zinc-air battery generates power via a chemical reaction. In a nutshell, it works by oxidising zinc with oxygen from the air. Oxygen molecules enter the cell through tiny holes in the top and then come into contact with a positively charged electrode (cathode) made of porous carbon. The main difference you will note with a zinc-air battery is that each cell has a small adhesive tab attached – once you remove this tab, air can penetrate the battery and it will (after a brief time, between 30 seconds and few minutes, depending where you read it!) start to generate power. Once started, the process cannot be halted (even if you stick the tab back on) and the battery will continue to generate power, at about 1.45V, for perhaps 5 or so days, often depending on brand. (Some references say much longer but this is not our experience). So don’t do as one user did (we read about online) and dutifully removed all the tabs so the batteries would be quickly ready for later use . . . only to find that later they were all flat! One big advantage of zinc-air batteries in hearing aids is that the voltage produced is quite stable until almost end of life, so the hearing aid parameters will not be affected. Even though the process cannot be stopped once started, it is still recommended that the hearing aid be turned off when not in use (ie, the battery compartment is opened) as this is claimed to prolong the life of the battery. Cost Zinc-air batteries are said to produce double the energy of a lithium-ion battery, at a third of the cost. Speaking of cost, expect to pay about $50 for a pack of 60 batteries – so that’s an ongoing cost to take into account. Zinc-air batteries are definitely NOT rechargeable. Safety If swallowed, zinc-air batteries are reputed to be VERY much safer than typical button cells, most of which contain lithium, mercury and other “nasties”. We’ve all seen the horror stories of major injury and worse when the stomach acid attacks these batteries; while swallowing a zinc-air battery is not recommended, most of the documentation we’ve read says that they won’t cause major damage. SC May 2017  93 CIRCUIT NOTEBOOK Interesting circuit ideas which we have checked but not built and tested. Contributions will be paid for at standard rates. All submissions should include full name, address & phone number. Using GPS Analog Clock as a 1pps signal source We've previously described using a GPS module as a source of a very accurate (in the long term) one pulse-per-second (1pps) signal. For example, see the GPS 1pps projects in the March 2008, February 2013 and April 2013 issues. However, operating these devices from a small battery is not practical since the GPS module needs to be powered for the whole time and it draws around 50mA continuously. In this month's Ask S i l i c o n C h i p pages, K. S., asks whether it would be possible to modify the recent GPS Analog Clock Driver project (February 2017) to provide an accurate 1pps signal with a much lower battery drain. That project uses the crystal oscillator in a low-power microcontroller to keep track of time and it periodically 94  Silicon Chip powers up a GPS module to get an accurate timestamp, which it then uses to adjust the crystal-derived 1pps signal, to compensate for it running fast or slow. Some simple modifications to that project, shown here, can therefore be used to produce the requested 5V TTL 1pps signal with low battery drain. The circuit shown here has been modified to run directly from a 5V supply. However, you could just as easily build the power supply as described in the February issue if you need to run it from a lower voltage battery (eg, 3.7V Li-ion or LiPo). The output that was previously used to drive the clock motor now produces the 1pps signal, with a siliconchip.com.au Atmel-based digital clock and stopwatch This clock/stopwatch is based around an ATmega8 processor, 16x2 alphanumeric LCD, 4MHz crystal and not much else. It's powered from a 9V battery or DC plugpack. When the circuit is powered up, the clock displays 00:00:00. Pushbutton switches S3-S5 can then be used to set the time, with S3 resetting the seconds to zero, S4 incrementing the minutes and S5 incrementing the hours. Once the time has been set, switch S7 is used to start the clock counting. LED2 lights up to indicate that the clock is running. pulse width of around 40µs. This has been modified by removing the clamp diodes, which are no longer required, and adding a 1kW pulldown resistor. The resulting signal can then be fed to one or several separate clock drivers or any other piece of equipment which requires a 1pps signal. As with the GPS Analog Clock, the GPS module will only be powered up once every 44 hours, siliconchip.com.au To use the clock as a stopwatch, turn the clock off using S7 and reset the chip by pressing S2. Use switch S6 to select stopwatch mode; the display will now show centiseconds (ie, hundredths of a second) in addition to the seconds, minutes and hours. Hold down switch S8 to start the stopwatch running and LED3 will light up in response. It will stop counting when you release S8. This is handy for measuring very short events, ie, just a few seconds. To measure longer times, use switch S7 instead. In stopwatch mode, it can measure from 1 centi- so the average current consumption of the circuit should be well under 1mA. 1N4148 diodes D2 and D3 have been added to derive the ~1.24V signal which was previously fed to pin 1 of IC1 when the boost regulator (REG1) was operating. Now that REG1 has been removed, when PNP transistor Q2 is switched on (by output pin 3 of IC1 going low), 5V is supplied directly to the GPS second (1/100th of a second) up to 24 hours. The software for the digital clock/ stopwatch is written in BASCOM and can be compiled to a HEX file for uploading to the ATmega chip using the free trial version of BASCOM, which can be downloaded from: www.mcselec.com/index.php? option=comdocman&task=doc_ _ download&gid=139 The BASIC code itself is named “Digital Clock and Stopwatch.bas” and can be downloaded from the Silicon Chip website, free for subscribers. Mahmood Alimohammadi, Tehran, Iran. ($50) module. At the same time, the 2.2kW resistor connected to pin 1 of IC1 forward-biases these two added diodes, giving around 1.2V and thus signalling to IC1 that the GPS module is operating. The accompanying PCB overlay diagram shows how to use the existing PCB design to build this modified version of the circuit. Nicholas Vinen, Silicon Chip. May 2017  95 Using a CAN bus to monitor individual solar panels The Controller Area Network or CAN bus was developed for use in automobiles however this circuit demonstrates that it is quite useful in fixed installations. In this case, it was used to solve a problem with a large solar array. We recently installed a 27.5kW rooftop solar system comprising 55 500W 24V panels spread across three rooftops. These panels together charge a battery bank which is used to power a number of indoor lights between 5:30pm and 11:30pm. Initially this worked well, however, after a few months the battery bank started going flat before the 11:30pm light switch-off. After some investigation, it was determined that a large number of bird droppings on the panels were affecting their output so badly that they could no longer charge the battery bank during the day. We initiated a cleaning regimen to solve this, however, it quickly became apparent that we really needed a way to know which panels on which roofs needed cleaning on any given day. Hence, this circuit was developed, which allows us to monitor the power generation of each individual panel and produce an alarm if one panel is generating significantly less than average so that we know which one(s) to clean. Each solar panel has four separate modules attached to monitor its output. The first is a low-cost 30A current transducer module based on the ACS712 IC. One of these is connected in series with each panel to measure its output current. The second is a 24V-to-5V buck regulator module used to power an Arduino board. This Arduino monitors the output of the current sensor module and uses the fourth module, a CAN transceiver based on the MCP2515 IC, to communicate over a single twisted-pair which is strung between the panels. This cable has a characteristic impedance of 120W and as you would expect, is terminated at either end with a 120W resistor. Up to 120 nodes can be attached to a single bus, so more than enough for our 55-panel system (and even sufficient for our next planned system, with 100 panels). For simplicity, we are only using CAN 2.0 which can carry up to 8 bytes of data at a time from one node to the other. Up to 120 nodes can share a single bus and each has an 8-bit identifier (address) of 0 to 255 (compare this to RS-485 which is limited to 32 nodes per bus). Units with a lower address have a higher priority in case there is contention on the bus, so normally the master is assigned the lowest identifier. The CAN bus has excellent error checking capability. The maximum cable length for the CAN bus depends on the communication speed; see insert in circuit diagram. Each node must be connected to the main twisted pair cable via a pair of leads no longer than 30cm. In addition to one slave module for each panel, one or more masters are placed on the bus for two purposes. Firstly, they provide an interface between the CAN bus and a PC connected to their onboard serial port, allowing the PC to query the current flow for each panel and software running on that PC can then generate an alert if it detects that one of the panels needs cleaning. The alert can include information for the operator as to the location of the dirty panel(s). Secondly, each master module also has a numeric keypad which allows the operator to directly enter a slave address along with a relay Circuit Ideas Wanted Got an interesting original circuit that you have cleverly devised? We need it and will pay good money to feature it in the Circuit Notebook pages. We can pay you by electronic funds transfer, cheque or direct to your PayPal account. Or you can use the funds as credit to purchase anything from the Silicon Chip online shop, including PCBs and components, back issues, subscriptions or whatever. Email your circuit and descriptive text to editor<at>siliconchip.com.au 96  Silicon Chip number, which sends a command to activate one of its attached relays. This is intended to be used to power solenoids in a reticulated water supply in order to spray the panel, thus cleaning it. However, for the moment, our system relies on manually scrubbing the panels as installing such a system would be a big job and would only help with lightly soiled panels. To switch a relay on or off, switch S1 must be in the lower position, connecting pin D10 to ground. The operator then keys in the 3-digit node identifier, then a single digit to identify the relay number, then either 0 (off) or 1 (on) and presses the # key. The command is then sent to the appropriate node. With S1 in the upper position, connecting pin D10 to +5V, the master unit is in display mode where it scans the slaves and displays their overall status on the PC via its serial port. When queried by the master, each slave reads the solar panel current via the ACS712 module and its A0 analog input, using the internal analog-to-digital converter. When in display mode, the software running on the master PC queries each slave in turn, compares the readings and if any are significantly lower than average, alerts the operator as to which panels need cleaning. Since the output of the ACS712 is bipolar, ie, it can sense current flow in either direction, you may need to experiment with the connections between the ACS712 module and the Arduino to get the correct polarity reading. Slave nodes are assigned an address between 2 and 253. The main master address is 1 while secondary masters may be assigned an address of 254 or 255. The master and slave software sketches can be downloaded from the Silicon Chip website. Editor's Note: this solution is not directly applicable to a grid-tied solar system, since the bus voltage would be much higher (over 350V). However, it may be possible to adapt this circuit to work with such a system, with a number of changes to the overall configuration. Bera Somnath, Vindhyanagar, India. ($95) siliconchip.com.au siliconchip.com.au May 2017  97 500 1300 3300 6600 13,000 20 10 5 250 50 240 500 125 40 110 1000 Maximum bus length (m) Bus speed (kbit/sec) Table 1 Vintage Radio By Charles Kosina HMV’s 64-52 Little Nipper Charles Kosina has always enjoyed reading Vintage Radio every month in Silicon Chip. But rather than being simply nostalgic about his former job after school repairing radios, he decided to restore a valve radio that he purchased online, a 5-valve HMV Little Nipper, model 64-52. F or something of a nostalgia kick, I decided that I would try restoring a valve radio. On eBay there are numerous old radios for sale, some at quite ridiculous prices. After several unsuccessful attempts, I finally won an auction for an HMV Little Nipper 5-valve set which dates from about 1954. It is housed in a chocolate brown Bakelite cabinet and has a 5 x 7-inch oval loudspeaker which gives reasonable sound quality. As picked up, the radio was not working. It was reasonably clean but had some damage to the case and front panel. Also part of 98  Silicon Chip the trademark Little Nipper logo was missing. Fortunately, data for this set is easily obtained via the internet and I managed to download everything I needed. Fig.1 shows the complete circuit diagram which is a quite conventional 5-valve design. An internal ferrite rod antenna is tuned by one section of the tuning gang over the AM broadcast band and the signal is connected to grid 3 of the 6BE6 pentagrid converter, otherwise known as a heptode. It operates as a self-oscillating mixer, with the local Hartley oscillator func- tion tuned by the second section of the twin-gang capacitor. A fixed padder capacitor of 460pF is used in series with the tuning capacitor. Provision is also made for an external antenna coupled to the ferrite rod by three turns (L2) and via loading coil L1. The output from the plate, pin 5, is fed to the first double-tuned IF transformer which is peaked to an intermediate frequency of 457.5kHz. It feeds a 6BA6 remote-cutoff pentode. I noted with some interest the 10pF neutralisation capacitor from the plate of the 6BA6 to the bottom end of IFT1. The second IF transformer is connected to the 6AV6 demodulator and AF amplifier. The demodulator function is provided by one of two diodes. One of these could be used for AGC (automatic gain control) and the other for audio detection. In this circuit, only one of the diodes is used and its filtered negative voltage appears across the volume control, VR7. Further filtering is provided by R4 and C7 and is used as AGC for both the 6BA6 and the 6BE6. The signal from the wiper of the volume control is fed to the grid of the triode section in the 6AV6 and its plate signal is fed to the grid of the 6M5 pentode, which operates as a class-A stage driving the speaker via transformer T2. Negative feedback is applied from the secondary winding of output transformer T2 via the 25µF capacitor C20 to the cathode of the 6M5, to reduce distortion. Potentiometer VR2 and the associated capacitors provide a simple treble-cut tone control. The power supply uses a centretapped transformer feeding a 6X4 rectifier, the output of which is filtered by 16µF capacitor C19 for the 6M5 output stage and by two 10kW resistors in parallel (R10/R11) and 16µF capacitor C15 for HT to the preceding stages. Initial switch-on With some trepidation, I plugged it in and turned it on. That’s not really a siliconchip.com.au Fig.1: the circuit of the Little Nipper is quite conventional. It uses a ferrite rod antenna and its signal is coupled to grid 3 of the 6BE6 heptode, which functions as a self-oscillating mixer. good idea without some initial resistance tests. But it was a non-event, with no dial lamps but no smoke, which was a good start! Taking the back cover off I noticed that the cathodes were glowing on all but the 6BA6 valve. I have a collection of valves from decades back and I rummaged through these looking for a 6BA6. No luck but I came across a 6AH6, which is a sharp-cutoff pentode with an identical pinout. Well, let’s try that I thought and plugged it in. This brought success, of sorts, and the radio sprang to life but every station had a heterodyne whistle. With care, tuning to a zero beat produced a reasonable sound. The reason for the heterodyne whistles was obvious; too much gain. The 6BA6 has a transconductance of 4400µ℧ (µmhos) and a grid-to-plate capacitance of 0.0035pF. Contrast this with the 6AH6 which has 9000µ℧ and grid-plate capacitance of 0.03pF. Editor’s note: µ℧ (micromho) refers to the unit of conductance which is the reciprocal of resistance. That term came from spelling ohm backwards and is written with the upside-down capital Greek letter, omega. Conductance, typically referred to as “mu”, is used as a measure of gain in a thermionic valve (specifically triodes), siliconchip.com.au expressed in terms of amps/volt or the amount of plate current which flows for a given grid voltage. One micromho is equivalent to 1µA/V. More typically, gain was expressed in “millimhos”, equivalent to 1mA/V.) With double the gain and ten times the capacitance it was not surprising that the IF stage became an oscillator. As a quick test, I removed the cathode bypass capacitor, C8. That move reduced the gain enough so that the stage no longer oscillated. But this was just an interim measure as I wanted to keep the set as per original. Looking on eBay, one can obtain 6BA6 valves but at a price rather higher than I was willing to pay, as well as being far away so delivery could take some time. This is where friends come in. An email to a long-time friend resulted in him sending me a list of valves that he had been hoarding for many years and this included some 6BA6s. He very kindly posted me a couple, and when they arrived two days later I was able to plug one in. Sure enough, the circuit then worked well with no whistles. Being in a Melbourne outer suburb, all the metropolitan stations could be received well. The dial markings are obviously out of date as many stations have moved or disappeared but 3LO and 3AR are still approximately on the same dial spots, now renamed 774 and RN (Radio National). The blown dial lamps are rated 6.3V at 0.3A. Jaycar had replacements rated at 0.25A, which is close enough. It’s amazing that after so many years, near identical 6.3V lamps with screw bases are still available. The first modification I made was to replace the 2-core power flex with a 3-core double sheathed cord, to properly earth the chassis. The way to anchor the 2-core flex in those days was a knot inside the grommet; illegal and unsafe by today’s standards. I used a much better clamping system, as can be seen in the photos. Then I left the set running for some time, watching for any overheated components. None showed any signs of distress but I could not trust any of the high voltage capacitors. The filter capacitors, C15 and C19, are actually a dual electrolytic in one case. They showed no signs of distress but I have doubts about how long they would last. These will be replaced when I can get suitable new ones. All the paper capacitors subjected to high voltage were replaced with modern ones of the same or higher capacitance. I left the low voltage ones in May 2017  99 The top view of the set shows a pitch-covered output transformer, to the right of the power transformer. This photo was taken before the top of the chassis was cleaned. The rear cover of the set had damage around the mains outlet hole and so this was covered by the blue label, since the mains cable exits through the bottom of the set. This case cover was used in a number of Little Nipper models. The short black and white wires emerging from the back are for external antenna and earth. 100  Silicon Chip siliconchip.com.au At this stage of restoration, only two of the electrolytics had been replaced. The dual 16µF electrolytic on the left-hand side will have to be replaced, as well as the wax-covered paper capacitors. Some of the carbon resistors will also have gone high in value and will need to be replaced. Note the 3-core mains cord which has been properly anchored. place as I figured any leakage would not matter much. Cosmetic restoration Then it was time to fix the mechanical details. Internally, the chassis was reasonably clean. Using circuit board cleaner and a brush, I managed to clean off the accumulated grime on top of the chassis. The photo of the underneath of the chassis shows the construction techniques of the day which consisted of point-to-point wiring, with components wired to valve sockets and tag strips. Compared with today’s neat circuit boards it looks ugly but that is the way it was done then when we still had factories producing radios in Australia. Despite the untidiness, radios worked quite well. So far the restoration had been straightforward. However the Bakelite case presented some major challenges. This was something that I had never attempted before so I had to very quickly come up to speed on Bakelite restoration. The case had suffered damage in its past and there was a crack in the bottom right hand corner of the case. This had been glued together, but there was excessive glue and the broken piece was not quite in correct alignment. I decided that to break the siliconchip.com.au glue line and reglue it was too much of a risk, so decided to leave it as is. But I did remove the excess glue very carefully. The back cover had a piece missing next to the “Mains Outlet” hole. The cover is obviously designed to fit different models as the mains cable did not come through it anyway. What to do about it? Trying to reconstruct it was too hard and not really worth it. I opted instead to make a label cover with 300gsm photo paper to fit over the hole. Finally, I spent a fair while polishing the cabinet using car polish and a soft rotary brush on my electric drill. There were numerous tiny scratches and a few slightly deeper ones. Polishing made a huge improvement to the appearance although some of the deeper scratches are still there. With a lot more time, it could be improved further but that is an example of diminishing returns. The plastic escutcheon was a more difficult problem. It also had a repaired crack and only half the ‘Little Nipper’ logo was present. The repaired crack also had excess glue and the best option was to carefully remove it. As for the logo, the ideal way to fix this would be to make a replacement using a 3D printer. That’s a job for the future. At least the set had all four of the original knobs. Three of them were OK but the fourth was damaged and would not fit tightly on the shaft. I got around this by cutting a small rectangular piece of thin aluminium sheet and fitting it inside the knob so that it locked on the shaft flat. This was fitted on the least-used shaft, the tone control. Testing & alignment I decided to check the voltages to see how they compared to specifications. With a mains voltage of 234VAC the DC output from the 6X4 rectifier was 250V, with a ripple component of 16V peak-to-peak. This was close enough to the design figure of 280V±15%. Despite the amount of ripple on the DC voltage, there was no noticeable hum coming from the speaker. Likewise, the filtered voltage at C15 was 170V, compared with 185V in the specification. Finally, I decided to do a complete realignment. Fortunately, the downloaded data included a complete realignment procedure. Feeding in a signal generator, I discovered the IF was detuned to about 440kHz, not 457.5kHz as per the specification. Why was it 457.5kHz instead of the normal 455? Who knows? After tweaking this up, I then set the oscillator coil slug (L4) and trimmer (TC2) to have correct calibration May 2017  101 102  Silicon Chip +2 AF Frequency Response for the Little Nipper 64-52 Fig.2: the Little Nipper’s audio response was pretty typical for the day. It's quite far down at 5kHz and this is largely a result of the narrow IF response, which was desirable to get high sensitivity and good selectivity. 0 -2 -4 -6 dB at 600kHz and 1500kHz, and peaked the antenna trimmer (TC1) at 1500kHz. I don’t have the equipment to measure the sensitivity in terms of field strength as µV/m. My Meguro signal generator is calibrated in dB starting at 1µV, into 50W. Connecting to the antenna terminals does not give a good result as L1 is in series with the signal and heavily attenuates it. I wound two turns around the ferrite rod (L3), and by measuring the open-circuit and connected voltage, I calculated that the impedance seen by the signal generator was about 272W at 1000kHz. Measuring the voltage at the top of L3 indicated a voltage stepup ratio from the signal generator of 22 times. Tuning the receiver to a quiet spot near 1000kHz, and setting the generator to the lowest setting of 1µV (0dB) with 50% modulation at 400Hz, the tone was clearly audible. Because of the step-up ratio, this would represent about 18µV RMS at the control grid of V1. I decided to measure the maximum RF gain of the set, so first I disabled the AGC by shorting it out at C7, and measuring the rectified DC voltage at the top end of VR1. With the signal generator setting of +40dB relative to 1µV (this would be -8 -1 0 -12 -14 -16 -18 20 50 100 200 500 1k 2k 5k 10k 20k Frequency (Hz) approximately 169µV RMS) the DC voltage is -12.56V. This represents a gain of 74,300 or 97dB. Re-enabling the AGC, the output was -4.0V with the same input. I don’t have a direct way of measuring signal-to-noise so an estimate was made by measuring the peak-to-peak output voltage across the speaker terminals with an unmodulated carrier, followed by 400Hz modulation set to 50%. This gave me an S/N ratio of -32dB at 1µV + 30dB input, and -42dB at 1µV + 50dB. The audio output appeared adequate and the measured power into the speaker was 1.1W before there was any noticeable distortion of an input sinewave. I also did a frequency run on the set from the antenna to the speaker and this is shown in Fig.2. Using 1000Hz as the 0dB reference level, the -3dB point is about 1700Hz and at 3000Hz the audio response is 9dB down. Getting such an old radio working and looking reasonable was quite a rewarding task. Of course, the investment in time was way out of proportion to the final outcome but it provided an enjoyable trip down nostalSC gia lane. siliconchip.com.au ASK SILICON CHIP Got a technical problem? Can’t understand a piece of jargon or some technical principle? Drop us a line and we’ll answer your question. Send your email to silicon<at>siliconchip.com.au Capacitor questions I have a couple of technical questions. The first one is regarding the capacitors in the New Spring Reverb project in the April issue. I built the earlier unit published in the January 2000 issue and will have to think about whether to update. In the new design, the input has two 22µF capacitors in series to make a polarity insensitive capacitor somewhere between 11 and 22µF. The output has a single 22µF capacitor which is left out when a balanced supply is used. Why not use ceramic multilayer capacitors so the output can be left in and there is no problem if the supply is changed and the input signals are not subject to the possible effects of changing capacitance as the two caps switch over? Secondly, regarding the SC200 Amplifier power supply, I built the 20W Class-A amplifier (May-August 2007) and it has an audible (physical) buzz from the power transformer. There was a subsequent article on adding a small choke and capacitor in each connection to the rectifier from the transformer in the April 2011 issue. I applied this fix which has helped but has not eliminated the problem. Why do you not get this problem with the SC200? My guess is that maybe you do but when it is drawing 2.5A per side you are not going to hear it... or maybe anything. (J. G., Mount Helen, Vic) • Ceramic multi-layer capacitors do not work well for AC-coupling. They have too high a voltage coefficient and so introduce lots of distortion. The only ceramic capacitors we suggest you use for coupling would be C0G/ NP0 ceramics which are much larger and more expensive than other types; above about 1µF, electrolytic capacitors are the best choice for this job. There's nothing stopping you from installing back-to-back electrolytic capacitors at both the input and output of the Spring Reverb unit. There's provision for these on the PCB and it would work fine with either supply option. It's just an extra cost that we didn't think was justified as the components are not normally required. You are right that buzz is not much of an issue with Class-AB amplifiers like the Ultra-LD series and SC200 because they do not draw so much quiescent current. By the time they are Printing equipment front panels Can you tell me what sort of company I'd need to talk to about getting lettering and icons put on equipment panels? I tried silk screening companies but those folks only seem to do fabric. I also tried sign-writers but they don't seem interested and the one that did reply offered me adhesive vinyl lettering. (D. H., Sorrento, WA) • It depends on how you are getting the panels made. Some companies, eg, Altronics are cutting panels themselves and doing multicoloured printing on them with a specialised laser printer. When the front panel is removable, siliconchip.com.au our preferred method is to replace it with a PCB using the silk screen labelling as the label and routed slots and drilled holes for the mounting screws, switches, displays and so on. You can choose from a number of different solder mask colours including black, blue, red, green and yellow and specify the thickness, usually between 0.8mm and 2.0mm. The resulting fibreglass panels are quite strong and not overly expensive compared to other options. For further info on panels, have a look at this blurb we have on our website at: www.siliconchip.com. au/Help/FrontPanels drawing enough current for transformer buzz to be a problem, the sound level is likely to be so high that it masks it anyway. Mains buzz/hum/ripple is one of the limiting factors of the Ultra-LD Mk.3/4 performance which is why we went to significant lengths to address it in the complete amplifier we published (eg, putting a copper strap around the transformer) but it's still only contributing something like 0.0005% distortion for the aforementioned reason. Does a 230VAC inverter need to be earthed? I have an inverter which I purchased from one of the electronics stores a few years ago. It works fine for my application, but I thought I would check inside for the fuse ratings in case I ever needed to replace the fuses. What I did notice was that the mains outlet had no wire connected to the earth pin. Should this earth pin be connected to the metal chassis of the inverter? Secondly, there is a product on the market that can electronically protect a motor vehicle from rust, by applying an AC pulse to the metal structure, via a pad that works as capacitor coupling with the paintwork. Do these work in your opinion or is a sacrificial anode just as good? (A. D., Doonside, NSW) • The answer to your first question is no; the earth pin of the inverter's mains outlet should not be earthed. For a number of reasons, that is not a good idea and can create a shock hazard. Secondly, all of these vehicle corrosion prevention schemes, involving high voltage and capacitor coupling have little scientific basis. Nor is there any method by which you could apply a sacrificial anode. The best corrosion prevention is the modern paint systems applied to cars with the car bodies being totally immersed in a bath of primer coat. Cars with aluminium body shells are even better in this respect. All after-market corrosion prevention schemes for new cars are May 2017  103 Using the SC200 as a 630-metre band linear amplifier The SC200 amplifier featured in the January, February and March 2017 issues is a good workhorse design. You make a claim that it is rulerflat to 100kHz. Will you improve the frequency response slightly to 500kHz, so that it can be used as a linear amplifier on the amateur 630-metre band? Distortion at that frequency is not a problem as a Pi filter could easily be added at its output to remove unwanted signals. The ft of the transistors is still high enough to be useful. As the designer, you should know the response limits, making this a simple task. I have used an SC200 amplifier module at 0.1Hz! The circuit diagram has a small error where the protection clamp diodes go to the power rails and not to the transistor collectors. The Vbe multiplier has 100W resistors shown completely unnecessary as virtually all cars have a 5-year warranty against corrosion. Controlling the output of a fuel pump I am an auto electrician by trade and have contructed the Jaycar KC5502 12/24V 20A Motor Speed Controller kit based on your design from June 2011 and it works fine. The application it is to be used for is to control the speed of a fuel pump that has too much volume for normal operation. The car is turbocharged with a carburettor so the high pump volume is needed under full boost but is too much for normal driving conditions. So my question is whether I can use this kit with say a MAP sensor or something similar in place of the variable pot so that under boost, the speed control will go to full power and then return to a fixed, set speed under normal conditions. (F. F., via email) • What you are proposing is feasible, however, you would need to do a fair bit of additional signal processing to achieve it, which we suspect is outside your expertise. The speed pot in that design produces a variable voltage of 0.5-5V which is applied to pin 104  Silicon Chip on the PCB but these are shown as 220W on the circuit diagram. Also the 330W emitter resistor for Q5 is missing on the PCB overlay diagram, but is clearly visible in the photo on page 81 in the February issue. Have any board faults been reported? I have two identical amplifiers with identical components. One works; one "sticks" to the positive rail. I suspect that the output stage is not being pulled down! (L. B., Burwood, Vic) • We have not tested this amplifier at anything much above 100kHz but it is possible that it could be modified to give a reasonably flat response to 500kHz, provided that its closed loop gain was reduced to say, 11. To do this, increase the 470W resistor at the base of Q2 to 1.2kW. You will also need to drastically change or omit the RLC network at the output and then make whatever other changes are needed to render 1 of IC1 and this sets the motor speed. So if you could convert the output of your MAP (Manifold Absolute Pressure) sensor to operate over the required part of this range, it would do what you want. However, at high engine load, manifold pressure is low and so the output voltage from the MAP sensor is low but this is when you want the pump to run at full speed. Also, the output of the MAP sensor doesn't normally vary over the full 0-5V range. So you would need to invert the MAP output signal and also amplify/shift it and apply it to pin 1 of IC1 to achieve your desired result. A simpler but probably suitable approach would be instead to use a voltage switch in combination with the MAP sensor to switch the speed controller in-circuit when the MAP sensor output is high and bypass the speed controller when its output is low, to allow the pump to run at full speed. A suitable voltage switch is available as a kit from Jaycar, catalog code KC5377 and this is based on our Simple Voltage Switch for Car Sensors project from the December 2008 issue. The kit details are at: www.jaycar.com.au/ universal-voltage-switch/p/KC5377 the amplifier stable when driving your proposed load. You may also need to remove the fast recovery diodes (D3 & D4) at the output. Since harmonic distortion is not of interest in your proposed application, possibly the Vbe multiplier transistor and its associated components should also be omitted – just place a link between the collector and emitter pads for Q10 on the PCB. That way, there will be no quiescent current in the output stage. If you do decide to proceed, it would be wise to connect currentlimiting resistors in place of the fuses while you test it. Be aware that we have not done any work on this concept and cannot be certain that it would be practical. Thanks for bringing the circuit errors to our attention. We have published errata for that project and the errors have been fixed in the on-line edition. Connect the pump motor's negative terminal to the Voltage Switch relay common terminal, the relay's NO contact to the 12V supply and the NC contact to the motor speed controller's negative (-) motor terminal. Set the LK1 in the Voltage Switch to the High to Low (H/L) position and adjust the threshold to switch the relay when there is turbo boost. Preamp/amp has poor combined bass response I have built a stereo pair of CLASSiC-D amplifiers (November & December 2012), coupled with the Hifi Stereo Valve Preamplifier. My problem is that while the frequency response of both units measures almost totally flat from 20Hz to 20kHz, when I connect them together, lower frequencies from 20-100Hz take a severe dive of -12dB or more! Frequencies above 100Hz remain totally unaffected. Can you suggest a solution? (C. J., Samson, WA) • The problem is that the input impedance of the CLASSiC-D is quite low (less than 4.7kW) and is loading the outputs of the Valve Preamplifier more than it was designed to handle. You can fix this and achieve an almost flat response down to 20Hz by siliconchip.com.au Capacitor choice for bypassing ICs I notice of late you are specifying 100nF multilayer ceramic caps for supply bypassing (eg, in the New Spring Reverb project from the April issue of Silicon Chip). The layout photos show small blue caps that look more like 50V monolithic such as Altronics R2930A (Y5V) or R2931 (X7R). I would have thought that almost any 50-100V disc ceramic in almost any dielectric would suffice for this usage, so long as the series inductance was minimal, as is usually the case with ceramics (eg, Altronics R2865). I have also used polyester MKT caps for this purpose with no problems for audio use with TL072/74s; maybe LM833s would be a little more fussy. Can you please give a little guidance on this? (J. E., Denistone East, NSW) • On your first point, these days monolithic capacitors are the same as multi-layer ceramic capacitors changing the Preamplifier's output coupling capacitors from 220nF 630V polyester types to 4.7µF 450V electrolytic (eg, Jaycar RE6062). Make sure the polarity is correct (negative side to the output). Changing frequency of Motor Speed Controller I have built the control section of your High Power DC Motor Speed Controller from the February 2017 on protoboard. Everything is working fine except that I am unable to change the frequency of oscillation; I simply get a constant PWM frequency of 7.3Hz. (MLCC), although we agree that the term "monolithic" is confusing. We use MLCCs because they are tiny and cheap. As you say, almost any capacitor is suitable for supply bypassing, provided they have low inductance and low dissipation factor. MKTs and polyester capacitors are definitely suitable as well but tend to be a little more expensive and larger. Ceramic disc capacitors are probably OK but will typically have a higher ESR than multi-layer capacitors, as the latter are effectively multiple capacitors in parallel. Having said that, the ceramic type is more important in determining performance than the physical construction. NP0/C0G ceramic capacitors are usually the best (with the lowest ESR/ESL) but also the most expensive and largest for a given combination of capacitance and voltage rating. C0G/NP0 are also the only I also tried simulating the circuit and the result was a constant PWM frequency of 250Hz. The potentiometer action changes nothing. I have tried with different capacitor and resistor values for the external oscillator, so I think that it could be a problem with the code. (A. M., Oruro, Bolivia) • There is no code associated with changing the frequency. It is purely controlled by the external components for the RC oscillator. So VR1 should adjust the frequency since this changes the resistance component of the oscillator. Make sure the external RC oscillator is enabled in the configuration for the microcontroller (ie, EXTRC_IO). types of ceramic capacitors we would recommend for use in audio circuits (except for bypassing, of course). Their linearity is better than that of polyester dielectric (plastic film) capacitors and possibly even as good as polypropylene/polystyrene. By the way, NP0 and C0G refer to the same dielectric and may be specified interchangeably; note that both names contain zeros, not the letter O. Among the other common ceramic dielectrics, X7R is the next best thing after NP0/C0G and probably the best choice for bypassing ICs, followed closely by X5R. We tend to avoid Y5V ceramic capacitors; while they are cheaper and smaller than the other types mentioned above, their capacitance typically drops substantially at elevated temperatures and when charged to a higher voltage, by as much as 90%. Given the choice, you should use X7R/X5R rather than Y5V. For example: ; Program Configuration Register 1 ; code protection __CONFIG _CONFIG1, _CP_ALL & _CCP1_RB3 & _DEBUG_OFF & _ WRT_PROTECT_ALL & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _ MCLR_ON & _PWRTE_ON & _WDT_ OFF & _EXTRC_IO 100A speed controller wanted I have a speed control application that needs 100A capacity. Do you have any plans to upgrade your recent High Power DC Motor Speed Controller from WARNING! SILICON CHIP magazine regularly describes projects which employ a mains power supply or produce high voltage. All such projects should be considered dangerous or even lethal if not used safely. Readers are warned that high voltage wiring should be carried out according to the instructions in the articles. When working on these projects use extreme care to ensure that you do not accidentally come into contact with mains AC voltages or high voltage DC. If you are not confident about working with projects employing mains voltages or other high voltages, you are advised not to attempt work on them. Silicon Chip Publications Pty Ltd disclaims any liability for damages should anyone be killed or injured while working on a project or circuit described in any issue of SILICON CHIP magazine. Devices or circuits described in SILICON CHIP may be covered by patents. SILICON CHIP disclaims any liability for the infringement of such patents by the manufacturing or selling of any such equipment. SILICON CHIP also disclaims any liability for projects which are used in such a way as to infringe relevant government regulations and by-laws. Advertisers are warned that they are responsible for the content of all advertisements and that they must conform to the Competition & Consumer Act 2010 or as subsequently amended and to any governmental regulations which are applicable. siliconchip.com.au May 2017  105 Using GPS Analog Clock driver with two clocks I have a "station" clock which is two opposing battery-operated clocks in a metal case on a bracket on the wall. Each clock is electrically independent, each with its own 1.5V battery. It is fairly accurate – one side gains, the other loses, so taking an average gives reasonably accurate time! Neither clock has a second hand but I can hear them "ticking" so they must be stepped. My first question is: will the GPS driver in your February edition drive both these clocks in parallel? Also, since the PCB is too large to fit in the case (which is metal anyway), I need to put it in a separate plastic box and run a figure-8 wire back to the clocks. What is the maximum length this wire can be to still work properly? Lastly, since I will have the GPS driver separate, I am thinking of powering it from a plugpack in my junk box and make a floating 1.5V from a circuit I'm sure I'll find somewhere in one of your issues. What is the maximum voltage that this GPS driver will take (with the floating voltage at half the plugpack voltage)? I am thinking of using an old 5V Nokia charger if this will work. (J. B., Northgate, Qld) • While in theory you could drive the two clocks in parallel, the design does not have a lot of drive margin, particularly when the battery voltage drops. It would probably be better to drive the two clocks in anti-phase and use an inverting buffer stage to drive the second clock. The two separate output cables to the clocks could probably be up to about two metres in length. The GPS module itself can run from 5V, as can the PIC micro. Your Nokia charger would probably be OK, if the output is definitely 5V. It would be a good idea to omit the boost regulator from the circuit as it would be unnecessary and this would reduce the cost to build it. See Circuit Notebook in this issue, where we show how to modify the Clock Driver to run from 5V (but ignore the mods to the clock output as these are not relevant to you). You can use two identical resistors across the 5V output to generate the half-supply rail; somewhere around 220W should do the trick. This would also serve to limit the motor drive current due to the higher supply voltage. These could be soldered in parallel with schottky diodes D3 and D4, next to CON1. the January & February 2017 issues. I note it was designed with separate power and controller boards so would it be feasible to run two power boards in parallel, each with three Mosfets? Does the IRS21850S have adequate “fan-out” to drive six Mosfets? The Mosfets are rated at 120A each, so I’d guess they are more thermally, than current-limited. Could these instead be mounted on a heatsink? The diode does seem to be the limitation for “flywheel” current (60A). Could several of these be wired in parallel? (I. T., Duncraig, WA) • Ywo boards with three Mosfets would probably be sufficient for 100A but change D1 to a VS-80EBU04, available from element14. A suitable 100A fuse and inline holder would also be needed if your motor wiring does not already have one. Budget Senator speakers design I was comparing the internal volume of the budget Senator boxes to the recommended volume for Altronics C2036 drivers. They differ by a great margin; almost double. Why is it so? (E. B., Armadale, WA) • The data from Altronics gives a frequency response of 28Hz-2kHz for the C2036 but does not state whether this is a -3dB or -6dB response (or other). If you look at Fig.1 on page 38 of the May 2016 issue, you will see that the Budget Senators have a usable response well Radio, Television & Hobbies: the COMPLETE archive on DVD YES! A MORE THAN URY NT CE R TE AR QU ONICS OF ELECTR HISTORY! This remarkable collection of PDFs covers every issue of R & H, as it was known from the beginning (April 1939 – price sixpence!) right through to the final edition of R, TV & H in March 1965, before it disappeared forever with the change of name to EA. For the first time ever, complete and in one handy DVD, every article and every issue is covered. If you’re an old timer (or even young timer!) into vintage radio, it doesn’t get much more vintage than this. If you’re a student of history, this archive gives an extraordinary insight into the amazing breakthroughs made in radio and electronics technology following the war years. And speaking of the war years, R & H had some of the best propaganda imaginable! Even if you’re just an electronics dabbler, there’s something here to interest you. Please note: this archive is in PDF format on DVD for PC. Your computer will need a DVD-ROM or DVD-recorder (not a CD!) and Acrobat Reader 6 or above (free download) to enable you to view this archive. This DVD is NOT playable through a standard A/V-type DVD player. Exclusive to: SILICON CHIP 106  Silicon Chip ONLY 62 $ 00 +$10.00 P&P Order now from www.siliconchip.com.au/Shop/3 or call (02) 9939 3295 and quote your credit card number. siliconchip.com.au below 28Hz in the recommended enclosure, with a -3dB point of around 24Hz and a -6dB point below 20Hz. So the larger enclosure extends the bass response. We would not expect a sealed enclosure volume of 30 litres or a vented enclosure of 40 litres to be able to match this. 1pps signal wanted from GPS Clock Driver I saw the article on building a GPSbased Analog Clock Driver in your February 2017 issue. I would appreciate if you could confirm if this could be adapted for my clock. Many years ago (mid-1970), I built a digital "analog" clock. It has sixty LEDs in a circle, surrounded by a 12 LED circle. On this are seconds, minutes & hours indicated by illuminating the appropriate LEDs. Surprisingly, the TTL logic chips used back then still work very well 40 years later. This clock is timed by a quartz crystal. This was accurate enough back then but I think it could be vastly improved by using GPS data. The old crystal does not keep time as well now as it once did. What I like about your analog clock driver is that the power consumption is very low as the GPS module is not running non-stop. So, what I'm looking for is a simple 1Hz pulse in 5V logic that is very accurate. Your stepped second hand driver might do the trick. I do not require daylight saving time adjustment as I'm located in Perth, WA. I also do not have to have automatic start up time setting, a free running one second pulse is fine for my clock if that is doable. I believe you published a GPS based 1PPS time base back in February 2013 which might also work. Your suggestions are very much appreciated. (K. S., via email) • The GPS clock driver (February 2017) is ideal for your application. The PCB can be modified slightly to use a 5V supply, the MAX756 can be omitted and IC1 will deliver a 1PPS 5V TTL-compatible signal. While you don't need features such as daylight saving, you still need IC1 to switch the GPS module on and off to save power. See the amended circuit and overlay diagrams in the Circuit Notebook pages of this issue. Micromite Plus Explore 100 problems I built this project, as described in the October 2016 issue, with the 5-inch screen (dark blue). It has no manufacturer's name or logo but below the semitransparent brown multi-connection overlay it says PFB-SL050101-01A. On start-up, the microlight and banner came up in Tera Term correctly. The Option instruction would not accept "Landscape" but did accept "Portrait". It also accepted the "Touch" instruction. "GUI TEST LCDPANEL" does not work and results in a white rectangle which just stays there. "OPTION LIST" was an accepted and gave the following output: Micromite Plus MMBasic Ver 5.2 Copyright 2011-2016 Geoff Graham > OPTION LIST OPTION LCDPANEL SSD1963_5, PORTRAIT, 48 OPTION TOUCH 1, 40, 39 > BACKLIGHT 50 > GUI TEST LCDPANEL Do you have any idea why it isn't working properly? (C. B., Manypeaks, WA) • The option list that you provided shows that the Micromite was set up correctly and because you can get the command prompt, it means that everything except the display is OK. The fault could be due to an incorrect LCD panel, faulty soldering or a poor power supply. You should re-check the LCD display panel and make sure that you are using one that is similar to the one shown in the article. Also re-check your soldering. However, most reported faults are Off-grid solar inverter project wanted As a disgruntled electricity consumer I am fully intending to go at least partially off the grid due to rapidly rising energy costs. So I would like to ask a general question regarding projects please. Would Silicon Chip consider doing another high-powered 24V DC to 230VAC sinewave inverter suitable for solar systems, similar to your 2kW sinewave inverter project featured over a number of issues in 1992? As a personal preference it would by necessity be a standlone inverter, with appropriate switching so that I would be using my own generated power when available. I do not understand how people can sell energy to a retailer on a grid-tied system at a low price and then buy back that same power at a higher price using the current metering setup. siliconchip.com.au If your anser is Yes, how long would it be before the project appears please? If no, I will go looking for a commercial product that will suit. (I. T., via email) • Many people are contemplating going off the grid, as you are, but we think this could be a bit premature. Yes, the daily service charge is an irritant but at around $360 per annum it is not big enough to go that way, bearing in mind the much bigger investment you have to make. We do not plan to design another inverter since high power sinewave units are now so much cheaper to buy. Ideally, you want an inverter that can take the high voltage DC from your panels and not operate with a 24V input. However, we don't know whether such inverters are readily available. On the hand, if you are contemplat- ing a 24V system so that you can employ battery storage, that implies a much bigger investment and it is doubtful whether present battery systems have a sufficiently long life to make the payback period viable. That comment also applies to the newer lithium battery systems. If you already have a grid-tied solar installation, we think the best way to proceed is to make sure that your smart meter is set to "net" metering whereby you are not charged at peak rates for the energy you generate and use on site. This works particularly well if you have a swimming pool pump and salt-water chlorinator – your energy use is essentially free. We understand that in NSW, vast numbers of people have not had their smart meters changed over to net metering. May 2017  107 SILICON CHIP .com.au/shop ONLINESHOP Looking for a specialised component to build that latest and greatest SILICON CHIP project? Maybe it’s the PCB you’re after? Or a pre-programmed micro? Or some other hard-to-get “bit”? The chances are they are available direct from the SILICON CHIP ONLINESHOP. As a service to readers, SILICON CHIP has established the ONLINESHOP. No, we’re not going into opposition with your normal suppliers – this is a direct response to requests from readers who have found difficulty in obtaining specialised parts such as PCBs & micros. • • • • • PCBs are normally IN STOCK and ready for despatch when that month’s magazine goes on sale (you don’t have to wait for them to be made!). Even if stock runs out (eg, for high demand), in most cases there will be no longer than a two-week wait. One low p&p charge: $10 per order, regardless of how many boards or micros you order! (Australia only; overseas clients – email us for a postage quote). Our PCBs are beautifully made, very high quality fibreglass boards with pre-tinned tracks, silk screen overlays and where applicable, solder masks. Best of all, those boards with fancy cut-outs or edges are already cut out to the SILICON CHIP specifications – no messy blade work required! HERE’S HOW TO ORDER: 4 Via the INTERNET (24 hours, 7 days): Log on to our secure website – All prices are in AUSTRALIAN DOLLARS ($AU)     siliconchip.com.au, click on “SHOP” and follow the links 4 Via EMAIL (24 hours, 7 days): email silicon<at>siliconchip.com.au – Clearly tell us what you want and include your contact and credit card details 4 Via MAIL (24 hours, 7 days): PO Box 139, Collaroy NSW 2097. Clearly tell us what you want and include your contact and credit card details 4 Via PHONE (9am-5pm EADST, Mon-Fri): Call (02) 9939 3295 (INT 612 9939 3295) – have your order ready, including contact and credit card details! YES! You can also order or renew your SILICON CHIP subscription via any of these methods as well! PRE-PROGRAMMED MICROS Price for any of these micros is just $15.00 each + $10 p&p per order# As a service to readers, SILICON CHIP ONLINESHOP stocks microcontrollers and microprocessors used in new projects (from 2012 on) and some selected older projects – pre-programmed and ready to fly! Some micros from copyrighted and/or contributed projects may not be available. PIC12F675-I/P PIC16F1455-I/P PIC16F1507-I/P PIC16F88-E/P PIC16F88-I/P PIC16LF88-I/P PIC16LF88-I/SO PIC16LF1709-I/SO PIC16F877A-I/P UHF Remote Switch (Jan09), Ultrasonic Cleaner (Aug10), Ultrasonic Anti-fouling (Sep10), Cricket/Frog (Jun12), Do Not Disturb (May13) IR-to-UHF Converter (Jul13), UHF-to-IR Converter (Jul13) PC Birdies *2 chips – $15 pair* (Aug13), Driveway Monitor Receiver (July15) Hotel Safe Alarm (Jun16), 50A Battery Charger Controller (Nov16) Microbridge (May17) Wideband Oxygen Sensor (Jun-Jul12) Hi Energy Ignition (Nov/Dec12), Speedo Corrector (Sept13), Auto Headlight Controller (Oct13), 10A 230V Motor Speed Controller (Feb14) Automotive Sensor Modifier (Dec16) Projector Speed (Apr11), Vox (Jun11), Ultrasonic Water Tank Level (Sep11), Quizzical (Oct11), Ultra LD Preamp (Nov11), 10-Channel Remote Control Receiver (Jun13), Revised 10-Channel Remote Control Receiver (Jul13), Nicad/NiMH Burp Charger (Mar14), Remote Mains Timer (Nov14), Driveway Monitor Transmitter (July15), Fingerprint Scanner (Nov15) MPPT Lighting Charge Controller (Feb16), 50/60Hz Turntable Driver (May16) Cyclic Pump Timer (Sep16), 60V 40A DC Motor Speed Controller (Jan17) Pool Lap Counter (Mar17) Garbage Reminder (Jan13), Bellbird (Dec13), GPS Analog Clock Driver (Feb17) LED Ladybird (Apr13) Battery Cell Balancer (Mar16) 6-Digit GPS Clock (May-Jun09), Lab Digital Pot (Jul10) Semtest (Feb-May12) PIC16F2550-I/SP Batt Capacity Meter (Jun09), Intelligent Fan Controller (Jul10) PIC18F4550-I/P GPS Car Computer (Jan10), GPS Boat Computer (Oct10) PIC32MX795F512H-80I/PT Maximite (Mar11), miniMaximite (Nov11), Colour Maximite (Sept/Oct12), Touchscreen Audio Recorder (Jun/Jul 14) PIC32MX170F256B-50I/SP Micromite Mk2 (Jan15) – also includes FREE 47F tantalum capacitor Micromite LCD BackPack [either version] (Feb16), GPS Boat Computer (Apr16) Micromite Super Clock (Jul16), Touchscreen Voltage/Current Ref (Oct-Dec16) Micromite LCD BackPack V2 (May17) PIC32MX170F256B-I/SP Low Frequency Distortion Analyser (Apr15) PIC32MX170F256D-501P/T 44-pin Micromite Mk2 (Now with Mk2 Firmware at no extra cost) PIC32MX250F128B-I/SP GPS Tracker (Nov13), Micromite ASCII Video Terminal (Jul14) PIC32MX470F512H-I/PT Stereo Audio Delay/DSP (Nov13), Stereo Echo/Reverb (Feb 14), Digital Effects Unit (Oct14) PIC32MX470F512H-120/PT Micromite PLUS Explore 64 (Aug 16), Micromite Plus LCD BackPack (Nov16) PIC32MX470F512L-120/PT Micromite PLUS Explore 100 (Sep-Oct16) dsPIC33FJ128GP802-I/SP Digital Audio Signal Generator (Mar-May10), Digital Lighting Controller (Oct-Dec10), SportSync (May11), Digital Audio Delay (Dec11) Quizzical (Oct11), Ultra-LD Preamp (Nov11), LED Musicolor (Nov12) dsPIC33FJ64MC802-E/P Induction Motor Speed Controller (revised) (Aug13) dsPIC33FJ128GP306-I/PT CLASSiC DAC (Feb-May 13) ATTiny861 VVA Thermometer/Thermostat (Mar10), Rudder Position Indicator (Jul11) ATTiny2313 Remote-Controlled Timer (Aug10) When ordering, be sure to nominate BOTH the micro required AND the project for which it must be programmed. SPECIALISED COMPONENTS, HARD-TO-GET BITS, ETC NEW THIS MONTH: MICROBRIDGE (MAY 17) - PCB plus all on-board parts including programmed microcontroller (SMD ceramics for 10µF)      $20.00 MICROMITE LCD BACKPACK V2 – COMPLETE KIT (MAY 17) - includes PCB, programmed micro, touchscreen LCD, laser-cut UB3 lid, mounting hardware, SMD Mosfets for PWM backlight control and all other on-board parts      $70.00 EFUSE (APR 17) two NIS5512 ICs plus one SUP53P06      $22.50 EL CHEAPO MODULES (APR 17) AD9833 DDS module (no gain control)      $15.00 MICROMITE DDS (APR 17) AD9833 DDS module (with gain control)      $25.00 POOL LAP COUNTER (MAR 17)   two 70mm 7-segment high brightness blue displays plus logic-level Mosfet      $17.50   laser-cut blue tinted lid, 152 x 90 x 3mm      $7.50 P&P – $10 Per order# TOUCHSCREEN VOLTAGE/CURRENT REFERENCE   MICROMITE LCD BACKPACK KIT (programmed to suit) PLUS UB1 Lid    LASER-CUT MATTE BLACK LID (to suit UB1 Jiffy Box)       (DEC 16) SHORT FORM KIT with main PCB plus onboard parts (not including BackPack module, jiffy box, power supply or wires/cables) $70.00 $10.00 $99.00 PASSIVE LINE TO PHONO INPUT CONVERTER - ALL SMD PARTS (NOV 16) $5.00 MICROMITE PLUS EXPLORE 100 *COMPLETE KIT (no LCD panel)* (SEP 16) $69.90 (includes PCB, programmed micro and the hard-to-get bits including female headers, USB and microSD sockets, crystal, etc but does not include the LCD panel) DS3231-BASED REAL TIME CLOCK MODULE with two 10mm M2 spacers & four 6mm M2 Nylon screws 100dB STEREO AUDIO LEVEL/VU METER All SMD parts except programmed micro and LEDs (both available separately) RASPBERRY PI TEMPERATURE SENSOR EXPANSION (JUL 16) $5.00 (JUN 16) $20.00 (MAR 17) DRV8871 IC, SMD 1µF capacitor and 100kW potentiometer with detent      $12.50 Two BSO150N03 dual N-channel Mosfets plus 4.7kΩ SMD resistor: (MAY 16) $5.00 MICROWAVE LEAKAGE DETECTOR - all SMD parts: (APR 16) $10.00 ULTRA LOW VOLTAGE LED FLASHER BOAT COMPUTER - (REQUIRES MICROMITE LCD BACKPACK – $65.00 [see below]) (APR 16)   VK2828U7G5LF TTL GPS/GLONASS/GALILEO module with antenna & cable:   VK16E TTL GPS module with antenna & cable: $25.00 $20.00 STATIONMASTER (FEB 17) kit including PCB and all SMD parts, LDR and blue LED      $12.50 SC200 AMPLIFIER MODULE (JAN 17) $35.00 hard-to-get parts: Q8-Q16, D2-D4, 150pF/250V capacitor and five SMD resistors      60V 40A DC MOTOR SPEED CONTROLLER (JAN 17) $35.00 hard-to-get parts: IC2, Q1, Q2 and D1      COMPUTER INTERFACE MODULES CP2102 USB-UART bridge microSD card adaptor (JAN 17) $5.00       $2.50 ULTRASONIC PARKING ASSISTANT (REQUIRES MICROMITE LCD BACKPACK – $65.00 [see below] Ultrasonic Range Sensor PLUS clear lid with cutout to suit UB5 Jiffy Box (MAR 16) $7.50 MICROMITE LCD BACKPACK ***** COMPLETE KIT ***** (FEB 16) *$65.00 includes PCB, micro and 2.8-inch touchscreen AND NOW INCLUDES LID (specify clear or black lid) MINI USB SWITCHMODE REGULATOR Mk II all SMD components (SEP 15) $15.00 THESE ARE ONLY THE MOST RECENT MICROS AND SPECIALISED COMPONENTS. FOR THE FULL LIST, SEE www.siliconchip.com.au/shop *All items subect to availability. Prices valid for month of magazine issue only. All prices in Australian dollars and included GST where applicable. # P&P prices are within Australia. O’seas? Please email for a quote 05/17 PRINTED CIRCUIT BOARDS NOTE: The listings below are for the PCB only – not a full kit. If you want a kit, contact the kit suppliers advertising in this issue. For more unusual projects where kits are not available, some have specialised components available – see the list opposite. NOTE: Not all PCBs are shown here due to space limits but the SILICON CHIP ONLINESHOP has boards going back to 2001 and beyond. For a complete list of available PCBs, back issues, etc, go to siliconchip.com.au/shop Prices are PCBs only, NOT COMPLETE KITS! PRINTED CIRCUIT BOARD TO SUIT PROJECT: PUBLISHED: PCB CODE: Price: CURRENT ADAPTOR FOR SCOPES AND DMMS AUG 2012 04108121 $20.00 USB VIRTUAL INSTRUMENT INTERFACE SEPT 2012 24109121 $30.00 USB VIRTUAL INSTRUMENT INT. FRONT PANEL SEPT 2012 24109122 $30.00 BARKING DOG BLASTER SEPT 2012 25108121 $20.00 COLOUR MAXIMITE SEPT 2012 07109121 $20.00 SOUND EFFECTS GENERATOR SEPT 2012 09109121 $10.00 NICK-OFF PROXIMITY ALARM OCT 2012 03110121 $5.00 DCC REVERSE LOOP CONTROLLER OCT 2012 09110121 $10.00 LED MUSICOLOUR NOV 2012 16110121 $25.00 LED MUSICOLOUR Front & Rear Panels NOV 2012 16110121 $20 per set CLASSIC-D CLASS D AMPLIFIER MODULE NOV 2012 01108121 $30.00 CLASSIC-D 2 CHANNEL SPEAKER PROTECTOR NOV 2012 01108122 $10.00 HIGH ENERGY ELECTRONIC IGNITION SYSTEM DEC 2012 05110121 $10.00 1.5kW INDUCTION MOTOR SPEED CONTROLLER (NEW V2 PCB)DEC 2012 10105122 $35.00 THE CHAMPION PREAMP and 7W AUDIO AMP (one PCB) JAN 2013 01109121/2 $10.00 GARBAGE/RECYCLING BIN REMINDER JAN 2013 19111121 $10.00 2.5GHz DIGITAL FREQUENCY METER – MAIN BOARD JAN 2013 04111121 $35.00 2.5GHz DIGITAL FREQUENCY METER – DISPLAY BOARD JAN 2013 04111122 $15.00 2.5GHz DIGITAL FREQUENCY METER – FRONT PANEL JAN 2013 04111123 $45.00 SEISMOGRAPH MK2 FEB 2013 21102131 $20.00 MOBILE PHONE RING EXTENDER FEB 2013 12110121 $10.00 GPS 1PPS TIMEBASE FEB 2013 04103131 $10.00 LED TORCH DRIVER MAR 2013 16102131 $5.00 CLASSiC DAC MAIN PCB APR 2013 01102131 $40.00 CLASSiC DAC FRONT & REAR PANEL PCBs APR 2013 01102132/3 $30.00 GPS USB TIMEBASE APR 2013 04104131 $15.00 LED LADYBIRD APR 2013 08103131 $5.00 CLASSiC-D 12V to ±35V DC/DC CONVERTER MAY 2013 11104131 $15.00 DO NOT DISTURB MAY 2013 12104131 $10.00 LF/HF UP-CONVERTER JUN 2013 07106131 $10.00 10-CHANNEL REMOTE CONTROL RECEIVER JUN 2013 15106131 $15.00 IR-TO-455MHZ UHF TRANSCEIVER JUN 2013 15106132 $7.50 “LUMP IN COAX” PORTABLE MIXER JUN 2013 01106131 $15.00 L’IL PULSER MKII TRAIN CONTROLLER JULY 2013 09107131 $15.00 L’IL PULSER MKII FRONT & REAR PANELS JULY 2013 09107132/3 $20.00/set REVISED 10 CHANNEL REMOTE CONTROL RECEIVER JULY 2013 15106133 $15.00 INFRARED TO UHF CONVERTER JULY 2013 15107131 $5.00 UHF TO INFRARED CONVERTER JULY 2013 15107132 $10.00 IPOD CHARGER AUG 2013 14108131 $5.00 PC BIRDIES AUG 2013 08104131 $10.00 RF DETECTOR PROBE FOR DMMs AUG 2013 04107131 $10.00 BATTERY LIFESAVER SEPT 2013 11108131 $5.00 SPEEDO CORRECTOR SEPT 2013 05109131 $10.00 SiDRADIO (INTEGRATED SDR) Main PCB OCT 2013 06109131 $35.00 SiDRADIO (INTEGRATED SDR) Front & Rear Panels OCT 2013 06109132/3 $25.00/pr TINY TIM AMPLIFIER (same PCB as Headphone Amp [Sept11])OCT 2013 01309111 $20.00 AUTO CAR HEADLIGHT CONTROLLER OCT 2013 03111131 $10.00 GPS TRACKER NOV 2013 05112131 $15.00 STEREO AUDIO DELAY/DSP NOV 2013 01110131 $15.00 BELLBIRD DEC 2013 08112131 $10.00 PORTAPAL-D MAIN BOARDS DEC 2013 01111131-3 $35.00/set (for CLASSiC-D Amp board and CLASSiC-D DC/DC Converter board refer above [Nov 2012/May 2013]) LED Party Strobe (also suits Hot Wire Cutter [Dec 2010]) JAN 2014 16101141 $7.50 Bass Extender Mk2 JAN 2014 01112131 $15.00 Li’l Pulser Mk2 Revised JAN 2014 09107134 $15.00 10A 230VAC MOTOR SPEED CONTROLLER FEB 2014 10102141 $12.50 NICAD/NIMH BURP CHARGER MAR 2014 14103141 $15.00 RUBIDIUM FREQ. STANDARD BREAKOUT BOARD APR 2014 04105141 $10.00 USB/RS232C ADAPTOR APR 2014 07103141 $5.00 MAINS FAN SPEED CONTROLLER MAY 2014 10104141 $10.00 RGB LED STRIP DRIVER MAY 2014 16105141 $10.00 HYBRID BENCH SUPPLY MAY 2014 18104141 $20.00 2-WAY PASSIVE LOUDSPEAKER CROSSOVER JUN 2014 01205141 $20.00 TOUCHSCREEN AUDIO RECORDER JUL 2014 01105141 $12.50 THRESHOLD VOLTAGE SWITCH JUL 2014 99106141 $10.00 MICROMITE ASCII VIDEO TERMINAL JUL 2014 24107141 $7.50 FREQUENCY COUNTER ADD-ON JUL 2014 04105141a/b $15.00 TEMPMASTER MK3 AUG 2014 21108141 $15.00 44-PIN MICROMITE AUG 2014 24108141 $5.00 OPTO-THEREMIN MAIN BOARD SEP 2014 23108141 $15.00 OPTO-THEREMIN PROXIMITY SENSOR BOARD SEP 2014 23108142 $5.00 ACTIVE DIFFERENTIAL PROBE BOARDS SEP 2014 04107141/2 $10/SET MINI-D AMPLIFIER SEP 2014 01110141 $5.00 COURTESY LIGHT DELAY OCT 2014 05109141 $7.50 DIRECT INJECTION (D-I) BOX OCT 2014 23109141 $5.00 DIGITAL EFFECTS UNIT OCT 2014 01110131 $15.00 DUAL PHANTOM POWER SUPPLY NOV 2014 18112141 $10.00 REMOTE MAINS TIMER NOV 2014 19112141 $10.00 REMOTE MAINS TIMER PANEL/LID (BLUE) NOV 2014 19112142 $15.00 ONE-CHIP AMPLIFIER NOV 2014 01109141 $5.00 TDR DONGLE DEC 2014 04112141 $5.00 MULTISPARK CDI FOR PERFORMANCE VEHICLES DEC 2014 05112141 $10.00 PRINTED CIRCUIT BOARD TO SUIT PROJECT: PUBLISHED: PCB CODE: Price: CURRAWONG STEREO VALVE AMPLIFIER MAIN BOARD DEC 2014 01111141 $50.00 CURRAWONG REMOTE CONTROL BOARD DEC 2014 01111144 $5.00 CURRAWONG FRONT & REAR PANELS DEC 2014 01111142/3 $30/set CURRAWONG CLEAR ACRYLIC COVER JAN 2015 - $25.00 ISOLATED HIGH VOLTAGE PROBE JAN 2015 04108141 $10.00 SPARK ENERGY METER MAIN BOARD FEB/MAR 2015 05101151 $10.00 SPARK ENERGY ZENER BOARD FEB/MAR 2015 05101152 $10.00 SPARK ENERGY METER CALIBRATOR BOARD FEB/MAR 2015 05101153 $5.00 APPLIANCE INSULATION TESTER APR 2015 04103151 $10.00 APPLIANCE INSULATION TESTER FRONT PANEL APR 2015 04103152 $10.00 LOW-FREQUENCY DISTORTION ANALYSER APR 2015 04104151 $5.00 APPLIANCE EARTH LEAKAGE TESTER PCBs (2) MAY 2015 04203151/2 $15.00 APPLIANCE EARTH LEAKAGE TESTER LID/PANEL MAY 2015 04203153 $15.00 BALANCED INPUT ATTENUATOR MAIN PCB MAY 2015 04105151 $15.00 BALANCED INPUT ATTENUATOR FRONT & REAR PANELS MAY 2015 04105152/3 $20.00 4-OUTPUT UNIVERSAL ADJUSTABLE REGULATOR MAY 2015 18105151 $5.00 SIGNAL INJECTOR & TRACER JUNE 2015 04106151 $7.50 PASSIVE RF PROBE JUNE 2015 04106152 $2.50 SIGNAL INJECTOR & TRACER SHIELD JUNE 2015 04106153 $5.00 BAD VIBES INFRASOUND SNOOPER JUNE 2015 04104151 $5.00 CHAMPION + PRE-CHAMPION JUNE 2015 01109121/2 $7.50 DRIVEWAY MONITOR TRANSMITTER PCB JULY 2015 15105151 $10.00 DRIVEWAY MONITOR RECEIVER PCB JULY 2015 15105152 $5.00 MINI USB SWITCHMODE REGULATOR JULY 2015 18107151 $2.50 VOLTAGE/RESISTANCE/CURRENT REFERENCE AUG 2015 04108151 $2.50 LED PARTY STROBE MK2 AUG 2015 16101141 $7.50 ULTRA-LD MK4 200W AMPLIFIER MODULE SEP 2015 01107151 $15.00 9-CHANNEL REMOTE CONTROL RECEIVER SEP 2015 1510815 $15.00 MINI USB SWITCHMODE REGULATOR MK2 SEP 2015 18107152 $2.50 2-WAY PASSIVE LOUDSPEAKER CROSSOVER OCT 2015 01205141 $20.00 ULTRA LD AMPLIFIER POWER SUPPLY OCT 2015 01109111 $15.00 ARDUINO USB ELECTROCARDIOGRAPH OCT 2015 07108151 $7.50 FINGERPRINT SCANNER – SET OF TWO PCBS NOV 2015 03109151/2 $15.00 LOUDSPEAKER PROTECTOR NOV 2015 01110151 $10.00 LED CLOCK DEC 2015 19110151 $15.00 SPEECH TIMER DEC 2015 19111151 $15.00 TURNTABLE STROBE DEC 2015 04101161 $5.00 CALIBRATED TURNTABLE STROBOSCOPE ETCHED DISC DEC 2015 04101162 $10.00 VALVE STEREO PREAMPLIFIER – PCB JAN 2016 01101161 $15.00 VALVE STEREO PREAMPLIFIER – CASE PARTS JAN 2016 01101162 $20.00 QUICKBRAKE BRAKE LIGHT SPEEDUP JAN 2016 05102161 $15.00 SOLAR MPPT CHARGER & LIGHTING CONTROLLER FEB/MAR 2016 16101161 $15.00 MICROMITE LCD BACKPACK, 2.4-INCH VERSION FEB/MAR 2016 07102121 $7.50 MICROMITE LCD BACKPACK, 2.8-INCH VERSION FEB/MAR 2016 07102122 $7.50 BATTERY CELL BALANCER MAR 2016 11111151 $6.00 DELTA THROTTLE TIMER MAR 2016 05102161 $15.00 MICROWAVE LEAKAGE DETECTOR APR 2016 04103161 $5.00 FRIDGE/FREEZER ALARM APR 2016 03104161 $5.00 ARDUINO MULTIFUNCTION MEASUREMENT APR 2016 04116011/2 $15.00 PRECISION 50/60HZ TURNTABLE DRIVER MAY 2016 04104161 $15.00 RASPBERRY PI TEMP SENSOR EXPANSION MAY 2016 24104161 $5.00 100DB STEREO AUDIO LEVEL/VU METER JUN 2016 01104161 $15.00 HOTEL SAFE ALARM JUN 2016 03106161 $5.00 UNIVERSAL TEMPERATURE ALARM JULY 2016 03105161 $5.00 BROWNOUT PROTECTOR MK2 JULY 2016 10107161 $10.00 8-DIGIT FREQUENCY METER AUG 2016 04105161 $10.00 APPLIANCE ENERGY METER AUG 2016 04116061 $15.00 MICROMITE PLUS EXPLORE 64 AUG 2016 07108161 $5.00 CYCLIC PUMP/MAINS TIMER SEPT 2016 10108161/2 $10.00/pair MICROMITE PLUS EXPLORE 100 (4 layer) SEPT 2016 07109161 $20.00 AUTOMOTIVE FAULT DETECTOR SEPT 2016 05109161 $10.00 MOSQUITO LURE OCT 2016 25110161 $5.00 MICROPOWER LED FLASHER OCT 2016 16109161 $5.00 MINI MICROPOWER LED FLASHER OCT 2016 16109162 $2.50 50A BATTERY CHARGER CONTROLLER NOV 2016 11111161 $10.00 PASSIVE LINE TO PHONO INPUT CONVERTER NOV 2016 01111161 $5.00 MICROMITE PLUS LCD BACKPACK NOV 2016 07110161 $7.50 AUTOMOTIVE SENSOR MODIFIER DEC 2016 05111161 $10.00 TOUCHSCREEN VOLTAGE/CURRENT REFERENCE DEC 2016 04110161 $12.50 SC200 AMPLIFIER MODULE JAN 2017 01108161 $10.00 60V 40A DC MOTOR SPEED CON. CONTROL BOARD JAN 2017 11112161 $10.00 60V 40A DC MOTOR SPEED CON. MOSFET BOARD JAN 2017 11112162 $12.50 GPS SYNCHRONISED ANALOG CLOCK FEB 2017 04202171 $10.00 ULTRA LOW VOLTAGE LED FLASHER FEB 2017 16110161 $2.50 POOL LAP COUNTER MAR 2017 19102171 $15.00 STATIONMASTER TRAIN CONTROLLER MAR 2017 09103171/2 $15.00/set EFUSE APR 2017 04102171 $7.50 SPRING REVERB APR 2017 01104171 $12.50 NEW THIS MONTH 6GHZ+ 1000:1 PRESCALER MAY 2017 04112162 $7.50 MICROBRIDGE MAY 2017 24104171 $2.50 MICROMITE LCD BACKPACK V2 MAY 2017 07104171 $7.50 LOOKING FOR TECHNICAL BOOKS? YOU’LL FIND THE COMPLETE LISTING OF ALL BOOKS AVAILABLE IN THE SILKS & DVDs” PAGES AT SILICONCHIP.COM.AU/SHOP Motor Speed Controller for DC permanent magnet motor I have a motor from a treadmill that I have a project for. Can you tell me if there is an easy way to control its speed​I've included a picture of said motor. All I need is an on/off switch and speed control. I found a video on the YouTube showing one possible solution, at https://youtu.be/_NmAFZMAfH8 Is there be any possibility that this could work and if so, could you make a module incorporating the required the modifications? The parts used in the video are: 4000W or higher SCR-based motor controller (I have a 10,000W unit from eBay); A full wave bridge rectifier (I have a KBPC5010) and a 200kW linear potentiometer. (K. S., via email) • Your 1.5 horsepower permanent magnet motor runs at 180V DC and would require a controller that could deliver around 10A at maximum output and considerably more at switch-on. We have not produced a speed controller which operates at such a high DC voltage and power output and none of the high speed control circuits (such as our 230VAC 10A full-wave speed controller for universal motors from the February & March 2014 issues) could be adapted to your permanent magnet motor. due to a poor power supply, especially when a USB charger is used. The Explore 100 can draw as much as 600mA and many sources of USB power will have trouble supplying that. Try a different power supply and if you have a lab supply, test it with that. Diversity microphone switcher wanted In many venues where public address systems are used, the lecterns (especially those used by politicians) include two microphones. These are not actually both supplying a signal to the amplifier at the same time or else there would be severe “comb filtering” effects which can result in very tinny sound. So either one is used and the other switched in manually if there is a fault in one microphone or they automatically switch from one to the 110  Silicon Chip In fact, your YouTube video suggests using an off-the-shelf 220VAC SCR motor speed controller (similar in principle to our half-wave speed controller from the October 2002 issue) for the task but we would be very wary about this approach. For a start, the peak voltages applied to the motor from this type of controller will be around 330V (assuming a 240VAC mains supply in New Zealand). It is possible that the insulation of your motor is not rated for these high peak voltages. Second, while the maximum RMS voltage applied to the motor will not be far from the 180V DC rating for the motor, it still may not be suitable since the name plate of your motor specifically states that it must be grounded. If one side of the motor winding is connected to the case, that would make it unsafe to use with that type of controller. Third, the range of speed control available with an SCR speed control is usually quite limited although this does depend on the characteristics of the particular motor. In summary, the only safe approach is to use a controller specifically designed to suit your motor. other depending on which microphone has the higher signal level. But having two microphones often confuses people who are not used to public speaking and they may tend to lean towards one microphone or the other; they really should stand still while speaking I would like to propose a microphone switcher project which would monitor both microphones and send the signal from the one with a higher signal level to an output for amplification. Zero voltage switching would be used to minimise clicks. Ideally, the project would also need to provide phantom power. The switching algorithm could be similar to that used in dual diversity wireless receivers, as in your previous Silicon Chip project in August & September 1994 (Dual Diversity Tuner For FM Microphones). I should point out that this concept is not the same as used in radio microphones where there is a single microphone and the diversity switching operation is between two antennas or two receiver stages for the best RF reception. (C. J., Tamworth, NSW) • This is an interesting concept. Presumably, the switcher would select the signal with the largest amplitude and it would need to incorporate delays or hysteresis. What do other readers think? Float Charger operation misunderstanding I believe I have found an issue with the "Float Charger for NiMH Cells" in Circuit Notebook, June 2010, by David Eather. As I wish to build the charger, I have started buying the parts and when I was going through the circuit, siliconchip.com.au MARKET CENTRE Cash in your surplus gear. Advertise it here in SILICON CHIP FOR SALE KIT ASSEMBLY & REPAIR PCB MANUFACTURE: single to multi­ layer. Bare board tested. One-offs to any quantity. 48 hour service. Artwork design. Excellent prices. Check out our specials: www.ldelectronics.com.au KEITH RIPPON KIT ASSEMBLY & REPAIR: * Australia & New Zealand; * Small production runs. Phone Keith 0409 662 794. keith.rippon<at>gmail.com LEDs, BRAND NAME and generic LEDs. Heatsinks, fans, LED drivers, power supplies, LED ribbon, kits, components, hardware, EL wire. www. ledsales.com.au tronixlabs.com - Australia’s best value for hobbyist and enthusiast electronics from adafruit, DFRobot, Freetronics, Raspberry Pi, Genuino and more, with same-day shipping. PCBs MADE, ONE OR MANY. Any format, hobbyists welcome. Sesame Electronics Phone 0434 781 191. sesame<at>sesame.com.au www.sesame.com.au ETI VALVE GUITAR AMP POWER TRANSFORMER, EA Valve Guitar Amp Output Transformers 60W, NOS RCA USA 6550, Luxman 6240G. Phone 0400 494 294. VINTAGE RADIO REPAIRS: electrical mechanical fitter with 36 years ex­ p erience and extensive knowledge of valve and transistor radios. Professional and reliable repairs. All workmanship guaranteed. $10 inspection fee plus charges for parts and labour as required. Labour fees $35 p/h. Pensioner discounts available on application. Contact Alan on 0425 122 415 or email bigalradioshack<at>gmail.com DAVE THOMPSON (the Serviceman from S ILICON C HIP) is available to help you with kit assembly, project troubleshooting, general electronics and custom design work. No job too small. Based in Christchurch, NZ but his services are available Australia/NZ wide. Email dave<at> davethompson.co.nz Where do you get those HARD-TO-GET PARTS? Where possible, the SILICON CHIP On-Line Shop stocks hard-to-get project parts, along with PCBs, programmed micros, panels and all the other bits and pieces to enable you to complete your SILICON CHIP project. SILICON CHIP On-Line SHOP www.siliconchip.com.au/shop KEEP YOUR COPIES OF SILICON CHIP AS GOOD AS THE DAY THEY WERE BORN! ONLY 95 $ 1P6LUS p&p A superb-looking SILICON CHIP binder will keep your magazines in pristine condition. * Holds up to 14 issues * Heavy duty vinyl * Easy wire inserts ORDER NOW AT www.siliconchip.com.au/shop ADVERTISING IN MARKET CENTRE Classified Ad Rates: $32.00 for up to 20 words (punctuation not charged) plus 95 cents for each additional word. Display ads in Market Centre (minimum 2cm deep, maximum 10cm deep): $82.50 per column centimetre per insertion. All prices include GST. Closing date: 5 weeks prior to month of sale. To book, email the text to silicon<at>siliconchip.com.au and include your name, address & credit card details, or phone Glyn (02) 9939 3295 or 0431 792 293. I found the issue. Values for R1 are provided for the currents of 200mA, 400mA and 500mA, 600mA. According to the data sheet for the LM317T, the formula for working out the current for R1 is I = Vref ÷ R. So for example, working it out for 200mA, for the given value of R1 = 1.2W, I = 1.25 ÷ 1.2 gives 1.041A and not 200mA. Shouldn't it be 6.2W, ie, I = 1.25 ÷ 6.2 gives 0.201A or 201mA? Please correct me if I am wrong. (R. M., Perth, WA) • The current limit is set by transistor Q1 and not the LM317T. So as current flows through Rcl, there is a voltage siliconchip.com.au produced across this resistor. When Rcl is 1.2W and with 200mA current, there will be a voltage drop of 0.6V across the resistor and so the transistor base voltage will be 0.6V above the emitter. The transistor will conduct, pulling the adjust pin of REG1 low. This has the effect of reducing the output voltage of REG1 to limit current to 200mA. The calculation of the current limit you provide for the LM317 is when the output is connected to the adjust pin via a resistor and current is drawn at the adjust pin. However, in the Float Charger circuit, the arrangement is different and the output of REG1 is set by resistor R2 in series with R1, between the output and adjust terminals. Overall output voltage above the adjust pin is set by the current through R3 and VR1. Resistor R1 in this circuit is only required to protect against a short circuit at the output. In the event of a short circuit, Q1 will switch on fully but this can only reduce the output voltage to around 1.25V. This voltage then appears across R1 which dissipates the excess May 2017  111 Next Month in Silicon Chip Getting Started with the Micromite, Part Four The final instalment in the series covers features such as power saving, using touch-sensitive screens, non-volatile memory, interrupt routines and other features. Using a DDS Module for AM Radio IF Alignment Advertising Index Altronics........................... INSERT Blamey Saunders hears.............. 5 In this article, we present updated software and slight tweaks to the hardware of the Micromite BackPack Touchsreen DDS Signal Generator described in the April issue. These changes make it a cinch to align the IF stage of a transistor or valvebased superheretodyne AM radio. Dave Thompson...................... 111 Arduino-based Digital LC Meter Hare & Forbes....................... OBC A fully operational digital inductance and capacitance meter made from a standard Arduino board, I2C LCD, prototyping board, comparator IC, reed relay and a handful of small components. Measures capacitance from 0.1pF to over 2.7µF and inductance from about 10nH to over 100mH, with five-digit resolution. Note: these features are prepared or are in preparation for publication and barring unforeseen circumstances, will be in the next issue. The June 2017 issue is due on sale in newsagents by Thursday May 25th. Expect postal delivery of subscription copies in Australia between May 25th and June 12th. Notes & Errata SC200 Audio Amplifier, January-March 2017: in the circuit diagram, Fig.1 on pages 30 & 31 of the January 2017 issue, D3 and D4 are shown connected across the pre-fuse ±57V rails when they are actually connected across the collectors of Q11-Q16, ie, after the fuses. Also, in the PCB overlay diagrams (Fig.4) on page 80 of the February 2017 issue, the pairs of 100W resistors on either side of VR1 should be 220W to match the circuit and parts list, and there is a 330W resistor not shown immediately above VR2 which should be fitted (see adjacent photo). All these errors have been corrected in the online version of these issues. High Power DC Motor Speed Controller. February 2017: on page 67 under the heading Testing the second paragraph should read: "Rotate VR2 and VR3 fully clockwise and VR1, VR4, VR5 and VR6 fully anticlockwise. Set VR7 mid way". The difference is VR1 is rotated anticlockwise and VR2 clockwise, while VR7 is set mid way. GPS Analog Clock Driver, February 2017: two bugs in the software have been brought to our attention. One only affected the stepping version and caused a weak clock motor drive as the three paralleled outputs didn't always provide the same polarity output. This is fixed with revised firmware (v2.6). The other affected all versions of the clock but only when using certain GPS modules (eg, VK16HX) and would result in a failure to acquire GPS time even if the module had a proper satellite lock. This has also been fixed in v2.6 firmware for stepping hands and v1.3 for sweep hands. Touchscreen Precision Voltage/Current Reference, October & December 2016: there is a discrepancy between the circuit diagram, PCB overlay and parts list. The circuit diagram shows 22kW & 750W feedback resistors for REG1, which is correct, but the PCB overlay and parts list show these as 56kW and 1.5kW respectively. The 56kW/1.5kW combination could result in damage to REG1 when the circuit is powered up. If you have purchased a kit, contact us and we will send the correct resistors and if you request it, a replacement CS5173 regulator IC. Otherwise, use the 22kW and 750W values as shown in the circuit diagram, Fig.2 on pages 76 and 77 of the October 2016 issue. High-Current Adaptor for Scopes & DMMs, August 2012: one 3.3MW resistor has been omitted from the parts list. The Altronics terminal barrier code P2103 mentioned has the wrong pin pitch; use Jaycar HM3162 instead. Finally, note that on page 75, the article says that IC1 and IC2 have the same number of pins but this is not correct; IC1 has 14 pins and IC2 has 16 pins. 112  Silicon Chip Digi-Key Electronics.................... 3 Emona Instruments................. IBC Jaycar ........................... IFC,53-60 Keith Rippon Kit Assembly...... 111 Keysight Technologies...... INSERT LD Electronics......................... 111 LEDsales................................. 111 Master Instruments..................... 9 Microchip Technology................ 13 Mouser Electronics...................... 7 Ocean Controls......................... 15 PCB Cart................................... 11 Sesame Electronics................ 111 SC Online Shop..........29,108-109 SC Radio & Hobbies DVD....... 106 Silicon Chip Binders.................. 64 Silicon Chip PCBs..................... 83 Silicon Chip Subscriptions......... 67 Silicon Chip Wallchart............... 80 Silvertone Electronics................ 14 Tronixlabs................................ 111 Vintage Radio Repairs............ 111 Ask SILICON CHIP . . . continued from page 111 energy as heat. Since it's inside REG1's feedback loop, during normal operation, it has no real effect on circuit behaviour other than REG1's output voltage needing to be slightly higher than the voltage across the battery during charging, due to the voltage drop because of the current flowing through R1. We hope this helps in your underSC standing of the circuit. siliconchip.com.au “Rigol Offer Australia’s Best Value Test Instruments” Oscilloscopes RIGOL DS-1000E Series NEW RIGOL DS-1000Z Series RIGOL DS-2000A Series 450MHz & 100MHz, 2 Ch 41GS/s Real Time Sampling 4USB Device, USB Host & PictBridge 450MHz, 70MHz & 100MHz, 4 Ch 41GS/s Real Time Sampling 412Mpts Standard Memory Depth 470MHz, 100MHz & 200MHz, 2 Ch 42GS/s Real Time Sampling 414Mpts Standard Memory Depth FROM $ 469 FROM $ ex GST 579 FROM $ ex GST 1,247 ex GST Function/Arbitrary Function Generators RIGOL DG-1022 NEW RIGOL DG-1000Z Series RIGOL DG-4000 Series 420MHz Maximum Output Frequency 42 Output Channels 4USB Device & USB Host 430MHz & 60MHz 42 Output Channels 4160 In-Built Waveforms 460MHz, 100MHz & 160MHz 42 Output Channels 4Large 7 inch Display ONLY $ 539 FROM $ ex GST Spectrum Analysers 971 FROM $ ex GST Power Supply RIGOL DP-832 RIGOL DM-3058E 49kHz to 1.5GHz, 3.2GHz & 7.5GHz 4RBW settable down to 10 Hz 4Optional Tracking Generator 4Triple Output 30V/3A & 5V/3A 4Large 3.5 inch TFT Display 4USB Device, USB Host, LAN & RS232 45 1/2 Digit 49 Functions 4USB & RS232 1,869 ONLY $ ex GST 649 ex GST Multimeter RIGOL DSA-800 Series FROM $ 1,313 ONLY $ ex GST 673 ex GST Buy on-line at www.emona.com.au/rigol Sydney Tel 02 9519 3933 Fax 02 9550 1378 Melbourne Tel 03 9889 0427 Fax 03 9889 0715 email testinst<at>emona.com.au Brisbane Tel 07 3392 7170 Fax 07 3848 9046 Adelaide Tel 08 8363 5733 Fax 08 83635799 Perth Tel 08 9361 4200 Fax 08 9361 4300 web www.emona.com.au EMONA