Line 576: | Line 576: | ||
<br> | <br> | ||
Spent a good deal of time debugging my index.php and making it work with the php_serial.class.php. I had to make some changes so that the php errors and warning would show up. In the php.ini file, I changed display_errors = Off and error_reporting = E_ALL. Errors/warning still did not show up so, in the httpd.conf for apache2, I added "php_flag display_errors on" and | Spent a good deal of time debugging my index.php and making it work with the php_serial.class.php. I had to make some changes so that the php errors and warning would show up. In the php.ini file, I changed display_errors = Off and error_reporting = E_ALL. Errors/warning still did not show up so, in the httpd.conf for apache2, I added "php_flag display_errors on" and | ||
− | "php_value error_reporting 2039" which resulted in a load of error files echoed on index.php upon a refresh. Essentially, any access by the script was getting an "Access denied". All of the commands use stty. The command by the script, which took "/dev/ttyO2" as an argument, was essentially running the command "stty -F /dev/ttyO2" and getting the access denied reply. I tried this command in a terminal on the board and had no trouble running it.<br> | + | "php_value error_reporting 2039" which resulted in a load of error files echoed on index.php upon a refresh. Essentially, any access by the script was getting an "Access denied". All of the commands use stty. The command by the script, which took "/dev/ttyO2" as an argument, was essentially running the command "stty -F /dev/ttyO2" and getting the access denied reply. I tried this command in a terminal on the board and had no trouble running it.<br><br> |
− | Obviously the permissions were not right, so I ran "sudo chmod 777 /dev/ttyO2" and reloaded the page - no more errors. I hooked up the scope to the transfer line of the serial port on the pandaboard and pressed the buttons on the site from my netbook and saw blips on the scope - finally things were working right.<br> | + | Obviously the permissions were not right, so I ran "sudo chmod 777 /dev/ttyO2" and reloaded the page - no more errors. I hooked up the scope to the transfer line of the serial port on the pandaboard and pressed the buttons on the site from my netbook and saw blips on the scope - finally things were working right.<br><br> |
− | Scott hooked up the pandaboard to his laptop and ran putty. It works!<br> | + | Scott hooked up the pandaboard to his laptop and ran putty. It works!<br><br> |
− | [[Image:Pandaboard_serial.avi]] <br> | + | [[Image:Pandaboard_serial.avi]] <br><br> |
Scott, Kin Chin, Michael, Matt, and Chris worked on figuring out the initializations and main code for the microcontroller. Once they had what they thought would work, we hooked the two boards up - nothing. We tried the micro with putty - and it worked! So, we currently have the Pandaboard<-->laptop and micro<-->laptop connections working. However, at this point we cannot get the two to communicate with each other. | Scott, Kin Chin, Michael, Matt, and Chris worked on figuring out the initializations and main code for the microcontroller. Once they had what they thought would work, we hooked the two boards up - nothing. We tried the micro with putty - and it worked! So, we currently have the Pandaboard<-->laptop and micro<-->laptop connections working. However, at this point we cannot get the two to communicate with each other. | ||
</td> | </td> | ||
Line 622: | Line 622: | ||
4 x IRF9630<br> | 4 x IRF9630<br> | ||
4 x IRF630<br> | 4 x IRF630<br> | ||
− | 4 x 4N28<br> | + | 4 x 4N28<br><br> |
− | Spent a while testing an H-bridge configuration. I kept having problems that didn't seem to make any sense - at one point forward would work and backward wouldn't when the port pins were definitely switching the opto-isolators. The reverse voltage was actually .1V. Kin Chin came and we probed more around the circuit and started switching components out. We narrowed the problem down to the 4N28 which, after further inspection of the data sheet, I realized that I was probably frying them with too much current from the battery. We switched the configuration to use TIP120's instead of the 4N28's and the circuit finally worked for forward and backward. We updated the code on the micro to reflect changes in the control.<br> | + | Spent a while testing an H-bridge configuration. I kept having problems that didn't seem to make any sense - at one point forward would work and backward wouldn't when the port pins were definitely switching the opto-isolators. The reverse voltage was actually .1V. Kin Chin came and we probed more around the circuit and started switching components out. We narrowed the problem down to the 4N28 which, after further inspection of the data sheet, I realized that I was probably frying them with too much current from the battery. We switched the configuration to use TIP120's instead of the 4N28's and the circuit finally worked for forward and backward. We updated the code on the micro to reflect changes in the control.<br><br> |
I added a startup script to the Pandaboard that runs 'sudo chmod 777 /dev/ttyO2' when the board boots. I will soon add the command 'sudo webcam /etc/webcam.conf &' so that the webcam is initialized on startup. If I have time and can figure it out, I will add commands so the board emails me its IP address when it boots - however I am unsure of how this would work. | I added a startup script to the Pandaboard that runs 'sudo chmod 777 /dev/ttyO2' when the board boots. I will soon add the command 'sudo webcam /etc/webcam.conf &' so that the webcam is initialized on startup. If I have time and can figure it out, I will add commands so the board emails me its IP address when it boots - however I am unsure of how this would work. | ||
</td> | </td> |
Revision as of 06:07, 3 December 2011
Contents
Jason Holmes - Design Notebook
Week of Sept. 19 |
September 21, 2011 (1.5 hours):
|
September 22, 2011 (20 minutes):
|
September 23, 2011 (1 hour):
|
WEEK SUMMARY: Accomplishments: Obtained usernames for HKUST members
|
Week of Sept. 26 |
September 27, 2011 (45 minutes):
|
September 27, 2011 (30 minutes):
|
September 28, 2011 (1 hour):
|
September 29, 2011 (45 minutes):
|
September 30, 2011 (1.5 hour):
|
WEEK SUMMARY: Accomplishments: Completed preliminary block diagram layout of system. Decided on potential processor family.
|
Week of Oct. 3 |
October 6, 2011 (2 hours):
|
October 7, 2011 (1 hour):
|
October 7, 2011 (1.5 hours):
|
WEEK SUMMARY: Accomplishments: Finished poster for VIP poster session
|
Week of Oct. 10 |
October 11, 2011 (30 minutes):
|
October 13, 2011 (1 hour):
|
October 14, 2011 (1.5 hours):
|
WEEK SUMMARY: Accomplishments: Decided on a development board to begin prototyping.
|
Week of Oct. 17 |
October 17, 2011 (30 minutes):
|
October 17, 2011 (1 hour):
|
October 18, 2011 (3 hours):
IP Camera:TRENDnet TV-IP110WN Wireless N Internet Camera
|
October 19, 2011 (2 hours):
|
October 20, 2011 (1 hour):
|
WEEK SUMMARY: Accomplishments:
|
Week of Oct. 24 |
October 25, 2011 (3.2 hours):
(640 x 480 pixels) X (2 bytes per pixel) = 614,400 bytes per frame All of the CMOS cameras output in a RGB format or similar - raw image data. For most cameras, this is 16 bits per pixel. Without doing our own compression, this image data would be impossible to send wirelessly. There is a library for C to convert RGB data to JPEG format, which then possibly be converted to MJPEG on the controller side. This could possibly be used on-board, but the speed would have to be tested.
|
October 28, 2011 (1.5 hours):
|
WEEK SUMMARY: Accomplishments:
|
Week of Oct. 31 |
November 1, 2011 (4.5 hours):
|
November 3, 2011 (7 hours):
|
November 3, 2011 (1.5 hours):
|
WEEK SUMMARY: Accomplishments: Received tanks
|
Week of Nov. 7 |
November 8, 2011 (3 hours):
|
November 9, 2011 (3 hours):
|
November 10, 2011 (2 hours):
|
November 11, 2011 (2 hours):
|
WEEK SUMMARY: Accomplishments: Completed design review
|
Week of Nov. 14 |
WEEK SUMMARY: Accomplishments: Got a webcam feed - though not a great feed
|
Week of Nov. 21 |
November 23, 2011 (3 hours):
|
November 24, 2011 (6 hours):
|
November 25, 2011 (1.5 hours):
$serial = new phpSerial; $serial->deviceSet("/dev/tty0"); $serial->confBaudRate(2400); $serial->deviceOpen(); switch ($_POST['D']) { case "Forward": echo "Forward Pressed"; $serial->sendMessage("F"); break; case "Left": echo "Left Pressed"; $serial->sendMessage("L"); break; case "Right": echo "Right Pressed"; $serial->sendMessage("R"); break; case "Backward": echo "Backward Pressed"; $serial->sendMessage("B"); break; case "Stop": echo "Stop Pressed"; $serial->sendMessage("S"); break; default: echo "Initial page load"; } ?> |
November 25, 2011 (30 minutes):
|
WEEK SUMMARY: Accomplishments: Web server successfully setup with a functioning index
|
Week of Nov. 28 |
November 28, 2011 (8 hours):
|
November 29, 2011 (30 minutes):
|
November 29, 2011 (3.5 hours):
|
November 30, 2011 (8 hours):
|
Dec 1, 2011 (5.5 hours):
|
Dec 2, 2011 (2 hours):
Here are some obvious problems that will need to be addressed: |
WEEK SUMMARY: Accomplishments:
|