Silicon ChipThe Maximite Computer, Pt.2 - April 2011 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Nuclear power now not likely in Australia
  4. Feature: Can Earthquakes Be Predicted By VLF Radio Signals? by Stan Swan
  5. Feature: The Rise & Fall Of Electronics Today International by Collyn Rivers
  6. Project: Portable Headphone Amplifier For MP3 Players by Nicholas Vinen
  7. Project: Fixing Transformer Buzz In The Class-A Amplifier by Leo Simpson
  8. Project: Cheap’n’Simple 100V Speaker/Line Checker by Ross Tester
  9. A Speed Controller For Film Projectors by John Clarke
  10. Review: Agilent’s InfiniiVision 4-Channel Oscilloscopes by Nicholas Vinen
  11. Project: The Maximite Computer, Pt.2 by Geoff Graham
  12. Book Store
  13. Vintage Radio: The 1939 STC 504 5-valve table radio by Rodney Champness
  14. Advertising Index
  15. Outer Back Cover

This is only a preview of the April 2011 issue of Silicon Chip.

You can view 35 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 "Portable Headphone Amplifier For MP3 Players":
  • Portable Stereo Headphone Amplifier PCB [01104111] (AUD $10.00)
  • Headphone Amplifier for iPods and MP3 Players PCB pattern (PDF download) [01104111] (Free)
  • Headphone Amplifier for iPods and MP3 Players panel artwork (PDF download) (Free)
Items relevant to "Fixing Transformer Buzz In The Class-A Amplifier":
  • 20W Class-A Amplifier Power Supply PCB [01105074] (AUD $20.00)
Items relevant to "Cheap’n’Simple 100V Speaker/Line Checker":
  • 100V Speaker/Line Checker PCB [04104111] (AUD $15.00)
  • 100V Speaker/Line Checker PCB pattern (PDF download) [04104111] (Free)
Items relevant to "A Speed Controller For Film Projectors":
  • Projector Speed Controller PCB [13104111] (AUD $10.00)
  • PIC16F88-I/P programmed for the Projector Speed Controller [1310411A.HEX] (Programmed Microcontroller, AUD $15.00)
  • Firmware and source code for the Speed Controller for Film Projectors [1310411A.HEX] (Software, Free)
  • Speed Controller for Film Projectors PCB pattern (PDF download) [13104111] (Free)
Items relevant to "The Maximite Computer, Pt.2":
  • Maximite PCB [06103111] (AUD $15.00)
  • PIC32MX695F512H-80I/PT programmed for the Maximite/miniMaximite (V2.7) (Programmed Microcontroller, AUD $30.00)
  • CP2102-based USB/TTL serial converter with 5-pin header and 30cm jumper cable (Component, AUD $5.00)
  • MaxiMite Firmware v4.1, documentation, libraries, sample software, serial port driver and sprint/font editor (Free)
  • MaxiMite Microcomputer PCB pattern (PDF download) [06103111] (Free)
Articles in this series:
  • The Maximite Computer, Pt.1 (March 2011)
  • The Maximite Computer, Pt.1 (March 2011)
  • The Maximite Computer, Pt.2 (April 2011)
  • The Maximite Computer, Pt.2 (April 2011)
  • The Maximite Computer, Pt.3 (May 2011)
  • The Maximite Computer, Pt.3 (May 2011)

Purchase a printed copy of this issue for $10.00.

Building The Maximite Part 2 – by Geoff Graham L AST MONTH, we introduced our all-new, PIC32-based microcomputer with its purpose-written MMBASIC language. Now we’re getting on to the fun part: building it! We mentioned at the end of last month’s article that a kit would be available from Altronics for the Maximite. That has now been firmed up: a complete kit of parts, complete with a pre-programmed PIC-32 and already soldered onto the PCB, should be available this month from Altronics stores, resellers and internet/mail orders for just $79.95 (Cat K-9550). That represents real value for money! Options Before you start on construction there are a couple of decisions to make. Firstly, you can set up the video output to be 86  Silicon Chip VGA only or composite only or switchable between the two. The combinations for these options are shown in Table 1. Most constructors will use the VGA output (ie, for a standard computer monitor) and for this option you only need to follow the circuit in Fig.2a and the component list in Table 1 (ie, leave out the 680Ω resistor, leave jumper JP2 out but install a 1N4148 diode in the position marked “D1”). If you want to use composite video (eg, to suit a TV set with a “video in” terminal), you need both the 680Ω and 120Ω resistors, while JP2 can be wired permanently linked. As you will not need the VGA connector, you can leave that out and use the blank section of the rear panel for a panel-mounted RCA connector wired to CON5. If you wish to switch between VGA and composite you should install a 2-pin header in JP2 so that you can consiliconchip.com.au VGA Composite Selectable VGA or Composite R4 Leave Empty 680Ω Resistor 680Ω Resistor D1 1N4148 Diode 120Ω Resistor 1N4148 Diode JP2 Leave Empty Permanent Link Jumper or Switch Table 1: components used for permanent VGA or composite video output or for the ability to select between the two. nect a jumper or switch and use the components listed in the last column of Table 1. As explained last month, the video quality is not quite as good as the dedicated modes but it is still acceptable. Another decision relates to how you plan to use the external input/output pins. As shown in the photographs, we used a right angle IDC header plug. This allows you to connect the Maximite to a variety of external circuits via an IDC socket crimped to a length of 26-way ribbon cable. This is ideal as the connector and cable are cheap and at the other end of the cable you can strip the wires and simply solder them to your test setup. Another way of using this connector is to use female to male jumper leads to connect the Maximite to a solderless breadboard, as shown last month (page 36). The female end of the jumper wire can be simply pushed onto the pins of the IDC header and the other end plugged into the breadboard. However, be careful which pin is used – they’re easy to mistake. Instead of using an IDC header plug you could use two rows of vertical header pins. This will enable you to connect (via a matching header socket) to a second PCB mounted in the lid of the case which could hold specialised signal conditioning circuitry suited to your application. There is plenty of room in the case for components on this second board and the completed assembly would make a neat and compact package. Construction OK, now we get on with the fun part! If you are building the Maximite from the Altronics kit, it will come with IC1 pre programmed and pre-soldered to the PCB. This makes construction easy as the rest of the components are easy to solder. If you are building the Maximite from the ground up you should refer to the PIC32 article in last month’s issue for pointers on how to solder the chip. Of course, the PIC32 will need to be programmed so you will also need a PICKit 3 or similar programmer connected to CON3 to program the chip with the firmware, available from the SILICON CHIP website. The PCB uses fine tracks and IC1 can be damaged by static, so you need to take the standard precautions. Make sure that you and your soldering iron are grounded, use a temperature-controlled soldering iron and only hold it on a joint for a few seconds. Because the holes are plated through, it is difficult to remove components after soldering so make sure that the component is the correct type/ value and is oriented correctly. You should start with the low profile components and work your way up from there. The PCB is silk-screened with the component labels and placement so construction will mostly consist of just following the labels on the board. Depending on the manufacturer of the capacitors that you are using, some may require that their legs are bent out to suit the PCB, which was designed for components with a 0.2-inch pitch. When installing the crystal leave it sitting one or two millimetres above the PCB to prevent the chance of any of the underlying solder pads shorting to the crystal’s metal case. Normally you would not install anything in the position marked CON3. This is the programming interface described earlier and it will only be required if you need to program a blank PIC32 chip. SD card connector The SD card socket is a surface-mount device but it has two small pins on the underside that will match two holes in the PCB to ensure that the socket is correctly positioned. When soldering the SD card socket you should make sure that you find and solder all the solder tabs – there are 16 in total. Two of these are very close together on the front left-hand corner of the socket (viewed from the front) and both should be soldered together to the same solder pad. When mounting the voltage regulators (REG1 and REG2) you should bend the pins close to the component’s body so that they fit in the small space. The PCB will have holes drilled so that you can screw the regulators to the board. Here’s what your completed Maximite should look like – it’s shown here mounted in the bottom of the case at 1:1 scale. All components and connectors are on the one, double-sided PC board. The Altronics kit will have the PIC32 chip already soldered to the board and programmed ready for use. That’s the only difficult part of the whole project! siliconchip.com.au April pril 2011  87 CON2 4148 D1 680 10 F 5.6k 100nF + REG1 7805 120 2 10k 1 On the circuit diagram (Fig.1, page 33) the H-SYNC connection to the VGA connector is incorrect. It should connect to pin 13. Fig.2(a) and the PCB artwork are correct. 2 CON9 CON3 ICSP 3 10 26 4 Errata from last month: CON4 CON7 100nF CON1 1k 100nF 47 33k 33k 47 100nF X1 8.00MHz 22pF 22pF 47 F D2 1 1N4004 88  Silicon Chip 1k the pins fully from the bottom of the board. This will result in the LEDs being perfectly positioned + SOUND VIDEO REG2 IC1 LM1117T with respect to the front panel. PIC32MX795/ PIC32MX695 Fig.7 provides the template for CON6 CON5 drilling the front panel and Fig.6 EXT JP2 JP1 CON9 SD CARD SOCKET USB provides the front panel artwork. SELECT S2 COMPOSITE These templates and the panel 100nF artwork suit the Altronics H-0376 + S1 snap-together case. LOAD FIRMWARE LED2 LED1 We printed the artwork onto 100nF 10 F A A K K heavy duty adhesive backed paper (Avery 936067) and then     Fig.3: the component overlay for the Maximite. Use covered the printed surface with      this in conjunction with the photo overleaf and the adhesive clear plastic film of the circuit diagram published last month. Note that this is a type used to cover books. After double-sided board – once you have soldered in a component, it is rather more you have trimmed the label you difficult to remove than on a single-sided board. So get it right first time! can stick it onto the front panel for a professional result. An alternaIf you are likely to use a power supply higher than the tive, tougher cover would be a heat laminated sleeve but specified 9V (eg, up to 14V) it would be wise to place a these are harder to cut out and trim small heatsink under at least REG1. This could be a small The PCB is mounted in the case using 4mm long M3 piece of aluminium sheet, possibly bent into a “L” shape screws (either metal thread or self tappers) at each corner. with an appropriately placed hole for the screw. However, in When you snap on the covers the result is a neat little box normal use (ie 7-9V DC supply) this will not be required as that contains a lot of power. the regulators operate well within their temperature range. The Altronics VGA connectors have their pins set slightly Testing closer together than other VGA connectors so, if you are We will assume that your PIC32 has been programmed. using one of these, you will need to bend the two outer Testing the Maximite is as simple as plugging it into a 9V rows of connecting pins out by a millimetre or so before DC power source (normally a plugpack). First make sure inserting the connector in the PCB. The connector will then that a jumper is placed on the EXT position of JP1 so that sit flush with the board and can be soldered as per normal. the PIC32 can be powered from the external power supply. Finally, it is best to mount the LEDs after you have drilled On power-up, the firmware in the PIC32 will run a self the front panel. Bend the leads downwards 2mm from the test and after this has successfully completed it will turn body as shown below and position the LEDs in the PCB on the green LED on the front panel. An illuminated LED with the front panel temporarily placed in position and is therefore an indication that all is OK and no light means the LEDs poking through their respective holes. The longer that you have a problem. lead of the LED (the anode) should be on the right hand If the LED does not come on you should first check the side when the board is viewed from the front. power supply voltages. Is the input between 7V and 14V? You can then tack-solder the leads into position on the top The output from REG1 should be 5V and the output from of the board before removing the front panel and soldering REG2 should be 3.3V. If these are correct you should then check all the capacitors for correct placement, value and polarity. Every one is critical and a misplaced capacitor Fig.4: when mounting the could prevent the processor from starting up, LEDs the leads should be bent Also check the 47resistor and the power LED for cordown about 2mm from rect placement and polarity as the LED will not illuminate the body with the longer if these are incorrect. The final check is to examine IC1 lead (the anode) on the for shorts or defects in soldering. This will require a high right when viewed from powered magnifying loupe and you should carefully check the front. Temporarily mount each pin. the front panel and use the With the firmware running you can check the video hole drilled in it to hold the output by attaching a VGA or composite monitor and you LED in place while you tacksolder the leads. This will should see the MMBasic prompt as shown in Fig.8. Finally ensure correct positioning plug in a PS2 keyboard and try typing in something. With of the component. the firmware running correctly any fault in these interfaces 100nF siliconchip.com.au Parts List – Maximite Microcomputer 1 PCB, code 06103111, 124mm x 69mm 1 Snap-together case 130 x 75 x 28mm (Altronics H0376) 1 8MHz crystal 1 DC power socket 2.1mm PCB mount (CON1) 1 USB B-type socket, PCB mount (CON2) 1 5-pin ICSP connector, PCB mount (CON3) 1 DE-15 (or HD-15) high density 15-pin female D connector (Altronics P3084A) (CON4) 3 2-pin headers (CON5, CON6, JP2) 1 6-pin mini DIN female connector (socket) (CON7) 1 IDC 26 pin boxed header PCB mount, 90° pins (CON8) 1 SD card reader socket (Altronics P5720) (CON9) 1 3-pin header (JP1) 1 Toggle switch SPDT 90° PCB mount (S1) (Altronics S1320) 1 Micro tactile pushbutton switch (S2) 4 M3 metal thread screws (or self-tappers), 4mm long Semiconductors 1 PIC32MX695F512H-80I/PT or PIC32MX795F512H-80I/PT microcontroller (available from www.microchipdirect.com) [IC1] 1 7805 5V voltage regulator (TO-220) [REG1] 1 LM1117T-3.3 3.3V voltage regulator [TO-220] [REG2] 1 1N4148 general purpose low power silicon diode [D1] 1 1N4004 general purpose silicon power diode [D2] 1 Green LED, 3mm [LED1] 1 Red LED, 3mm [LED2] Capacitors 1 47µF 6.3V tantalum 2 10µF 16V tantalum 7 100nF ceramic or MKT 2 22pF ceramic Resistors (0.25W 5%) 2 33kΩ 1 10kΩ 1 5.6kΩ 1 120Ω 2 47Ω 1 10Ω 2 1kΩ 1 680Ω could only be related to components specific to the interface and should be easy to diagnose. USB interface Before using the USB interface you will need to install the SILICON CHIP USB Serial Port Driver on your computer (available from the SILICON CHIP website). This will work with all modern versions of Windows and full instructions are included with the driver, so installation should be easy. The Maximite uses the standard CDC protocol and drivers are also available on the internet for the Mac and Linux operating systems. The Maximite will be listed on siliconchip.com.au Fig.5: the input/output connector used by the Maximite. This view is from the back of the unit and should be referred to when connecting to external circuits. The 5V and 3.3V pins can supply about 100mA for powering external circuits. your Windows computer in the Device Manager under Ports (COM and LPT) as “Communications Port – SILICON CHIP USB Serial Port” with a specific COM port number. When you configure the serial emulation software on your computer you will need to specify this number to establish communications with the Maximite. If the software also needs to know the communications parameters you can specify 9600 baud with one stop bit and no parity. For the serial emulation software on Windows we recommend that you use the free, open source Terra Term (http:// logmett.com). This emulator allows you to easily send a file over the serial interface and capture data coming in the reverse direction. Sending a file lets you upload a BASIC program to the Maximite where it will be received and stored in memory as if there was a high speed typist on the other end typing in the program. This makes it possible to enter and edit your BASIC program on your Windows computer (where you have the convenience of a mouse and cut and paste) then send it via Terra Term and the USB to the Maximite where you can test it. Note that for this to work you need to configure Terra Term for a delay of 50ms per line (Settings > Serial Port). Power supply The Maximite is intended to be powered from a 9V DC plugpack but the supply voltage can be anywhere in the range of 7V to 14V. However, at the higher end of the range REG1 will be required to dissipate a lot of heat. We mentioned earlier a heatsink under REG1 to assist in this regard. But if you plan to power the Maximite from, say, a 12V battery in an automotive environment it would worth placing a 33 5W resistor in series with the power supply line to drop the supply voltage and dissipate some of the heat outside the Maximite’s case. Capacitor Codes You could also consider replacing Value µF Value IEC Code EIA Code REG1 with a more 100nF 0.1µF 100n 104 robust (and expen22pF   NA 22p 220 sive) regulator like Resistor Colour Codes o o o o o o o o No. 2 1 1 2 1 1 2 1 Value 33k 10k 5.6k 1k 680 120 47 10 4-Band Code (1%) orange orange orange brown brown black orange brown green blue red brown brown black red brown blue grey brown brown brown red brown brown yellow violet black brown brown black black brown 5-Band Code (1%) orange orange black red brown brown black black red brown green blue black brown brown brown black black brown brown blue grey black black brown brown red black black brown yellow violet black gold brown brown black black gold brown April 2011  89 the LM2937. This is pin-for-pin compatible with the 7805 but is more suited to the auto environment where large voltage spikes are prevalent. One other point to keep in mind is that, unless a plugpack specifically states it has a regulated DC output, the no-load output voltage of the vast majority of plugpacks is significantly higher than their nameplate states – we’ve seen them as much as double! The theory is that the voltage will drop to around the right level at full load. But the Maximite draws so little current most plugpacks will never get down to that, so be warned! If you wish, you can power the Maximite from a USB power source by moving JP1 to the USB position. This might be useful if you will be using the Maximite as a peripheral to a desktop PC – when you plug the Maximite into the USB it will be automatically powered up. Fig.8: if you see this prompt on your screen you can be assured that both the microcontroller and the video output circuitry are working correctly. Getting started So, now you have everything you need to build the Maximite and start experimenting with it. Next month we will go into more detail on how to use it but in the meantime you can get started by downloading the “Maximite User Manual” from the SILICON CHIP website. This provides the definitive summary of the Maximite and MMBasic. The download also includes some sample programs that you can run to get a feel for the potential contained in this tiny but powerful computer. For up to date errata, notes and new firmware for the SC Maximite go to http://geoffg.net/maximite.html Fig.6: the front panel artwork (shown full size) can be copied onto adhesive paper and then covered with a thin adhesive plastic sheet (of the type used to cover books) or printed then sealed with a heat laminator. After trimming the result will be a professional looking front panel. Fig.7: these are the front (top) and rear (below) panel cutouts for the Maximite shown full size and to scale. You can photocopy these (without breaking copyright) and use them as templates to drill and cut your panels. They’re designed to suit the Altronics H-0376 snap-together case. The power switch and the SD card slot are the only critical cutouts as these components are soldered to the PCB. You should check the cutouts against the actual components that you are using as the size (and therefore positioning) might vary between manufacturers. 90  Silicon Chip siliconchip.com.au