Author Topic: Sonar with ATMega168  (Read 1441 times)

0 Members and 1 Guest are viewing this topic.

Offline RobotFreakTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Sonar with ATMega168
« on: August 31, 2010, 02:35:53 PM »

I have a Deventech SRF05 sonar that needs to be interfaced with an ATM168.  Does anyone have any sourcecode or tutorials for doing this?  Would it be possible to do it with the timerx8 library from the 50$ robot (see below)? If so, how?  Please let me know, I'm new to timers and AVR microcontrollers...Thanks in advance!

Offline kidwidget

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: Sonar with ATMega168
« Reply #1 on: September 14, 2010, 06:56:36 PM »
I have this code for the Parallax Ping))), it works basically the same way. The start pulse on the Ping))) is 5us and not 10us. The Ping))) has a 750us delay between the start pulse and rising edge of the output pulse, the SRF05 has a 700us delay.  If you like you can download the file from my website (I just started the website so it's kind of bare). I've tested the code on a simulator and it works there but I haven't had time to build the hardware so it may not work completely. It's coded with Algorithm Builder which is visually based assembly programming. Algorithm Builder is free to download so you don't have to by anything. Here's the link

edit: corrected typo
« Last Edit: September 14, 2010, 07:03:31 PM by kidwidget »
World's crappiest website,


Get Your Ad Here