Hello Guest it is March 29, 2024, 02:12:13 AM

Author Topic: testing a reflective object sensor??  (Read 8998 times)

0 Members and 1 Guest are viewing this topic.

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: testing a reflective object sensor??
« Reply #10 on: December 28, 2007, 05:24:45 AM »
According to my maths, you can change the resistor in the supply circuit to a 147K and this will do. However, I still think your easiest way is to wire a 5v regulator to your 0v - 12v pins. This will give a regulated 5 v supply for all your sensors. I don't know why Bob Campbell has gone for 12 volts - since the computer works at 5v - it may be so that it is compatible with CMOS chips as well. (Does Campbells board demand a 12v signal back ??)

The 5v regulators are cheap - a matter of pence (or cents). They have three leads - one to 0v, one to supply volts and the other is the output at 5v (usually slightly under) they are as simple as that. They do not consume any current in themselves. A 1 amp version, or 0.5amp version should be more than adequate.

They are completely transparent to the supply voltage, in that even if that varies, the output remains steady.

You can then use the circuit posted (but don't forget to remove the pull up resistor on the output, you don't need it.
You can test the sensor with a volt meter before connecting it to the computer or fitting it to the mill.

Jim
Not me driving the engine - I'm better looking.

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: testing a reflective object sensor??
« Reply #11 on: December 28, 2007, 05:46:37 AM »
Further to the above (having Googled Bob Cambell designs ) the breakout board also provides a 5 volt power supply. It says this is for the optical isolators on the Geeko drives. Why not use this - the sensor you are using is only a form of optical isolator - the isolator is a package that generates a signal and shines it across to a reciever - you are generating a signal and shining it to a reciever (albeit via a mirror) they are identical - use the 5 volt supply on the board.

I would have to have a look at Campbells circuit diagram to understand where you have to put the input. Can you wire direct to the computer pins. The input he has provided with the 0 - 12v supply is for proximity devices and it then says the signal is converted back to 5 volts. You don't want that input - you are already at 5 volts ( in fact your device is not at any voltage if you remove the pull up resistor. All it does when the signal shines on it is ground the signal wire (0v)). See if there is a pin on the breakout board to put the signal directly to the computer (pins 10 - 13, 15). Test the input pins, they should be at 5v (i.e. they have pull up resistors). If on Campbells board the inputs are a bit indeterminate, then you may have to include the pull up resistor as per the original circuit.

I hope this is not too much waffle
Not me driving the engine - I'm better looking.

Offline TonyP

*
  •  132 132
    • View Profile
Re: testing a reflective object sensor??
« Reply #12 on: December 28, 2007, 06:26:01 AM »
Jim,

sorry to disagree, but I think you've slipped a decimal point or a unit. For a 5v supply and a diode current of 25 - 30mA you'd need around 160 ohms. , allowing for a forward diode drop of about 0.9v.

Tony

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: testing a reflective object sensor??
« Reply #13 on: December 28, 2007, 09:05:06 AM »
Tony - Yes- I have done it again - a very rough voltage for voltage calculation gives 3K and a more complcated one gives 1k140. If I were to use 12 volt supply I would try 3k and work down until I got optimum performance. It seems to indicate in the spec that the voltage drop over the diode can be up to 1.7 volts - ANYBODY ELSE LIKE A GO.

I don't think it is relevant, however, because there is a 5 volt supply available on the card. Use the resistor shown, which I know works because thats what I used.
« Last Edit: December 28, 2007, 09:31:14 AM by jimpinder »
Not me driving the engine - I'm better looking.