Tuesday, April 16, 2013

Component Testing

On Friday, we tested the lights and built a basic winch system for our hanging lights.

Lights

Robbie showed us how to transform the sensor ports into outputs using the following code:
Using the on8 and off8 commands, etc. we can turn the current in ports 6, 7, and 8 on and off. To adjust brightness, we make the lights flicker on and off so quickly that it is unnoticeable. For example, this program makes the lights only have current for half the time, making them half as bright. 
On Tuesday, I went into the lab to test the number of LEDs we will be able to use. We wanted about 20 in each sphere, so I tried out powering 20 at once:
They were still satisfactorily bright, not nearly as bright as a single one would be, but more lights, rather than brighter lights, would be more appealing with our sphere idea. But, I wanted to compare the many lights to the brightness of a single light, so I connected one light to the next port. 
Here I ran into a problem. Turning on power to one port shuts off power to the other ports, so a program reading "on8 on7" would only turn on port 7. As far as I can tell from messing with the underlying code, they can't be turned on simultaneously, though I will have to ask Robbie about this on Wednesday. To solve this, I wrote a program that switches power between the two ports every 2 ms. However, this has the same effect as the dimming program from earlier. The ports can't be at full brightness at the same time, since power is switching back and forth. 
In this situation, the 20 lights are probably not bright enough:
From here, I experimented with smaller numbers of lights to see how many would be able to still be bright enough with only half-power.
It seems like 12 is a good number for each group of lights, since they can still be quite bright while sharing power with another group. 

Winch

We built a simple winch out of Legos with an NXT motor which models what we will use to hang the lights. We did not include any gears because the motor's speed can be controlled through programming. We had some trouble with where the fixed end of the string/wire (the end that will be plugged into the Cricket) should go, but we decided it should trail off parallel to the axle so that spinning the axle will not pull on the fixed end.

Plans for Moving Forward

This Wednesday, I will try to make a works-like model, probably on a breadboard, that integrates feedback and control from light and touch sensors. Since Ashley will probably not be there, this might be a hard goal to achieve, but hopefully the model will be satisfactory. Depending on whether we have hollow cardboard spheres for the LEDs, I may be able to make one or more light spheres to test with the winch. I am afraid that they will be too light to hang nicely from the string/wire, since the wire could be stiff.

No comments:

Post a Comment