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




Geen opmerkingen:

Een reactie posten