Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: guynamedbathgate on December 25, 2007, 01:20:06 PM
-
Hello all and Merry Holiday.
I've been trying to hook up a spindle indexer to my lathe and I just cant seem to make it work so Ive decided that the first thing to do is to test the reflective object sensor Im using.
I figured an easy enough test would be to get a small 5volt ac adapter.
first I hooked the positive side of the power supply to the sensor and then attatched a voltmeter between the out put of the sensor and the negetive lead.
then I just pointed the sensor at the sun and watched the voltage jump to 5 vlots then covered it and watched it fall.
so far so good.
now I figured I could test the infer red emitter on the sensor by just conecting the pos and negative leads to the power supply and trying the same test in the dark with a reflective object (hense the reflective object sensing) anyhow I could not get this to function like I had thought. I cant get any voltage change.
I have 2 different sensors and Ive tested them both and cant get either of them to work. so I was curious if there is another way to test these sensors or if Im even doing it properly.
I understand that its an infrared emitter but should I be able to see any kind of light coming out of the emitter ( like old tv remotes) or would I not be able to see anything.
Im using this sensor
http://www.fairchildsemi.com/ds/QR%2FQRB1134.pdf
please help.
-
hmm Im wondering if I blew the LED. am I supposed to use a resistor on this thing to bring the current down or what? I guess trial and error isnt always the best way to go.
any info anyone can provide on hooking these things up would be appreciated.
If I wanted to use a external power supply to run the emmitter. what would be the proper way to hook it up.
again If anyone has any info I would love to hear it.
Chris
-
Chris, check the emitter with your cell phone camera or a digital camera. The image sensors in these consumer goods detect the infrared spectrum. Go on, try it on your TV remote.
Whacko for invisible light
-
And yeah, you got to limit the current, somewhere between 25ma to 60ma
You blew it for sure
Whacko
-
You can always strip the one out of the TV remote. Just make sure you tuned the TV to your preference before you hack the remote! :)
Whacko the hacko
-
Ok well I ordered a new one . so Im doing my best to come up with what size resistor to put in line with this thing but Im having a bit of trouble. I'm ok at assembling electronic components but sizing them Im affraid is not my strong suit.
I have a little 5 VDC, 300 mA ac adapter I was planning to use to power this thing. what size resister should I use in the circuit to power the emitter?
Chris ???
-
I am crap with electronics but are you sure its AC volts you need? thought it would be DC.
Hood
Edit
Ignore me, I must have been seeing things, could have sworn I saw 5VacĀ :o
Edit again
Ah I did in your first post, so I am not going totally mad :) so presume it is a 5V dc?
-
yeah sorry about the cofusion. I just refer to AC to DC adapters as AC adapters . but I really mean. I'm using 5 volts DC. Guess if im gonna keep doing this I better get usedd to calling things by their real names.
Chris
-
I am using the Fairchild sensor, looks like the same one.
If you look back in the posts, you will see a wiring digram for this. Basically the transmitter is wired to a 5 volt supply thorugh a current limiting resistor. This shines down and then reflects back to the receiver.
The diagram shown ( and I am very sorry, but I have forgotten who submitted it, although I enclose a copy here) shows on the input a pull up resistor. The inputs lines to the computer already have pull up resistors, and two proved too much, so I removed it and the sensor works very well. It is mounted above the lathe chuck mounting plate (which I painted matt black) the reflector was from my grand-daughters "stick on" shiny things, and I picked one that was like a small mirror (about 6mm by 6 mm).
I picked off the power supply from my stepper motor drive cards (24 volt) I used a 5 volt regulator on a small piece of circuit card. This is quite adequate and saves any other input to my box of tricks. The regulator runs up to 1 amp, so there is plenty in hand for other sensors or applications.
I found the sensor very sensitive to being the correct distance from the reflector (although if you study it you can see why) - it has to be at 90 o to the spindle, and the beam has to go down the transmitter, then bounce back up the receiver.
Once it is installed and working it is faultless. I have several others ( I think I got four) and I am thinking a replacing my limit/home switches with them, if I can figure out how to mounted them. I think they will be a lot less susceptible to swarf and other little metals which short the terminals of my micro switches.
Jim
-
thanks jim but I have already tied this circuit and have not been successful with it. I,m using Bob campbells breakout board so that could be part of the problem. for its input terminal i has 3 screw terminals.
1 2 3
Ground signal 12 VDC
I have not been able to make that circuit work for that board.
wich is why i decided to go with a seperate power supply for the emmiter. Ive been able to get the signal to the PC to work simply by hooking the the sensor to the signal and ground terminals and shining it at the sun to test it. My index light comes on as it should in Mach so I figure I should just power the emitter with a seperate power supply to save the trouble.
but again Im not sure what size resistor to use on the power supply to prevent blowing the LED again. so If anyone knows how I can achieve this I would be greatful.
again I have a small 5V DC power adapter that out puts 300mA. I figured I could just use it If I know what size resistor to put in front of the LED.
Chris
-
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
-
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
-
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
-
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.