Posts Tagged ‘light’

FNR – Yoda Bot & TSL235R

Posted by Erin, the RobotGrrl on Sunday, September 12th, 2010

IMG_9661

One of the sensors that would be cool on Yoda Bot would be a colour sensor, or something like that. I had this TSL235R sensor handy from a recent purchase at RobotShop. Its primary function is to convert light to a frequency value. Last week I soldered it all together, and managed to get the code to report some values back. This week I worked more with the sensor values, trying to determine if the sensor actually can detect colour through some light shining and deduction.

In order to figure this out, I devised a simple little experiment, employing the scientific method. I hypothesized that the sensor could be able to report different values back for different colours underneath of it. There were four colour (or three colours and one shade) options used:

IMG_9660

Each piece of construction paper would be placed underneath the sensor unit of the robot: (The below photo doesn’t show the right configuration, the construction paper was aligned better in the experiment)

IMG_9658

For 100 iterations each, measurements would be recorded for white, red, green, blue, and no light on from the RGB LED beside the sensor. The RGB LED is surrounded by some black foam, so it doesn’t leak into the sensor. Also, since it is a mixture of red, green, and blue that makes the white colour, it was more of a shade of violet or light blue.

I put the results into google docs, and whipped up some graphs. It was very clear that the white shining colour provided the largest difference in values between the sheets. Here are the values for the different colours of paper given the white light:

Yoda Colours

The values are close, but there is a difference somehow. Click here to check out the spreadsheet. The unit of measurement for the values is uWatt/cm2, but I have no idea if that is correct or not. The function is in the code. ;) I’m surprised that the other colours didn’t exhibit more different values for different colours of paper, for some reason I thought that might help. It would be interesting to do this on a more shiny or reflective surface! Also, adding foam on the side that doesn’t have foam (refer to photos above) might help too.

It will be really cool to make the optimizations, see if there is a value difference, then create some calibration code and test it out. I’m thinking that the predicted colour can be displayed on Yoda’s pirana LED on its hand. It would be cool to surround the Yoda bot with coloured squares, and have it do different actions. Eventually this could be used as some sort of localization technique that will communicate to the other robots as well.

The code used is below. It’s a good resource to get the TSL235R working with the Arduino! For anyone else reading this who has one of these sensors, you have to attach a 0.1uF capacitor between Gnd and +5V. It reduces noise from the sensor. I was confused about that at first too, but the datasheet says so, and one of the posts on the Arduino forums also says to. :D

Click to download YodaBot.pde


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. GO OPEN SOURCE! :)

Posted in: Programming, Projects, Robot.

Friday Night Robotics – Light

Posted by Erin, the RobotGrrl on Friday, January 23rd, 2009

For better or worse, I made a program for BubbleBoy that reacts to a light being turned on.

BubbleBoy Lamp - FNR

The program evaluates the light the same way MANOI’s hockey stick did. Once it goes over a particular threshold, it will begin to spin its hat and start saying “HELLO!HELLO!HELLO!”.

BubbleBoy Lamp - FNR

At first, I wanted to make BB react to sound, so I dismantled a “haut-parleur” that I got a while ago, thinking that it was a piezo speaker. It’s actually not a piezo, because when I was looking at the analog readings on the Arduino, nothing happened if I fiddled with it. Weird!


BubbleBoy Lamp - FNR

BubbleBoy Lamp - FNR

When it says on the LCD that I’m at “cheel”, it is hardcoded in. I tried to use the script that downloads a feed, but it doesn’t work for me, for some reason. I commented below that post with my setup and questions. =)

BubbleBoy Lamp - FNR

Aah I can’t wait until my Femsapien arrives from the EPFL! It is super boring without a humanoid to work on. :D

I’m not exactly sure what the moral of this FNR is supposed to be… annoy me and face ‘teh ultimate’ BubbleBoy?! Hahahaha

I’ll add the video later in another post, Vimeo has a wait time of 130 minutes – and YouTube … well who knows about YouTube. o.O

I’m going to be working on an AI Library for Processing with a few people here at the COSI (hopefully). Expect many more posts about that! Woohuu! =)

That’s all for now. *turns lamp off*

BubbleBoy Lamp - FNR

Posted in: Programming, Projects, Robot, School.

Friday Night Robotics

Posted by Erin, the RobotGrrl on Friday, December 26th, 2008

Merry Christmas and Happy Holidays to everyone!
Best of all… it’s ROCK EM SOCK EM ROBOTS DAY! (Boxing Day)

Just as a fair warning, if this entry has more bizarre grammar mess-ups than usual, it’s because I ate too many jelly beans, and all I can think of is jelly beans! Robot jelly beans, jelly bean slushie, a meadow of jelly beans, jelly bean snow… *goes on and on* I think in pictures… and all I can think of right now is a DANCING JELLY BEAN ROBOT! Hahaha, joking. (Or am I?) ^_^

I hardly realized it was Friday today, so it doesn’t really feel like a FNR.

Last Friday, although I didn’t blog it, I was working on the LEDs that you’ll see on the stick, and the program! This Friday I tested and twirked the program so I can blog it.

Here is MANOI!

MANOI Hockey AI

Do you notice something different about the stick?

MANOI Hockey AI

The stick now has two perf boards on it! These perf boards have three yellow LEDs surrounding a LDR which has black construction paper around it.

MANOI Hockey AI

MANOI Hockey AI

The reason why I chose these yellow LEDs was nothing scientific. These were the only ones I had where I could have some consistency across the two boards. The LEDs on the left are inside of a yellow casing. The ones on the right are in a clear casing. There is a little bit of a difference in the readings of the LDRs, but they both work the same.

I would have really liked to do a different version of this but with an IR sensor and a FSR, but, as I mentioned above, these were the only things I had, and they will for sure get the job done!

What happens is the LDRs “spit out” a reading of the amount of light around it. I use the cardboard to ensure it is directed at what we want to be observing. When there is no object between the two LDRs, the reading is very high. Yet, when there is an object between the two, the reading drops a fair amount. This is because the LDR cannot sense the light from the opposite LEDs. I also tested this with a fairly white object (my DAD’s lead solder spool (eeew lead)) and it does work, meaning the reflected light from the LEDs back into the LDR (on the same board) does not obscure it. You can see for yourself in the video below. :)

I tinkered with the LDRs’ amount that it to create a threshold that will trigger MANOI’s shot. From what I learned at Stanford, this is simply called a neuron. It has input values, and if they meet a certain threshold,it will do something. This is a very primitive form of AI, but big things come in simple steps. =)

Here is a video of MANOI action! Pretend that the roll of tape is a hockey puck… it almost looks the same!


MANOI Hockey Robot AI from RobotGrrl on Vimeo.

It is also on youtube, here.

At the beginning, you see the LEDs flash. This means that the Arduino is soon going to evaluate the LDR levels. It takes five samples from each LDR, one every 500 ms. It then makes an average, which is the baseline used for comparing the LDR value against the threshold.

Yes, I agree, that this can completely become messed up. I will probably implement a markov approach to create (and update) the baseline. However, I’ll probably only do that after I make a modified Bayes algorithm for the AI. :)

You might have noticed something different about MANOI’s other hand. I’m giving it a gripping claw so that it can grip stuff. It won’t be meant to hold on to anything precious, but it could emphasize an effect here or there.

MANOI Hockey AI

While I was adding on the boards, there was just not enough room for all of the stuff that I needed… like +5V and -Gnd. I made a thing with headers and inverted headers so I can easily plug it in!

MANOI Hockey AI

It saves much needed space on the wave shield:

MANOI Hockey AI

Just to add, today I was using an Arduino with an ATmega328. :)

There are more pictures that you can look at in this photoset on Flickr!

This project is almost finished! I just will add in an algorithm improving the AI, make more videos… and that’s it! I will continue the project later on, though with a few more things. I’ll add servos that can rotate the leg so I can make the robot actually skate, and many more things that I am still thinking of. :P

Can you believe that the Trossen Robotics robot contest deadline is really soon? Yikes!! :P
I just have to take a few more videos and work out what I will say in my post… what do you think the judges will be looking for? Hopefully it won’t end up like BubbleBoy in crabfu’s competition… x_x

Though, when crabfu was on Daily Planet (I actually saw it on TV (like two months before all of the robot websites started to go crazy over it), not on youtube) he described his robots as having character because you can interact with them through a control pad.

I think that is completely opposite, because then it is just the human expressing their character through a machine. When you don’t have to use a remote, yet the robot still interacts with its environment, that’s when a robot truly has character. :d

Now we know why BubbleBoy obviously lost… He can have his definition, and I’ll have mine. :) His works are very interesting though! I never knew you had to start a fire to make a steam thingy move. I figured you would just boil water or something… hahahaha :D (I never thought as far as you would need fire to make water boil, though… EPIC NOT-WIN!) XD

I hope you really enjoyed this blog post. It makes a lot more sense now that one can see what the finished robot will look like!

Posted in: MANOI, Projects, Robot.

Wind to Light

Posted by Erin, the RobotGrrl on Monday, October 15th, 2007

Meant for the urban environment, “Wind to Light”, an installation by Jason Bruges Studio utilizes 500 mini wind turbines to generate power to illuminate mounted LEDs on the top of the turbines. The result is a cloud of light that emanates from the ground as weather and wind patterns shift over time.

Jason Bruges Studio – Link

I’ve always wanted to do something like this! I’m going to look around more to see if they explain how to make one of these… if they do, I’m going to make REALLY awesome ones with prettyful designs!

Link.

Posted in: News, Tech News.