Silicon ChipThe Arduino MegaBox from Altronics - December 2017 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Australia's strength in manufacturing
  4. Feature: Rail Guns and Electromagnetic Launchers by Dr David Maddison
  5. Project: Touchscreen Altimeter and Weather station by Jim Rowe
  6. Feature: Interfacing with the Raspberry Pi – for Beginners by Andrew Pullin
  7. Project: The Arduino MegaBox from Altronics by Bao Smith
  8. Product Showcase
  9. Review: Music Hall mmf-1.3 Belt-Driven Turntable by Leo Simpson
  10. Serviceman's Log: Video trials and tribulations by Dave Thompson
  11. Project: Build your own Super-7 AM Radio Receiver – Part 2 by John Clarke
  12. Feature: El Cheapo Modules 11: Pressure/Temperature Sensors by Jim Rowe
  13. Subscriptions
  14. Project: Part 3: Finishing our new 6GHz+ Digital Frequency Meter by Nicholas Vinen
  15. PartShop
  16. Vintage Radio: Roberts R66 4-valve 2-band portable by Marc Chick
  17. Market Centre
  18. Notes & Errata: 50A Charger Controller, Nov16; Deluxe Touchscreen eFuse, Jul17; Universal Battery Valve Power Supply, Aug17; 3-way Active Crossover, Sept & Oct17; Kelvin the Cricket, Oct17; Circuit Notebook: Modifications to Universal Battery Valve Power Supply, Oct17; 6GHz+ Touchscreen Frequency Meter, Oct-Dec17; Super-7 AM Radio, Nov17
  19. Advertising Index
  20. Outer Back Cover

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

You can view 38 of the 104 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 "Touchscreen Altimeter and Weather station":
  • PIC32MX170F256B-50I/SP programmed for the Touchscreen Altimeter/Weather Station (Programmed Microcontroller, AUD $15.00)
  • GY-68 Barometric Pressure/Altitude/Temperature I²C Sensor breakout board (Component, AUD $2.50)
  • DHT22/AM2302 Compatible Temperature and Humidity sensor module (Component, AUD $9.00)
  • Elecrow 1A/500mA Li-ion/LiPo charger board with USB power pass-through (Component, AUD $25.00)
  • Micromite LCD BackPack V2 complete kit (Component, AUD $70.00)
  • Firmware (HEX) and BASIC source code for the Touchscreen Altimeter/Weather Station (Software, Free)
  • Altimeter/Weather Station front panel artwork (PDF download) (Free)
Items relevant to "The Arduino MegaBox from Altronics":
  • Firmware (Arduino sketch) for the LC Meter (Mega Box) (Software, Free)
  • Firmware (Arduino sketch) for the VS1053 Music Player (Mega Box) (Software, Free)
Articles in this series:
  • The Arduino MegaBox from Altronics (December 2017)
  • The Arduino MegaBox from Altronics (December 2017)
  • Arduino LC Meter Shield Kit (January 2018)
  • Arduino LC Meter Shield Kit (January 2018)
  • The Arduino Mega Box Music Player revisited (February 2018)
  • The Arduino Mega Box Music Player revisited (February 2018)
  • Altronics New MegaBox V2 Arduino prototyping system (December 2019)
  • Altronics New MegaBox V2 Arduino prototyping system (December 2019)
Items relevant to "Build your own Super-7 AM Radio Receiver – Part 2":
  • Super-7 AM Radio PCB [06111171] (AUD $25.00)
  • Case pieces for the Super-7 AM Radio (PCB, AUD $25.00)
Articles in this series:
  • Build the Super-7 – a single-board AM radio receiver (November 2017)
  • Build the Super-7 – a single-board AM radio receiver (November 2017)
  • Build your own Super-7 AM Radio Receiver – Part 2 (December 2017)
  • Build your own Super-7 AM Radio Receiver – Part 2 (December 2017)
Items relevant to "El Cheapo Modules 11: Pressure/Temperature Sensors":
  • GY-68 Barometric Pressure/Altitude/Temperature I²C Sensor breakout board (Component, AUD $2.50)
  • GY-BM BMP280 module (Component, AUD $5.00)
  • GY-BME280 Barometric Pressure/Altitude/Temperature/Humidity I²C Sensor breakout board (Component, AUD $12.50)
  • GY-BME280 module (6-pin/3.3V version) (Component, AUD $10.00)
  • Software for El Cheapo Modules: GY-68 (BMP180) (Free)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
Items relevant to "Part 3: Finishing our new 6GHz+ Digital Frequency Meter":
  • 6GHz+ Touchscreen Frequency Counter PCB [04110171] (AUD $10.00)
  • Short Form Kit for the Micromite Plus Explore 100 (Component, AUD $75.00)
  • Case pieces for the 6GHz+ Frequency Counter (PCB, AUD $15.00)
  • Software for the 6GHz+ Touchscreen Frequency Counter (v1.01) (Free)
Articles in this series:
  • 0.01Hz - 6+GHz touchscreen frequency meter, Part 1 (October 2017)
  • 0.01Hz - 6+GHz touchscreen frequency meter, Part 1 (October 2017)
  • Touch-screen 6GHz+ Frequency Counter, part II (November 2017)
  • Touch-screen 6GHz+ Frequency Counter, part II (November 2017)
  • Part 3: Finishing our new 6GHz+ Digital Frequency Meter (December 2017)
  • Part 3: Finishing our new 6GHz+ Digital Frequency Meter (December 2017)

Purchase a printed copy of this issue for $10.00.

The Altronics Mega Box Article by Bao Smith T Make your Arduino projects easier to build and look much more professional with this kit from Altronics. It includes a pre-cut plastic instrument case, 16x2 alphanumeric LCD, four illuminated pushbuttons, two relays, an infrared receiver, rotary encoder and pluggable terminal blocks. This makes building your Arduino Uno or Mega project a breeze. he Altronics MegaBox kit (Cat K9670; www.altronics.com. au/p/k9670-inventa-mega-box-forarduino/) is a clever Arduino prototyping system developed by Altronics. It comes with a large PCB measuring 197 x 115mm and the Arduino module and optional shield board plug into this. The PCB then neatly fits into the supplied case with the controls accessible through holes cut into the front. It’s easy to build since all the components are through-hole types. While we describe it as a prototyping system, it’s quite possible to build a finished project using it; something that would come in handy everyday. As well as the extra components mentioned above which you can use to build your project, the PCB has a 210-pin prototyping area which lets you fit the extra components you need which are not already provided by the MegaBox or fitted to the Arduino or shield boards. All the connections from the main Arduino board and the other hardware in the box are broken out into female headers so that you can easily make connections between them using jumper wires. The MegaBox also has a lot of extra power supply connection points, which you will often find you need. For example, near where the Arduino module is mounted, there are four sets 42 Silicon Chip of five sockets giving you additional 3.3V, 5V, GND and VIN connections. Similarly, there are two 14-pin headers near the prototyping area, one giving you access points to the 5V rail and the other GND. Due to the way the boards are mounted they provide a separate 6-pin in-circuit serial programming (ICSP) connector. Then you have connection points to attach wires for interfacing with other components like the illuminated pushbuttons, relays, LCD, LEDs, rotary encoder and infrared receiver. Note that to take full advantage of all the features in the MegaBox, you really need to use an Arduino Mega to have enough I/O pins. But you certainly can use it with an Uno for some applications and this is how we tested it. What can it be used for When you plug a shield board into an Arduino, you can play around a bit but all you’re really left with is a bit of a curiosity. To turn it into something truly useful, you need a user interface for your device, some kind of enclosure and so on. The MegaBox gives you all that. For example, you may recall the article in our July 2017 issue on building the Arduino Music Player (See www. siliconchip.com.au/Article/10722). We plugged an MP3 player shield into an Arduino Uno but to make it Celebrating 30 Years truly useful, we had to add a keypad and an LCD so you could control it. And while that worked well, all you ended up with was three separate modules connected by flying leads; hardly a “finished product”. If we had the MegaBox, we could have easily built that finished product and with a lot less hassle. In fact, you could take our Arduino Music Player code and adapt it to the MegaBox, giving quite a nice little package. It already has an LCD module onboard and since it has a remote control receiver too, you could use a universal remote to control it. That’s even more convenient than the numeric keypad we used at the time. You could also use the four illuminated pushbuttons to provide standard functions such as play, stop, pause and next/previous track, and the rotary encoder to scroll through menu items. The more we think about it, the more we realise that adapting the code in this manner would be a really fun project! You may also remember our Arduino-based Digital Inductance and Capacitance Meter from the June 2017 issue (see www.siliconchip.com.au/ Article/1067). Guess what – Altronics have actually designed a shield board for that project and it integrates perfectly with the MegaBox. We don’t have space to describe it siliconchip.com.au The Altronics MegaBox connected and running the provided example program. The illuminated pushbuttons are controlled via an IR remote control, and the LCD backlight brightness is adjusted by the rotary encoder, with an integer value displayed on the screen indicating the number of units away from the rest position of the rotary encoder. fully in this article but we’ll show how to build it and integrate it with the MegaBox (or separately) next month. Those are just two examples of what you can do with the MegaBox. Given the plethora of Arduino shields, the hardware provided by the MegaBox itself and the ability to add extra components in the prototyping area, it’s a really flexible system that would be suitable for a lot of different purposes. Circuit description The MegaBox circuit is shown in Fig.1. Much of this is taken up by the Arduino module, the optional shield and the wiring between them. The headers where the shield can be plugged in are wired directly to the corresponding pins on the Arduino, which is also plugged into a set of headers. So the shield works as if it’s plugged on top of the Arduino board, even though the two are mounted side-by-side. A third set of headers, shown next to the ones the Arduino is plugged into, are provided so that it’s easy to wire up any free Arduino pins to other parts of the board. Most of the rest of the circuitry is in separate blocks with headers for the inputs and/or outputs of each block. So to use one of these sub-circuits, all you have to do is run jumper wires between the Arduino headers and the headers for that sub-circuit. One of the few portions of circuitry already wired to the Arduino itself surrounds LED3, which lights up when the SCK pin is high, indicatsiliconchip.com.au ing that SPI serial communication is in process. LED3 is driven by NPN transistor Q4 which is in turn driven by pin 13 (the SCK pin on the Arduino Uno) via a 10kW current-limiting resistor. A second 10kW base pull-down resistors shunts any leakage current to ground. There’s also a reset pushbutton (S5) on the MegaBox board because the button on the Arduino itself is inaccessible due to being mounted upsidedown. This is simply wired between the Arduino reset pin and ground. Headers CON3-CON6 provide an easy way to access the 3.3V, 5V and VIN (DC input) supply rails and make ground connections. Each provides five sockets to make connections to one of these rails. Separate sub-circuit blocks Pushbuttons S1-S4 are illuminated momentary types; the illumination is provided by a built-in LED. Three headers are provided to make connections to these buttons. One 8-way header (CON2) gives access to the LED anodes via 1kW current-limiting resistors; the cathodes are connected to ground. That same 8-way header also gives access to the switch common terminals. Two additional four-way headers This is what the PCB should look like after all the soldering has been completed. Three of the 3-way screw terminals do not have a matching relay, so you will need to solder wires to the adjacent pins to utilise them. Also, you can see that digital pin 3 of the Arduino main board is mislabelled on the PCB. Celebrating 30 Years December 2017  43 Fig.1: complete circuit diagram for the Arduino MegaBox. (CON17 & CON18) are provided to connect to the normally open and normally closed contacts plus there are four jumpers (JP1) to short the normally-open contacts to ground. This makes it easy to sense when a 44 Silicon Chip button is pressed since all you need to do is fit the shorting block on the jumper for a button and then wire the same button’s common terminal to an Arduino digital pin. Set that pin as a digital input with internal pull-up and Celebrating 30 Years the pin will be high normally and is pulled low when the button is pressed. Two extra general purpose LEDs, LED1 and LED2, are provided and would be most useful for debugging purposes since they are mounted insiliconchip.com.au lows you to wire these relays up to Arduino pins. There are also three extra 3-way pluggable terminal blocks at the back of the unit which are wired to solder pads on the board and you could potentially wire these up to extra circuitry fitted to the prototyping area. An infrared receiver is mounted at the front of the unit and it is powered from the 5V supply, with a 47W/47µF RC filter to prevent supply noise from affecting its operation. Its output is available on a 1-pin header (IR interface) and the signal can be decoded using the Arduino IRLib or other library. There is provision for mounting a 16x2 LCD panel on the front of the unit and its 16 pins are wired directly to a 16-pin female header (CON9). The power supply (+5V and GND) pins are pre-wired for you along with contrast adjustment trimpot VR1. Transistor Q3 allows PWM control and dimming of the backlight and it has a 1kW base current-limiting resistor and a 10kW resistor to ensure it stays off when not driven. A rotary encoder (similar to a potentiometer but with a digital output) is provided for user input and is wired to a 2-way header (Encoder interface) with 10kW pull-ups to 5V on its two output terminals. It provides a “graycode” output. When rotated in one direction, the binary output at terminals A & B will have the following sequence: 00, 01, 11, 10, 00, 01, 11, … while rotation in the other direction will give: 00, 10, 11, 01, 00, 10, 11, … There are various Arduino libraries to help you decode this, including one called (predictably) “Encoder”. Construction side the case. These are also provided with 1kW current-limiting resistors and have their cathodes connected to ground and their anode connections made via a 2-way header (LED interface). There are also two on-board DPDT relays. One set of contacts for each siliconchip.com.au relay is wired to a 3-way pluggable terminal block at the back of the unit. Each relay has a back-EMF quenching diode across its coil and a BC548 transistor to drive that coil, along with 1kW base current-limiting resistors and 10kW pull-down resistors. A two-way header (Relay interface) alCelebrating 30 Years The main task when building the MegaBox is soldering all the components onto the main PCB. Fig.2 shows the overlay diagram which indicates where all the components go. Many of them are headers (mostly female but some male too). Our sample MegaBox didn’t come with much in the way of instructions and if yours doesn’t either then this article should be a useful guide. You can also refer to our photos to see how the finished board should look. Start by soldering all the low-profile components first (eg, resistors and diodes) then move on to the relays, semiDecember 2017  45 Fig.2: exact-size PCB overlay for the Altronics MegaBox, which shows the locations of the various headers and other components. conductors and capacitor. Some components, such as the diodes, capacitor and relays, need to be fitted the right way around. For the diodes and relays, match up the stripe/line on the component to the one shown in Fig.2 or on the PCB. For the three LEDs, the cathode (shorter lead) is on the same side as the flat portion of the plastic lens and should be matched up with what is shown in Fig.2 and the PCB silkscreen. On the single 47µF electrolytic capacitor, the stripe down its side indicates the negative lead while the positive lead will be longer. The longer (positive) lead goes to the pad marked with the “+” symbol. We found it easier to fit the switches, terminal blocks and infrared sensor before the headers and left the rotary encoder for last. Note that the headers supplied may be longer than needed and you will have to cut the female headers to length and snap the male headers apart. The various different header lengths required are listed in the parts list 46 Silicon Chip while the headers supplied are likely to be 40 pins long and so you can cut these up to form several of the smaller headers. You will be left with some spare headers at the end. To snap the male headers, grab either side of the location where you want to snap them with two pairs of pliers (or just one pair) and then apply force to bend the header until it snaps. Doublecheck you will get the right number of pins before snapping. The female headers are a little more tricky because you need to cut them apart using side cutters. This almost always destroys one pin so you should make the cut in the middle of the pin past the end of the last one you want to keep. You can then remove the pin at the cut (if it didn’t already fall out) and file any jagged plastic edges smooth. Three dual-row female headers are required and while Altronics do provide a long dual-row header to cut apart, doing so is quite tricky; you really need a large pair of side-cutters. Instead you can cut and fit two singleCelebrating 30 Years row headers side-by-side. Soldering the pin headers so they're straight can be tricky. Our tip is to solder one pin, then visually check it is flush and straight and re-melt the joints if it isn’t, while applying a small amount of pressure. Once it’s straight, you can solder the other pins. You may also find that it helps to use a small flat piece of wood or similar material to support the header during soldering. The right-angle female header is used as the socket for the LCD but note that you will have to solder a 16-pin male header to the back of the LCD panel to plug into this. When soldering the rotary encoder, be sure to solder the two support pins on either side to prevent it from being ripped off the board. An example program Altronics provides a small example program on their website that showcases the LCD screen, rotary encoder, IR sensor and four illuminated pushbutton switches. You can download it siliconchip.com.au from http://download.altronics.com. au/files/software_K9670.zip This program assumes you're using an Arduino Mega for the pin layout; you can use an Arduino Uno, like we did, but some of the I/O pin numbers will need to be changed. Here are the pin numbers we used with their software to work with the Uno: • Encoder interface: pin A → D2, pin B → D3 (line 35) • LCD screen: RS → D4, E → D5, DB4 → D6, DB5 → D7, DB6 → D8, DB7 → D9 • Backlight interface → D10 (line 46) • IRD1 → D11 (line 53) • SW1 LED → A3, SW2 LED → A2, SW3 LED → A1, SW4 LED → A0 (lines 60-63) Before you can compile and upload the software in the Arduino IDE, you will need to install third-party libraries from the following sources: https://www.pjrc.com/teensy/td_ libs_Encoder.html https://www.pjrc.com/teensy/td_ libs_IRremote.html You might run into conflicting names for the IRremote library as the header file shares the same name as the RobotIRremote library. The easiest way to solve this problem without renaming one of the libraries is to just remove the RobotIRremote library from "C:\Program Files\ Arduino\libraries" (or wherever the Arduino IDE is installed) temporarily. That’s assuming it was already installed. Otherwise, it won’t be an issue. With the libraries loaded, you can upload the program to your Arduino board using a type-B USB cable and then make the various pin connections using male-male flying jumper leads (not included in the kit but see parts list for a suitable set from Altronics). It helps to have a variety of lead lengths for tidiness but you will at least need a few that are more than 100mm long, if not 200mm to match the width of the PCB. To figure out where the wires go, first refer to the list of connections above in reference to changes to the software (which is a complete list) but you can also refer to the photos in this article as a guide. Note that when you run the software, you will need to adjust contrast trimpot VR1 for text to be visible on the LCD. We found that we had to wind it almost fully anti-clockwise for the text to be visible. siliconchip.com.au Parts List 1 double-sided PCB, coded K9670, 196.5 x 115mm 1 quarter-rack plastic instrument case with pre-cut holes 1 16x2 alphanumeric backlit LCD screen (LCD1) 1 infrared receiver (IRD1) 4 right-angle illuminated momentary pushbutton switches (S1-S4) 1 4-pin PCB-mount vertical tactile switch (S5) 1 10kW horizontal trimpot (VR1) 2 2A 5V mini DIL DPDT relays (RLY1,RLY2) 5 3-way PCB-mount right-angle pluggable terminal blocks (CON8,CON12) 1 rotary encoder with nut, washer and knob (S6) 1 2x18 pin dual-row female header 1 2x14 pin dual-row female header 2 2x3 pin dual-row female headers 1 16-pin right-angle female header (CON9) 1 16-pin female header (CON16) 2 10-pin female headers 8 8-pin female headers (including CON2) 1 6-pin female header 4 5-pin female headers 2 4-pin female headers 3 2-pin female headers (including CON7) 2 1-pin female headers 1 2x18 pin dual-row male header 1 2x4 pin dual-row male header (JP1) 1 2x3 pin dual-row male header 1 16-pin male header (for LCD1) 1 10-pin male header 5 8-pin male headers solder plus mounting screws and rubber pads for the case. recommended: Arduino Uno or Mega; set of various male-to-male single jumper wires (try Altronics P1016); universal infrared remote control (eg, Altronics A1012); 4 shorting blocks (for JP1). All not included in the kit. Semiconductors 4 BC548 NPN transistors (Q1-Q4) 2 5mm red LEDs (LED1,LED3) 1 5mm green LED (LED2) 2 1N4004 1A diodes (D1,D2) Also, note that their software doesn’t adjust the LCD backlight until you turn the rotary encoder. You could connect the backlight control pin directly to 5V so that the backlight runs at full brightness all the time (as long as the unit is powered). Or you can remedy this by adding the line "analogWrite(BL, 255);" after the line 69, which reads "lcd.begin(16, 2);". This will cause the backlight to start out at its highest brightness (if you haven’t wired it directly to 5V, as suggested above). The data sheet for the LCD screen used in this project is available from: siliconchip.com.au/link/aahx The sample software will detect rotation of the front-panel encoder and display the rotation amount on the screen. It will also pick up and display some infrared remote control codes, specifically, RC5 codes 0x001 - 0x004 and 0x801 – 0x804. These correspond to the buttons 1-4 on a universal remote Celebrating 30 Years Capacitors 47µF 16V electrolytic Resistors (all 1/4W, 1% metal film) 7 10kW (brown black black red brown) 10 1kW (brown black black brown brown) set on one of the more common Philips TV codes. When these buttons are pressed and are generating the correct codes, it will toggle on/off the corresponding LED in one of the four pushbutton switches. Conclusion The Altronics MegaBox is a very flexible system and can be used with virtually any Arduino shield (apart from a few that are too tall to fit in the case). Altronics supply a range of shields but it can be used with shields from other sources, too. Building the MegaBox is not difficult so it’s suitable for relative beginners. You can purchase the MegaBox kit (K9670) for $80 plus postage, or $75 each if you're buying two or more. It is available from the Altronics website at www.altronics.com.au/p/ k9670-inventa-mega-box-for-arduino or you could pick the kit up from one SC of their retail stores. December 2017  47