Line Tracking Robot Racer: Wheel Testing (Speed, Acceleration and Force)

The next component on our list was the wheels. We had previously discussed the possibility of including 3D printed tracks as a replacement, but decided against this as wheels would be easier and faster to test and change or alter if necessary, and also gives us the option to experiment with gears. We experimented with two different wheel sizes by laser gutting them quickly out of plywood and calculating the speed for each journey using the formula speed =distance/time. 

We wrote new code to test the wheels, making sure that the Racer only moved forwards. We marked a two meter track and then timed how long (time) it took for the Racer to finish the two meter (distance) track.
40mm Wheels completed the 2 meters in 15 seconds.

60mm Wheels completed the 2 meters in 9 seconds.

Calculations for working out the speed for each set of wheels:

Speed=Distance/Time

40mm :

speed = 2 / 15

0.13 meters per second

60mm :

speed = 2 / 9

0.22 meters per second

From this we learnt that the larger the diameter of the wheel the faster the rotation, this confirms what we were taught in one our mechanical engineering lecture that the more ground per rotation increased speed.

We chose to carry on using elastic around both wheels for added traction, the same way as we did on the previous sketch model. Due to the increased size in wheels increasing the speed of the Racer, it has been necessary to reduce the delay function in the coding.

After testing the speed of the wheels we chose to calculate acceleration, which is change in velocity/time taken

60mm Wheels =0.0086 meter / square second {m/s2}

40mm Wheels = 0.0244 meter / square second {m.s2}

Finally we wanted to work out the force depending of the size of the wheels, in order to work this out we needed to weight the Racer, the weight was 250g.

20170317_102020

Force = Mass X Acceleration

60mm Wheels :

Force = 0.25(kg) X 0.0086(m/s2)

Force = 0.00215 N

40mm Wheels:

Force = 0.25 X 0.0244

Force = 0.0061 N

Due to a larger acceleration

The larger wheel increases acceleration meaning less force is needed, increasing the efficiency of the Racer.  Therefore, we shall use larger wheels in the final model.

Line Tracking Robot Racer: Further Component Analysis

We returned back to the components list after familiarising ourselves with the infrared sensors. We wanted to think outside the box when it come to the components we included in our design so that it was unique in comparison to the many other Robot Racers online. One unique idea for components we had was using a free moving wheel at the front of the racer, this not only add a quirky look and function but it would also use less energy than a servo operated wheel and is also lighter in weight. We will decided whether it will be included on the final design after testing it on a prototype model. But before we can test this free moving wheel and other components we need a working code.

There are a list of component that were given to us that need to be included in our design including two dc motors and a servo motor. We were also given a choice of motor controllers, we chose to include the L298N. From previous research, this motor controller seems perfect for what we are trying to achieve as it is simplistic and easy to control the speed (which is controlled using Pulse Width Modulation pins on the Arduino) and direction (each motor is connected to an additional two digital pins that control the direction through simple LOW /  HIGH code combinations). A 9v battery will be used to power the Arduino through the motor controller. The motor controller is necessary because one  motor will not consume much current, but can’t move a large mass whereas as two motors can move a large mass but will consume a large current. 

motor controllertesting motors

We realised from previous testing with the IR sensors that for them to work at there best they needed to be approximately 20mm from the floors surface due to shadowing and reflection from the light source on the sensor which would provide an inaccurate reading.

As mentioned in the previous blog post the idea is that we could attach the digital sensors to each side of the car and they will then hopefully they will be able to sense the light difference between the flooring and the black tape, and will always be able to correct itself so that the black tape is kept in between the two sensors. Therefore the Racer will be able to follow the line. Depending on which sensor detects the tape, either the left or right motor will switch off so that the robot will correct itself.

1

The Code:

//motor controls
//left motor
int enableA = 10;
int in1 = 9;
int in2 = 8;

//right motor
int enableB = 5;
int in3 = 7;
int in4 = 6;

//sensor pins

int leftSensor = 4;
int rightSensor = 3;

void setup() {
Serial.begin(9600);
pinMode(enableA, OUTPUT);
pinMode(enableB, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(in3, OUTPUT);
pinMode(leftSensor, INPUT);
pinMode(rightSensor, INPUT);

}

void loop() {
int leftSensorValue = digitalRead(leftSensor);
int rightSensorValue = digitalRead(rightSensor);
boolean leftSenDetect = digitalRead(leftSensor);
boolean rightSenDetect = digitalRead(rightSensor);

//testing sensor values and distance required from ground

Serial.print(“left sensor = “);
Serial.println(leftSensorValue);

Serial.print(“right sensor = “);
Serial.println(rightSensorValue);

//false is if surface is DARK!
//true is if surface is LIGHT!

if (leftSenDetect == true && rightSenDetect == true) {
//left motor direction
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);

//left motor speed
analogWrite(enableA,200);

//right motor direction
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);

//right motor speed
analogWrite(enableB, 200);
}

else if (leftSenDetect == false && rightSenDetect == true) {

// slow down left motor speed
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);

//left motor speed

analogWrite(enableA, 75);

//maintain right motor speed
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);

delay(550);

analogWrite(enableB, 100);

}

else if (leftSenDetect == true && rightSenDetect == false) {
//maintain left motor speed
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);

analogWrite(enableA, 100);

//slow down right motor
digitalWrite(in3, LOW);
digitalWrite(in4, LOW);

delay(550);

analogWrite(enableB, 75);

}

}

2

 

This was basic prototype to test the functions of the model, although it lacked aesthetic quality to allowed us to test what we needed to. the base consisted of a 140mm X  70mm MDF board, and the components were attached to this with a range if blue tack, glue and double sided tape. These temporary attachment methods were useful for quick disassembly, in order to find the best position for the components.

Testing this prototype also made us aware of changes that needed to be made in the code, for example, we added a delay to the “if else” statements, giving the Racer more time to correct itself when turning sharp corners, due to this testing the delay has been set at 550 milliseconds, but this is open to change in further testing.

The first track we tested the model on was simplistic with minimal sharp corners, but since we are unsure on what the track will be like on the day, we created a more complex track once the car could follow the line on the first track.

tac1

There were a lot more issues with the second track (displayed below). The corners were so sharp that the Racer didn’t have enough delay time to sense the black line therefore it would leave the track. We altered the code and positioning of the sensors and after numerous attempts managed to get the Racer to follow it.

trac2

The laser cut wheels that were cut from the 6mm MDF lacked grip, this caused wheel spin when having one motor on and the other off. We solved this by using elastic bands to increase the traction greatly on the wheels.

 

Line Tracking Robot Racer- Experimenting with IR Sensors

To conclude level 5 Engineering science we have been asked to combine our knowledge of Programming and Electronics and Mechanical Engineering, and apply them to efficiently design and make a device that can complete a 10-meter course by tracking a line whilst carrying a raw egg.  

We began by creating a list of components which we thought we would need to create an accurate and fast moving line tracking robot. Out of all the components our first priority was selecting the most accurate sensor for the job we were facing. We came to the conclusion that using two IR sensors would work well. We could attach the digital sensors to each side of the car and they will then hopefully they will be able to sense the light difference between the flooring and the black tape. Therefore the Racer will be able to follow the line.

The IR sensors function using digital pins, therefore we can use the digital read function to see if they are  HIGH or LOW using the serial monitor. This was extremely useful in the development of our Racer design as it gave as an idea of how sensitive the sensors were the the light and dark floor surfaces, providing us with the essential information of how high from the floor surface the sensors would need to be to work. We wrote some basic code in order for us to test this:

int leftSensor = 7;
int rightSensor = 8;

void setup() {
Serial.begin(9600);
pinMode(leftSensor, INPUT);
pinMode(rightSensor, INPUT);
}

void loop() {
int sensorValL = digitalRead(leftSensor);
int sensorValR = digitalRead(rightSensor);
Serial.println(sensorValL);
Serial.println(sensorValR);
delay(1);
}

IR Sensors

Bringing the Outdoors in: 500 words

I was excited to begin the ‘Bringing the Outdoors in’ module as it sounded complete different to my previous field project. I could clearly see how I could benefit from the module as is was based around design development and human centred design which is essential in product designer. We were told that you must first gather inspiration, and then use that inspiration to begin ideation, and then implement the ideas in order to solve the issue. We were on the look out for inspiration on the Storey Arms trip. Whilst caving, Orienteering and Caving there were may health and safety issues which could be implicated, such as;

  • Strong water current
  • Rising water levels
  • Domino effect when people fall
  • Unstable walking surfaces
  • Slippery surfaces
  • Uneven surfaces
  • Temperature shock
  • limited visibility
  • Fitnes
  • Restrictive clothing
  • Large heights
  • Low ceilings
  • Rocky surfaces (more of an issue when needed to crawl)
  • Tight gaps
  • Navigation

Clara held a first aid workshop on the Tuesday after the trip, I am not first aid trained so it was essential in order for me to be educated on whats already out there. She also went through the stages you would have to go through in certain emergencies, and when it is necessary to contact emergency services. Following this me and my partner Sam did some quick idea generation, finishing with 100 ideas that answer the brief in some way. Next following session we narrowed down these ideas to five, after doing some market research and intense consideration, these ideas were;

  • An easy access food pouch
  • A slim head torch
  • LED bred crumbs
  • Anxiety helper
  • Friends App

We sketched up each of these ideas and decided on a final design which we could them prototype, test and develop. Once these prototypes were completed we took them back to the Brecon Beacons and immersed them in a natural environment, and got people to interact with the prototypes whilst asking them questions and receiving feedback which we recorded. This was very useful and gave us information for further developments.

On the following Thursday  we took our prototypes into PEL, using panoramic images that were taken on the two trips as the background setting. We also took a trip to Taff Trail and gathered leaves, stones and sticks to making the environment more realistic since it enhanced the participants, touch, smell, sound, and sight. We also played background sound which helped significantly.

We had a mixed reaction from the people we immersed in the environment with out prototypes. Some seemed to take it as a joke, some seemed too uncomfortable to get an accurate reading from but others seemed interesting by the concept and gave us some useful feedback.

We developed out prototypes using the feedback collected from the trip and PEL and then got a different group of people to test them in PEL for the second time. Once we had gathered this feedback we implemented it for the last time before the final presentation.

Bringing the Outdoors in, Week 5: PEL & Final Submission

We developed out prototypes using the feedback collected from the trip and PEL and then got a different group of people to test them in PEL for the second time. Once we had gathered this feedback we implemented it for the last time before the final presentation.

The presentation went fairly well, but there were clearly improvements that needed to be made.