woensdag 21 november 2012

prototype in solid works

hello

I've created a prototype of our robot in 3D, in solid works. Al the components are on it. The black box is the battery holder, therefore is the print with the microcontroller and in the front the print with the sensorarray. We use the drawning to have an idea of the design of our robot.







greets stef

vrijdag 16 november 2012

dear friends

Previous lesson the teacher mentioned a problem about our batteries. We use 4 times AA batteries,
so: 4 x 1.5V =6V. We need the 6V for our motors, and we convert the 6V to 5V to feed our microcontroller and h-bridge. But these are the values in perfect conditions. If the batteries are a few minutes in use, and has lost some power, it could be that we only have 4x1.2V = 4.8V left. This situation will cause problems. So there are a few solutions, we summarize 3:

1. In place of converting the 6V to 5V, we can also convert it to 3.3V. This will give no problem for our microcontroller, but our h-bridge needs to be feed with 5V. So we have to place another h-bridge. In the worst case scenario (4 x1.2V=4.8V) we also have not enough voltage for our DC motors. So the problem is not completly solved out.

2. We can also use a DC-DC convertor, it will convert the voltage we get from the batteries to the wanted 5V. We can buy a DC-DC convertor in an ic, but they are very expensive. An other solution is to make the circuit ourself. But this will cost us a lot of space on our print, space we don't have.

3. The last solution is to place 6 batteries instead of 4, then we have in perfect conditions 9V, and about 7.2V (6 x 1.2V) in the worst situation. On our print we have a high class voltage convertor who can convert these voltages to 5V. The voltage for our h-bridge and microcontroller is already insured.
Now is the problem that the motors get in the worst situation 9V, which is 3V to much. In fact it's not a big problem, because we are forced to use PWM (pulse width modulation). Our motors will run in freewheel at 4m/s, but the top speed only need to be 2m/s. So it's necessary to use PWM to lower the voltage and speed of the motors. With this in mind, the voltage of the motors will never be a lot higher then the allowed 6V.

The easiest and cheapest solution will be the third, place 6 batteries instead of 4. Another advantage is that the robot will lasts longer without chance the batteries. It seems quit clear that we go for the third solution.

greets
Stef

maandag 12 november 2012

Dear readers,


The following post will show you the completed version of two eagle drawings. You need these to make the PCB's needed for the line follower. There is one for the microcontroller and one for the sensorarray.


This is the one with microcontroller, HBridge,....






This is the sensor array




Your blogmeister
Giete




donderdag 8 november 2012

To detect the line we plan to use 8 lightsensors
Because every sensor got its own property's we have to calibrate them to determine what value the sensor gives when he sees black or white
The program to do this can be found at our colleague's blog : http://3autothespoilers.blogspot.be/

after the sensors are calibrated the value's should be put in our program:
this is an example on 6sensors


void setup(){
Serial.begin(2400);
}

void loop() {
  int sensors[6]={0,0,0,0,0,0};
  int witwaarden[6]={0,0,0,0,0,0};
  int zwartwaarden[6]={0,0,0,0,0,0};
  int i;
  int pin;
  int afwijking=0;
  int total=0;
  int teller=0;
  //read the value's from the analog pins
  for (i=0;i<6;i++){
  pin =A0+i;
  sensors[i]=analogRead(pin);
}
 //put the sensor value's in a range from 0-100
 for (i=0;sizeof(sensors);i++){
 sensors[i]=((sensors[i]-zwartwaarden[i])/(witwaarden[i]-zwartwaarden[i]))*100;
 }
 //calculate the position of the line
for (i=0;sizeof(sensors);i++){
  total=total+sensors[i];
}
teller =(sensors[0]*-25)+(sensors[1]*-15)+(sensors[2]*-5)+(sensors[3]*5)+(sensors[4]*15)+(sensors[5]*25);
afwijking=teller/total;
}