Today, we focused on the programming aspect of this project. Esther and I think that this will be one of the biggest challenges of this final project, because making the MotorCar move exactly where you want is actually pretty hard, especially after finishing the LogoChip challenges. In order to detect the candle, We were given four photo transistors. We attached the photo transistors to legos so that they could move left to right and up and down and then connected them to the front of our MotorCar. Here is a picture of the photo transistors:
On the breadboard, they are connected to the outputs and so on PicoBlocks, because they are sensors, we can print out the values that these photo transistors record. In order to get a feel for what kind of values the sensors gave, we attached them to the front of the car and lit a candle fairly close to it.On Picoblocks, we were able to see the values that each sensor recorded and we immediately saw that some of the sensors were weaker than others. There was great disparity in the values. For example, when the candle was up close, sensor 1 printed values below the hundreds, while sensor 4 printed out values above a thousand. This was very important to note because we would have to take in account different ranges of values for each sensor. So we designated the weaker sensors to locate the candle at a short range and the stronger sensors to locate the candle at a long range.
We decided to use 4 photo transistors: 2 for long range and 2 for short range. In doing so, we can locate the candle more accurately because the motion of the MotorCar will be restricted by two sets of limits, instead of one. This will also ensure that the car will move straight towards the candle, instead of having one sensor move straight towards the candle.
To test the long range sensors, we placed the candle 10 feet away from the MotorCar. We positioned the photo transistors (sensor 3 and 4) at our desired angle and we read the values that they gave. Sensor 4 fluctuated from 730 to 760 while Sensor 3 fluctuated from 750 and 770.
For our short range sensors, we placed the candle close to the MotorCar, at the distance at which the robot could put out the fire. Like with the long range sensors, we positioned our photo transistors (sensor 1 and 2) and read the values from PicoBlocks. Both sensor 1 and sensor 2 fluctuated around 5 and 10.
The values that we obtained are very important because we will use them in our program to ensure that the MotorCar is moving straight towards the candle and that it stops at the proper distance from it.
Below is a picture of how we placed the candle in order to test the values from the photo transistors.
No comments:
Post a Comment