Galileo Project Arduino help

John, Craig (+),

This thread goes out to the Arduino techies to ask for help on the
Galileo Project Arduino application.

Again, this hex-shaped "HIVE13 Tribute to Galileo" technology obelisk
thingie will have a fairly straight-forward embedded Arduino
application. There is a red/green/blue/red/green/blue sequence to the
thingie's six sides. The idea is to have six distance sensors at 60
degree increments around the 360 degree perimeter monitor peoples'
approach and make the Arduino inputs. As a general description, when
a person approaches from either of the two opposing red directions and
are in the say 36" to 6" range, the red input to the Arduino increases
from min to max. It is the same for the green and blue direction
inputs. The Arduino outputs drive one or more sets of red/green/blue
LEDs. These LEDs shine up into Galileo's finger and down into the
bowels of the HIVE body. Relative approach distances along the red/
green/blue inputs trigger increasing relative color and brightness
combinations in the red/green/blue output LEDs. When all three inputs
are equally close, the LEDs combine to make the brightest white. Some
form of corresponding RGB sound outputs would be a nice addition, if
there was an on/off switch.

Initial research shows the following infrared or ultrasonic distance

Sharp infrared distance sensor


Devantech SRF02 or MaxBotix EZ1 type ultrasonic sensors

They seem a bit expensive at up to $25 each. I don't know if there
are less expensive devices or better discounts. It is the same with
the LEDs. We'll have to see their effectiveness in bright daylight
vs. night time lighting levels. There are also form-factor issues in
the placement of the sensors and LEDs for maximum effect.

Your thoughts? Feel free to add to this thread and/or bring things to
prototype to the next Tuesday night HIVE meeting.


The software and hardware sides are extremely, extremely easy for this idea.

The cheapest, but maybe not best route to go for this one would be these IR sensors:

The only other thing required by them is an IR led. There is a library written for the arduino and from there it’s simply a matter of plugging the sensors and leds in to the correct pins.

On that page (s)he says that the sensor can detect a hand from about a foot away. Considering it’s a hand I think they will be able to detect a person from several feet away, which should be perfect for what we are doing.

If you want to have this concept running by next tuesdays meeting all you need to do is order the sensors, ir leds, and the normal leds. I already have the led fading code done and there is a library for the sensor code so I can get that working in about 30 minutes (max).

The led fading is pretty good via the arduino, although a max of 6 different led sets and sensor sets are supported. Just a warning.

If you think I’ve missed anything then tell me.


I agree this is a good starter project for anybody who wants to learn Arduino. That said, if somebody is just starting to learn Arduino then I highly recommend taking on this project. Just be sure you actually work on it because we don’t want this project to stagnate. I personally have no experience with IR sensors and only basic experience with other distance sensors. I’m curious if the IR senors will work on a bigger target (your body) from farther away as Jon has suggested. The sensor may need to see the reflection of the hand at a decent intensity to register which would mean the object needs to be close.

I know others in the Hive have played with distance sensors much more than myself. Does anybody have any spares we can test with. I have some fairly bright Red/Green non-diffused LEDs I could donate. I also have some diffused Red/Yellow/Green LEDs from the drinkshield I could bring but are not as bright. I think with the other members we won’t have to pay for LEDs :wink: The sensors however are another story… and we need six … Can anybody think of any cheap toys that might come with a good distance sensor we can salvage?


Like I said, I already have most of the code done and I think the sensors I linked to are about as cheap as they come ($3.75 each). I honestly don’t think you’ll find anything much cheaper. I checked out the datasheet and they can actually detect movement up to 8m (about 28 ft) away, so they should be more than is needed. For the setup I don’t think anything on it will be permanent so if you want to later on we can borrow the sensors, etc.


Actually, the PNA4602M photodiode looks pretty good to me. The form factor is a good fit and the price is a lot better than the earlier alternatives. I’ll wait to see if anyone may have some or something else similar to suggest and/or bring in to prototype this Tuesday. If no better alternatives show up, I can place the order.

It is the same for the LEDs. I’d like to prototype the form factor and brightness for these. Maybe we can breadboard some options on Tuesday night, and have a dummy program that ramps the RGB intensities up and down in a loop rather than with actual sensor inputs.

Side note to DaveM if he is lurking on this thread, we can design-up a 3-D shape that would insert between the top of the glass cage and the base of the Galileo cup to hold the Arduino, position the six photodiodes and even point the LEDs. He could then make the part on the MakerBot. We can discuss this more Tuesday too.


I have a couple of comments. The sensor Jon linked to is not a relative distance sensor. From the linked code it can only say if an object is reflecting the or light or not. Also the datasheet from what I saw said that under ideal conditions it can detect ir light at 10 meters. However the ideal conditions are a direct led light source in a dark room without any interfering light. If all we want is a ‘presence’ sensor rather than a distance sensor I would be interested in trying it, but I am unsure how well it will work. It all depends on how reflective a person in clothing is vs. a hand in front of it.

Finally I have quite a few RGB leds and I can donate a few to the cause. I also have some ir leds that I could donate.

I think Paul’s assessment here is spot on. The linked Arduino Playground program is strictly a presence switch. The author of the program said he was getting about a foot of range, and I would expect that to be typical.

I agree as well. I have some Photodiodes and IR LED's I will try and
bring in Tuesday for testing if you wish. I have an ultrasonic range
finder I can also bring in for prototyping purposes. It is more
expensive than the IR but it works great. To reduce cost, what about
ausing a servo to sweep and area and detect a presence? we could
estimate which side they are approaching from and could cover the
entire object with 3 or less ultrasonic sensors. It may be an
annoyance having the noise however. Also, Maybe we could mount one
underneath and constantly sweep? Either way I will try to remember the
stuff for your evaluation.

The above are all good inputs from one and all.

For further explanation of the original intent, see the picture posted

Let's gather before/after the Tuesday business meeting to see and
discuss all available prototypes and ideas.