Maker Pro
Maker Pro

GCSE Course Work Project - Robot Vacuum Cleaner

Hi everyone,

I am starting my GCSE DT project and am looking for some advice on it.

This is the specification by AQA:

Context
Vacuuming carpets is a disliked chore for most householders. A company
wishes to produce and market a product or system that will move a vacuum
cleaner across every piece of the floor area.

Design Task 8
Design and make a device or system that when placed in a room will move
across the entire floor area sensing walls and moving around objects where
necessary. You do not need to design the vacuum device, only the system that
moves around the room.
So as you can see, i don't need to make the vacuuming/suction part, just the navigating robot.

Here is what i want to end up with:

- an autonomous robot that can navigate the room, and be able to cover most of it (this can be by a random process)
-Something that is able to sense obstacles, such as walls, stairs, cats (noises) etc and move away from them
-Something that runs for a set period of time
-Something that looks good

Here is what I think I should do so far:

Using the microcontroller (we are provided with a PIC Genie by our teacher, and we use the flowchart on CircuitWizard to programme it), I can control the wheels, and any sensors such as sensing walls

My Questions:

- I need to make an ultrasonic range finder circuit for the obstacle and cliff sensors, and i am not sure how to do this. What is the circuit? What things do i need? How will it integrate into the rest of the robot, e.g. the microcontroller, so it can turn away etc...

- Although i know that the PIC Genie chip is good, i feel that the flowchart programming interface i am using (Circuit wizard) is not as good as conventional programming (i.e. coding) Am i right? If so, do you recommend any software for the PIC?

-I know the Arduino microcontroller is more expensive, but it is also much better and versatile. Do you think that that would be better for my project?

So what do you think?

Thanks!:D
 
I'm not familar with Circuit Wizard so I can't give much input...

There are ultrasonic modules that are cheap, they interface very easily to micros, you don't need anything special just a serial interface...

This side gives a lot of the basics, for your hardware/software...

http://www.technologystudent.com/pics/picdex1.htm

I know the Arduino microcontroller is more expensive, but it is also much better and versatile. Do you think that that would be better for my project?

The Arduino is not better or versatile, just another alternative that has it's own set of pros and cons... Don't be sold by the hype...

Since it's a school project you will get guidance but not answers, so start getting your hands around things and come back with specific questions when you hit a road block...
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
There are two approaches to this problem.

You should be able to find two commercial devices that implement these solutions (although one will be harder to find).

Is there a third method?

Can you improve on either method?

As Cocacola suggests, don't buy into hardware until you know what it needs to do, then decide on what fits best.

There are many sensors available on the market (just look some up on ebay). But consider what sensors you really need. Perhaps you can get by with fewer. What do you *really* need to know?

Off the top of my head, the two things I really want to know are

1) Have I hit something?
2) Am I about to drive off a cliff?
 
Thanks for the replies. One of the things that i really need to clear up is the ultrasonic range finder circuit. A website suggestion would be helpful too; i have researched on it and can't figure out where to start making it.
 
Thanks for the replies. One of the things that i really need to clear up is the ultrasonic range finder circuit. A website suggestion would be helpful too; i have researched on it and can't figure out where to start making it.

Well, they are not all created equal... The little self contained modules from Asia (for a few bucks) already do all the math and work and spit out either a serial number or more commonly a pulse who's length is dependent on the measured distance... You simply measure the length of that pulse and you have your distance...

Here are the directions from a pulse module on Ebay... I commented them with / at the end of each line

Connect power and ground.
Supply a 10uS pulse to the trigger input. /you would send this pulse out from your micro frequently so that you can sample the distance returned
Module will send out an 8 cycle burst of 40kHz ultrasound. /the module does the work
Echo pin will be pulsed to high and back to low /you measure this 'high' state duration
Distance (cm) = pulse width of echo (uS) / 58 /you take the duration measured and get a distance, most compilers will have a built in 'Pulse In' command that will measure it for you
Distance (inches) = pulse width of echo (uS) / 148 /you take the duration measured and get a distance
No object detected = approx. 38ms pulse /self explanatory

Here are the directions for a serial module, notice all you have to do here is constantly read the incoming data and you have the distance returned every 50ms...

This module will occupy IO port of a microcontroller. After power-on, this module will measures the distance every 50ms and a frame will be from pin OUT. The frame includes four 8-bit data. The format is: 0XFF + H_DATA + L_DATA + SUM:
1. 0XFF: as a starting data of a frame, used for judgment
2. H_DATA: high 8 bits of data
3. L_DATA: lower 8 bits of data
4. SUM: sum of data, used for verification. 0XFF + H_DATA + L_DATA = SUM (lower 8-bit only)
Note: H_DATA and L_DATA compose 16-bit data which is value in millimeters.


If you want code examples just hit up Google they are all over the place, as it's pretty basic stuff...
 
Last edited:
Thanks. I will use the serial module as it is automatic. But, i still have some questions ( i am beginer in electronics, so don't know too much), what is 0XFF, H-DATA, L_DATA & SUM? Where will they be used, for example how will i be able to program it, with what software?
 
Thanks. I will use the serial module as it is automatic. But, i still have some questions ( i am beginer in electronics, so don't know too much), what is 0XFF, H-DATA, L_DATA & SUM? Where will they be used, for example how will i be able to program it, with what software?

The pulse is easier to implement for the newbie... Just measure the pulse length and divide by either 58 or 148 depending on if you want cm or inches...

As for what those variables in the serial module, it explains it quite well...

1. 0XFF: as a starting data of a frame, used for judgment
2. H_DATA: high 8 bits of data
3. L_DATA: lower 8 bits of data
4. SUM: sum of data, used for verification. 0XFF + H_DATA + L_DATA = SUM (lower 8-bit only)
Note: H_DATA and L_DATA compose 16-bit data which is value in millimeters.

The module will output a $FF to tell you that it's the start of the data packet, it will then send a 16 bit value as a high and low 8 bit value and then it will send the lower 8 bit value of the three previous values added up as a checksum... You take the two 8 bit values it send you merge them back into the 16 bit value and that is the distance in mm...

A measured 16 bit value will be a value between 0 and 65535

So lets say the module detects something at 35677 mm

To split the 35677 into to 8 bit values you divide by 256 to get the H_DATA or high byte...

So we get H_DATA = 139 or $8B in hex

You take the remainder and that is the L_DATA or low byte...

L_DATA = 35677 - (256*139) = 93 or $5D hex

To get the sum you take the lower byte (look above on how to get the lower byte) of $FF + $8B + $5D that is 231 or $E7 hex

So the data packet the module will send out to the micro is

FF 8B 5D E7

You can verify this packet with the checksum if you desire or you can assume it was received correctly and take the $8B and $5D value reverse the math and get 35677 mm

At least that is my 5am going to bed math version of it :)

I'm not going to tell you how to program it as that will defeat the entire purpose of your project, it's basic micro programming stuff just apply yourself... To get this project working in the most basic form isn't that much work, and it will teach you quite a bit when done...
 
Last edited:
Top