It is critical in development work to start by building the simplest possible device that works. This often involves some kind of blink program. While this appears trivial (and boring), it validates that the whole toolchain is working: the power supply, the compiler, the programmer, the hardware, your wiring etc. After doing this it is always best to add funcions one at a time, testing each one as you go. This makes debugging much easier, as only samll amounts of new code need to be inspected each time.

Code lends itself to unit-testing and refactoring because one can copy and paste at no cost. For electronics, to unit test, one way would be to write software, then replace a function with a piece of hardware that does the same thing (for example, filtering a signal). Refactoring would involve recreating a completed project on a breadboard with a duplicate set of parts (to test) and then modifying (to refactor). A good example of this is a changing output of a filter, voltage regulator or amplifier. It could also mean reusing an input or output device with a new MCU.

The aim of these projects (at least to begin with) is to build a simple CNC device. Any system like this needs a number of components.


Tools of production

Start with a small project and a budget. Buy the best set of equipment it affords for that project. Build your set over time.

These are the tools I have to date:

  • For PIC MCUs:

    • XC8 for compiling
    • a PicStart+ clone for programming pic16 MCUs (ZIF socket and ISCP) and a PicKit2 clone for programming pic16 and pic18 MCUs (ISCP only)
    • pk2cmd for uploading
  • For AVR MCUs:

    • avr-gcc and avr-objcopy for compiling
    • a USBasp clone for programming
    • AVRdude for uploading

- GNU Make for managing compilation and writing of hex files.

  • For circuit design:

  • For circuit building:

    • Power supply
    • Fluke 179 DMM
    • Hakko FX888D soldering iron
    • Panavise 396 with Quadhands workbench mount
    • SS-02 solder sucker with silicone tip
    • Sidecutters
    • Tweezers
    • A 2mm drill bit
    • A set of electronics screwdrivers
    • Wire strippers
    • Components: solder, a resistor pack, capacitors, wires, stripboard, breadboards and dev boards

How to choose the next project

There are many projects and limited time. Use the following guide (in order of priority):

  1. Prefer projects that build on previous projects
  2. Prefer new projects that enable multiple future projects
  3. Prefer projects that assist your career
  4. Prefer projects of commercial application

Beyond this, being interested is the best motivation.

Next articles:

  1. LED dimming and toggle w/ AT90S2313 (PWM, interrupts, rotary encoder)
  2. LCD display "Hello world" w/ AT90S2313 (LCD)
  3. LCD control over serial link w/ 2x AT90S2313 (LCD, interrupts, UART)
  4. Circular buffer on AT90S2313
  5. Radio serial link

Some ideas:

  • a process for circuit board creation
  • bayesian classifier + IP blocking for website attacks
  • control the position of one servo motor with another
  • WebGL fabric modelling
  • Yet Another PIC Programmer
  • ngspice tutorial
  • temperature controlled oil heater with remote sensors