Let's Make Robots!

start here robot ultrasonic sensor

Newbie here

Hi every one i have been member for a while now and have finally collected all the parts needed to complete fritz start here robot.

Every thing is the same apart from im using a 28x2 picaxe instead of the 28x1 picaxe,also using the ultrasonic sensor pictured below (in attachments instead of the SRF05.

i have followed the walk  through on http://letsmakerobots.com/node/66  for the SRF05 sensor and translated the wires to my sensor as followed:

wire             srf05                mine

black           ground 0v         gnd

blue             trigger input      trigger

yellow          echo output      echo

red               5v supply          vcc

i also used the basic program from   http://letsmakerobots.com/node/66 and nothin happens????????

here is the spec for the sensor:


  • The modules includes ultrasonic transmitters, receiver and control circuit
  • Its stable performance and high ranging accuracy make it a popular module in electronic market
  • There are 5 pins out of the module, VCC, Trig, Echo, GND and OUT
  • Best performance in 30 degrees angle
  • Electronic brick compatible interface
  • Dual transducer
  • Arduino library ready


  • Voltage: DC 5V
  • Current: 15mA
  • Ultrasonic Frequency: 40K Hz
  • Maximal Range: 400cm / 13 feet
  • Minimal Range: 3cm
  • Resolution: 1cm
  • Trigger Pulse Width: 10μs
  • Dimension (L x W x H): Approx. 44 x 20 x 18 mm

i am hoping some one can point me in the right direction.

link to seller as requested


sensor.jpg29.07 KB
2.JPG1.38 MB
1.JPG1.43 MB
3.JPG1.27 MB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

This is about your ultrasonic (PING) sensor.

I see from the photo that the 4th pin is OUT. The other SRF-05 sensor has five spots, but there is no physical pin in that position

Vcc (5 volts)



(no pin)


--therefore I am going on the assumption that you do not need to use the Out pin, but hook up the other four.

Trig will be on an output pin of your picaxe. This is where you tell it to send out a ping.

Echo is on an input pin of the picaxe. (--And after the ping output,) This is where the information returns to the micro-controller chip.

Here is program that should work, ==>> but alter the pins to be what pins you are using on your processor, if you are not using b.0 and c.1 for your Trig and Echo pins

(These symbols all say "left" because I am using two sensors. I just deleted the code for the "right" sensor and then checked this code to be certain the remaining sensor still worked properly, >>so this code has been tested with a picaxe 28X2.)


#picaxe 28X2

symbol trigL = b.0       ' for PING out, I am using b.0 here     ‘ Define output pin for Trigger pulse (X2 parts)
symbol echoL = c.1    `For the input, I am using c.1 here      ' Define input pin for Read Echo pulse (X2 parts)
symbol RawRangeLeft = w2         ' I am using a 16 bit word variable for "Raw" range figure
symbol RangeLeft = w4               ' I am using this 16 bit word variable for Range in 1/10ths of an inch.
symbol InchesLeft = w6               ' I am using this 16 bit word variable for distance to target in inches.


pulsout trigL,4                             ' Pulse-Output  [for number (of 5 uSec pulse widths)]
                                        `must be at least 2.  [2 x 5uS = 10 uS trigger pulse @ 8 MHz. (minimum=10uS)]

pulsin echoL, 1, RawRangeLeft     ' measures range in 10uS steps  (5uS each at 8 MHz. for X2)
pause 20 
let RawRangeLeft = RawRangeLeft / 2 ` correct for 8 MHz speed
       ' now convert range to inches (divide by 14.8) --ORIGINAL INSTRUCTIONS
       ' multiply by 10 then divide by 148... er, 153 instead
       ' At my altitude and temperature, this number is ~153 instead of 148
RangeLeft = RawRangeLeft * 100    `to get
RangeLeft = RangeLeft / 153          ` Tenths of an inch from target

       ; If decimal is .5 or higher, then I will round up to the next inch
let InchesLeft = RangeLeft + 5         ` to round off fractions to nearest inch
InchesLeft = InchesLeft / 10            `Inches is now INCHES-TO-TARGET

pause 50                                       ' extra recharge period after ranging completes

sertxd(" Range to Object = ",#W6,CR,LF)

goto main 


I hope the above code helps you prove out your installation.

Ok, time to jump in.

We can talk about math all day long. At this point, hook up each side in parallel. Hook up each "set" of motors to the motor driver. Put the robot up on books so the wheels can turn freely. Run the darn thing.

Put your finger on the motor driver chip and let it spin. If it gets hot, come back and tell us --If it just gets a little warm, forget about everything we talked about in this thread and go build robots.

You may want to expand this test by dragging your finger along one (or more) of the wheels --Introduce a "load" and see if we start getting hot then.

No hot = good.

Little Hot = Probably ok

Hot = still probably ok (but we may want to talk about heat sinks

Too hot to touch = STOP and Unplug

hi  ignoblegnome

sorry my mistake

1 yes same motors diferent vendors,

2 your right i have conected them in parallel on each side not fron an rear.

rushing when typing an not thinking sorry

OK. With luck you actually have 4 identical motors. You should be good to go!

ignoblegnome: just check fritz link an collected  ,very helpfull link.

birdmun:thank you for the brackdown on parallel an series, my motors are conected in parallel that was very easy discription to follow .

chris the carpenter:

      2 motors at the rear as follows 

  • Gear Ratio: 1:200
  • Power: 3 to 12V DC
  • Single motor
  • Without loading: 40-230mA / 25-100rpm 
  • Output torque: 2-12Kgf.cm

      2 motors at front as follows,

  • . geared motor with a reduction of 200:1.
  •  Works on 3-9V,
  •  output speed is approximately 50 rpm at 6V.
  •  No load current 120mA at 6V,
  • Torque at 6V 2100g/cm.

Front has in parallel  240mA(2x120mA) at 6v

how would i work out the rear motors in parallel  data for the states  40-230mA  at 12v


hope your not getting tired of my dumb questions


OK, I see a couple of problems with this.

  1. If your two pair of motors are not identical, you may have trouble trying to get them all to turn at the same speeds. The motors all looked the same in your picture, so I assumed they were the same. Is there a chance they are the same but just sourced from different vendors?
  2. You want to connect the two right side motors in parallel, and the two left side motors in parallel. If you connect the front as a parallel pair and the back as a parallel pair, you cannot turn.

Maybe you'll be able to deal with item #1, but #2 is a deal breaker.


Yes, series is 1/2 the volt to each motor and the same current draw. Parallel is equal voltage with double the amps. Parallel would be preferred here but you must check the amp draw for your motors, double it and check to be sure it is less than what the L293D can handle. If it is not, you gotta stick with series.

V1 and V2 (and everything else) can be found here. NOTE --V2 also goes to the output pins (where the servos go) so just be aware of this.

i am using 4 AA's rechargeable batterys at 1.2v giving me 4.8 volts in total.

as for your question would you loose power from the motors ie speed/revolutions due to the volts being split between the two.

how do you connect in series and connect in  parallel ((might sound stupid  but just want check what i have done)

 i see that you stated that you can split V1 V2 to use V2 to power the motors please could i have more informayion on that  ignoblegone

ignoblegone sorry for all the questions but very egar to learn

Read Frits' post Picaxe 28 Project Board for Dummies. It will tell you all you need to know about V1 and V2, plus everything else about that board. It is a great reference.

Oh, and yes. If you run the motors in series, each gets half the voltage that they would have gotten singly or in parallel. So they will run much slower and with less power. Since you are starting at 4.8V, and you lose 1.5V through the motor driver to begin with, you are starting with 3.3V. Now divide that in half. Will  your motors run at 1.45V? Maybe not so well.

Your motors are in series if you hook the positive of one to the positive point on the driver board and then the negative of that motor to the positive of the next. Followed by, the negative lead of the second motor going to the negative connection on your driver board. Christmas lights may or may not be a good image for series depending on whether or not when one burns out the whole strand is dark, series, or when one burns out you can see that it needs replaced, parallel.

Your motors are in parallel if you hook both positive leads to the driver's positive connection and both negative leads to the negative connection. Best image for parallel is a ladder with the rungs being your motors/load and the sides/legs being your power rails. BTW, I mentioned Christmas lights above. Newer sets typically use parallel connections for the lights so when one burns out the whole strand doesn't go dark. Only the dead one is dark.