Saturday, August 18, 2012

"The Brain": Step 6 - Main controlling electronics

To control what the brain does when a file is accessed, is achieved using a PIC microcontroller mounted on a custom designed printed circuit board (PCB).The end result looks like this:


This design will probably use a 'master' board plus two or three identical electronic control boards (depending on how much control is to be achieved).
Some of the main stages in producing a control board are described below:

1) Design the circuit
This starts on the back of an envelope and on a prototyping platform (a 'breadboard').

It progresses to designing a schematic diagram on an electronics CAD/CAM suite (I use KiCAD).

The final schematic looks like this

Key features are:

  • Lots of flashing LEDs on the board itself!
  • 11 high-current channels of LED control
  • Programmable
  • Some user-control using two jumpers

2) Pick the actual electronic components
Tell the CAD/CAM software what components are available for the circuit. For example, the main 'spinal cord' wires will be connected using several 3-way screw-terminals. In order to produce a PCB, the software needs to know the exact dimensions of the component, so it can lay-out the correct copper pads.
3-way connector details

3) Design the PCB
Decide on the board size. Drop the component 'footprints' onto the board. Slowly make each connection from pad to pad, until the whole schematic diagram is correctly wired-up.
Wiring-up the pads

The finished board design
4) Etch and drill the PCB
The design is printed and then transferred optically (using a UV light box), to a light-sensitive layer on a new PCB.

The optical image is developed (much like an old 'wet' photograph negative).

Copper is exposed ready to be etched away

The board is then immersed in an acid etching bath.
Etching starting

Etching nearly finished
The finished board:

The holes are then drilled:

Top of the finished board

Bottom of the finished board

5) Solder on the components
Add each component
Components being added

The finished board

The finished board
6) Program the micro-controller
The board does nothing until the micro-controller is 'told' how to control the outputs. This is done using a programming language on a PC, with the finished software being saved on the micro-controller, by connecting the PCB to the PC using the special programming port (the white, 6-pin plug).

7) Finally, see if it works!
Hopefully, if every step has been fault-free, everything will work as it is supposed to. The spinal cord is connected up, so is the power supply. A simple, test program is installed and the brain is switched on.

The software lights up the bottom half of the brain like a 'pulse' and continually animates the rotation of the dummy hard drive.

The infant brain is born!

Next: Add some more of the brain LED channels to the existing control PCB and adjust the software to make the brain react to a signal (the accessing of the real hard drive).

No comments: