Friday 30 March 2012

Week 10: March 20, 2012 (Tuesday)

Hardware - Sensor

Testing the robomouse to see how it’s running. It runs slowly so I modified the delay in the program to see the difference. After a few tests the battery becomes flat and need to be recharged. Therefore I proceed on sensor testing in order to determine the relationship between the output voltage and distance. I’m using a distance measuring sensor with analog output model Sharp GP2Y0A41SK0F. The distance measuring range is 4 cm to 30 cm. The sensor has 3 pins as below:


Pin No.
Signal Name
1
Vo
2
GND
3
Vcc
 
Initially, the output voltage reading is not stable. According to the datasheet, a by-pass capacitor of 10 uF or more has to be connected between Vcc and GND near this product in order to stabilize the power supply line. So, a by-pass capacitor of 10 uF is connected and the output voltage becomes stable. The output voltages for distance measurement from 2 cm to 40 cm were recorded and plotted into graph. The results are as below:


Distance (cm)
Output voltage (V)
2
2.43
4
2.63
6
1.89
8
1.46
10
1.21
12
1.02
14
0.88
16
0.76
18
0.67
20
0.56
22
0.47
24
0.39
26
0.31
28
0.27
30
0.22
32
0.19
34
0.15
36
0.13
38
0.11
40
0.10

  

The sensor
Sensor circuit with 10 uF capacitor
 
Measurement process (white box as the object / wall)
Distance 2 cm
Distance 6 cm
Distance 10 cm
Distance 20 cm
Distance 30 cm
Distance 40 cm

Sunday 25 March 2012

Week 9: March 17, 2012 (Saturday)

Hardware - PIC Controller Board

I went to the office to continue wiring the PIC circuit board. Once finish, I assemble the PIC circuit board on robomouse chassis.

Completed PIC 18F4585 Controller Board

Saturday 24 March 2012

Week 9: March 16, 2012 (Friday)

Hardware - PIC  Controller

Today I try to simulate the program using 18F4585. Initially, the simulation did not work due to error in proteus schematic. The vcc connected to MCLR is not wired properly therefore the MCLR is always reset. After the problem is fixed, the simulation works. Then, I started to test the program on PIC 18F4585 testing circuit. The PIC was programmed by using Galep-5 Universal Programmer. The circuit run successfully. Then I started to construct the PIC circuit on a single hole board.


PIC 18F4585 circuit board in construction

PIC circuit board (back view)

I'm using a ZIF (zero insertion force) socket for ease of programming as I'm using a separate programmer to program the IC. The wiring process to be completed tomorrow.

Tuesday 20 March 2012

Week 9: March 15, 2012 (Thursday)

Hardware - PIC controller board

I have received the PIC18F4585 from my supervisor. So I’m thinking of completing my hardware so I can fully concentrate on the development of the software. Therefore, I constructed a PIC 18F4585 test circuit before developing the circuit on a single hole board. Test reset circuit ok. Then, I modify the program from 16F877 to 18F4585 to test the PIC test circuit.

Reset test circuit

Switch is pressed

PIC test circuit

Sunday 18 March 2012

Week 9: March 14, 2012 (Wednesday)


Software

Continue with programming to turn right or left at 90 degree with the chassis stays at the same spot. To turn right the left wheel should move forward while the right wheel should reverse. On the other hand, to turn left, the right wheel should move forward and the left wheel should reverse. So, the program has to be written in such a way that each motor has to be controlled separately. The program is partially completed up to the controlling of the motor separately…To be continued.

Week 9: March 13, 2012 (Tuesday)

Software

Continue on the forward and reverse program. After several adjustment, the simulation works.