Saturday, April 30, 2011

Robo-Roundup #11

http://rpmedia.ask.com/ts?u=/wikipedia/commons/thumb/c/c5/Shadow_Hand_Bulb_large.jpg/250px-Shadow_Hand_Bulb_large.jpg
Sorry for not posting this weeks roundup on Friday. My internet connection was messing around, and that meant I could not post on Friday. However, this weeks roundup contains robots that help recycle to ones that help you around the house. I hope you enjoy!

1. This robot is helping us get to a greener and cleaner earth, see it all at: http://spectrum.ieee.org/automaton/robotics/industrial-robots/zenrobotics-makes-recycling-robots-epic-trailers-about-recycling-robots

2. Getting tired of your daily household chores, if so this bot is perfect for you: http://www.plasticpals.com/?p=27540

3. We have all heard of the game catch, but with a robot its a different story: http://www.plasticpals.com/?p=27592

4. Caterpillar inspires scientist to construct a new type of robot, check it out at: http://www.sciencedaily.com/releases/2011/04/110426213039.ht

Well, I hope you enjoyed this weeks Robo-Roundup and we hope you read next weeks too!

Wednesday, April 27, 2011

Meet the Cute Little Tweenbot



 Robots that look too humanoid appear to be scary or weird to everyday people, but thats not the case with the Tweenbot. The Tweenbot is a little robot that looks cute and has the main purpose of driving in a straight line. Tweenbots are unleashed into public places where there is an abundance of people strolling around, and the bot has to rely on the kindness of the person to help the robot get to its destination that is labeled on its flag. If you think that no one would help this little ball of fun, then your wrong. Just check out the video below to see for yourself! Thanks for reading a feel free to comment below!



-original source: http://spectrum.ieee.org/automaton/robotics/diy/tweenbots-now-on-kickstarter


Enclosure design



Proposed enclosure design - inside the main body are four black tubes (actually drinking straws covered in black crepe paper but only because I couldn't find any black straws anywhere!)

It still needs four buttons (to turn each of four different channels on and off) and somewhere to put the "tuning pegs" for the potentiometers (which adjust the light sensitivity levels on each input pin) but this is the initial design idea for the enclosure.

The 16x2 character display allows users to tune the inputs and select different keys/sample sets without having to refer back to the PC the device is connected to. The LEDs show which channels are currently on and off. Of course a lot of this information could be display onscreen (on the PC) when used as a USB/HID device, but keeping it off-screen allows us to modify the firmware to create a midi version of the instrument in future.

Tuesday, April 26, 2011

The invisible instrument - schematics

Here's the latest schematics for our invisible instrument.
This version hasn't even been built yet (not even on a breadboard) but is an idea for improving on the current version.
We're acutely aware that four inputs isn't a massive number for an instrument - we could use "doubling-up" to create up to seven inputs (e.g. accept 1000 as the left-most position, 1100 as the next position towards the right, 0100 as the next, 0110, then 0010, 0011, 0001) but this would stop the instrument being poly-phonic (since 0110 would mean "play sound four" rather than "play sounds 2 and 3 together"). It's swings and roundabouts really.



Despite only four inputs, this does allow a large number of pop (and rock) songs to be played - 90% of popular music consists of three chords, four if you include a relative minor for the middle eight (if none of this means anything to you, don't panic!). Changing the sequence or overplaying chords with different lead lines is what gives most pop music depth. After all, too many chord changes and the song becomes unpredictable: and it's the predictability of music that gives it its "hook" (or, easy-to-recall melody).


Triggering riffs/chord samples with a single input allows songs to be built up from simple, repetitive sequences

This new instrument includes a dial (for selecting the current key/chord/scale if we ever get around to midi output) as well as some buttons and LEDs. The buttons are used during playback to "layer" multiple sounds from a single input:

The idea is to allow the user to load up to four different sounds to be played back whenever an input is trigger. It's a bit like having up to four channels, which can be muted/unmuted. It could be a bassline, guitar chord(s), synth parts and a melody line. When an input is triggered, all four sounds can be played at once. The user can turn off which of these are played by pressing the buttons which latch the sounds on and off. The LEDs show which "channels" are selected for playing when an input signal is detected.

So players can start with just the guitar part playing (for example, channel one active) - playing up to four different chords/riffs/patterns either in sequence or together - then turn on the bassline (channel two) and whenever a single input is triggered, both the guitar and bass parts play. The key to the success of this approach of course is that sound1 on channel 1 and sound1 on channel 2 are in the same key or at least sound harmonious when played together.

By combining these simple channels, it should be possible for someone (with a little practice) to create some rather complex sounding tunes.

I guess the only way we'll ever know, is to build one of these things and try it out!

What does the invisible man play? An invisible instrument



To date, we've been calling our instrument a "shadow harp".
While this is accurate - the instrument detects the presence of shadows in order to play notes - we've been undecided about the name for a while. Really, because Peter DeSimone has already created an instrument he calls a shadow harp (albeit one that was abandoned and replaced with his "pocket harp") and although this instrument was inspired by his, it really is a different project (more in-line with his original pin-hole light harp than his final shadow harp solution).

After a bit of debate and a few beers (ok, a few cups of tea) we decided to call our version the "invisible instrument". It's a specific enough name to convey what the instrument does (it's an instrument but the playing surface is invisible) but vague enough to allow for modifications and changes to the design and behaviour in future revisions!

So from now on, any references to a "shadow harp" are purely accidental - we mean, of course, "the invisible instrument".

It's stopped working!

Last night we celebrated (albeit in true nerd style, with a cup of tea and a Bourbon biscuit) after getting our "shadow harp" working properly.
It was possible to trigger 1,2,3 and even 4 different samples in sequence (one after the other) or together (by spreading my hands sideways and covering all four inputs at once). It seemed to be working exactly as designed.

This morning, keen to repeat the successes of last night, I plugged the new instrument into my PC and tried to play a simple tune. Nothing!
The LDR values didn't seem to change. I altered the sensitivity threshold but only saw activity when it was reduced down to 2 instead of 10 as it was last night. This was so sensitive that other inputs were triggering sounds even at the slightest movement near them.

I noticed that the raw input values had increased from around 220 to 252 and reduced very slightly when the end of each tube was covered.
Thinking about how the LDR works (with a variable resistance from 5Mohm down to a few hundred Kohm) it sort of made sense. During the day, natural daylight floods the room, so the "top" resistance is lower, compared to the fixed 1Mohm resistor to ground. At night, when playing the instrument under artifical light, the somewhat dimmer conditions mean the "top" resistor has a higher value - so the ratio between the top and bottom resistors is lower on each input pin. This theory is in line with the input values seen: at night, the input values are noticeably lower than during the day.

The solution? Not sure - my gut reaction is to replace the bottom resistors with linear pots, so that the instrument can be "tuned" to the ambient light conditions.
A simple set-up screen when the instrument is first switched on will allow the user to find the optimum values for the "bottom" resistor before play commences.
Perhaps something like take a reading from each pin in turn, compare to the mid-point (128) value and display it as a bar on the screen. The user then twiddles each pot in turn, until all inputs are set to about half-way. They can then press a button to start playing the instrument, knowing that hand gestures will be correctly sensed and processed as inputs for the device.

[update: I just tried replacing the 1Mohm bottom resistors with lower valued ones (about 330Kohm) and the instrument once again became sensitive enough to play. It seems that allowing the user to change the initial resistance of the bottom resistors (i.e. replace with potentiometers) could be the way to go!]

How the new shadow harp works



Each of the four analogue inputs as a simple voltage divider.
5V is connected to one side of a light-dependent resistor (LDR), which is wired in series with a resistor to ground. The input signal is taken from between the two resistors.

As the user places their hand over the LDR, the resistance falls, causing the ratio between the two resistors to drop. This variable voltage is fed into an analogue pin, converted to a digital value (0-255) by the microcontroller's ADC hardware and compared to the last value read in.

Even when static, analogue input values tend to "drift" - i.e. float around, +/-1 or +/-2 (so a "constant" value of 128 may actually vary between 126 and 130 over time!)
To overcome this, we take a reading from the analogue pin, compare it to the previous value and if the difference is greater than 2, this represents a genuine change in resistance, which we then process.

In fact, depending on light levels, sometimes it is necessary to adjust this value to 4 or 5, to avoid cross-talk as the user places their hand in a position that influences to LDRs, next to each other. By making this threshold value a variable, we can allow the user to set their own "sensitivity" level for playing the instrument.

In indoor lighting, the LDR inputs typically read around 220.
When you place your hand over an input tube, this value drops to around 205.
Sometimes neighbouring LDR values drop when you place your hand over an input - by setting the sensitivity to 8, in this case, only the sensor with a hand above it actually triggers an input signal.

Triggering inputs is quite simple - if an input value is falling compared to its previous value, this represents the presence of a hand above the input.
When the input value is constant, the hand is still present. When the value is rising, this is the user removing their hand away from the input.

Using Oshonsoft's hidterm DLL and an 8-byte USB buffer, we can send the raw input values AND the trigger values (0 or 1) for four inputs at a time:

Monday, April 25, 2011

Say Hello to all the 2011 RoboGames Humanoid Robots


This years RoboGames will include some very unique and interesting robots. Robot ranging from dancing robots, weight lifting, and even Kung-Fu robots. Some of them are NAO robots and some are completely custom made. With all of these robots, this years game's will obviously be truly fascinating. You can see some robots in the video below! Thanks for reading and be sure to comment below!