Saturday, June 16, 2012

My Home Brew Robotics Project, Embedded Controller Based Peripheral Devices

The wide range for the kinds of PDs I've worked on over the years is reflective of the fact that the original focus of this product was student science lab support. Here is a list of the PDs that, to date, I've at least started and which are now sitting on a shelf in my office in various stages of completion...

Dual Optical Interrupt Timer: 25mm Gap
Dual Optical Reflection Timer: 25mm Gap
Optical Interrupt Timer: 75mm Gap
Time of Flight Sensor

Quadrature Rotation Encoder
Pressure Sensor: (0-1.45) PSI-gauge
Pressure Sensor: (0-25) PSI-gauge
Pressure Sensor: (0-7) PSI-differential
Pressure Sensor: (0-100) PSI-differential
Load Cell

Temperature Sensor: Ambient
Temperature Sensor: RTD
Temperature Sensor: Type-K Thermocouple

LED Strobe Light
Audio Signal Generator
Precision Audio Signal Generator
Audio Signal Sensor
Audio Signal Sensor: with DSP
12kHz Pulse Generator
12kHz Pulse Detector

IrDA Link
Fiber Optic Link
TV Remote
Card Swipe Reader
Bar Code Reader
Laser Diode Driver
Hot Plate Controller
Mitutoyo Electronic Caliper Pickup

USB-HID Host Controller
USB Slave Controller

Real Time Calendar Clock
External LCD Display
External Keypad

Limit Switch
Dual H-Bridge, Stepper Motor Drive
Light Duty DC Motor Drive
Medium Duty DC Motor Drive

4-Port Hub
8-Port Hub
Wall-Wart Power Supply
De-Walt Battery Power Supply
Solar Cell Power Supply

PDs, The Original Design Effort. When I first began this project, I settled on the USB 1.10 serial bus as the preferred communications link between the CB and the PDs . And my choice for an embedded controller was an 8-bit USB-enabled PIC processor. The photo below shows two examples of these older design efforts.

Electronic Caliper Serial Port Adapter and Differential Pressure Sensor.
USB as a serial interface has much to recommend itself for applications like robotics, but for a number of reasons that I'll cover in a future post, I had to give up on using it, [1]. What I ended up doing was creating my own serial bus design by first throwing out a lot of the protocol overhead that burdens the USB standard, while optimizing those aspects of USB that lend themselves to the kinds of lab bench and robotics applications I envisioned for this home-school science lab product.

The down side of this change was that I couldn't use any of the industry standard USB micro-controllers to design around. But the up side was that, by designing my own micro-controller in a FPGA, I was able to incorporate into hardware a lot of features that would have been impossible to implement using any industry standard USB micro-controller.

PDs, The Current Design Effort. Once the decision was made to abandon USB as my choice for the system's serial interface, the design of the PDs fell immediately into place. I had already done several USB Host controllers and USB-SIEs in Verilog, so having to forgo using an off-the-shelf USB part and create my own FPGA based micro-controller was an easy transition.

Working in Verilog allowed me to implement in hardware a serial bus with the exact features my system design needs. It also let me incorporate into a PD’s design, features I could never have had using a standard micro-controller chip. Here are just a few examples.

CW from top: photo-gate timer,dual H-bridge motor driver, audio tone generator.
The optical photo-gate timer PD has a 1ms resolution for absolute timing measurements, but when used for velocity measurements of a passing object, can run in a 10┬Ás resolution mode. The timer can be configured to trigger on either a rising or falling edge or set to record either an absolute time stamp or on/off duration times. Since each photo-gate timer is synced to the CB's clock, a sequence of timers, spaced even meters apart, can be used to measure a time-of-flight profile for ballistics experiments. This is something that no off-the-shelf physics-lab photo-gate timer can do.

The dual H-bridge motor controller PD can either micro-step drive one stepper motor or variable-speed drive two DC motors.

Since each PD can sync its own internal clock to the CB's to within a few micro-seconds, this allows not only the frequency of an audio tone generator PD to be controlled, but its phase as well. This opens up the possibility of using pairs of tone generators to do audio wave-interference experiments. One can also use a cluster of tone generators to create a steerable phased-array audio beam!

12.5 kHz pulse transmitter for echo-location experiments. LED strobe light.
The pulse transmitter PD above is used to drive a 12.5 kHz piezoelectric ceramic resonator element. The tone is high enough to "get the physics right" for demonstrating bat or dolphin echo-location. But it's low enough for students to hear and experience the phenomenon of echo-location directly. Again, since each PD can sync its own internal clock to the CB's to within a few micro-seconds, this pulse transmitter can be paired with a pulse waveform detector PD to capture the returning waveform with micro-second resolution.

The LED strobe light PD can be paired with an audio tone generator to do physics experiments involving driven mechanical systems. A tone generator PD can be used to drive a mechanical system, while a strobe light PD can be set to a frequency 1 to 2 Hertz off from the tone generator's. This allows students to see visually a system's response as the frequency of the tone generator is swept up/down.

A USB adapter PD. This allows USB HID devices to be plugged into the WIDJETS CB
For example, one of the big drawbacks of a robotics kit like LEGO Mindstorms is that there are no user manual control devices available for them. Having a USB adapter PD that can act as a USB Host Controller allows one to use USB-HID devices as input controls to the CB; devices such as an optical mouse, keyboard, joystick or game controller.

A second advantage of such a PD is that memory sticks can be used for program transfer to/from a CB or to act as extra memory space for programs too large to fit in the CB's internal memory space.

[1]. T.B.D.

No comments:

Post a Comment