603,888 active members*
4,449 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > Spindle speed optical sensor for Pokeys57cnc
Page 2 of 3 123
Results 21 to 40 of 46
  1. #21
    Join Date
    Oct 2016
    Posts
    29

    Re: Spindle speed optical sensor for Pokeys57cnc

    what is the pokey powered from??
    I think you need a solid 5V supply for starters.
    P.S. why POKEY pin 13? it seems to be the index pin.

  2. #22
    Join Date
    Jul 2009
    Posts
    36

    Re: Spindle speed optical sensor for Pokeys57cnc

    The Pokeys board accepts 5 - 24 volts and I am powering it with a 24v switching PSU. The only other thing on that PSU is the nema 17 motor that turns the tool turret. The Pokeys board has IDC connectors which are mapped to specific functions. I have an IDC break out board attached with a 6" cable. I am connected to the break out board from the provided 5v on pin 1 of the connector. 0v is on pin2 , pokeys pin 13 is designated as the index pulse for spindle speed readout and it is pin 7 on the IDC connector.



    Ok. Here are the test results for the index set up on the bread board.

    1) with 180 ohm on the led and 10k ohm on the emitter. 5v/0v supply from Pokeys IDC breakout and signal attached to pin 13 (pin 7 of IDC on breakout board).

    2) Add 330 ohm resistor and 22 nf cap for filter.

    3) Attach 7414 with .1uf cap

    _______V in_______V out H_______V out L

    1)_____3.65________2.13_________.695
    2)_____3.886_______2.3__________.712
    3)_____3.926_______3.1__________3.1

    Before hooking up the bread board I get 4.89v at the supply on the Pokeys board? They tell you in the instructions that that pin 13 is a 3.3 volt logic and can take a max of 5v and that is what they provide on the IDC connector? They give a thorough description of each type of pin but the description for this type is not very clear other then it has an internal pull up resistor.

    I did the tests with the Pokeys software on and the IO status tab open. I observed the led as I went from high to low. The threshold for Pokeys is 1.7v and the light will go on and off at either side of that voltage.

    I honestly do not understand, with the voltage spread and the waveform I am showing why I need additional filtering? However I would really like to understand why the 7414 is not working. I would also like it to work so that i can go back to Pokey and get them to fix the issue with the index pulse!

    Let me know what you think?

    Thanks
    Jeff

  3. #23
    Join Date
    Oct 2016
    Posts
    29

    Re: Spindle speed optical sensor for Pokeys57cnc

    Good morning Jeff, I don't quite understand what you are measuring with Vin? is this input to the 7414? and Vout high is the 7414 out? if so i think you need to moniter the 5V supply during these transitions because Vout of the 7414 shouldnt wander, it should be either 3.3 or 0.2V

  4. #24
    Join Date
    Jul 2009
    Posts
    36

    Re: Spindle speed optical sensor for Pokeys57cnc

    Volts in is measuring the supply voltage from the pokeys board. As you can see as soon as I connect it to the basic circuit #1 the voltage drops. volts out is measured at the emitter to 0v. #2 is adding the filter and measuring at the same points. #3 is adding the 7414 into the circuit and again measuring the same points. I did not bother to measur the out put of the 7414 as bothe the hih and loe going in were 3.1v and no adjustment of the sensor effected that voltage.( High and low are a result of rotating the black and white disk at the sensor.) I did not adjust the distance of the sensor for any of the tests.

    Hope this explains it?

    Jeff
    Attached Thumbnails Attached Thumbnails 2017-02-27 12.17.21.jpg   2017-02-07 15.24.08.jpg  

  5. #25
    Join Date
    Oct 2016
    Posts
    29

    Re: Spindle speed optical sensor for Pokeys57cnc

    Bingo-the 5V supply should not vary by more than 0.2V at the worst, the std 5V regulator 7905 spec is 50 100 millivolt variance max

  6. #26
    Join Date
    Jul 2009
    Posts
    36

    Re: Spindle speed optical sensor for Pokeys57cnc

    I am not sure I know what that means at this point? I just tried leaving the whole setup is with the circuit complete including the 7414. Remember the only difference in the circuit is the 10k ohm resistor vs the 1k ohm on the emitter. I took my wall wart power supply (5v 1 amp) and attached it to the bread board and disconnected the 5v supply from the Pokeys to the bread board. I energized the circuit and rotated the spindle. I got one or two good readings until the 7414 got really hot so I disconnected the PSU???? I have plenty of 7414's left but am confused as to what I am doing wrong. The circuit is the same as Carstens except for the emitter resistor and the cny37 sensor. The diode resistor I would think is inconsequential? If I were to change the 10k to the 1k he is using would that not increase the current? Also I would loose the high and low output of the cyn70 i am using so the volts into the 7414 would not yield the desired result?

  7. #27
    Join Date
    Oct 2016
    Posts
    29

    Re: Spindle speed optical sensor for Pokeys57cnc

    Another good piece of info, the 7414 shouldn't get hot - it only draws 15 ma,(what are the other 5 inverters connected to??? their other outputs aren't grounded are they?check the wart output first, if good (5V DC)then find whats drawing the current-the POKEY???
    I keep going back to the manual-you are on pin 7 of the encoder connector?(ultra fast enc I ) its marked DIO33? I've gone thru the manual a couple of times and I see as an
    output it can only supply 4 ma but it doesn't say what it can sink.I think you said its set in software as an input?
    can we switch pokey pins for testing? maybe a DI5P? it can take 5.5V and its guaranteed to have a 10k input impedance
    you have waaay too much current draw and I can't tell where it is going. good luck-I want to see this thing work too.

  8. #28
    Join Date
    Jul 2009
    Posts
    36

    Re: Spindle speed optical sensor for Pokeys57cnc

    Jim,

    It looks like I have sucked you in deep(LOL)! I am ready to take a hammer to the board and ship it back to Pokeys direct if I new where they were. I can not test anything as i have lost all connection with the board. I think i mentioned that I could not get it to connect to Mach a day or two ago. This was a problem out of the blue. I finnaly was able to get a connection through the pokeys software. That is how I was able to post the results I sent you. This morning Pokeys support gave me some things to try and now I have nothing! I wiped everythin from the computer and have tried a fresh install and still nothing. I am waiting on them to tell me what to try next. As for the other 5 inverters they are hooked to nothing. It was wired up just like the diagram, =5v on pin14 with the .1uf cap to 0v, 0v on pin7, signal in on pin 1 and signal out on pin 2 of the 7414. The only thing hooked to the Pokeys board is 0v from the bread board for reference and the signal wire to pin 13 from pin 2 of the 7414.

    Looking at the manual all the dp15 pins are preconfigured in the plug in and are unavailable. The only other option would be a d133p and there is no information on them? The DIO33 can be used as an input or an output. Although pin 13 can be reconfigured for something else it is preconfigured to be the spindle index input. I wish i had a frequency generator that put out a square wave but I do not. I have a audio wave generator. I guess I could get complicated and make an oscillating circuit using a 555 timer. and at least test the circuit for performance on the bench?

    The Misses has me tied up for tomorrow and then church on Sunday. My children are on a school trip and will be back in the wee hours of the morning on Monday! I am hopping to get some reply from pokeys and be able to connect up again so we can get this doped out. I don't know how Carsten was able to make this work? I guess the laws of physics are different in Germany?

    Thanks,

    Jeff

  9. #29
    Join Date
    Jul 2009
    Posts
    36

    Re: Spindle speed optical sensor for Pokeys57cnc

    Hi Jim,

    Well I finally got back to where I was before. I had to reinstall my OS and start over. After several tries I am now connected again! The guy who fixed my spindle board suggested I use a 74LS14 to pull the signal more to the low side and he also mentioned it could handle a higher impedance? The signal looks very noisy on the scope and I am not sure what changed. I asked Pokeys how much current pi 13 can sink and they said it was connected directly to the controller chip with a weak pull up resistor between 50k to a 100k ohm? I am not sure where to go from here?

    Jeff

  10. #30
    Join Date
    Oct 2016
    Posts
    29

    Re: Spindle speed optical sensor for Pokeys57cnc

    We had a large current draw and a hot chip last time?. if the POKEY pin 13 is an input by default you should be able to measure any current into or out of that pin directly with your meter set to say 100 milliamp scale , place a 50 ohm resistor in series with the test lead and get less than 1 ma to 5V and less than 1 ma to ground. If its greater than that then something is going on with the pokey settings. the 50 ohm resistor is a limiter in case something is fishy.

  11. #31
    Join Date
    Jul 2009
    Posts
    36

    Re: Spindle speed optical sensor for Pokeys57cnc

    I did as instructed. I used my good bench meter and set it to the 300 ma scale. Using a 50 ohm resistor I got 0.00! The board says it can take a max of 5v signal. should i try it without the resistor?

  12. #32
    Join Date
    Oct 2016
    Posts
    29

    Re: Spindle speed optical sensor for Pokeys57cnc

    both +5V to pin 13 was 0.00 and gnd to pin 13 was 0.00? Perfect! You could skip the resistor but its not necessary-I would put the 7414 back in and check its current draw
    (either +5V in or gnd out) and see what its drawing) or better yet, see what the whole perfboard circuit is drawing-put the ammeter in series w/the 5V supply.
    As far as the noise , oscope from the start to the end-start at the LED (make sure you're not driving the LED with a noisy source. -phototrans out (sounds like you did this already) and of course output of 7414, then maybe we can work on the noise.

  13. #33
    Join Date
    Jul 2009
    Posts
    36

    Re: Spindle speed optical sensor for Pokeys57cnc

    I did this yesterday before your post and I will do the rest today. Here are a couple of scope shots I captured with my camera. I took the cny 70 sensor with nothing but a 180 ohm resistor on the diode and a 10k ohm on the transistor output. I used a 5v 1 amp wall wart PSU and ran the spindle at 800 rpm. The scope is set for .5 v division and 5 ms width, with a 10 x probe. I get an acceptable wave with some ringing on the top. When I attach the signal to the pokeys board I get the garbage you see in the other shots.


    I ordered a few 74ls14 chips as suggested by Geoff at Scope Systems and am waiting for them to come in. I was just wondering what your thoughts were in regard to my findings. If the 10k is causing too much impedance I am not sure what to do. It seams the cyn 70 will not give me a good swing in voltage if I reduce the resistance too much more?

    I was using a separate supply as the on board 5v supply has no specification. The manual says to give the board a supply voltage of 6 - 26 vdc with a min of 2.5 watts ( I am using a 24v PSU ). All of the 5v supply pins share the load placed on the on board 5 v regulated supply.

  14. #34
    Join Date
    Oct 2016
    Posts
    29

    Re: Spindle speed optical sensor for Pokeys57cnc

    that bottom (last)trace looks fine-can you measure the low volts on that bottom trace? I'm guessing thats the cny70 out?
    that trace looks so good I wouldn't need a schmitt trigger!!

  15. #35
    Join Date
    Jul 2016
    Posts
    660

    Re: Spindle speed optical sensor for Pokeys57cnc

    on your scope readings it`s somewhat feeding back sir, did you try opto isolation? because every time you connect it to the input it garbles the square wave signal so something is causing it, it could be solved by opto isolation or input inductive transformer.

  16. #36
    Join Date
    Jul 2009
    Posts
    36

    Re: Spindle speed optical sensor for Pokeys57cnc

    Ok. I did a little rearranging and set up a new sensor. I placed the load resistor on the positive side and then re ran my tests. attached is a scope trace of the new arrangement and a diagram of the circuit. When I attach the signal to the Pokeys I no longer get the garbled signal. The trace is with the signal attached to the Pokeys. In the diagram you can see my voltage swing is much better. Now for the bad news. It still gives an erratic spindle speed in Mach3? The last comment I had gotten from Pokeys, when asking about sink current, was that it was designed for a digital signal????? That is ridiculous! They have a whole blog on threading with an index pulse in Mach4. They are using the same pin and an analog sensor!

    On another note I had thought about trying opto isolation but they require a digital signal?

    I just received 3 74ls14 ic's from element 14. I am not sure what resistor values to use but I think I will try one with the 10k as it is the best signal I have?

  17. #37
    Join Date
    Jul 2016
    Posts
    660

    Re: Spindle speed optical sensor for Pokeys57cnc

    So if it wants a PWM digital signal you can re create it by using only 2 diodes ( one going forward positive side, one going backwards on the negative side) on your outputs to eliminate the negative side of the square wave, if it still does`nt then you need a voltage comparator chip to create the PWM method. you`re almost there sir



    Do the diode method first, if it still does`nt, then you proceed with the voltage comparator circuit to digitize the square wave signal.
    Attached Thumbnails Attached Thumbnails pwm.JPG  

  18. #38
    Join Date
    Oct 2016
    Posts
    29

    Re: Spindle speed optical sensor for Pokeys57cnc

    great square wave! I was reading Carsten's fix (https://www.machsupport.com/forum/in...c,34483.0.html ) and i like adding a lowpass filter 10-20 nf cap on output. I think the POkey input looks for a real fast signal and yours maxes out at 200 hz??-I wouldn't go his route right away cause he also needed to stretch his pulses out and you don't need that, but he also talked about Mach3 (increase the ultra fast encoder filter setting in the mach4 plugin settings to 100) I don't know anything about mach3-i use Linuxcnc and a simple breakout board on my mill.
    EDIT I would keep adding capacitance till my squarewave started to round the corners over like your traces showed in your post #11

  19. #39
    Join Date
    Jul 2009
    Posts
    36

    Re: Spindle speed optical sensor for Pokeys57cnc

    Wow, it's funny you said that. I tried adding a 22nf and then 100 nf and the top of the rising edge just started to round over. Before I added the caps all you could see on the trace was the top and the bottom. I could not even see the rise or fall on the screen? They do have a filtering section in the Pokeys software that I can adjust via a slider. It has no reference number like in 4. I had tried it before but not since I added the 74LS14. I sent the results from my last post to Pokeys support and am waiting for a reply.

    KHOUJ,

    I tried a comparator using an opamp I had laying around and it did not help that is why I am using the 74ls14 hex shmitt trigger.

  20. #40
    Join Date
    Jul 2016
    Posts
    660

    Re: Spindle speed optical sensor for Pokeys57cnc

    Sir can you tell us what`s the exact signal requirement input on pokeys? things like minimum and maximum to variate the speed? sorry for my dumb question sir I have a different field in electronics (communications, repeaters, XOR`s) maybe I can learn from it too

Page 2 of 3 123

Similar Threads

  1. Spindle speed sensor
    By Shishio Makoto in forum Dynomotion/Kflop/Kanalog
    Replies: 6
    Last Post: 01-07-2015, 09:10 AM
  2. Replies: 1
    Last Post: 08-02-2013, 10:07 PM
  3. X2 Spindle Speed Proximity Sensor Placement
    By Steoh in forum Benchtop Machines
    Replies: 5
    Last Post: 01-28-2011, 08:48 PM
  4. spindle speed sensor
    By escowizard in forum Bridgeport / Hardinge Mills
    Replies: 1
    Last Post: 08-22-2009, 04:09 AM
  5. Installation of spindle speed sensor
    By Bloy2004 in forum CNC Machine Related Electronics
    Replies: 7
    Last Post: 01-28-2004, 04:50 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •