Author Topic: infrared sensor robot - When power is switched on scanner servo rotates to right  (Read 2539 times)

0 Members and 1 Guest are viewing this topic.

Offline BorotTopic starter

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
When first connecting power to my sharp infrared sensor robot (the 50 dollar photovore robot that's been retrofitted with the sharp ir rangefinder) the servo rotates the sensor to the right. As i understand it this is during auto-calibration. Is this something that is supposed to happen?
The robot at the moment continuosly turns in a circle, with the servo occassionally rotating and the robot travelling straight for a period of very approximately a second.

sensor = sharp infrared rangefinder 33_GP2Y0A02YK0F_ss

Offline BorotTopic starter

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
addition to the last statement!
Further to this the servo doesn't continuously rotate from left to right as can be seen in the video. Any ideas as to why the servo isn't continuously scanning?

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Did you calibrate it?
Howdy

Offline BorotTopic starter

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
thanx smash for the reply,
I haven't calibrated it(the ir rangefinder you mean?)! Can you point me in the right direction?



some specs for my servo, units might be missing:
No. Item Specification
5-1 Overall Dimensions See the drawing
5-2 Limit angle􀀡 180 deg± 10 deg
5-3 Weight 9 ± 1 grams (without servo horn)
5-4 Connector wire gauge􀊳 􀏞28 PVC
5-5 Connector wire length 150 ± 5 mm
5-6 Horn gear spline 20T/􀓿4.82
5-7 Horn type Cross , Bar ,
5-8 Reduction ratio 1/265

Control Specification􀎚
No. Item Specification
6-1 Control system Pulse width modification
6-2 Amplifier type Analog controller
6-3 Operating travel􀊳 90 when1000 2000 micro secs
6-4 Neutral position 1500 micro secs
6-5 Dead band width 7 micro secs
6-6 Rotating direction Clockwise 􀊻when1500 2000
6-7 Pulse width range 800􀐨2200
6-8 Maximum travel Approx 165 when800􀐨2200

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
I might be wrong but doesn't the $50 upgrade run off the stampy algo? So you first have to calibrate the sensor when you turn it on?
Stampy, Sumo Robot ?
As i said, i might be completely wrong, i just woke up...
Howdy

Offline BorotTopic starter

  • Jr. Member
  • **
  • Posts: 12
  • Helpful? 0
SmAsH,
i ave done this calibration !
Also I  tested the ir rf with my multi-meter and was receiving a higher voltage output from vo(rangeing up to 1.8v) upon holding an object in front, that the ir rangefinder is reporting an analog voltage back to the mcu's adc port.

question - does a variation in the pulse modulation range say my servo only goes to 2000 µsec compared to the hs-311 which goes to 2400µsec cause a problem with the numeric values sent by the servo rotate/left/right/go straight commands?

Offline hopslink

  • Robot Overlord
  • ****
  • Posts: 202
  • Helpful? 14
SmAsH is right and the code is for a 'bot designed to chase and push a target. If you examine the code you will see that it should:

1) On starting perform a calibration, reading the sensor and storing the value.

2) Start on the left and sweep the sensor right looking for a target within calibration range.

If it finds a target it sweeps back to find the target's left edge, otherwise it travels to it's programmed limit. On reaching the limit of the sensor sweep the 'bot will turn right and spin. You should only see the sensor scan left and the 'bot go straight (or left) if it reads a target in range, otherwise it should just spin on the spot.

Note: left and right may be switched above, but the logic is correct.

It sounds like your 'bot is behaving normally. Are you giving it a target to chase? If it won't recognise a target but the sensor is working correctly check that the sensor ground is the same level as the 'bot's and that the sensor output is connected to the correct ADC pin.

If the code exceeds the your servo's PWM limits the servo probably will not work and the 'bot won't move. 

 


data_list