Maker Pro
Maker Pro

detecting a red pocket on roulette wheel

Q

Quack

Jan 1, 1970
0
Hi,

I have an interesting task here - i want to sit something on the rim
of a roulette wheel, and get a +5v logic signal while the red pocket
is infront of this 'something', and 0v (or close to it) while its not.

The problem is the lighting conditions are indoors, and shadows may be
cast, so i want it to automatically calibrate somehow to these
effects.
The wheel also has a green pocket, which i dont want to triger.

I have a selection of photodiodes i purchased for experimentation -
and im considering how to go about this.

I could use an A2D, like a PIC16f877, it has an internal A2D, but i
think its too slow. My tests show that i can only get a reading every
10ms, i need a lot more than that.

So this is why i would like to make an analogue circuit that would be
'biased' to logic levels, for a simple '1' or '0' depending. But then
the lighting conditions come into play ... also the green may trigger
it.

Im really not sure how to do it.


what if i was to have a red led, and a suitable 'visible light'
photodiode, and take a reading with the led off, then with the led on
(over and over again) and use the difference to workout if its right.
OR compare readings to a 2nd photodiode which is unaffected by the led
output. or something like that - but the problem with that is it needs
A2D, and thats too slow.

The wheel has 37 pockets, and spins at about 2 1/2 seconds per
rotation, leaving me about 15 pockets per second to check - but its
not enough to get '1 pocket per reading', i need a much higher
resolution than that.

Im not sure im explaining it right, but how would any of you go about
setting something like this up ?

Any suggestions would be great!

Alex.
 
T

Tim Dicus

Jan 1, 1970
0
Quack said:
Hi,

I have an interesting task here - i want to sit something on the rim
of a roulette wheel, and get a +5v logic signal while the red pocket
is infront of this 'something', and 0v (or close to it) while its not.

The problem is the lighting conditions are indoors, and shadows may be
cast, so i want it to automatically calibrate somehow to these
effects.
The wheel also has a green pocket, which i dont want to triger.

I have a selection of photodiodes i purchased for experimentation -
and im considering how to go about this.

I could use an A2D, like a PIC16f877, it has an internal A2D, but i
think its too slow. My tests show that i can only get a reading every
10ms, i need a lot more than that.

So this is why i would like to make an analogue circuit that would be
'biased' to logic levels, for a simple '1' or '0' depending. But then
the lighting conditions come into play ... also the green may trigger
it.

Im really not sure how to do it.


what if i was to have a red led, and a suitable 'visible light'
photodiode, and take a reading with the led off, then with the led on
(over and over again) and use the difference to workout if its right.
OR compare readings to a 2nd photodiode which is unaffected by the led
output. or something like that - but the problem with that is it needs
A2D, and thats too slow.

The wheel has 37 pockets, and spins at about 2 1/2 seconds per
rotation, leaving me about 15 pockets per second to check - but its
not enough to get '1 pocket per reading', i need a much higher
resolution than that.

Im not sure im explaining it right, but how would any of you go about
setting something like this up ?

Any suggestions would be great!

Alex.

Hi Alex,

That is an interesting project! Planning on making some money? Can I get in
on it if you are? :^)

Depending on how close you can get the device to the wheel, you may want to
try a reflective transmitter/receiver device like you suggested. Use a red
(or IR if you want to be stealthy) focused laser diode as the transmitter.
Aim it at the pocket. Use a focused photodiode to pick up the reflected
light. Red pockets should reflect much more of the laser diode light than
the green or black pockets.

You may want to consider using a pulsed output on the laser diode (say
40KHz) and a PLL device (LMC568 would be my choice) on the photodetector.
This will help eliminate some of the ambient light challenge you may have.
It may require some manual or automatic calibration to operate correctly.

It seems that an A/D conversion every 10ms (100 conversions/second) would be
fast enough. That would be more than 6 conversions per pocket.

Does that make sense?

Tim
 
G

Garrett Mace

Jan 1, 1970
0
what if i was to have a red led, and a suitable 'visible light'
photodiode, and take a reading with the led off, then with the led on
(over and over again) and use the difference to workout if its right.
OR compare readings to a 2nd photodiode which is unaffected by the led
output. or something like that - but the problem with that is it needs
A2D, and thats too slow.

The wheel has 37 pockets, and spins at about 2 1/2 seconds per
rotation, leaving me about 15 pockets per second to check - but its
not enough to get '1 pocket per reading', i need a much higher
resolution than that.

Im not sure im explaining it right, but how would any of you go about
setting something like this up ?

Any suggestions would be great!


Figure out which color reflects more light; possibly put a red filter over
the detectors to increase the difference. Now place *two* detectors such
that when one detector is reading a green pocket, the other is reading a red
pocket. Now, when you read the two values, you know that the one with the
higher value is going to be the red one. So you compare the values and pick
the higher (perhaps looking for some amount of separation) and the result
should be much more independent of the ambient light.
 
J

~^Johnny^~

Jan 1, 1970
0
I have an interesting task here - i want to sit something on the rim
of a roulette wheel,

Russian technology, perhaps? ;->
 
Q

Quack

Jan 1, 1970
0
Hi Alex,
That is an interesting project! Planning on making some money? Can I get in
on it if you are? :^)

Its actually a legitimate project :).

Its for a results reader/logger.

They do exist already, TCS and Huxley make them, but not to the
specifications we need for this.
Depending on how close you can get the device to the wheel, you may want to
try a reflective transmitter/receiver device like you suggested.

Yes very close, within about 10cm of the ball, 5-10cm to the pocket
(Depending on where we point it) - sitting ontop of the rim, slightly
overhanging. Nice and close is fine.
Use a red
(or IR if you want to be stealthy) focused laser diode as the transmitter.
Aim it at the pocket. Use a focused photodiode to pick up the reflected
light. Red pockets should reflect much more of the laser diode light than
the green or black pockets.

Actually what im using now are two "Balluff laser contrast scanners" -
which i have configured to recognise the red from the other pockets -
these give a pnp output and i use it pretty much directly in my logic.
(PICmcu controlled)

I am also using a SICK proximity switch to detect the ball.

By using two of the above balluff sensors, i can tell the direction of
the wheel pretty much instantly, due to the order in which they 'rise'
or 'fall' (they are pointed next to each other on the wheel).

And by doing some tricky timing i know when the green went past, and
therefore when the above mentioned SICK sensor triggers from the ball,
i know which pokcet its in. (i start an incrementing pocket count from
zero - and then when the ball is found, do a lookup table depending on
the wheel direction to find the result)

So as far as logic goes, i have it all down - working great.

Due to the Balluff sensors using a focused laser diode, reading a
'spot' of color - it must be alligned VERY accurately so as not to see
any 'text' - just the colors. It just so happens that there is a
narrow band of pure color just above the text on roulette wheels, and
this is a great detection spot - but is very narrow, and a good bump
puts things out of allignment :(.

The prototype is actually running in a real casino now - sometimes
weeks without a problem, but then one day the cleaners will touch it..
and i get phone calls.

But that is a prototype - and using pre-packaged sensors is not only
expensive, its very difficult to customise a nice enclosure.

So im thinking of something with a more 'diffuse' nature, so it wont
be so picky about 'precise' positioning.

So before i can go and design a more solid enclosure for the next
version, i want try out some more designs.

I will post some pictures up here today to make things clearer ...

Really i am hopeless with all things analogue - and i find it
painstakingly tedious to try and get things like this working :(. I
really appreciate all help.

Thanks,

Alex.
 
Q

Quack

Jan 1, 1970
0
Some pictures to clear things up;

the wheel pockets, and current laser positions;
www.quack.cc/wheel_numbers.JPG

balluff sensor
www.quack.cc/balluff_sensor.JPG

sick proxmimity switch
www.quack.cc/sick_sensor.JPG

So what im trying to do is remove the necesity to point at that 'spot'
on the wheel - so a more diffuse, perhaps red led/photodiode approach,
instead of focused laser. (as the accuracy of positioning is very hard
to accomplish in the 'real world')

But then this would leave me the wheel direction problem.

Ahh, but if i could detect green independently, then the wheel
direction problem is solved, as on one side of the green its a red
pocket, and the other a black. So by merely asking 'which pocket came
after green' answers the direction of the wheel.

So i also need a seperate circuit to detect green too, as its own
trigger - seperate from red completely.

And then these must work with each other - reading the same pocket at
the same time (or close to it). So as not to interfere with each
other.


I could just spend some time trying to design an enclosure which would
hold the above balluff sensors in a very tight formation - but i think
no matter what, its going to be very common for this thing to get
moved.

Alex.
 
Top