Silicon ChipElectromechanical Tic-Tac-Toe - March 2024 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Solid-state drive pitfalls
  4. Feature: Computer Storage Systems, Pt2 by Dr David Maddison
  5. Project: Laser Communicator by Phil Prosser & Zak Wallingford
  6. Project: Pico Digital Video Terminal by Tim Blythman
  7. Feature: Electromechanical Tic-Tac-Toe by Steve Schultz
  8. Project: ‘Nunchuk’ RGB Light Driver by Brandon Speedie
  9. Product Showcase
  10. Project: Mains Power-Up Sequencer, Pt2 by John Clarke
  11. Review: Arduino for Arduinians by Nicholas Vinen
  12. Vintage Radio: Bush MB60 portable radio by Ian Batty
  13. Serviceman's Log: This Time, It's Personal! by Dave Thompson
  14. PartShop
  15. Market Centre
  16. Advertising Index
  17. Notes & Errata: Mains Power-Up Sequencer, February & March 2024; Ideal Diode Bridge Rectifiers, December 2023; GPS-Disciplined Oscillator, May 2023
  18. Outer Back Cover

This is only a preview of the March 2024 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.

Articles in this series:
  • Computer Storage Systems, Pt1 (February 2024)
  • Computer Storage Systems, Pt1 (February 2024)
  • Computer Storage Systems, Pt2 (March 2024)
  • Flowcode (March 2024)
  • Computer Storage Systems, Pt2 (March 2024)
  • Flowcode (March 2024)
Items relevant to "Laser Communicator":
  • Laser Communicator transmitter PCB [16102241] (AUD $5.00)
  • Laser Communicator receiver PCB [16102242] (AUD $2.50)
  • Laser Communicator PCB patterns (16102241/2) (Free)
Items relevant to "Pico Digital Video Terminal":
  • Digital Video Terminal PCB [07112231] (AUD $5.00)
  • Digital Video Terminal kit (Component, AUD $65.00)
  • Digital Video Terminal front panel (07112232) (PCB, AUD $2.50)
  • Digital Video Terminal front panel (07112233) (PCB, AUD $2.50)
  • Firmware for the Pico Digital Video Terminal (Software, Free)
  • Digital Video Terminal PCB pattern (07112231) (Free)
  • Pico Digital Video Terminal panel cutting diagrams (Panel Artwork, Free)
Articles in this series:
  • Pico Digital Video Terminal (March 2024)
  • ETI BUNDLE (March 2024)
  • Pico Digital Video Terminal (March 2024)
  • ETI BUNDLE (March 2024)
  • Pico Digital Video Terminal, Pt2 (April 2024)
  • Pico Digital Video Terminal, Pt2 (April 2024)
Items relevant to "‘Nunchuk’ RGB Light Driver":
  • Nunchuck RGB LED Lights PCB [16103241] (AUD $20.00)
  • ATmega32U4 programmed with the firmware for the Nunchuck RGB LED Driver [1610324A.HEX] (Programmed Microcontroller, AUD $20.00)
  • Firmware for the Wii Nunchuk RGB Light Driver (Software, Free)
  • Nunchuck RGB LED Lights PCB pattern (16103241) (Free)
Items relevant to "Mains Power-Up Sequencer, Pt2":
  • Mains Power-Up Sequencer PCB [10108231] (AUD $15.00)
  • Firmware (ASM and HEX) files for the Mains Power-Up Sequencer (Software, Free)
  • Mains Power-Up Sequencer PCB pattern (PDF download) [10108231] (Free)
  • Panel labels and cutting diagrams for the Mains Power-Up Sequencer (Panel Artwork, Free)
  • PIC16F1459-I/P programmed for the Mains Power-Up Sequencer (1010823A.HEX) (Programmed Microcontroller, AUD $10.00)
Articles in this series:
  • Mains Power-Up Sequencer, Pt1 (February 2024)
  • Mains Power-Up Sequencer, Pt1 (February 2024)
  • Mains Power-Up Sequencer, Pt2 (March 2024)
  • Mains Power-Up Sequencer, Pt2 (March 2024)
  • New use for Mains Sequencer (July 2024)
  • New use for Mains Sequencer (July 2024)
  • Mains Power-Up Sequencer, part one (February 2025)
  • Mains Power-Up Sequencer, part one (February 2025)
  • Mains Power-Up Sequencer, part two (March 2025)
  • Mains Power-Up Sequencer, part two (March 2025)
Items relevant to "Arduino for Arduinians":
  • Arduino for Arduinians six PCB pack (AUD $20.00)
  • Arduino for Arduinians Project 27 PCB (AUD $7.50)

Purchase a printed copy of this issue for $12.50.

By Steve Schultz Electromechanical Noughts & Crosses Machine In his autobiography, Dick Smith described building a machine that could play Noughts & Crosses in 1958 using parts from a telephone exchange. I was fascinated with the idea of such a machine and decided to build my own version of it, with some modern twists! T his article outlines the design of my machine, which uses electromechanical components. It isn’t intended to have the level of detail of a project article, but it should give you a pretty good idea of how I built it and how it works. I was inspired to do this by the competition announced in the October 2021 issue of Silicon Chip (p13) by Dick Smith to design a modern Noughts & Crosses machine. I wanted to see whether I could build a machine using the technology he would have had available to him at the time. Items like PMG stepper switches aren’t readily available anymore, so I would have to 3D-print the mechanical components needed. The result is shown in Photo 1 and in the photo at the end of the article – the shiny dome on top is a bell to announce the winner! My machine includes a display and control board, a register and control board, two stepper switches and a motorised cam switch. The design is loosely based on an article published in 1956 called “Relay Moe plays Tic Tac Toe” – see Photo 2. It is described as consisting of 90 relays, a stepper and a motor that drives a series of cam switches. That article explains the machine’s logic for completing a row of three (or blocking a row of three). However, it doesn’t describe how the machine decides on its moves. I also found a YouTube video at https://youtu.be/SlNxBb_27CA about Photo 1: a top-down view of the completed machine. You can see many of the mechanical components at the top; there are many relays on a PCB under the LED game board. 56 Silicon Chip Australia's electronics magazine a machine invented by Donald Watts Davies (one of the inventors of the packet-switched network). He built it in 1949 using relays and stepper switches – see Photo 3. While Relay Moe used red and green lights to represent noughts and crosses, Davies’ machine appears to project the circle and cross symbols onto a screen. A more compact design Those machines were large and used point-to-point wiring. I minimised the size of my unit and maximised the ease of assembly by using miniature relays, printed circuit boards and ribbon connectors. My first attempt at building such a machine, shown in Photo 4, had a few Photo 2: one of the inspirations for this design was the Relay Moe from 1956, featured in Radio-Electronics. siliconchip.com.au Photo 3 (above): Donald Watts Davies’ 1949 electromechanical Noughts & Crosses playing machine. Photo 4: my first attempt was not so successful, partly because it tended to skip steps, leading to invalid states. shortcomings, including poor reliability. I used solenoids to drive ratchets that rotated multi-pole switches representing the square selected at each turn. The concept worked, but I had problems with the force needed to turn the ratchet and the spring force used to return to the home position. Occasionally, a switch position would be skipped, giving an invalid game. Also, this machine could only play the same game each time – it would always select the top left corner if the machine went first. The new machine has a level of randomness in its first move and in follow-on moves. That makes it more difficult for the player to anticipate the machine’s strategy. It does this by using two stepper switches. One selects the corner squares and the other the edge squares. When a game is started, the stepper switch retains the previously selected square, which is random. The stepper switch will cycle through a random sequence of squares with 11 possible positions (the 12th is home). For example, the corner stepper may step through the following sequence (referring to Fig.1): 1-3-7-9-3-1-7-3-9-13. Hence, each game will be different. In addition, the new machine is designed with a set of rules followed by the motor cam sequence. The original machine was not rulebased but used pre-determined calculations based on previous moves. A set of motorised cam switches effectively cycle through a set of rules in sequence, bypassing the rest of the cycle if a rule matches a condition. For example, one of the key rules is for the machine to select a blocking square if the player has played two squares in a row. siliconchip.com.au In terms of electronics, it mainly uses miniature DPDT relays, diodes, resistors, and capacitors; there are no transistors or integrated circuits. I used LEDs for the display because of their convenience and low power usage, but I could equally have used miniature incandescent lamps. The main display board includes the buttons for the player to select a square, the noughts or cross display, three lights to identify a machine or player win or a draw, and a machinefirst button. If the machine wins, the bell rings four times. I also added a Skill switch with low, medium, and high settings, which changes the rules used. You can see videos of my machine in operation at the following links: • siliconchip.au/link/abrl • siliconchip.au/link/abrm Operating principles The overall architecture of the machine is shown in Fig.2. When a player selects a square, it starts the cam sequence motor, which rotates a series of cams in sequence – see Fig.4. These implement the rules in order. If a decision is made to select a square, the rest of the cam sequence is bypassed. The flow chart, Fig.3, outlines the decision tree for the machine. The flow is shown for the Skill switch on the High setting, in which case the machine implements the “First Player Move” logic in the lower part of the flowchart. If the player has gone first and selected a corner, the machine will attempt to force a draw so the player cannot win. It does this by choosing the centre square and setting the “Corner Bypass” relay. This means that the next machine move will be an edge, and the player must respond with a block, resulting in a drawn game. If the machine has gone first (it will have selected a corner), it will choose the diagonally opposite corner as Fig.1: the numbering scheme for referring to specific squares on the game grid. Fig.2: the basic arrangement of the Electromechanical Noughts & Crosses machine. Australia's electronics magazine March 2024  57 the next move unless the player has already taken that square. The Skill switch is primarily related to the rules for the first move, as the first two moves tend to determine the game’s result. The basic operation of the register and control board depends on combinations of relays to store the current state of the board. 18 relays (nine for the machine and nine for the player) store whether a square has been selected. When a square is selected, the associated relay is activated and self-latches with one set of contacts, so that the relay stays on when the selection is released. This also lights up the nought or cross display for that square. The machine will always try to complete a row of three (to win) or block the player from winning. To do this, a combination of cam switches and ‘branching’ relays determines the next square to select. For example, if the machine has already played squares 1 and 3, square 2 is the winning square. The branching relays are used as AND gates. In this case, square 2 is selected by 1 AND 3. Square 2 would also be a winning square if 5 and 8 had already been selected. So, the logic for choosing square 2 is (1 AND 3) OR (5 AND 8). The cam switches latch such a combination into the Intermediate Memory or “IM” relays. Once the machine’s squares have been latched, another cam will check to see if the player Fig.3: this flowchart shows the steps that the machine uses to play the Noughts & Crosses game. Fig.4: the motor, gear and cam arrangement used to run through the ‘program sequence’ after the player makes a move. Fig.5: the machine uses two 3D-printed stepper switches like the one shown here. One is used to randomly select game board corner squares, and the other is used for edge squares. Photo 5: the 3D-printed stepper switch disc has two bridging contacts that make electrical connections between pairs of pads arranged radially. 58 Silicon Chip Australia's electronics magazine siliconchip.com.au already occupies the winning square and cancel the associated IM relay if so. An uncancelled IM relay can then be used to select the relevant square. Stepper switches Two stepper switches, shown in Fig.5, are used for scanning and selecting free corners or edges. Each stepper switch consists of an electromagnet that attracts an armature. The armature pushes an arm onto a ratchet wheel. The ratchet wheel rotates a set of contacts that effectively form a two-pole, 12-position switch. The A-part of the switch is used to scan for a free square. When a free square is found, the equivalent contact on the B-part of the switch is pulsed and selects that square. Two bridging wipers (see Photo 5) rotate in an anti-clockwise direction by one increment for each movement of the armature. The contacts bridge pairs of pads on the adjacent PCB. If the contact has +24V present, the armature will stop, and a pulse will be passed via the “B Common” line to the relevant B contact. This pulse selects the appropriate square. The control board for the stepper switch has a few relays to latch the scanning action until a free square is found; the free square operates a ‘cancel’ relay that unlatches the scan relay. The stepper switch is self-actuating. When the armature closes, in addition to incrementing the ratchet, it operates a microswitch that opens the coil magnet circuit and the armature returns to its home position. The stepper switch consists of the frame that mounts all the mechanical (including bearings) and electrical components, the electromagnet coil, and two circuit boards: one with the rotary contacts and the other with the control circuitry. Where possible, I have tried to design the components as reusable modules. This is the case for the cam sequence motor unit and the stepper switch modules. All modules are interconnected using ribbon cables and IDC connectors. When designing the stepper switch mode, I kept the following in mind: • It needed sufficient power to operate the armature and rotate the ratchet reliably, between 20 and 40 watts. This dictated the 24V operating voltage. • I made it self-operating so it doesn’t need an external clock/ siliconchip.com.au oscillator to pulse the magnet coil. A microswitch disconnects the magnet when the armature moves to the end of its stroke, with a capacitor to define the operating frequency. • It needed to reliably increment and stop in the correct location. This dictated the final design of the ratchet, which has two profiles: one for the push arm and another for the detent wheel. It also meant that the mechanism needed to be adjustable. I built a special alignment circuit board to drive the stepper switch and used a string of LEDs to confirm the alignment (see Photo 6 and siliconchip.au/ Videos/XvO+alignment). • I also wanted the stepper to be able to be used for “counting” operations. That means it has a ‘home’ position that it can return to. The scan input can then be used to increment the switch. One of the sources I referred to when designing the stepper switch was a 1964 publication, “How to use rotary stepping switches”. The stepper has two inputs: Home and Scan. If the Scan input goes high, the Scan relay is latched and power is supplied to the main magnet coil. The coil attracts the armature, which in turn operates the microswitch when it reaches its limit after pushing the ratchet forward by one position. The microswitch operates the coil release relay, allowing the armature to return to its home position. The hold capacitor keeps the coil release relay latched for a defined period, allowing the frequency of self-actuation to be controlled. In early testing, with no capacitor, the switch would cycle through the 24 contact positions in about a second. With the capacitor, it goes through roughly two steps per second. Each operation of the armature rotates the A and B wiper contacts one increment. If a square is already occupied, that contact will be in a disconnected state, with no voltage present. If a square is free, +24V will be detected on the contact and fed to the A common line. That operates the stop relay, which releases the scan relay, ceasing the scan sequence. The equivalent B-side contact is pulsed with the A common line feed to select the relevant square. Register and control board The nine relays representing whether the machine or player occupies a square are interlocked so that the player cannot select a square if the machine has already occupied it. These are the Machine Memory (MM) and Player Memory (PM) relays. If the player goes first, the motor start relay is latched, and the motordriven cam switches commence their sequence. One of the cams (Cam1) switches the motor stop relay at the end of the sequence. The cam switches drive several actions in sequence. Cam2 checks whether the player has completed a row of three and, if so, operates the player win relay and bypasses the rest of the cycle. The next cam (Cam4) clocks the MM states into the branch relays to determine whether the machine can complete a row of three and therefore win. If, for example, MM1 and Photo 6: one of the stepper switches being calibrated using the purpose-designed adjustment aid PCB. Australia's electronics magazine March 2024  59 Fig.6: this cam disc, Cam1, stops the motor at the end of the cam sequence, so it has a single cam with a short dwell. Fig.7: Cam5 (“Cancel squares occupied by other player”) needs to trigger functions 4, 7, 9 & 11, so it has four lobes with longer dwell than Cam1. MM2 are selected, the branch relays will operate IM3. If the player already occupies square 3, Cam5 will operate the relevant IM cancel relay, clearing IM3. If the IM relay is not cleared, the follow-on cam (Cam6) will select that square. Similarly, the following sequence clocks the PM states into the branch relays, in conjunction with the machine & player swap relays, controlled by Cam3. If the machine can block the player from completing a row of three, it will. Cam7 performs a check to determine whether the machine has managed to complete a row of three and, if so, operates the machine win relay. It also activates Cam12, which has four lobes that ring the bell four times. The cam sequence is summarised in Table 1. Each cam is defined by a few parameters, including the number of lobes, the start and end angle for each lobe, the leading angle, the dwell angle and the trailing angle. For example, for Cam1, the dwell is very short (see Fig.6). We want this cam to operate the motor stop relay but coast to a stop so that the cam switch is ready for the next cycle. However, Cam5 (Fig.7) needs to operate four times during the cycle, with a longer dwell. The cams are mounted on a 7mm hexagonal brass shaft, ensuring an accurate angular relationship between cams. Table 1: Cam Sequence Cam Description 1 2 3 4 5 6 A vital part of the circuitry is associated with bypassing follow-on cam cycle events when an earlier cycle has declared a win for the player or machine, or when the machine has selected a square to play. If a decision is taken to choose a square, we must ensure that only that square is selected and the rest of the sequence is bypassed. These functions are performed by a Bypass Delay relay that, if activated, operates the Bypass Relay. Once activated, the remaining Cam actions are skipped until the end of the cycle. The Player Win Detect and Machine Win Detect functions also trigger the Bypass Relay directly. The first two moves In most Noughts & Crosses games, the outcome is determined by the first two moves. Several relays track and control these two moves, including the ‘Machine Went First’ relay and the ‘Player First Move’ relay. Combined with the Skill switch, they determine how the machine responds to the early player moves using the following rules. If the player goes first and selects a corner, the machine chooses the centre square. If the Skill switch is set to High, it also latches the Corner Bypass relay. The strategy here is that the next machine move will select an edge and force the player into a draw. If the machine selects a corner first, the next move should be to choose the 7 8 9 10 11 12 13 14 15 1 Motor stop 2 Player won 3 PM/MM swap 4 Copy MM into IM register 5 Cancel squares occupied by other 6 Select lowest IM 7 Win if IM still present 8 Clear IM relays 5 Cancel IM relays 4 Copy PM into IM register 5 Cancel squares occupied by other 6 Select lowest IM 8 Clear IM relays 5 Cancel IM relays 9 First move checks 10 Corner check 11 Edge check 60 Silicon Chip Australia's electronics magazine siliconchip.com.au diagonally opposite corner unless the player has already taken that square. The components of this system can be broken into blocks that interact with each other to form the overall system. Machine and Player Square registers Fig.8 shows the arrangement of the machine and player registers for each square. The player selects an available square by pressing the Player Select button. If the machine already occupied the square (MM1 here), the button is isolated from the 24V line and prevented from operating because the MM1.2 contact will be open. If the square is free, the player button operates the player memory relay (PM1), which self-latches. The button also sends a pulse to the cam motor start circuit via an isolating diode. When a square is free, the Square 1 Free output is presented with 24V via the normally-closed contacts of both relays. When the square is occupied, the output is disconnected. If 24V is available on the Square Free line, when the stepper switch is scanning, it will stop and select the free square. If the square is selected, a pulse will be initiated on the MM1 Select line, and the relay will start to switch the MM contacts. That will remove the 24V from the Square Free line, causing the relay to stutter and not reliably latch. The RC network on the Square Free line ensures that this latches reliably without the need for make-beforebreak contacts. Fig.9 shows the part of the circuit that determines the first two moves using two relays. The Player First Move relay represents the first move by the player, whether or not the machine has gone first. This relay is initially unlatched and is latched at the end of the first cam cycle via the Motor Stop signal. It remains latched for the rest of the game. The Machine Went First relay is latched when the player selects the Machine First button, latching the relay and selecting a corner via the Corner Select line. If the machine went first, Cam9 will trigger the Diagonal Select function. Because the machine will have selected a corner on the first move, this operation selects the diagonally opposite corner as the second move if the player has not taken it. If the player has gone first, the machine’s siliconchip.com.au Fig.8: there are nine sets of relays like these. If the player has chosen the square, the Player Memory (PM) relay is latched on, while if the machine has chosen it, the Machine Memory (MM) relay is on. Fig.9: these two relays help the machine to determine the first two moves based on who went first. The move is selected based on the states of the Diagonal Select, Centre Select and Corner Select lines. Fig.10: the logic for square 1 to determine whether to complete a row of three to win the game or to block the player from completing a row of three. Similar logic is used for the other eight squares. first move will be to select the centre square if it is free. Intermediate Memory circuits Fig.10 only shows the logic associated with selecting square 1 to complete a row of three to win, or to block Australia's electronics magazine the player from completing a row of three. However, similar logic applies for the other eight squares. Here, 24V is applied to the positive side of relay IM1 if squares 2 and 3 are occupied by the machine (or 4 and 7, or 5 and 9). March 2024  61 When Cam4 closes, the other side of the IM1 relay is grounded, causing it to operate and self-latch via the IM relay contacts. If square 1 is already occupied by the player (PM1), 24V will be present on the positive side of the IM1Cancel relay. When Cam5 operates, it connects the other side to ground, activating that relay. If square 1 is occupied by the player, the IM1Cancel contacts open, cancelling the IM1 relay and preventing the subsequent selection of that square. Any remaining latched IM relays constitute valid square selections to complete a row of three. Note that more than one IM relay can be operated. To avoid trying to repeat previous moves, the IM Cancel relays also have an input from each associated MM relay. on any of the IM Select lines, the Machine Win relay will operate and self-latch via its first set of contacts. The second set of contacts closing will present 24V to the input of Cam12, which will ring the bell to indicate that the machine won. Machine Win Detect circuit The detection of a Player Win occurs close to the start of the Cam cycle as it is initiated by the player pressing a button. Referring to Fig.12, the branch (B) relays are used to detect the winning This is shown in Fig.11. After Cam6 has operated, selecting the relevant MM relay, it remains closed when Cam7 operates. If 24V is still present Player Win Detect Circuit Photo 7: winding an electromagnet coil with a drill is much less tedious than doing it by hand! I measured the resistance at the end to verify that I had put roughly the right number of turns on. Fig.11: the Machine Win Detect circuit. It is a diode OR circuit based on the state of the nine Intermediate Memory (IM) relays driving a self-latching relay. Fig.12: the Player Win Detect circuit uses the states of the branch (B) relays, combined with diode logic and fed through the Player Memory relay that would be needed to complete a row of three. Photo 8: tapping the iron core support for the electromagnet. Australia's electronics magazine siliconchip.com.au 62 Silicon Chip square in a row of three. For example, if the player already occupied squares 2 and 3, square 1 would be the winning square, and contacts B2.1 and B3.1 would be closed. If the player selects PM1 (the winning square), contact PM1.2 closes, supplying 24V to the input of Cam2. When Cam2 operates, the Player Win relay is latched and the Player Win Light is lit. If squares 5 and 8 were occupied instead, square 2 would be the winning square, and if the player had selected square 2, that would operate the Player Win Relay via PM2.2 when Cam2 closes. Motor Control circuit When the player presses a button associated with a square, in addition to selecting the square, power is connected to the Motor Start relay. This relay self-latches and commences the cam rotation sequence. While the motor is operating, the Player’s Turn light is turned off, indicating that they must wait until the end of the sequence before taking their next turn. Once the cam sequence is completed, Cam1 activates the Motor Stop relay, which unlatches the Motor Start relay. The inertia of the motor coming to a stop means that Cam1 opens, leaving the next cycle ready to start. The motor used is a 12V DC motor with an inbuilt reduction gearhead. It is designed to operate at 36 RPM (one rotation every 1.7 seconds). The desired cycle of about 4 seconds was achieved using a reduction gear in the cam motor assembly. Some technical notes I used FreeCAD to design the mechanical components. It is a parametric CAD package, so it was easy to design the cams (including the cam lobes’ leading, dwell and trailing angles). During development and testing, those parameters needed to be changed frequently. One of the mechanical components I 3D printed was the coil bobbin for the main stepper magnet. After several operations, I noticed that the bobbin had started to melt; the coil consumed roughly 30W. Having prototyped the bobbin using PLA, I ordered Nylon units from a professional 3D printer, as Nylon can handle higher temperatures than PLA. One of the biggest challenges was siliconchip.com.au Photo 9: here you can see the two stepper switches and cam mechanism that are housed in the upper portion of the clear acrylic case, plus the relay board. Australia's electronics magazine March 2024  63 creating an electromagnet with enough force to drive the armature. I needed the armature to be no more than 4mm from the magnet end, which dictated the size of the armature arm, the push arm and the ratchet size. I started with a 12mm diameter core but ended up with a larger 16mm diameter core to increase the cross-­ sectional area and therefore force. I also used a high magnetic permeability iron rod to maximise the magnetic field. Based on the book mentioned earlier, I knew that the magnet needed to consume 20-40W to operate effectively and fast. As the magnetic field is related to the product of the number of turns multiplied by the current (B ~ n × I), I needed to maximise the number of turns while keeping the current at a reasonable level (<2A). I started with a wire diameter of 0.315mm (28AWG) and 1800 turns. This consumed approximately 1.3A. I ended up using a thicker conductor (0.355mm, 27AWG) and 1500 turns on the same-sized core, resulting in a current of 2A and therefore a 26% higher ampere-turn value. I wound the bobbins using an electric drill (Photo 7), feeding the enamelled copper wire from a reel. As I had calculated the turns using the depth and width of the bobbin, I simply filled the bobbin to the outside edge. I then measured the resistance to confirm the approximate number of turns. Photo 8 shows how I tapped the electromagnet’s iron core support. I designed the PCBs using Altium’s CircuitMaker cloud-based software, which is free to use. I chose it because of the vast library of available components, the powerful auto-route function and the general usability of the product. When designing boards such as the rotary select board for the stepper switch, it was essential to dimension and position the pads accurately. I could also create and re-use ‘components’ such as the LED array representing the nought or cross. Initially, I tried to find a commercial multi-segment LED component that could display the nought and the cross. I couldn’t find anything suitable, so I decided to make the display from discrete LEDs on the PCB. Each square has 25 LEDs: 13 red ones for the cross and 12 green for the nought. The 13 LEDs for the cross are split into series strings of six and seven, accounting for the forward voltages of the LEDs. Similarly, for the nought, there are two groups of six. Assembly and enclosure I wanted to give the player the experience of interacting with the machine and seeing and hearing the operation. Therefore, the stepper switches and the cam sequence motor unit are mounted in a clear enclosure at the top of the unit, as shown opposite. When the player selects a square, they can see the motor cam sequence run and the stepper switches operate. LEDs on the main register and control board indicate the current state of the control relays. The display and control panel can be angled up to observe relay operation. The main enclosure is a timber frame that I rebated (using a router) to house the top and bottom panels. The timber frame is made from Tasmanian Oak and varnished. The top panel is a transparent acrylic sheet that supports the display board below via standoffs. I sprayed the bottom surface of the top panel with matte black acrylic paint, with the “windows” for the LEDs masked with adhesive labels. That gives the display squares some depth when viewing. The switch and display labels are self-adhesive “Traffolyte” labels I ordered from a labelling supplier. The bell If the machine wins, a bell is rung four times. It is a modified “Call” bell from Officeworks. A micro-solenoid (visible on the right of Photo 12) operates the striker. When testing the unit with friends, it became clear that the bell was an essential part of the feedback. Initially, the bell only operated when the machine won. I modified the unit to make the bell ring if the player won, making it more engaging and satisfying. Playing a machine that always wins is not much fun. The Skill switch gives the player much better odds of beating SC the machine. Photo 11 (left): this photo was taken towards the end of the extensive testing regime, with the machine fully working but yet to be put into its custom case. Photo 12 (below): I modified a call bell from Officeworks, adding a solenoid to actuate the striker. 64 Silicon Chip Australia's electronics magazine siliconchip.com.au Photo 13: the finished Noughts & Crosses playing machine. The LEDs look a lot brighter in person, you can get an idea of how bright they are from Photo 11 (shown opposite). siliconchip.com.au Australia's electronics magazine March 2024  65