Photointerruptor circuit for spindle speed
Hello all,
It's been a while since I was last here...
I'm in a world of hurt trying to wire up some form of spindle speed detection for a lathe.
I've got some Darlington photointerruptors (KTIR0121DS) which I think are the right thing for the job. I want to power them from a 5V supply, and sense the outputs on inputs to a parallel port (the PCPPS breakout board from DIYCNC).
Can anyone suggest the right circuit and resistor values for this?
I've made 3 versions now, and all of them seemed to work OK (swing from 0.6V to 5V when interrupted) until connected to the parallel port inputs. Once connected though the voltages were different, and only moved around 0.2V when interrupted, which is not enough to change the inputs.
I'm clearly doing something wrong, but after 3 attempts to start from scratch and recalculate, I haven't got things running...
Can anyone help?
1 Attachment(s)
Re: Photointerruptor circuit for spindle speed
Here's the circuit I've arrived at. The resistance values are 100 ohm for the led, and 6800 ohm for the sensor. The signal gets connected to the parallel port.
What am I doing wrong?:thumbup:
Re: Photointerruptor circuit for spindle speed
Re: Photointerruptor circuit for spindle speed
Re: Photointerruptor circuit for spindle speed
Thanks for that. I've bitten the bullet and ordered some Optek OPB916B. It seems the processing circuitry is included, so should make life easier...
Re: Photointerruptor circuit for spindle speed
cncdoctor makes an index pulse board which is perfect for this, but last time i looked he was out of stock.
Re: Photointerruptor circuit for spindle speed
I recon those bits will do it... The cncdoctor board looks the business, but in the fullness of time I'm going to want spindle index, spindle pulse, x home and z home, so i was trying to do it simply and cheaply.
Back in the day I'd have sorted that KTIR0121 circuit in my sleep. All forgotten!
Re: Photointerruptor circuit for spindle speed
i've used his board and it works well, but all you need is the sensor and the correct limiting resistor.
1 Attachment(s)
Re: Photointerruptor circuit for spindle speed
Well, that was remarkably easy! 3 resistors, 3 sensors, a case, and an ethernet socket to carry the signals back to the control box. All working happily.
The only problem is I fried 2 inputs on the bob during my misadventures. Are there any options out there other than the diycnc bobs?
Re: Photointerruptor circuit for spindle speed
Worried about saying the obvious.... but have you ever used an Arduino? If I were doing what your doing; my initial tool would be an Arduino...
Apologies in advance if that is a useless comment.
Re: Photointerruptor circuit for spindle speed
I have got an arduino, but I'm not sure it would add anything in this case. I'm just wiring 3 switches up to input pins on a parallel port. All the computing is done er... in the computer:)
The problem was my over confidence with electronics, but the sensors i2i pointed me to are much easier to use.
The arduino is great. I followed a guide on the web to make an RFID door lock. It still amazes me how simple it was when I use it.:)