Let's Make Robots!


Plays a game with you through an xylophone

Hi there LMR, here is another one of our projects, as promised. :)
This is Xylomatron. It is a robot that you can play a game similar to "Simon Says" but with a xylophone interface. Basically, it does play a note and expect you to repeat it, if you succeed it adds another note to the previous sequence and expect you to do the same. Therefore the game gets harder at each level, depending on your memory.
When you fail, it gets quite angry thinking "The puny human couldn't memorize X notes" (it does really trace it in fact :D)

To detect the notes, it uses 2 digital pins, each attached to 4 different value of resistances with a pull up circuit. The user closes the circuit using the stick, therefore returning a specific value. This method seems to need lots of trimming over time, the values change, to cover this issue we have coded a trimming function to the robot.
Although, we will soon print a board and change this method with a more solid shift register solution, which actually we couldn't do at the time because of the lack of the component on the night we were finalizing its prototype circuit. We were caffeinated, sleepy, I really don't know what we were thinking by adding the pull up circuits.

Anyway, the robot has 6 servos. 4 mini servo is on the arms and 2 micro servo is used for the neck. We have used an ardweeny (a quite cheap and small arduino clone) to run it.

The entire hull is hand-made and painted, used a pvc-foam called sintra.

Here are some photos from development (click to enlarge):

And some photos from the 7DX demo party:


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Just out of curiosity, what are you using to form your PVC sheeting? You have some precision work there. I've used boiling water or a heat gun with cardboard forms or the edges of the adjacent pieces, but I don't get results this good.

-Utility knife to cut the pieces.
-A lighter to bend. (just a regular lighter. a heatgun would be better though).  The thing is that I draw where to bend on the pvc with a ballpoint pen, and be creative about how to bend it. If I want a circular angle I use round objects (like a bottle), if I want it to be sharp I use the edge of a table.
-No matter how you bend it, since you are doing it by hand, it will be imperfect. The real jobs start with the sandpaper. You fix the edges, make the bended surfaces smoother by using different grades of sandpaper.

With I had a 3d printer or a cnc, but I kinda like working like this. I usually don't plan what the robot will look like, I do the design as I go.

Nice work. Outstanding.

Is it possible that you use the digital pins in PWM mode that you can get a different value than [0..1] ?
So you are actually using two analog pins to read in the tone the user played?

...and welcome to LMR.

We are using analog inputs indeed, but the input method isn't the problem.
The true problem is the oxydation metal plates of the xylophone, and many other variable that can cause difference in the resistance values of the pull up circuits. I mean, even the position of the robot slightly change the results (most possibly because of the electromagnetic waves of the household devices and electricity wiring in the walls, and the metal plates act like giant 'antennas').
Therefore, the robot needs to be trimmed once in a while.

A shift register setup will fix this problem for good, and will only take 1 pin :)

Thanks for the welcome, its nice to be here.  

Ah I see.

Regarding the electrical calibration problem: Did you ever thought about having a piezo sensor sticked to the underside of the xylophone's metal plate? Like inside an acoustic electric guitar.

Could that enable the Xylomatron to read-in the data more reliable with less calibration nessessary?

The first thing we have tried to do was to stick a single piezo at the bottom of the xylophone to try to determine the frequencies of the played note. That didn't work out well. But using seperate piezos for each plate sounds interesting. That might just work.

We can do the shift register setup coupled with piezos. That would also eliminate the cable of the stick, will think about this Thanks for the idea! :D 

Yes. For each metal plate one piezo. Detect a hit when hit-strength actual-value is higher than a nominal treshold value.

That is a simple hit-sensor.

Added value: Using the piezo you now have the strength of the hit. If you could bring the analog value into your microprocessor you could also use this information and i.e. let the Xylomatron hit the xylophon harder. But then the shift-in register might fall apart...

But hey - that's just my 2-cents. Keep up the good work, Botdev.

That's about what most electronic drum triggers use to register velocity of stick impact for midi information. The only problem I see is the limit of ADCs on a 328-a problem which can easily be overcome using AT Tinies. The link shows the possibilities for a Beagleboard but the principal is the same for Arduino. If you have D pins open it might be the way to go-especially since a 74hc165 won't work with analog info.

Indeed. The shift register can not be used for this function anymore.

But you could put the shift register between the arduino and something like this one:
a 8-channel analog multiplexer/demultiplexer.

My collegue Frank pointed me to this chip while having a coffee break talk about the lack of analog inputs and the usefulness of the analog/PWM values.

This analog multiplexer could help the Xylomatron to just use one analog pin but work with eight analog sensors (or actors). With the shift register one could add more multiplexers but use only 3 digital pins for the control.

Pardon Botdev... but we are slowly getting off topic now ;-)


Nevertheless the AT Tiny is a good idea too. Maxhirez. As usual. 

I have used these analog multiplexers once. Definitely worth trying, thanks for pointing them out