Electronics Engineer, Control systems used in new products

Project training list

By Joseph Ellsworth      Sep 2009    206-601-2985    


This list is a ordered set of projects which builds on the complexity of the pior projects.  If you work through to the end of this list and understand both the hands on design, prototyping and therory behind each project then you will be eminantly valuable to any small company who needs to build custom electronic control projects.    All of these designs are micro controller centric but they do require basic understanding of electronics,  transistors, voltage dividors, etc. 

Starter systems

Starter Recomendation:  http://www.coridiumcorp.com/ARMduino.php which is a $30 board which comes with the power regulator, programming connector built in.  Saves time but is sufficiently expensive that it discourages leaving completed working circuits laying around.    This board is unique in that they have both a very easy to learn basic compiler built in and their C library has been extended  to the point where the C is nearly as easy to read as the basic.

My favorite development board is http://www.futurlec.com/ET-STM32_Stamp.shtml which starts at $24 but does not include the power supply.  It has 512K ROM and 2 DAC so iti is very powerful.  Unfortunately it does not come with a compiler and figuring out the GNU tool chain will take some extra time to figure out a tool chain.    This set of expertise will be very helpful and highly valuable.

I started directly with AVR micro controllres soldered into project board but they do have some minimum soldering to reach viable system.   The nice thing about the AVR systems is that they are sufficiently cheap ($2 to $10) to leave the chip in test circuits,  They have a wide range of chips to fit different needs,  Most of their chips are available in DIP format which is easier to solder.   Plan on 3 days to figure out the basics on the AVR.  There is a section in the development plan on this.

Prototype schedule

I suggest you work in this order as it uses the skills built in prior steps for each more complex step.   This will give you the best learning experience.   Times listed are in days assuming a 8 hour work day.  If you are willing to put in 16 hour days for then it will go twice as fast.  When you reach the end of this cycle you will be good enough to help me and other inventors.   I have most of the individual parts you need here but I am not willing to let you take them until I am confident you will put in the time.   Ideally you would target completion of this before you start school.    This may seem overwhelming but if you ignore all the future steps and focus on the current step it should go much easier.


1/6 day
Build a 3.3V and 5V regulated supply that can accept a range of input from 5V - 25V from any DC input.   You will find many 9V power adapters for old products, phones, laptops to provide the basic power.  I like the LP2954, L7805, LM1117, L1087.   Hook aligator clips to these to make powering your tests easy.    Note:   I use a 8 inch piece of flat steel for heat disipation which is bolted to a wood block for isolation.



1/2 day
 day figuring out installation cable.  May need a Max232 chip on breakout board. http://www.futurlec.com/DevBoardAccessories.shtml and RS232 Connection Cable and LCD with Cable.


2 days mapping out GNU tool chain and getting basic communications to development board worked out.


1/4 day
 day to figure out how to turn a LED on and off using GNU tool chain.  Do forget current limiter.


1/2 day
 Use PWM built in to CPU to control average current flow through a LED to control brightness.


1/4 day
Built and test 3 resistor circuit to allow TTL serial connection to PC to be read by the PC using standard terminal program.  Unless specifically noted otherwise this circuit should be used to report measurement and diagnostics for other tests to the PC.



1/4 day
Measure voltage from ADC report on TTL serial to PC.



1/4 day
Measure resistance on a ADC and report TTL serial to PC.



1/4 day
Measure current flow by voltage drop across precision resistor and report by TTL serial to PC



1/4 day
Measure temperature using temperature variable resistor, voltage divider and ADC


1/2 day
Use an opto coupler to activate a low-side switching using mosfet transistor to drive 20 amp 12V DC motor.


1/4 day
Use a hall sensor to measure current flow through a wire in non-contact fashion.


1/4 day
Measure distance of magnet to sensor using ratiomeric hall sensor and report by TTL serial to PC



1/4 day
Build optically isolated circuit which uses CPU interrupts to count AC pulses based on change of state of pin.  Use 5V AC for safety.



1/4 day
day to build circuit which uses interrupts to synchronize to AC pulses.    Whenever the AC wave is in the top 30% of it's cycle we want to push power from a capacitor into the AC circuit.     Use 5V AC for safety.



1/4 day
day to built and test interface to I2C or SPI temperature sensor.


1/4 day  to build and test interface to I2C or SPI Serial Eprom


1/4 day  to build and test interface to I2C or SPI real time clock.


1/2 day  to build opto driven triac interface to switch part of a AC sign wave.


1/4 day  use ADC to measure voltage from small solar cell to determine day versus night and calculate level of insolation (amount of sunlight being received).


1 day  to build basic circuit which uses opto coupler and mosfet transisters to build a reverisble DC motor driver.  (Not cheating using pre-built unit)  This one can be harder so could take up to 3 days to figure out.


1 day  to build circuit which interfaces measure AC pulses and PWM to transfer a mathematically computed portion of a AC sinewave using a SCR triac.


1 day
Build a auto ranging voltage measurement system.   The therory of operation is the voltage input may be anywhere from 1,000V down to 0.001V.  The input to the CPU ADC can be between 0V and 3.3V.  A voltage divider is used to adjust the voltage form input into the range the CPU can handle.   The issue is that with such a large voltage range the 10 bit ADC does not have sufficient resolution to give good increments in the lower voltages.  The goal of this circuit is to switch voltage dividers so the CPU always assumes it is starting with the 1,000V but if it senses lower voltage it will work down to the next smaller dividor until it finds smallest one which keeps the ADC voltage in the range 0-3.3V.  The lower level voltage dividers must  be completely disconnected until the voltage has been determined safe or it will damage the CPU.   Once voltage is with drawn the CPU should automatically switch back to the safe mode and auto range down as needed.    Suggest 10 discrete dividors.  The CPU will need to mathematically convert back to real voltage from dividor output.     Hint:   Use as high of a resistance value as feasible for the dividor. You want less than 0.02mA draw from the power source you are measuring.    I used opto couplers to obtain the best isolation when switching out the voltage dividors and then used a multiplexer to minimize the CPU IO lines used to drive the opto couplers.  See also TLP627-4F-ND,  ADG1612 and ADG2128   note: You can build a voltage dividor which divides the voltage before input in a safe range for the switch.  This may save on parts cost but adds a minimum parasitic cost which should be avoided where feasible.


1 day  to build interface to TTL serial GPS unit and parse data basic data stream.


1 day to build and test interface which is a reversible DC motor driver using a I2C controller motor driver chip.


1/4 day Build circuit which uses a hall sensor to sense RPM of a shaft based on magnets rotating on shaft.  Software should use chip level events not polling.



2 day Build and test circuits for both end radio transceiver link http://www.futurlec.com/Radio.shtml Range - Up to 800m  includes capturing data from telemetry link to computer or saving data to SD.   In ideal scenario would include bi directional command interface to allow some tweaking of performance characteristics.    Would want to try both built in antenna unit and directional antenna eventually.  Optional use of Bluetooth or WiFi links instead but this one is cheap to try.


1/2 day
Use PWM and capacitor charge to produce a DAC like output.  This should be opto isolated to allow source voltages upto 200V.  Should use a voltage dividor on input to allow save measurement of voltages up to 200V.   Test with 5V or 12V for safety.



1/2 day
Experiment with putting CPU into low power sleep mode to be woken up either by timer or event thrown by pin input state change.   Try to drive total power consuption as low as feasible over a 1 hour period while taking a reading from a ADC once per minute or whenever the button which changes pin state is pushed.


1/2 day Build and test link to SD card bridge such as the SD card socket built into  http://www.futurlec.com/STM32_Development_Board.shtml


1/4 day Build feedback system which uses RPM of shaft to adjust PWM to raise or lower power fed to DC motor to control rotational speed.   Build both a lo side and a lo side + hi side switch.



2 day Replicating circuit of my current heat controller for plastic fabricator.   This includes diptrace layout.   If we are confident on this you will build 1 by hand like I did then we will we will choose a few of these or some combination and have the smallest board run we can find to have it produced so you can experience soldering your components into a board layout.


3 day Replicate my  current thermal heating circuit with resistance based temperature sensor.   But extend to use PWM to allow configuration of maximum AC/cycle.  
  • Remember that Triac once turned on remain on until the AC wave passes through zero again.  
  • Use a resistive thermal sensor good to 300C and voltage dividor to measure temperature. 
  • Uses a triac to turn AC power on to resistive heating coils.  
  • Also extend to measure total effective current flow using hall sensor.
  • Limit  limit total current draw to a specified amount.
  • Optically isolate the CPU from AC circuits.
  • Assume that triacs fail with AC passed back to gate so design for optical isolation.
  • This would be a good circuit to build around the Butterfly or http://www.futurlec.com/STM32_Development_Board.shtml because they have an easy wire LCD for $11.  The butterfly with the build in LCD and joystick controller would also be a good starting point to minimize soldering.   
  • Includes both working prototype circuit and layout in diptrace to have this produced in larger volumes.



Layout and board production software



2 day
Figure out how to use diptrace.http://www.diptrace.com/



1 day
Convert designs above to small dip trace circuits and from there into DIP style board layouts.


6 day
Convert 3 of your favorite circuits tested first in DIP circuit boards and convert to surface mount boards.    You will need to learn how to layout for surface flow and bake the components in place.


1 day
Produce basic aiming circuit which uses a small PV strip to determine when a device mounted on a single Axis is aimed most directly at the sun.  Therory is that voltage of unloaded PV strip should go up when aimed most directly at the sun.   Do not need the motor simply want the detection circuit on simple gimble that can be hand turned.    Use 2 additional strips to determine which way to turn to reach maximum brightness.



1 day
Use Humidity sensor with voltage or frequency output such as humirel and temperature sensor and calculate dew point.   Turn on motor if current temperature of secondary sensor is below dew point.








Motor control and positioning



3 day
Stepper motor driver.  Using only micro controller,  opto couplers, mostfet and jfet build a circuit that can drive a stepper motor through a virtual space of 50,000 steps.   Input commands are move to step #, change speed, query position, set unit (step, inch, mm), set steps per unit.  zero current position,  set limit min, max.   All config should be stored in non volatile memory.        Interface is via RS422 chip control and commands are via the RS422 interface.    Assume the stepper will be hooked to a worm gear but we do not know how long the worm is or what pitch density it has so these must be field configured via RS422 type interface.   See equivelant Gcode commands.   Need to accomodate end limit detection to prevent overrun.




2 day
Replicate stepper motor driver but use motor driver chip  instead of direct driving of the motor.



2 day
Replicate stepper motor driver but use to drive a servo motor with feedback instead of stepper.



2 day
Replicate stepper motor driver but use to drive 3 axis instead of only 1 axis.  Consider using central control CPU and 3 smaller CPU each driving and montitoring progess of a individual axis.   Assume each axis controller will be installed close to the motor.  RS422 is used to provide robust interface in electrically noisy enviornment.


















 Single Chip Microcontroller specific -

No pre-built boards here.  Part of the benefit of this section is to build the CPU directly into circuit.   This reduces the minimum cost per board and can mean the difference between a product that can be sold and one which is too expensive to take  to market.

Once this list is completed then bare AVR chips can be used to build all of the circuits above.  I find that it generally adds about 1 to 2 hours per circuit to solder in the minimum support circuitry when using AVR DIP chips.     There are pre-built boards available with the circuitry already present but these generally add substantially to the cost.

Other chips such as PIC can be used in liue of AVR.  TI has a very nice chip the MSP430 which is cheap,  ultra low power and has a $9.00 starter kit which can be adapted to program other MSP430 in circuit.

1/2 day
Figure out basic programmer. 
  • Test ability to program chip in circuit using the programmer.
  • Solder chip into circuit and with minimum circuitry. This is generally a 3.3V regulator,  3 resistors for the RS232 interface,   6 pin connector for programmer.



1/6 day
Build and test serial communications using a 3 resistor mechansim  to allow AVR CPU to talk to PC.  No RS232 level converters used.  Test ability to send data from chip to PC.
  • http://master.rungie.com/index.php/Serial_adapters
  • http://www.botkin.org/dale/rs232_interface.htm



1/6 day
Build  RS232 level converter such as MAX 233 chip into circuit.     Test ability to send data to and from PC using the serial interface.  This is critical because it is also the easiest way to change operating parameters in the field.
  • http://www.botkin.org/dale/rs232_interface.htm



1/4 day
Reproduce the LEED blink and the variable resistor based temperature sensor on hand soldered



1/4 day
Implement mechansim which detects hardware button contact.  Demonstrate with 2 buttons one which is polled,  one which is  event driven.



1/4 day
Test ability to save and restore data to on chip persistent storage media.



2 day
Use single chip micro controller like MSP420 built into simple breadboard socket using basic AVR programmer to replicate motor driver and voltage sensor circuit above but with a much cheaper chip.


3 day
Reproduce 3 of the projects above with AVR directly in circuit rather than using the external project boards.
  • Build DIP style Diptrace layouts and have the boards etched with external surface.  Hand solder the components.
  • Convert the above to surface mount layouts and have new boards produced  and then bake the compoents in place.
  • Note:  There is a minimum cost
















Power Managment in Renewable Systems


2 day
Build TEC pulse driver.     Idea is that pulsing larger voltages of power into a TEC cooling module will provide more efficient cooling.   What you want to build is a system which can amplify a 5V input voltage to 250V output.   Use a PWM system driving a opto coupler which pulses power into the TEC.   Need to be able to vary the length of the pulses and the space of time between pulses.  Best guess is that something like a pulse 0.1 seconds long with gap of 3 seconds will provide optimal but just a guess.  Implement an algorithm which varies pulse and gaps to find optimal cooling per power consumption.   Cooling to be measured by SPI or I2C temperature sensor.   At this voltage will be vary easy to cook and destroy the TEC so temperature sensor should be able to measure over temp and disconnect entire circuit.   Hint:  Try independant 12Vsupply for TEC initially and then try higher voltages.   Will need heat disipation block for TEC.  We have found that solid aluminum blocks which are JB welded to both side of the TEC work well.




1/2 day
Optional but we talked about it yesterday as the foundation for MPPT controllers
We talked about this yesterday and I focus first on electronic versions.    In reality we can probably buy a multi-tap transformer which has output taps at 0.5,1,2,3,4,5,6 and then use a simple switching mechanism to choose the TAP we want to use based on the sensed input voltage.  That should allow us to use PWM to do the final regulation of the output voltage.


































































































.....
....
....



.....







Extras


2 day
Need an Ocilloscope?  This development board claims to have a circuit and software that will produce a multi channel digital storage ocilloscope for $99.  You need to build computer controlled resistor ladder which always starts with a highest resistance and then works down to find the right voltage range but that should be easy for you now.   http://www.societyofrobots.com/axon/


30 day
Name Recognition - Helps find Jobs -    Figure out the GNU tool chain for the STM32 is a mandatory pre-requisite for this project
I include an open source module for a port of the LUA port this chip which gives us an interpreter on chip.   This is one of those opportunities for building highly valuable highly specialized skills.   My guess is that if you actively participated in the porting effort then we could work it into user groups so you where selling a fair amount of time helping others.     Having LUA on the STM32_stamp module would be give you a significant competitive advantage.