Pages: [1]   Go Down
Author Topic: Robocup Junior soccer ball sensor  (Read 1075 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: December 13, 2012, 06:07:25 pm by dockedrockets » Logged

Pages: [1]   Go Up
Jump to: