Go Down

Topic: Robocup Junior soccer ball sensor (Read 2076 times) previous topic - next topic



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 :
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() {

void loop() {
  int sensorValue = analogRead(A0);

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


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

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131