dinsdag 18 december 2012

IR communication on the self made controller

Dear readers


Stef Ingels and I managed to program the infra red communication today. After we programmed a bootloader onto the fourth contoller we made.
First of al we made sure that the led and TSOP were functioning fine we uploadet the complete program onto the microcontroller. with succes.

In the movie under this post you can see how the robot answers to the commands we give him. For an explanation how the infrared communication works see the posts below.

Your blogmeister
Giete

Our IR transmit/receive module

dear readers

to communicate whit the robot, we needed an ir module with an ir led and TSOP 2238 on it. The schedule is given below:



A picture of how it looks like:



It is not possible to place the module directly to our computer, we connect it to an arduino were the computerprogram is uploaded to. Trough the serial monitor of arduino we can communicate with our arduino and so send with the LED to our robot. To communicate with the arduino we use several abbreviations/codes. The list with codes and a short explanation:


Greets 

Stef



The final microcontroller bord

dear readers


Because our previous 3 microcontrollers were crached, we decided to make another board. This time with true hole components, because we had not the time to make another print. A picture of the print can you see below:


The schedule is lightly different then our PCB. This because the atmega328 PU we are using has 28 pins instead of 32 on the smd atmega328 we were using. On the smd atmega are 2 more analog channels, one more ground and one more VCC. Also we changed the clock to 16 MHz, this to avoid our problems with burning a boatloader on it. The rest of the schedule is the same as that of the prints we made before. 
the schedule for the microcontroller:


In the message that guillaime posted earlier, he explains how to burn a bootloader and configure the microcontroller.


greets

Stef


Testing the complete robot for the first time

Dear readers


Last night I managed to finetune my program in such a way that it reacts to a change of position.

How did I finetune?

After I wrote the final peace of the program (being the pid control an pwm output) I uploaded it into an arduino hooked up to the robot. I din't connect the engine's in the first stadium. I just tested my white calibration and black calibration. This worked out fine. You can see how it works in the first video below. After de white an black values were set I putted al the results of every calculation on the serial monitor with a delay at the end. This way I could monitor the programs every move. Check everything as well. I made modifications where needed.

After I tough that I figured it out I uploaded the program again an this time I connected the engines. I didn't put the wheels on the ground because my test set-up did not allow me to let it ride (to many cables attached to the computer). The first two or three attempts weren't good. I had a unforeseen problem. One of the engines gearboxes didn't function well. I tried to fix this by setting the standard pwm value a lot higher for this engine. This somewhat worked but every time the engine comes in lower rev areas is has the intention to stall. I will have to take a look at the gearbox later and hope that its fixable. My efforts weren't in vain tough because I managed to make al little film that shows you how the wheels react to the changing position.

All the talking is in Dutch because were from belgium (off course you already knew this).
So I tried to put subtitles in the film. I hope you guy's approve.


Yours sincerely
Giete

maandag 17 december 2012

Programming the microcontrollers

Dear readers


We managed to make upload programmes in our micro controller. It wasn't easy at all. And after we managed to do is I wrote a guide for you guys so you can do it yourselves. I hope you enjoy it.

Here it is!

1 The goal of this guide

After reading the short guide you should be capable to load up your own program(written in Arduino). To a atmega328 connected to a 20MHz cristal.
The longer guide explains how you can adjust the board.txt file and avrdude.conf file to a microchip of your choice. In this guide you will learn what to adjust an how. In the short guide this is already done for you. The long guide is an extension to the sort one.

2 Short guide

2.1 Getting started(prepare yourselves)

First make sure that you can connect the reset, MOSI, MISO and SCK pin easily to the Arduino and that you can supply the microcontroller with a 5V or 3,3V stabilized voltage.
Download WinAVR, you can use the link below or you can look for it yourself. http://winavr.sourceforge.net/download.html
After downloading WinAVR you may install this program. We will need this later on.

2.2 Checking for a signature(look if it is alive)

After you made sure all this is possible, you may open an empty Arduino file.
Go to ‘File’ -> ‘Examples’ -> ‘ArduinoISP’
(You can go ahead and read this file because some of this guide is based on the text above the program.)
After you did this you may connect the three leds as the text in the program asks you to do. After this you ma upload the program in your Arduino. (check your board en serial port first).
Once the uploading is done you should have one of the three leds (the one on pin9) glowing softly. This is your heartbeat. If this led ever burns constantly then you should reset the Arduino your working on. This may or may not be necessary later on. It depends on how lucky you are.
After all this is done you may change the settings of the Arduino software to:
- ‘Tools’ -> ‘Board’ -> ‘atmega duemilanove w/ATmega 328’ (it has to be this regardless of what board you’re using.)
- ‘Tools’ -> ‘Programmer’ -> ‘Arduino as ISP’
- ‘File’ -> ‘Preferences’ -> Mark the checkboxes ‘compilation’ and ‘upload’

This is all for the software. You already connected the three leds to pin 7,8 and 9 of the Arduino (except when you’re using a MEGA check the text above the Arduino ISP program to see which pins you should use).
Now, connect the MOSI, MISO, SCK and reset pin according to the following table (again this table is NOT for Arduino MEGA’s check the text above Arduino ISP for that!!):
Pin Controller                          Pin Arduino
Reset                                       10
Mosi                                        11
Miso                                        12
sck                                          13

NOTE: make sure the ground of the Arduino and the microcontroller are connected. It won’t work if these aren’t connected!!

Once this is done the hardware and software parts are all ready to check if the microcontroller is alive.
Go to ‘Tools’ then click ‘burn bootloader’. IT WONT WORK! So don’t panic. You’ll get (if everyting goes as planned) this error. The printscreen was taken at the bottom of the errorlist under the progrmcode of the arduino software. You can see (aproximately halfway this picture) ‘device signature = 0x1e9514’ this is a good sign. When a microcontroller answers with it’s signature it works just fine. Next step, we are going to adapt the software to our needs.


2.3 Adapting the software to our needs

You can find two files you need to download on our blog (http://auto-3am-gr9.blogspot.be/). It will be under the subject where you found this guide. (in these folder the changes have been made for a atemega 328 with a 20MHz crystal. The long guide learns you how to do this so you can do this for yourself and maybe other microcontrollers.)
Now I will tell you where these folders need to be replaced.

2.3.1 Board.txt

Go to the folder where you’re Arduino software is located. Once inside this folder go to ‘hardware’ -> ‘arduino’ you can see the board file there. Just copy the new one in this folder and replace it for the old one. Close this window.

2.3.2 Avrdude.conf

If you installed WinAVR correctly (like I asked in the beginning of this guide) the you sould find a folder named ‘WinAVR-20100110’ on your primary hard drive. Open this folder and go to ‘bin’. In this folder you will see the Avrdude.conf file (if you look hard enough or use Ctrl-f..). Now replace this folder with the one you downloaded from our blog. Close the window.

NOTE: close all windows of Arduino software so it can adapt to the new board file!
After you did this we are done adapting the software!

2.4 Adapt the Low fuse of the microcontroller

This is where the fun starts. We will now start controlling the controller.

Open cmd. Now type in the following command ‘avrdude –P com?? –b 19200 –c stk500V1 –p m328g -v -v’

Fill on the ?? the serial port which you’re Arduino is currently using.

This should sum up some facts of your microcontroller. You should get something like the picture below


On the bottom of this picture (and hopefully you cmd screen) you can see that the device signature is still there (lucky us, it’s still alive) and under the signature you van se ‘lfuse ready as 62’ this means (among other things) that the microcontroller is running on his internal clock of 1MHz. We don’t want this because is screws up all our programs. We want it to run on the 20MHz crystal. This is what we are going to do:

Type in the following command: ‘avrdude -P com?? -b 19200 stk500V1 -p m328g -U lfuse:w:0xFF:m’. Again, the question marks are to be replaced by your serial port. BEFORE YOU PRESS ‘ENTER’ MAKE SURE THAT I’TS lfuse AND NOT hfuse!!!!! If you write hfuse you will lock down the microswitch forever.

Now we are sure that things are correct, press enter. You should get a screen like the picture below.


The microcontroller is now ready for us to put a program on it.

2.5 Uploading the software

Open the software you want to upload. Do this with Arduino. If everything went according to plan (or guide..) then go to ‘Tools’ -> ‘Boards’ -> ‘ATmega328 van Glenn’. Set the programmer to ‘arduino as ISP’. Also check if the checkboxes in ‘file’ -> ‘preferences’ are still on.

Now click on COMPILE!! Not upload, you will ruin everything.

NOTE: If you did click upload than repeat ‘checking for a signature’ to check if everything is still working and repair the mistake you made.

After you clicked on compile, you should see a lot of stuff going on in the black screen below your program. After it is finished you should see something like the picture below on the bottom of that screen.


If we magnify it, it looks like this:


Now open cmd again. The file path you see highlighted in bleu is this guide is specific for our computer so don’t copy this file path, use the one you have on your screen.

You can go to a file by using the ‘cd’ command. Look at the pictures below to see how we did it.


Again, this is the file path for our computer, don’t copy this completely it won’t work.

Now, once you are in the correct build map you can check if your file is in this file. You can do this by using the command ‘ls’ as you can see in the picture below.


Once you made sure it’s there type in the following command: ‘avrdude –P com?? –b 19200 –c stk500V1 –p m328g –U flash:w:??.cpp.hex

For the first pair of questionmarks, fill in the serial port of your Arduino. For the second question marks check your compiled file on Arduino to see what the name of the file is and fill it in. (please use ‘.cpp.hex’ only once)

Press enter and if you obeyed this guide as you should have done then you should see the program uploading on your microcontroller.

3 The end

Thank you for using this guide I hope you’ll enjoy it!

I would like to thank the team that made most of this possible. So thank you Laurens, Glenn and Mathijs

I would also like to thank my team. Thank you Stef, Stef and Réné.

And finally I would like to thank the lector who helped us, thank you Mr. Lievens

NOTE: sorry for mistakes I may or may not have made against the English language, I’m from Belgium so English isn’t my native language.



Brought to you by
Giete

dinsdag 4 december 2012

Dear reader(s),

Yesterday we did some testing involving our sensor array and the program we use to calibrate/normalize the value's
We calibrated the sensors and put the feedback of our program in a graph at different hights
this is the graph we had at the best hight, 10mm between line and print.

Image and video hosting by TinyPic
As you can see the value's are pretty linear, a negative value means the program has to steer to the right.
A positive value means the program will have to steer to the left.

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;
}



woensdag 31 oktober 2012

Primitive IR communication

The actual testprogram

In order to change the Ki,Kp,... values on our robot without touching it we had to establish a IR communication. The program of this communication need to answer automatically. After a long way of research en testing we were able to make a very basic program that reacted to a command by answering "Gelukt".

Here is the code for the robot


#include <SerialCommand.h>

#define arduinoLED 13   // Arduino LED on board

SerialCommand sCmd;     // The demo SerialCommand object


void setup()
{
  Serial.begin(2400);
 
  sCmd.addCommand("K", TestLoop); //test moet hoppa terugsturen
 // sCmd.setDefaultHandler(Fout);      // al de code niet herkend word stuurt hij "homo" terug
 
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);

  // Clear Timer on Compare Match (CTC) Mode
  bitWrite(TCCR1A, WGM10, 0);
  bitWrite(TCCR1A, WGM11, 0);
  bitWrite(TCCR1B, WGM12, 1);
  bitWrite(TCCR1B, WGM13, 0);

  // Toggle OC1A and OC1B on Compare Match.
  bitWrite(TCCR1A, COM1A0, 1);
  bitWrite(TCCR1A, COM1A1, 0);
  bitWrite(TCCR1A, COM1B0, 1);
  bitWrite(TCCR1A, COM1B1, 0);

  // No prescaling
  bitWrite(TCCR1B, CS10, 1);
  bitWrite(TCCR1B, CS11, 0);
  bitWrite(TCCR1B, CS12, 0);

  OCR1A = 210;
  OCR1B = 210;

 
}

void loop() {
 sCmd.readSerial();
}

void TestLoop() {
  Serial.println("R");
}


If this code receives the character "K" it writes "R" back to the PC via the IR communication. The PC processes it further as you can see below.


And the code for the computer:

#include <SerialCommand.h>

#define arduinoLED 13   // Arduino LED on board

SerialCommand sCmd;     // The demo SerialCommand object


void setup()
{
 
  sCmd.addCommand("V", VerzendLoop);
  sCmd.addCommand("R", OntvangLoop);

 
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);

  // Clear Timer on Compare Match (CTC) Mode
  bitWrite(TCCR1A, WGM10, 0);
  bitWrite(TCCR1A, WGM11, 0);
  bitWrite(TCCR1B, WGM12, 1);
  bitWrite(TCCR1B, WGM13, 0);

  // Toggle OC1A and OC1B on Compare Match.
  bitWrite(TCCR1A, COM1A0, 1);
  bitWrite(TCCR1A, COM1A1, 0);
  bitWrite(TCCR1A, COM1B0, 1);
  bitWrite(TCCR1A, COM1B1, 0);

  // No prescaling
  bitWrite(TCCR1B, CS10, 1);
  bitWrite(TCCR1B, CS11, 0);
  bitWrite(TCCR1B, CS12, 0);

  OCR1A = 210;
  OCR1B = 210;

  Serial.begin(2400);
}

void loop() {
 sCmd.readSerial();
}

void OntvangLoop(){
  Serial.println("Gelukt");
}

void VerzendLoop() {
  
  Serial.println("K");
}



If this code receives the caracter "R" and prints "Gelukt" on the serial monitor.

This is a film that tests this project. Please don't mind the language. It's Dutch, we are form Belgium an that is our native language (obviously....)


Short history and information


This communication took us a while to figure out.

At first we discovered the program dirt cheap wireless. This program allowed us to make a 38kHz carrier wave for our led. This meant that we could now successfully modulate the signal to the correct frequency.The program made us (me for the most part) curious. I wanted to know how the set-up managed to create a carrier wave with exactly the right frequency. After I researched the timers on the data sheet of the ATmega I discovered how it al works an I also could make the mathematical link from the 16MHz crystal and the 38kHz carrier wave made by dirt cheap wireless.
Thanks to this knowledge I was able to modify the setup to someting we could use with the 20MHz crystal.

The second thing we discovered was the SerialCommand library. This library allowed us to make commands which, if send over the serial port, would take the program into a specific loop. The library also contained a function that made it possible to process a number send with the initial command.
After a little research on this library I was able to make the test program you can see above. After further research I was able to write loops that could process numbers.

After I put all of this research together in one program I was able to establish a fully working infrared communication on our microcontroller.


Your blogmeister
Giete





woensdag 24 oktober 2012

calculating the minimum sample frequency of our microcontroller

When our robot aproaches a corner, he have to sample in time his sensors so he doesn't miss the corner and just go further in a straight line. So first we calculate the time that the robot needs to miss the corner. A diagram of this situation is shown below.

Data:

radius: 0,1m
line thickness: 0,015m
thickness sensors: 0,07m

X1= 0,1m –  (0,07/2) = 0,065m

Y= tan(53°) x 0,065 = 0,08625m

 Time needed so the robot leaves the black line at 2m/s

S = V x t
t = S / V

t = 0,08625 / 2 = 0,043125s
or = 43,12 ms

How more we can sample in these 43.12 ms, how better our robot will drive trough the corners. We can't tell how much we will sample because we have no idea how big our program will be for the PID regulation. We hope to sample 10 times in those 43.12 ms, that corresponds to a sample at each 1.5cm of the corner.


greetz 
Stef Ingels




woensdag 17 oktober 2012

pin lay-out h-bridge

dear friends

Here some information about our h-bridge. The pin lay-out is given in the below diagram:



The pin numbers with their function and a bit information about the connection can be find in the table below:



For more information about the h-bridge, go to:

http://www.farnell.com/datasheets/389117.pdf


greets 

Stef Ingels

In addition to this post I would like to present to you the testfilm of the h-bridge that Stef Ingels and I made.



This video shows you a test program that allowes me to change the speed of the engines. It also showes that the h-bridge works perfectally.

Its in Dutch, sorry but we are from Belgium.. I'm not saying to difficult things. Its mostly like 'I'm now changing the speed' but you can obviously hear that.

Thanks for watching

Giete

zaterdag 13 oktober 2012

What microchip do we need?

Dear reader


We were asked to make an 'educated guess' in how fast our microchip needed to be.


In a project last year we used the atmega 328chip. We think that this chip is suitable for our PID line follower. The chip we used then was mounted on a arduino board. The good thing about this is that we can test our software more easily thanks to the arduino's at our disposal. When we have a finished and working program we should be able to upload it into our SMD atmega328 chip.

We need a microchip that is powerful enough to handle all the calculations. The 20Mhz clock speed of the atmega328 should do the job.

As for the I/O, the atmega has a maximum of 23I/O pins. This is more than enough for our project.

We don't know yet how big the program will be but we figure the the available 32kbytes EEPROM memory will be more than enough.

Thanks to the fact that the bootloader of arduino is easy to find we can use the arduino software to program our line follower. It should be easy programmable with this program software. This high(er) program language is easier to use than a low program language and allows us to write more difficult programs.
(The bootloader can be found at http://www.arduino.cc/en/Hacking/Bootloader)

As for the price, the atmega328-AU cost us 4.19 Euro (about 5.5USD).

Your Blogmeister
Giete



vrijdag 12 oktober 2012

Hello dear reader,

Yesterday we made a video of our ir communication as it is at the moment.
Its basicaly the same program as found here:
http://tthheessiiss.wordpress.com/2009/08/05/dirt-cheap-wireless/

with the only difference in the sendprogram is that we don't write "TESTING TESTING TESTING" every 500ms
In our program we changed that part so the arduino will send what we tell it to trough his serial port

this is the modified sendprogram:
//dirt cheap wireless TX
//generates 38kHz carrier wave on pin 9 and 10
//sends data via TX every 500ms

char incomingByte;
void setup()
{
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);

  // Clear Timer on Compare Match (CTC) Mode
  bitWrite(TCCR1A, WGM10, 0);
  bitWrite(TCCR1A, WGM11, 0);
  bitWrite(TCCR1B, WGM12, 1);
  bitWrite(TCCR1B, WGM13, 0);

  // Toggle OC1A and OC1B on Compare Match.
  bitWrite(TCCR1A, COM1A0, 1);
  bitWrite(TCCR1A, COM1A1, 0);
  bitWrite(TCCR1A, COM1B0, 1);
  bitWrite(TCCR1A, COM1B1, 0);

  // No prescaling
  bitWrite(TCCR1B, CS10, 1);
  bitWrite(TCCR1B, CS11, 0);
  bitWrite(TCCR1B, CS12, 0);

  OCR1A = 210;
  OCR1B = 210;

  Serial.begin(2400);
}

void loop()
{
  if (Serial.available()>0) {
    incomingByte = Serial.read();
  Serial.print(incomingByte);
  }
}

marked red is the loop we changed.

Now we have a one way communication.
The next step would be having the arduino answer something as a response ,such as message received.
To test this out we tried to send back what we received.
Then we had the folowing problem, the message was sent back but because the sender receives the message at his RX-pin, the same pin we use to send commands from our pc to the arduino.
the message that was send back was seen as a command from the pc.. a command to send..
this way we made a loop without end.
another problem is as you will see in the video below is that we receive a certain amount of noise, we keep receiving ÿ in between messages.
We'll have to think about something to filter this out of the data and will probably use a startcharacter and an endcharacter in our message to do this.
Note that the noise is never inside data,its only when no data is being sent.

Link to video:
http://www.youtube.com/watch?v=PKneGq5Sy34

The schematics can be found at dirtcheapwireless,the first link.


woensdag 10 oktober 2012

Assignments + part list [NEW]

Dear readers



We had a second meeting with our teacher on monday.
In this meeting he asked us to:
1) Put our calculations on the blog (that is already done by Stef Ingels)
2) Make an electrical scheme for the PCB we will make. I will do that myself en hope to finish it by or in the coming weekend.
3) Finish our IR transmit and receive software (and put this on the blog with a explanation)
4) Put our parts list on the blog

Here is the result of the fourth assignment:




Part Price Amount Price total Website
Front 'wheel' 4,69 1 4,69 http://www.pololu.com/search?query=954&x=9&y=4
Engine + Gearbox 12,34 2 24,68 http://www.pololu.com/catalog/product/999
Rear Wheels 6,15 1 6,15 http://www.pololu.com/search?query=1420&x=0&y=0
Transistors 0,25 8 2 http://be.farnell.com/fairchild-semiconductor/bc547b/transistor-npn-to-92/dp/1017673
Battery holder 0,92 1 0,92 http://www.pololu.com/search?query=1145&x=9&y=7
Microcontroller 4,19 1 4,19 http://be.farnell.com/atmel/atmega328-au/mcu-8bit-avr-32k-flash-32tqfp/dp/1972086?Ntt=1972086
H-bridge 2,97 1 2,97 http://be.farnell.com/rohm/bd6225fp-e2/h-bridge-driver-18v-0-5a-hsop25/dp/1716263
Resistors 22kohm 0,21 8 1,68 http://be.farnell.com/te-connectivity-cgs/352022kjt/resistor-1-watt-22k-5/dp/1265186
Resistors 680ohm 0,21 8 1,68 http://be.farnell.com/te-connectivity/3521220rft/resistor-2512-2w-220r-1/dp/2117486?Ntt=2117486
IR LED 940nm  0,95 16 15,2 http://be.farnell.com/knowledge-on/kel5002a-a/ir-emitter-5mm-940nm/dp/4890929
Christal 0,37 1 0,37 http://be.farnell.com/abracon/abl-20-000mhz-b2/crystal-20m-18pf-cl-hc49-4h/dp/1611779
Jumpers 0,12 2 0,24 http://www.gotron.be/kortsluitjumper-p2-54.html
Spanningsregelaar 4,92 1 4,92 http://be.farnell.com/national-semiconductor/lp2954ait/ic-v-reg-ldo-5-0v-2954-to-220-3/dp/9494847
Capacitors 1µF 0,26 1 0,26 http://be.farnell.com/avx/08053c105k4z2a/capacitor-0805-x7r-25v-1uf/dp/1833845
Capacitors 2,2µF 0,7 1 0,7 http://be.farnell.com/avx/08053c225kat2a/capacitor-2-2-uf-25v-0805-x7r/dp/1657931
Capacitors 22pF 0,13 2 0,26 http://be.farnell.com/avx/08051a220jat2a/capacitor-0805-22pf-100v/dp/317500



As you can see I kept the number of suppliers as low as possible. This reduces transportation costs which makes the finished product cheaper. It also makes it easier to order, you don't have to visit a lot of different sites. 

I will make the electrical scheme with a program called 'eagle'. I will post the file and a screen shot later this week.

As for out joint venture, as Stef VP said earlier we would take the IR communication an the other team the sensors. Rene will post a short message about the sensors later on.

Your Blogmeister
Giete


(Tis list has been updated on 26/11/2012)


























































calculating the wheels, engine, gearbox and h-bridge

dear friends

I had the assignment to calculate al the specifications considering the engines, gearboxes, wheels and h-bridge of our robot. First we had to chose our wheels. Our chose went to the pololu wheels (60mm x 8mm).
Now we can calculate the speed that the engines need, to drive at a topspeed of 2 m/s.
circumference: 0.06*3.1415 = 0.18849 m
RPM / meter : 1 / 0.18849 = 5.305
so for 2 m/s we find: 5.305 * 2 * 60 = 636.6 RPM

Second we calculate the torque that the engines minimum need to drive at 2 m/s.
We want the robot to accerelate in 2s to the topspeed of 2 m/s and the weight of the robot is calculated about 0.3 kg.

a= v/t    => a= 2 m/s / 2s = 1 m/s²

F= m*a     => F= 0.3kg * 1m/s² = 0.3 N

T= F*r      => T= 0.3N * 0.03m = 0.009Nm = 0.9Ncm

So the engine we search needs al least a torque of 0.9Ncm and a speed of +- 630 RPM. These values are calculated in free-run. To make sure that the engines we order are strong en fast enough, we will order an engine that is faster and has more torque than calculated. We can chose out of 2 engines:

-> 30:1 Micro Metal Gearmotor HP  ( 1000 RPM and 9 oz-in, stall current 1600mA )
-> 10:1 Micro Metal Gearmotor        ( 1300 RPM and 2 oz-in, stall current 360mA )

The first engine ( 30:1 Micro Metal Gearmotor HP) has a good speed, but the torque that he can generate is very high. this causes that the stall current is (to) high. Also the wheels of the robot will spin with such a high torque.

The second engine (10:1 Micro Metal Gearmotor) has a rather high speed, but the torque of the engine is good for our robot (2 oz-in  ->   1.4123 Ncm). This is a bit more than calculated, but will have no significant causes for us.

We have chosen for the 10:1 Micro Metal Gearmotor. The decisive was the good torque and the much lower stall current of the engine. The speed of the engine can we regulate later with our microship.
10:1 Micro Metal Gearmotor


 data about the motor:
- torque                                            1.4123 Ncm
- speed                                             1300 RPM
- stall current:                                    360 mA
- free-run current                               40 mA
- weight                                             9.63 g
- ratio                                                10:1
- size                                                 24*10/12 mm

The torque of 1.4123 Ncm gives us an accerelation of:

F= M/r  => F= 1.4123Ncm / 3cm = 0.470N

a= F / m  => a = 0.470N / 0.3kg = 1.567 m/s²

In 1.27s we go to our topspeed of 2 m/s

Now we have chosen our DC motor, we can further on by searching a good H-bridge. The stall current of our engine is 360 mA. This  value is important for the choise of our h-bridge. The output current of our h-bridge must be higher than 360 mA.
Our choise went to the l 293D h-bridge, it is al frequently used h-bridge witch we already worked with last year.

Summarized:

-> WHEELS: pololu (diameter 60mm x 8 mm)

-> ENGINE: pololu, 10:1 Micro Metal Gearmotor, ( 1300 RPM and 2 oz-in, stall current 360mA )

-> GEARBOX: pololu, ratio of 10:1, in 2 stages (comes together with the engine)

-> H-BRIDGE: L 293D, output current +- 1A


With these calculations guillaime can finish the part list and order the products we need. I hope that we will recieve them as soon as possible. So we can go on testing en designing our robot.

Greets

Stef Ingels







maandag 8 oktober 2012

Today we worked on the IRcommunication.
We tried to use the same IR library as we used in a previous project,but this didn't seem ideal for this kind of application.
the sent signal was converted into a code wich didn't make a lot of sense,it was good for remote control of a few function but not for actual communication.
Then we tried the example from this website: 
We modified some minor details so we could just type in a message in the serial monitor of arduino to send.
This way we made a kind of chat system between 2arduino's.
After messing around a bit with this new toy we quickly found out that when no messages were send we would pick up noise, mostly the character ÿ.
This didn't interfere with the message itself but could form a problem when we are sending several commands.
Therefor is our next challenge to make some kind of start/stop-byte/char to detect the start and end of the message.
Stef VP

zondag 7 oktober 2012

Dear Reader,

Thursday we had a meeting with our teacher together with 2 other groups.
He gave us 3 jobs:
Make a demonstration where you use IR to communicate between 2 arduino's.
Make a demonstration where you use IR leds to detect white or black.
Make a demonstration where you use normal lightsensors to detect white or black.
Compare the results from the IR test and the lightsensor test to decide whats the best choice.

We got a bit depressed by all this work so we teamed up with the other groups.
By monday we'll make the communication with IR since we had some experience with this from a previous project.
The other groups would make the sensor test because they already made a linefollower with similar sensors.

The next update on this will probably come monday.

Stef VP

woensdag 3 oktober 2012

hello dear friends

Special thanks to giete to invite me to this blog. Now the team is complete, we can start.
It will be al hell of a job but I'm sure we can make it work!

See you later

Stef Ingels
Dear Bloggers


Just ended meeting two. We are restricted to a 50 Euro budget (this budget is only for the finished robot itself, testing en testing parts are not included). This budget is far to small for this kind of project I think.
In this meeting we made up a parts list, in total we would be paying 48 Euro. And we might not have everything yet. The list has yet to be approved by our teacher... Maybe he has a hint or two to cut down our costs.

We are getting most of the parts on www.pololu.com. If anyone has a better proposal (by better I mean cheaper) than your proposals are most welcome. Shipping costs don't matter ;)

Your Blogmeister
Giete

dinsdag 2 oktober 2012

Just joined our blog,
For the random strangers that stumble upon this blog,this will be about a project from school.
We have to make a linefollower that will follow a line using PID
Variables such as Kp,Ki and Kd must be sent wireless to the linefollower.
Today we'll have a second meeting and try to find fitting sensors,wheels,motors gearboxes and a microcontroller.

Stef VP

Eerste vergadering

Beste bloggers


Bij deze vind de eerste vergadering plaats.
Te doen deze vergadering:
-Een blog aanmaken
-Opdracht bespreken
-Eerste stukkenlijst samenstellen

Uw blogmeister
Giete