Go Down

Topic: Robocup Junior soccer ball sensor (Read 1 time) previous topic - next topic

Jak24

Hi!

I am a Robocup Junior soccerhttp://rcj.robocup.org/soccer.html competitor,
and I am currently in the process of selecting my ball sensor.
Now I found this article :
http://rcj.robocup.org/rcj2009/newball/cheapRCJ05sensors-RobotDemos09.pdf
And I ordered the TSOP1138 and connected it as the circuit in the document says I should with
a 100k resistor and a 1uF cap to get an analog reading.
The code I used is the Analog Serial Read example code
Code: [Select]

void setup() {
  Serial.begin(9600);
}

void loop() {
  int sensorValue = analogRead(A0);
  Serial.println(sensorValue);
}

And I am not getting any readings back besides 0.
So I did some further research and it turns out the ball actually outputs 40 khz instead of 38 which the sensor is set at,
but I should get at least some readings right even with the 2khz difference?
And also I don't suppose it's an issue but the capacitor I have is 1uf and 16v, would that be an issue?
Any advise appreciated, or if any one could suggest a better ball sensor!

Best Regards

dockedrockets

#1
Dec 14, 2012, 12:00 am Last Edit: Dec 14, 2012, 12:07 am by dockedrockets Reason: 1
I compete in robocup and used that sensor before. That sensor is a digital sensor so it returns either a high or a low. Connect it to a digital pin and set up a code that reads the value of a digital pin and prints it to a serial monitor. Then get out a Roboball (Mk2) and turn it off and on in front of the sensor. I forget but I am pretty sure that it returns low when it is sensing IR. Don't worry about the frequency. I have done this before and it worked  for me. Also forget about the low pass filter and just put a 100ohm resistor between the 5v line of the arduino an d the input of the sensor.

Go Up