Saturday, December 3, 2011

Balancing Robot



This is my latest robot – it’s an inverted pendulum 2 wheel balancing robot. These photos and video are actually about a year old and were taken during initial development. I have made many improvements since these were taken, and will update with new pictures and videos showing the improvements and enhanced capabilities soon.

The robot has six PIC processors from Microchip Technology (http://www.microchip.com/) to handle the various functions:

  • The master processor board has two PICs – the receiver PIC decodes the RC receiver’s PWM outputs and passes the results to the master PIC which controls the whole system.
  • The IMU (Inertial Measurement Unit) processor board has a PIC that implements a Kalman filter to process inputs from a solid state SEN-008413 three degree of freedom module. The module is from Sparkfun Electronics (http://www.sparkfun.com/) and uses an ADXL320 accelerometer in combination with an ADXRS401 gyro rate sensor.
  • The Sensor processor board has two PICs – one to capture data from a couple slotted encoders from an old wheel mouse to provide position feedback (but not balance information). The other PIC on this board handles communication with the CMUcam1 camera module (http://www.cs.cmu.edu/~cmucam/home.html) and LV-EZ4 ultrasonic rangefinder from Sparkfun Electronics (http://www.sparkfun.com/).
  • Finally, the Speech processor board has a PIC that handles control of an old SP0256-AL2 allophone based speech chip.

There is also an H-Bridge motor controller board to take PWM commands from the master processor to control the two drive motors.

All software was written in PIC assembly language.

This video shows the robot balancing and moving around. The forward and turning inputs come from one joystick on a standard radio control (the same one I used on my snake robot). The head movement is controlled by the other joystick on the RC control. This video demonstrates the manual head movement mode, the head actually has a color tracking mode that I will show and describe in a future posting.

Tuesday, August 4, 2009

Modulus

It was so much fun building those Music from Outer Space boards in the Chameleon that I decided it was time to add to the Chameleon, Paia Keyboard, and Fatman and make a full fledged modular synth. It’s called Modulus, named after a villain from the Fantastic Four comics. This part of the synth was built over a period of over three years.



Here’s a list of what you see in the picture above (click the picture for a larger view).

Top case:
- Left Speaker
- MFOS 16 Step Sequencer
- Yamaha DD5 Drum Machine - with mods to provide pattern select indicators, tempo indicator, and multiple trigger outputs
- Waveform Visualizer – an original design to display oscilloscope-style waveforms on an LCD screen
- Right Speaker / Amplifier

Middle case:
- Nameplate / Blank Panel for a future module
- Dual Quantizer – two MFOS quantizers in one module
- MFOS VCO
- MFOS VCO
- MFOS LFO
- MFOS LFO
- MFOS Low Pass VCF
- MFOS State Variable VCF
- Dual ADSR – based on a design by yusynth
- MFOS Dual AR
- MFOS Dual VCA
- MFOS Dual VCA
- MFOS Noise and MFOS S&H in one module
- MFOS Ring Modulator

Bottom case:
- Joystick / MIDI Interface jack panel
- MFOS VCO
- MFOS VCO
- Square Wave Divider and Multiple – my own design
- MFOS Dual AR
- MFOS Low Pass VCF
- MFOS State Variable VCF
- MFOS ADSR – with mods for display LEDs and repeat
- MFOS ADSR – with mods for display LEDs and repeat
- MFOS Dual VCA
- Reverb and MFOS Panner – the Reverb is my own design
- Mixer – my own design

On top of keyboard:
- Joystick / MIDI Interface – my own design
- Chameleon
- Fatman

Bottom:
- Paia Keyboard
- Power Supply

The bottom case modules are normalized behind the panel – MIDI pitch CV is connected to the two VCO inputs, VCO outputs are connected to the In1 to 3 of the VCFs, VCF outputs are connected to the VCAs, the VCA outputs go to the mixer, whose FX loop A goes to the reverb and loop B goes to the panner. Gate CVs from the MIDI interface go to the ARs and ADSRs, with the ARs controlling the VCFs, and the ADSRs controlling the VCAs. No patch cords are required to get the bottom case to produce sounds, but of course everything can be overridden when cables are inserted.

Modules are standardized to a size of 7” tall by 2-3/4” wide. This puts the knobs at a horizontal spacing of 1-3/8” and the 1/4” jacks are spaced 11/16” horizontally. Vertical spacing is 1" overall. This gives a nice density of components, not too big but still plenty of room to turn the knobs and insert patch cords.

Tuesday, July 28, 2009

Chameleon





My Paia Stringz ‘n Thingz / Organtua keyboard is a great sound generating source. Sure would be nice to be able to process those sounds through some voltage controlled filters and amplifiers, with MIDI and some other stuff thrown in for good measure, right? The Chameleon was born!





After some research, I decided to use Ray Wilson’s excellent modular synth board designs from Music From Outer Space as the basis for the Chameleon. The unit contains the following MFOS boards:

- Noise and Random Gate generator
- Low Frequency Oscillator (LFO) with extensive routing possibilities to the other modules
- Sample and Hold (S&H )
- Stereo Auto-Panner with custom modifications for status & rate LEDs
- 2 State Variable Voltage Controlled Filters (SV VCFs)
- 2 Attack, Decay, Sustain, Release generators (ADSRs) with custom modifications for ADSR LEDs and an auto-repeat circuit
- 2 Voltage Controlled Amplifiers (VCAs)

The boards are integrated in the unit so that no patch cord changes are necessary to reconfigure the modules. Everything is routed and connected through selector switches and potentiometers on the front panel. This is accomplished through a custom control voltage (CV) and audio mixing and distribution system. There is also a custom 3 channel MIDI interface that includes 2 Attack-Release-LFO (AR-LFO) generators, and a MIDI trigger and gate implementation with yet another LFO. DC power (+/-12V and +5V) is provided from an external power supply, with power switching and filtering built into the Chameleon. Everything is packed into a 20½ inch wide by 6½ inch deep by 3 inch tall box with 77 knobs and 17 switches. Holy sardine can, Batman!

Thursday, July 23, 2009

Paia Keyboard

I’ve always been a big fan of Paia gear. I built several of their things from plans in Radio Electronics magazine. The Oz keyboard was one of the first things I ever made. My version was made using a circuit board from Paia, and parts from my own suppliers. The original Oz circuit board was for a 1½ octave design, but since I had a 2½ octave keyboard from an old organ, I added a second octave – and so it became a sort of a super-Oz or mini-Organtua depending on how you look at it. A couple Organtua boards and a Stringz ‘n Thingz chorus board from Paia were added later for additional ranks. It eventually ended up getting scavenged for parts for other things.

Nowadays you can get old Stringz ‘n Thingz and Organtua keyboards on Ebay from time to time. I picked up a pretty beat up Stringz ‘n Thingz cheap, and to my surprise, it included not only the Stringz ‘n Thingz circuit boards, but also a couple of those Organuta boards too! So combined with my boards from the super-Oz (see above) still in my junk box after all these years, I made a new case and rebuilt the whole thing into a hybrid unit that actually has the functionality of both a Stringz ‘n Thingz and an Organtua on steroids in one unit. Pretty cool. And if that wasn’t enough, I even added a MIDI interface to drive other stuff (more on this later).









By the way, the keyboard bushings - the little rubber bumpers that stop that annoying “thump” when you press and release keys - were old and dried out so I got a replacement set from Archive Sound. Easy to install, and highly recommended for restoring or rebuilding these old units.

The Stringz ‘n Thingz uses a very different keying circuit than the Organuta. The Organtua uses a MK50240 top octave generator to create individual notes as square waves and then connects those individual note outs through mixing resistors and the keyboard switches to the output. The Stringz ‘n Thingz uses a diode switching scheme to trigger, sustain, and decay notes. To make them compatible, I added a 37 note diode switching circuit to the Organtua outputs so the same key signal that triggers the strings also triggers the organ:



The 12V key switches are also sampled and used to trigger the MIDI processor to generate MIDI data. There’s no velocity sensitivity, but note on and note off information is sent out from the keyboard. A split of the data across MIDI channels 1, 2, and 3 is also performed based on the control panel switch settings. So even though the keyboard is small, it is zoned to allow simultaneous control of multiple MIDI devices.



Here’s a detailed picture of the card rack at the right side of the unit. The 3 blue boards at the top are the Organtua ranks 1, 2, and 3. The next board is the diode switching board. The next two beige Organtua boards are ranks 4 and 5, which are keyed through a decaying version of the diode switching circuit shown above and are fed to the second chorus board. The final board closest to the keys is the MIDI interface, based on a PIC16F877A microcontroller.



Here is a view of the control panel artwork. Controls are provided for all the funtions including tuning of the two master organ oscillators, tuning of the strings section, split point for the strings (cello vs. violin), octave selection of each of the 5 organ ranks, modulation and attack rate for the organ ranks, independent chorus control of the strings and the rank 4/5 outputs, sustain times, individual level controls, and MIDI modes.

Paia Fatman







This is a custom Paia Fatman that I built several years ago. The basic Fatman kit is actually still being sold today. Of course, one of the neat things about building a kit is all the learning you do in the process, plus you can make mods. Check out the Paia web page for ideas. My Fatman has lots of mods, including the ASR LFO, subharmonic generator, PLL VCO, ASR/ADSR reverser, and pitch LFO. The Fatman design is based around an 8031 microprocessor, but I used an Intel 8051 which has an 8Kx8 EEPROM built in so the external memory is not required - that’s why there are two empty sockets on the PC board in the picture above.

Wednesday, July 8, 2009

Wind Controller Mark II






OK, fast forward about 5 to 10 years, and I am starting to get a little paranoid about the reliability of the Mark I wind controller. Sure, it still works OK, but the keys (switches) are getting a little old, the wiring is getting old - it was built using lots of point-to-point wiring. Plus I now know all about PICs from working on the walking robot . Instead of 21 integrated circuits, I can build a new one with 4 chips. Wow, isn’t new technology great? To top it off, my woodworking tools have multiplied, so now I can make a much nicer case for a new wind controller. Oh, and Yamaha had a new model too, so there you go.

A note of explanation: the wind controller doesn’t generate sound in itself, it just creates and outputs MIDI data. I use a Korg 05R/W synthesizer to generate sounds, the Korg is the black box in the picture above. Think of the Korg like a keyboard without the keys, and the wind controller is what’s taking the place of the keys. Of course, with the pressure transducers (see the details post) and all the MIDI data they generate, there is lots more expression available to control acoustic wind sounds.

Wind Controller Mark II – Details












The circuit boards are housed in a wooden case made from cherry and walnut with some decorative inlays on the bottom part. The main body of the case was assembled as an octagonal assembly, but was rounded on the outside for that traditional instrument look and shape. There are three circuit board assemblies, the main board that has the processor and other active circuitry, an upper switch assembly for the fingering buttons, and a lower switch and LED assembly. The lower assembly connects to the main board before being inserted into the case. The upper switch assembly is also inserted into the case and connects to the bottom half sandwich with a small ribbon cable.






Just like the Wind Controller Mark I, the new wind controller has at its heart a wind pressure sensor to detect how hard you’re blowing. A Fujikura XFPN-050-KPGT1 is used as the sensor. You can see the brass tubing coming from the mouthpiece at the right of the picture. There’s a small tube connected inline that the pressure sensor’s port slips into when the circuit board is put into the case. The brass tube goes all the way to the bottom of the wind controller, you can see it sticking out just below the MIDI connector in a picture above.




The round flat pad in the pictures above is a force sensing resistor (FSR) from Interlink Technologies. It measures lip pressure to detect how hard the mouthpiece is being squeezed. This signal is useful to generate MIDI pitch bend commands, allowing you to bend notes just like on a real acoustic instrument.

A Maxim MAX479 micro power precision quad op-amp that buffers the sensor inputs for input to the PIC16F877, the brains of the wind controller. The PIC software to process the fingering switch and sensor inputs is written in assembly language.


Power for the wind controller comes from the interface box, which contains a conditioning circuit for power from two AA batteries. It has an interface jack for a foot switch, which is useful for special effects like sustaining or droning notes, selecting interval mode, and other programmed features.

Tuesday, July 7, 2009

Wind Controller Mark II – Sound Samples

Sound samples are from the wind controller connected to a Korg 05R/W synth. No sequencing or other multitrack recording was used for any of the samples, all are recorded live from the synth.

Pan Flute: Click here to play
Trumpet: Click here to play
Alto Sax: Click here to play
Bagpipes: Click here to play

Wind Controller Mark I










Being a lifelong saxophone player as well as an electronic enthusiast, I always thought an “Electric Saxophone” was a neat idea. In the 70’s there was a device called a Lyricon, which was basically an analog controller packaged with a traditional analog synth. They were pretty expensive at the time, too. In the 80’s, Yamaha came out with the WX11 and WX7, digital synth controllers that output MIDI to control contemporary synthesizers. The flute or trumpet or whatever patch you were using could now be realistically controlled using breath pressure, embouchure, and fingerings. Very cool. Well, they were just a little too expensive for me to dive in to, plus, I liked to make things, so I created the Wind Controller Mark I . It used an Intel 8085 processor (just like the platform robot), along with lots of memory, peripheral, and “glue” logic. It still works great.

Snake Robot – Overview


After the success of my walking robot, and since I knew how to control servos using a PIC now, I wanted to do something on a bit larger scale. This web site caught my eye. The S5 robot was especially intriguing, since it could both slither and sidewind. I decided this was an interesting project to try on my own, so I decided to make a similar robot using 40 servos. My design started from scratch, the only thing “borrowed” from the S5 design was the universal joint and opposing servo arrangement to get the necessary axes of freedom. Otherwise, my hardware and software design is completely new.


My system is controlled with a Hitec hobby radio control, and is implemented as a multiprocessor system that runs on six 16F876 PICs from Microchip Technology, Inc.


The master processor consists of two PICs – one decodes the RC receiver PWM outputs and passes the results to the master PIC, which computes the positions for the 40 servos in the various modes and sends serial data packets to four slave processor. The four slave processors control ten servos each through serial links. All software was written in PIC assembly language.