Richard Irons February 27, 2002
91.548 Robotics I
Lab 5: LogoChip Bus Communications
I continued my development of a LogoChip sonar for Lab 5. The circuit I developed has the Cricket as the master and the LogoChip as the slave. The LogoChip bus communications circuit that I have created is similar to my Lab 4 circuit except for the addition of the Cricket to the circuit and the removal of the LogoChip connection to the UML Dev board beeper. This write-up, the circuit diagram, and the source code for both the Cricket and the LogoChip can be found at my
Robotics I Lab 5 Web Page in addition to being found linked to this document.I was required to free up the use of the B0 port since this port was required for the Cricket board bus connection. This was not a significant problem since I was able to reorganize my B port connections around this restriction. The restriction did force the removal of my UML Dev board beeper connection from the LogoChip. I used the beeper primarily for providing feedback to the user about sonar contacts, but I was able to develop this same capability on the Cricket.
The Cricket board that I attached to the LogoChip had the extra feature of a "Touch" sensor. The "Touch" sensor would control when the LogoChip would make sonar readings. The control loop within the Cricket Logo code checks to see if the "Touch" sensor is activated on each pass. If the sensor is activated, a command is sent to the LogoChip via the Cricket bus to activate the sonar. The LogoChip is also sent an integer value identifying the number of sonar readings to sample. These readings are then averaged by the LogoChip and then transmitted to the Cricket. When the Cricket receives the averaged sonar contact distance back from the LogoChip, a tone is then emitted. Low tones correspond to contacts that are far away and high tones correspond to contacts that are nearby. If the touch sensor is not active during a pass of the Cricket's main control loop, a command is sent to the LogoChip to stop sampling sonar readings.
The main control loop in the LogoChip Logo code checks for the command to activate the sonar. If that command is received, the number of readings that should be averaged is then read from the bus. The readings are then sampled, accumulated, and averaged. The average sonar contact distance is then transmitted to the Cricket.
I believe that the sonar circuit I have developed provides a good foundation for the project I will be starting shortly. One enhancement that I would like to make to the circuit is to mount the sonar on a rotating platform. The platform would be rotated by one of the motors on the Cricket and controlled by the Cricket's Logo code. This rotating sonar would be significantly more useful then the currently stationary sonar.