Self-Playing Guitar System


This design allows the user to write guitar songs in software and play them back using a robotic system mounted to a guitar.  This system allows the user to control how each of the guitar strings is pressed (within the first 12 frets) and how they want each string to be strummed/picked for this particular “note-pick-frame”.  This is one of the most complicated systems I have designed to date.

06/23/2012 I am on the last stage of design for this system which involves building the mounting brackets that put the system on a guitar.  I am happy to say that all other software/hardware/electrical systems have been tested and are working wonderfully. It’s amazing to watch all of the motors turn and solenoids fire as “note-pick-frames” are played back.

Primary task  involved with developing the Self-Playing Guitar System

  • Brainstorm the feasibility and/or possible ways to accomplish playing a guitar
  • Select stepper motors/solenoids/drive pulleys/drive belts
  • Create computer software that allows the user to create/save/edit robot-guitar songs and send them over USB 2.0 FS to a control board.  This required hard-coding a database and robot guitar file system
  • Create USB drivers for computer and microprocessor
  • Design firmware stepper motor drive routines
  • Design firmware solenoid drive routines
  • Design firmware feedback/sensor processing routines
  • Design a Cooperative Multitasking System for the MCU that facilitates communication with a computer running the robot guitar song software over USB while concurrently executing the routines used to control how the robot devices are playing the guitar.  (Authors Note: This was an intense challenge given the number of motors/solenoids/feedback elements/timing/speed factors for this system!)
  • Design the electrical circuits/evaluate and select parts/create virtual simulation models using schematic capture and simulation.  Order necessary parts.
  • Integration of low voltage/high current switched mode power supply, “SMPS”, used for powering the stepper motors and solenoids
  • Design the PCB
  • Print the PCB
  • Populate the PCB
  • Test the PCB
  • Debug software/hardware,  correct errors, wash-rinse-repeat until perfect
  • Build adjustable guitar mounting brackets for motors/solenoids/feedback elements


  • Control:  (7) Bi-Polar Stepper Motors, (6) DC solenoids
  • Power:  There are three separate power rails on this system that require the following:
  1. 5-16 VDC [MCU supply rail; Regulation is onboard]
  2. 12VDC x 16A [SMPS input for stepper motor power]
  3. 18-24VDC x 8A [SMPS input for solenoid power]
  • MCU: PIC32MX795F512L (100 pin TQFP)
  • Communication: USB 2.0 FS running Custom Class USB drivers on computer/MCU
  • Interface:  Self-Playing Guitar Computer Software
  • Input:  (6) feedback elements (absolute stepper motor reference)
  • Motor Driver IC:  L298N

Potential Applications

  • Self-playing guitar/violin/banjo/drums/etc.
  • CNC machines
  • 3-D printers


Stepper Motor Control/Hardware interface C routines / Source Code

Posted in Self-Playing Guitar System | Leave a comment

12F1822 Touch Sense RGB LED Controller


12F1822 Touch Sense RGB LED Control Board

Number of Photos: 7
Total Size: 5.50 MB


This design monitors 1-2 capacitive touch sense element(s) and uses this sensory input as the basis for controlling the color an RGB LED.  The microprocessor used on this board is  PIC12F1822 and the RGB LED is a standard common cathode 4 pin unit.


  • Control:  (1-2) touch sense elements
  • Power:  3-5Vdc
  • Wide range of different color outputs
  • Color Selection – (1) The user can scroll through various colors by constantly touching sense element.  This is a particularly nice feature when the device is configured to have 100+ colors. (2) The user can tap the touch sense element causing the device to single step through each of the colors.  This is convenient when the device is set to produce a small range of colors.

Potential Applications

  • Anything that lighting can enhance
Posted in 12F1822 Touch Sense RGB LED Controller | Tagged , , , , | Leave a comment

Magnetic Field Measurement System

Magnetic Field Measurement USB 6

Magnetic Field Measurement (EMF) System

Number of Photos: 7
Total Size: 14.56 MB


This system measures magnetic fields and quantifies the value into Gaussian units (or some other derivable  quantity such as Tesla’s) and communicates them over USB 2.0  for real time display/data acquisition.  All measurements with this unit are achieved using  a non-contact/non-intrusive approach.  This design is directly controlled, programmed and monitored by your computer using a GUI I developed for it.  The MCU used on this design is PIC18F24J50.


  • Communication: USB 2.0 Full Speed
  • Channels: 1 – 6 **Use of multiple sensing channels permits more extensive applications and/or increased system accuracy.
  • Physical Interface:  RJ45 “Ethernet” Cable
  • Power:  Primary =  Device is powered entirely using USB bus power;  Secondary =  3.3-16Vdc Aux. power supply (can be used with or without USB power).  Onboard LDO regulator with multiple layers of redundancy for overvoltage/isolation/ESD protection of both USB/Aux power.
  • High Level Interface: Full-featured GUI allowing the user to monitor data in real time.   Custom class (application specific) full duplex USB 2.0 drivers for MCU and computer, On-board programmability of MCU over USB (bootstrapped).
  • Range:  – 165.00 to +165.00 Guass
  • Granularity: 0.32 Guass
  • Sample Rate:  500 ksps
  • Digital Filtering:  Dithering + Slow/Fast moving weighted average.
  • Software Requirements:  Windows OS + .NET 2.0-4.0 framework.  Should work with most Linux systems with little modification as well (currently untested).

Potential Applications

  • Magnetic Field Measurement
  • EMF compliance validation
  • EMF noise source location
  • Linear positioning/feedback
  • RPM measurement
Posted in Magnetic Field Measurement System | Tagged , , , , , , , , | Leave a comment

2-CH Precision Resistance Measurement System

Precision RES Measurement V2.1.1 LCD Resistance Measurement Menu

2-CH Precision Resistance Measurement

Number of Photos: 7
Total Size: 16.53 MB


This board can measure the absolute and relative resistance of most anything your can get your hands on over the order of nano to giga ohms be it the opposite ends of a bologna sandwich 500 feet away or a single resistor nested within a spiderweb of components.  The firmware is the heart of this unit and was developed with a host of provisions aimed at making measurements independent of environmental factors.  Of great consideration is that the device and its user interface were set up so that anybody can use the device with ease and confidence.  The device is designed to work at the industrial/extended industrial temp range and performs virtually independent of line length/temperature/peripheral circuitry.  This board would make an excellent pairing with the 4 Channel driver board for process control applications such as turning on a motor or sounding an alarm relative to a measured condition or defined set point.  The MCU used on this design is PIC18F46J50 or PIC24F32KA304.


  • Data-logging
  • Measurements are automatically formatted to show the most relevant data possible based off a formatting and centering algorithm.  This design currently displays what it measures using an 8-digit decimal value such as x.xxxxxxx or
  • Direct interface with current loop, 802.11, 802.15 and daughter boards shown on this site
  • Measurements for each channel are time and date stamped using a menu configurable Real Time Clock
  • Each measurement channel can be independently turned off or on and each channel can be post processed to determine some desired value that is application specific.
  • Targeted Auto Ranging (Quantatinization of measurements, though inherently constant [i.e. 2^n], are dynamically ranged and centered in accordance with source resistance so measuring over a wide range of resistive values is of a much higher precision than using  a constant #Bit ADC over a fixed span of nano-giga ohms). In simple terms,  a 1 Ohm resistor is quantified roughly around a center point of 1 Ohm and likewise this center point is manipulated in accordance to other unknown resistances.  Though this approach is far more difficult to implement both in hardware and firmware, implementation of these features makes this system significantly more capable.
  • Firmware encryption
  • Ambient temperature of the board is constantly monitored (always available on the LCD glass)
  • User Help and How-To Menus
  • Company contact menus
  • Low power consumption = ideal for battery applications
  • Self Calibration
  • Over-voltage and isolation of various elements

Potential Applications

  • Resistance Measurement (captain obvious strikes again)
  • Temperature Measurement
  • Load Cell Measurement
  • Strain Gauge Measurement
  • PH/Corrosion Measurement
  • Pressure Measurement
  • Position/Angle Measurement
  • Humidity Measurement
  • Airflow Measurement
  • Galvanic Potential Measurement
  • Float/Level Sensor Measurement
  • Instrumentation Calibration
  • Process Control
  • All sorts of applications needing a precision reading derived from Ohms Law
Posted in 2-CH Precision Resistance Measurement Board | Tagged , , , , , , , , , | Leave a comment

Vision Based Robot Control System


This gallery demonstrates the various configurations of the vision based robot control system.  I integrated this system with the robot built by our team for the ATMAE national robot competition in 2011.

Functional Description

There are three primary communication topologies the robot control system was designed for use with:

  • USB 2.0
  • 802.11 Wireless
  • 802.15 Wireless

Details on each topology are discussed below.

USB 2.0

This topology implements a direct connection using a USB 2.0 Full Speed between the 18F control board and a computer.  Both the control board and computer run a complementary set of Custom-Class USB drivers that were created solely for this application. This configuration has the highest speed of the aforementioned topologies and the most reliability due to it being a wired connection.  I have spent the majority of my time developing the Custom Class Driver’s and GUI for this interface.  A brief description of the operation of this system is as follows:

  1. Click the icon for the Robot Control Center program.  This will immediately launch the robot’s GUI and establishes a connection with the Robot Control board over USB in a background thread.  At the same time this program launches Roborealm and configures it for the robot system (For example camera’s, navigation variables, routines…It’s the same process you would undergo if manually setting up the vision system).  The GUI sets up another background thread for continuous extraction of vision data from Roborealm.
  2. Roborealm process camera data and updates various navigation variables created within its respective API.
  3. As data becomes available the robot control system program parses navigation variables from the Roborealm API server and post processes them into meaningful robot control commands (background thread).  This thread returns the post processed results as variables stored in various data structures within the main “parent” thread of the robot control center program.  This data is also used to update various portions of the robot control center GUI.
    1. If full autonomous control is enabled, the robot control center main thread enables the USB thread to send drive commands using vision data exclusively.  The GUI is also updated showing the navigation commands that are being sent to the control board over USB.
    2. If manual control is enabled, the robot control center thread enables the USB thread to send drive commands relative to which assigned keys are pressed on the keyboard exclusively.  The GUI is also updated showing the navigation keys being pressed.
    3. If debugging is enabled, the robot control center thread enables the USB thread to send drive commands relative to status of the various debugging elements integrated within the GUI.
  4. The USB communication thread issues a command telling the robot control board to send data reporting the status of analog/peripheral being monitored it (for example, is a switch pressed?).
  5. The firmware on the robot control board parses the navigation commands received over USB and use them to issue the direction and speed outputs to each channel on the motor driver board (Up to 8 motors can be controlled by this board).  The speed control is the most sophisticated of these routines as it allows for complete pulse width and pulse frequency to be set dynamically from USB data.
  6. The firmware on the robot control board acquires the state of analog/peripheral devices interfaced with the board and sends them to computer over USB where they are also updated on the GUI/processed.

802.11 Wireless

This topology implements an embedded server with a wireless internet connection using an attached wireless antenna transceiver module over SPI.  When this hardware is used the internal USB hardware cannot be used due to memory/processor power of the control board’s MCU.  Manual control of the board is facilitated using a web browser to access the control board as an embedded server that host a web page with various motor control system status aspects being reported in real time to it.  Currently I have not integrated Roborealm with this interface.

802.15 Wireless

Description In Progress….


Documents & Source Code

Posted in Robot Control System | Tagged , , , , , , , , , , , , , , , | Leave a comment

18F4550 Robot Control Board with USB 2.0 & 802.11/802.15 wireless enabled



This control board incorporates numerous features and coordinates a wide range of functions supported by four peripheral daughter boards for communication and control purposes.  It is the brains of the operation that facilitates linking a computer and attached hardware with the outside world for dynamic control/measurement/autonomous applications.  This design is directly controlled, programmed and monitored by your computer using a GUI and USB drivers I developed for it.  I integrated this board with a 3rd party vision system (RoboRealm) enabling it to drive a robot around on its own using vision.  I used this board + vision system on the robot built by our team for the ATMAE national robot competition in 2011.


  • Communication: Full Duplex USB 2.0, 802.11 a/b/g wireless, 802.15.4 wireless,  RS-232/485
  • Physical Interface:  USB 2.0 Type A,  (3x) 8p8 RJ-45 “Ethernet” breakouts, (6x) Terminal Block auxiliary  analog/digital IO’s 0-5VDC, SIL pin header breakout for serial com., SIL pin header breakout for ICSP
  • Power:  5-45V supply range, USB bus power detection and switchover modes.  On-board regulator with multiple layers of redundancy for over-voltage/isolation/protection.  5V Aux protected power output
  • High Level Interface- Full-featured vision system interface integrated with Robot Control GUI,  Custom class full duplex USB 2.0 drivers for MCU and computer, 802.11 wireless micro-server, Nodal based 802.15.4 wireless network control
  • Misc:  LED indicators for connection status and motor control state, master kill and MCU reset switches, hardcore USB 2.0 FS interface tested to be stable over 6 month constant/continuous connection period with WinXP OS, on-board programmability of MCU over USB (bootstrapped)

Potential Applications

  • Robotics
  • Industrial Control Systems
  • Vision Based Identification
  • Navigation and Control Systems
  • Wireless Metering Systems

Daughter Boards

Links & Source Code

Posted in 18F4550 Robot Control Board with USB 2.0 & 802.11/802.15 wireless enabled | Tagged , , , , , , , , , , , | Leave a comment

802.11 A/B/G Wifi Daughter Board

802.11 Communication Daughter Board SW View

802.11 A/B/G Wifi Daughter Board

Number of Photos: 11
Total Size: 8.75 MB


This is an 802.11 a/b/g wireless internet breakout module. It is used to provide a web based interface using 802.11 wireless communication. This board is essentially just a 2.4Ghz antenna module with supporting circuitry for interface to an embedded device over SPI.  The antenna module is made by Microchip part# MRF24WB0MA. This board transforms the USB 2.0/802.11/802.15 control board into a wireless embedded micro-server.


Host Communication: IEEE 802.11 A/B/G wireless

Peripheral Communication: SPI (20Mhz)

Interface: Standard RJ-45 Ethernet cable

Power: 3.3-45Vdc power supply input.  On-board LDO regulator.

Other: The ‘cool’ factor

Posted in 802.11 A/B/G Wireless Communication Daughter Board | Tagged , , , , , , , | 1 Comment

802.15.4 Wireless Communication Daughter Board


This an 802.15.4  wireless communication sub-system.   It is essentially just a 2.4Ghz-ish antenna meant for low power/low throughput embedded systems.  The antenna module is made by Microchip part# MRF24J40MB.  An amazing feature of this board is that it can communicate at distances of roughly a mile @ 400 KB/s.


  • Host Communication: 802.15.4 Wireless
  • Peripheral Communication: SPI 20MHz
  • Physical Interface:  1x8p8 RJ-45 “Ethernet” breakout
  • Misc:  3.3V & 5V bidirectional communication enabled. (Configured using jumpers)
Posted in 802.15 Wireless Communication Daughter Board | Tagged , , , , , | Leave a comment

4-Channel 4-20 mA Current Loop Communication Daughter Board


This a current loop communication daughterboard capable of communicating over the range of 0-20, 4-20 and 0-25mA for 4 independent current loop channels.  This board can be directly interfaced with the 4 or 2 channel precision resistance measurement board.

My Review

I don’t particularly care for the analog current loop  communication approach as it depends significantly on the receiving system to interpret the data being communicated.  Not to mention this further complicated by how well the transmitting system can output a current level corresponding to some relative condition.  The redeeming quality of current loops is that they are mostly immune to noise so industrial devices often use them.

My opinion is that current loops are essentially a headache unless used in a binary pulse output configuration.  When current loops are used in a binary style current pulse configuration this overcomes the undesirable tendency of most current loop transmitters to drift with temperature and/or current loop supply voltage levels (which inherently nullifies any advantage gained by noise immunity when transmitting an analog current level).

Posted in 4-Channel 4-20 mA Current Loop Communication Daughter Board | Tagged , , , , , , | Leave a comment

Printed Circuit Board (PCB) Fabrication


Printed Circuit Board (PCB) Fabrication

Number of Photos: 60
Total Size: 81.25 MB

There are a lot of benefits of being able to print your own PCB’s.  It’s a bit confusing and difficult at first but it’s worth the effort as it can be very rewarding once you get a system down and learn your capabilities with it.  I decided to post this gallery to help aid an individual trying to do the same. The ability to print my own board’s greatly enhanced or made possible many of my projects.

Printing a board w/out copper plating hole walls/vias

1.) Clean Copper Clad with fine grit sandpaper or scotch brite pad then wipe clean with rubbing alcohol or mild acid.

2-A) Print your PCB artwork if you haven’t already.  Your artwork should be printed on non-recycled glossy paper using a laser printer with plastic based black toner.  I have successfully used standard Oki, Lexmark and HP laser printers for this without a problem.  If possible, set the printer so that it prints using the following:  Darkest toner setting + Glossy Paper + Enhance Fine Lines + Highest Resolution + Ink Saver Off.

**Note:  Generally speaking, In many PCB CAD programs you will need to mirror the top layer of your PCB artwork and leave the bottom normal when printing it.

2-B) Apply PCB artwork to (both) surfaces of copper clad and use hot iron to transfer ink to surface of copper using lots of pressure and moving iron across all areas of board.  Make sure the board is on a flat, heat tolerant surface at this time and that your iron has FULLY heated before use (I use the highest heat setting).  When doing two sided PCB’s I use a bright light to line up the two layers and use two sided tape to attach them forming a pocket that I can slip the PCB into.  Alignment is critical for two sided PCB’s so take your time on this step. Application of  artwork on a  two sided PCB is shown below:

Artwork is first applied (above). Artwork is ironed on (below).

3.) Soak board in water and remove paper gently from copper clad board.  You should have a board that appears like the one pictured here at this point (bottom view).

All paper removed (top view)

4.) Etch board in acid.  Time will vary according to acid strength/type, copper thickness on PCB and solution agitation to name a few of the factors.  I etch my boards in two gallons of oxygen regenerated cupric chloride acid.  The advantage of using this acid is that it can be regenerated after each use by recharging it using oxygen from sources such as hydrogen peroxide or a generic fish tank air pump and stone(less than 10$ from Wal-Mart and is what I use).  I made my own cupric chloride from scratch.  I got most of my information from the author of this  cupric chloride informational website who did an outstanding job of describing various details of this acid.

5.) Now at this point the unwanted copper has been removed from the board and you need to remove the remaining toner from surface of traces that were masked by the PCB artwork.  I use an extremely fine grain sandpaper mounted on a rubber sanding block and wet-sand away the bulk of the remaining ink.  I use a scotch brite pad and fine metal bristle brush for the stubborn areas.

6.) Drill the holes

Printing a board w/ copper plating hole wall’s/ vias

1.  Drill all holes requiring plating of hole wall’s

2. Clean copper clad PCB by wet sanding with fine grit sandpaper then wipe clean with rubbing alcohol or mild acid.

3.  Apply hole wall charging solution to the inside hole walls.  Remove all excess solution from surface of the copper clad and do not clog the holes with the solution.


Hole-Charging solution =  I use a blended mixture of waterproof black acrylic ink (binding agent), Isopropyl Alcohol 95% (thinning agent) and fine grain graphite powder(plating agent)

4.  Plate the PCB (Pictured).  I recommend rotating the board several times during the plating process.  The speed of plating is dependent on several factors.

5. Wet sand the surface of the board until smooth and shiny.  The idea here is to make the surface suitable for transferring the PCB artwork onto it (The plating process causes the surface to become coarse).  Once completed clean board thoroughly and dry the same as in step 2.

6.  Apply the PCB artwork.  Aligning the PCB artwork at this point is key.

7.  Soak board in water and remove paper gently from copper clad board.  You should have a board that appears like the one pictured here at this point.

8.  Apply a acid resistant coating to the inside of the now plated hole walls.  There are a lot of ways this can be done.  I found using same the waterproof acrylic paint as used for the hole charging solution works fine since it is plastic based.  I thin the acrylic  with isopropyl alcohol and use a fine tipped brush to apply a thin layer of the paint to inside of each hole wall being careful not get any paint on the copper clad.  This part may sound bad but it actually goes pretty fast once you get a feel for it.

4.  Etch board in acid.  Time will vary according to acid strength/type, copper thickness on PCB and solution agitation to name a few.

5.  Remove toner from surface of traces that were masked by the PCB artwork.  I use fine grain sandpaper mounted on a rubber sanding block and wet-sand away the bulk of the remaining ink.  I use a scotch brite pad and fine metal bristle brush for the stubborn areas.

Posted in Printed Circuit Board (PCB) Fabrication | Tagged , , , , , , | Leave a comment