Bus Enabled Cricket-Logo Sonar

Edward Giardina


Pertinent Files: Logochip Code, Cricket Code

My project interfaces a Devantech Sonar board to a Logochip PIC microprocessor. That microprocessor circuit is a slave device on the Handy Cricket's one-line bus. Therefore, the Cricket can send a request expecting a certain result to the bus sonar, the sonar can report back on the bus its actual value (the sonar having done the math and all the hard stuff) and the handy Cricket can use that result to interpret its environment.

What I built, and How it works:

The Cricket's bus lines were attached to the wireless bread board of a PIC circuit using a cricket bus connector and two cricket wires. The white wire , the 'data' wire for the cricket's bus was fed into the B0 (pin 21) of the Logochip. The code used the new Logochip primitive bsend to send the numerical value of the sonar's ranging to the cricket. The cricket's code used the BSR to send a signal, then recieve the value of the sonar's distance. It compared that value to the value of seven inches. If the value was greater, the piezo beeped.

The functional design , besides the creation of a BUS-enabled sonar, was to create a cricket 'alert system'. A machine, or device, needs to be a certain proximity to a wall. Otherwise, it sets off an alarm so a technician can fix it. here, my Sonar 'bot' doesn't like to be approximately more than seven inches from the wall. If it is, it fires the piezo beeper as an alarm. It will stop firing when it is placed back close enough to the wall.


Picture 1: Basic Cricket Bus Wiring Diagram

Picture 2: Logochip's wiring diagram with Bus connection shown.

Picture 3: Quick Overview photo of Sonar Setup