Spindle speed optical sensor for Pokeys57cnc


Page 1 of 3 123 LastLast
Results 1 to 20 of 45

Thread: Spindle speed optical sensor for Pokeys57cnc

  1. #1
    Member
    Join Date
    Jul 2009
    Location
    USA
    Posts
    36
    Downloads
    3
    Uploads
    0

    Default Spindle speed optical sensor for Pokeys57cnc

    Hello,

    I am retrofitting a D&M CNC mill. I have installed an auto draw bar and a rotary tool changer. I have gone through a lot of electronics and have changed directions several times. I am a bit frustrated and am hoping someone might be able to guide me in the right direction. I abandoned all the "cheap Chinese stuff" as advised by many and am now worse off than before! I am now tying to make a go with the Pokeys57cnc sold as Mach3 compatible with included plugin. The after sale sales pitch is to abandon my 7 years of experience with Mach3 and buy Mach4! Learn new software and re-script everything of done In Mach3? Sounds like more fun then a barrel of monkeys!

    The Poykeys57cnc states in its manual that pin 17 is assigned to the spindle speed sensor. It specs the pin to be a 3.3 v logic that accepts .8 v low and 2.2 v high. It can take a maximum of 5v as that is the supply voltage they provide for the sensor you use. I am using a CYN70 reflective sensor and have wired it to supply .5 v low and 4.85 high.

    Here is the issue I attach the signal to pin 17 on the Pokeys board and it becomes 1.25v low? I e-mailed back and forth with support and was told there is a weak pull up resistor on all of their pins. I have tried using an op amp as a voltage controlled schmitt trigger and the low is worse. I have tried every resistor combination along with a voltage divider to bring the signal low enough to overcome Pokeys pull up resistor. They started to try and help through support and today e-mailed me that they do not offer electrical engineering services for free and that the problem was outside the scope of their support.

    I asked for a solution to a problem they created. Tell me what sensor to use or what to do to get the signal low enough for their design? If you specify a pin and claim its use is for a speed sensor and configure it as such in a Mach3 plug in it should work. In addition it should be supported. I will use whatever it is they had in mind that will satisfy Mach3 requirement for single pulse and Pokeys logic low. It appears they did not plan for this or I would get an answer.

    Sorry for the rant. Can anyone help me to figure out what components I need to assemble to convert the analog signal to a digital one. If not, can someone tell me how to get closer to the 0v rail before I attach the signal to Pokeys board.

    Attached is a photo of the machine and a diagram of my last attempt. Any help here would be greatly appreciated. I have seen others use this same sensor with Mach3 and it is why I selected it.

    Thanks for looking,

    Jeff K.

    Similar Threads:
    Attached Thumbnails Attached Thumbnails Spindle speed optical sensor for Pokeys57cnc-741opa-pdf   Spindle speed optical sensor for Pokeys57cnc-cyn701-pdf   Spindle speed optical sensor for Pokeys57cnc-2017-02-07-15-24-08-jpg   Spindle speed optical sensor for Pokeys57cnc-2017-01-31-16-53-47-jpg  

    Spindle speed optical sensor for Pokeys57cnc-2017-01-31-16-53-35-jpg  


  2. #2
    Member
    Join Date
    Oct 2016
    Location
    United States
    Posts
    29
    Downloads
    1
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    My read of the pokey manual looks like pin 17 is Galvanically isolated 0-10 v analog out-Doesn't look like this pin can be switched to an input.
    P.S. I can't see first two attachments
    Jim



  3. #3
    Member
    Join Date
    Jul 2009
    Location
    USA
    Posts
    36
    Downloads
    3
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    Jim,

    Thanks for the reply. I mistakenly stated pin 17 as I was having problems with that earlier. The pin in question is pin 13 on the encoder connector. The pi is working but the problem is it pulls up the low signal of the sensor.

    Thanks,
    Jeff



  4. #4
    Member
    Join Date
    Oct 2016
    Location
    United States
    Posts
    29
    Downloads
    1
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    Ok, that makes more sense, next I think for starters I would drive the sensor thru a 100 ohm resistor to get the drive current up a bit-18 ma is kinda low to drive the photo trans into saturation,also 39k in series with the phototransistor limits current to way less than 1 ma, i would bump that down to 4.5V/5 ma = 8 to 10k. next your 741 as a schmitt trigger is messed up a bit, might be in oscillation can't tell without an oscope but is definitely not swinging low enough to turn off pin 13. You are running pretty close to the LM741 minimum supply of 4.5V and they don't go rail to rail, a real schmitt trigger chip would probably be a better choice- Also I think the 1k resistors on the noninverting input are swamping the feedback-try switching all 3 resistors to 10K ohms or just try the new opto sensor resistors directly without the 741 and take some new measurements-need to get below 0.8 V for low input on pin 13.
    a sn7414 inverting schmitt trigger would be perfect.

    Last edited by jimairth; 03-21-2017 at 12:18 AM.


  5. #5
    Member
    Join Date
    Jul 2009
    Location
    USA
    Posts
    36
    Downloads
    3
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    Hi Jim,

    Thank you for the reply and the explanation. I had originally tried 10k ohm on the sensor and was only able to get the signal to .9v low? I decided to bread board the circuit again and hook it directly to the Pokeys board. I used a variable resistor and attached it to the board. I then opened the Pokeys software and went to the IO status tab. On the status tab are leds that report status in real time. I place the sensor on the black portion and lowered the resistance til the light went out. I then placed the sensor on the white surface and the light came on. I pulled the variable resistor from the bread board and measured it. Surprise, it was 11k ohm! I put a 10k ohm on the bread board and all looks good when operating by hand.

    I have suddenly developed a problem with the spindle control board and ended up sending it out for repair. I hope to have it back by Friday so I can test the sensor at rated speed. If it dose not work I think I will add the schmitt trigger you suggest as I am concerned that I am too close to the threshold and that the hysteresis will have an effect at higher speeds? Even though Pokeys indicates that pin 13 is 3.3 logic and requires <.8v it is working with .9v low with the 10k resistor? I have had the low signal lower with a lower value resistor but then the high signal becomes too low. The Pokeys board only seems to pull up the low signal and has very little effect if any on the high. I wish I had a better understanding as to why?

    Thank you again for the suggestions as they prompted me to do more testing. I had only used the 741 op amp because that is what I had on hand. I was not very familiar with op amps and comparitors before this. I did a lot of reading and bread boarded the circuit with variable resistors. I played around with the resistor values to get to the point you saw in the diagram. I really only know enough to not let the magic smoke out! I am ashamed to say but I had inadvertently reversed polarity on the SLO-SYN drives that came with the mill (very expensive smoke). I ended up having to buy new replacements so I went with gecko drives. I also purchased a used Tek scope and am trying to learn how to use it as well. I have reworked the electronics on this project too many times! When the spindle board comes back and I test the set up I will report back to you how it went.

    Jeff



  6. #6
    Member
    Join Date
    Oct 2016
    Location
    United States
    Posts
    29
    Downloads
    1
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    the pokey board is not doing any pulling-its a high impedance input-the problem is using bipolar designs (LM741 ) has a 0.7 volt voltage drop when on so you cant get closer to to zero than 0.7 V across the collector to emitter ( when transistor is fully on it still has 0.7v drop across itself Collector to Emitter. good luck-it looks like a great project
    Jim



  7. #7
    Member
    Join Date
    Jul 2009
    Location
    USA
    Posts
    36
    Downloads
    3
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    Jim,

    Thanks again! I actually understood that. BTW I looked at the sn7414 with interest while I was struggling through. Do you no of a through hole configuration of this chip? I guess I could solder the pads to some perfboard if the spacing is correct or etch a custom board? But I'd rather not have to. New tech is killing me as I'm trying to catch up to the old stuff. The radio frequency welders here at work are from the 60s with cloth covered wires!



  8. #8
    Member
    Join Date
    Oct 2016
    Location
    United States
    Posts
    29
    Downloads
    1
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    Digikey 296-1577-5-ND SN74HC14N there are 6 in there



  9. #9
    Member
    Join Date
    Jul 2009
    Location
    USA
    Posts
    36
    Downloads
    3
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    Hello Jim,

    Well I got the spindle board back and it is working. There was a small fuse soldered to the board for control circuitry. I thought I had checked it but I guess I should have de-soldered it from the board. Any way I purchased the Ics you had suggested and made a small circuit board and I must be connecting something incorrectly as it did not work? I then made a second board with just the two resistors, 220 ohm and the 10K ohm. I am at .5v low and 2.1 high. I started the Pokeys software and checked the IO status and the led for pin 13 goes on and off as it should when turning by hand. I then went to Mach3 and and started the spindle and the speed registers in the 100,000 range?

    I rechecked all of my settings and can find nothing to change to help the situation? I decided to bring my O scope to work to see if I could determine the problem. I am not very experienced with a scope but was able to get a steady square wave on the screen while running the spindle between 500 and 1500 rpms. The scope is a Tek 2232 two channel. I was set on 10x on the probe at .5 volt/div and 2ms div. There is noise at the top of the wave but it is a pretty sharp square pattern.

    I am at a loos as to where to go from here. The guy who fixed my spindle board said it was already set up for armature feed back and should maintain speed and torque within a reasonable range. I can spin the spindle at mid range where torque should be good but when I grab the spindle with my hand I can slow it down easily? I think I am back to where I need to figure out how to incorporate the closed loop PID.

    I need to figure out how to get the index spindle timing to work properly first! I am hoping you have some thoughts and or a direction you can send me in as I have exhausted my resources at this point.

    Once again any help you could provide will be greatly appreciated. I attached a PDF files that show a pictorial representation of the two circuits I had made.

    Jeff

    Attached Thumbnails Attached Thumbnails Spindle speed optical sensor for Pokeys57cnc-schmitt-pdf  


  10. #10
    Member
    Join Date
    Oct 2016
    Location
    United States
    Posts
    29
    Downloads
    1
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    sounds like you are almost there, I looked up the 7414 data sheet and the test values call for a 2k load resistor to ground on ouput as well as 15pf cap.
    should have a 0.1 uf cap to vcc to gnd and possibly adding the same to the sensor output to kill the motor noise-you could get a great square wave manually rotating the spindle, but when energised may throw a bunch of noise on output. heck put .1 uf across all three resistors and see if it cleans up that square wave.



  11. #11
    Member
    Join Date
    Jul 2009
    Location
    USA
    Posts
    36
    Downloads
    3
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    Well I tried everything and nothing seems to work. As for the 7414 I have had no luck even getting a Hi or lo signal? I bread boarded it and added the load resistor and the 15pf cap and it tis the same. I am going to borrow a frequency generator and see what I get with a know signal. That aside I left the original set up with just the resistors in it hooked up I added a .1 uf across the signal to ground and it had no affect. I then added another one across the supply, but can't imagine how that would have any effect to the emitter of the phototransister? It had no affect.

    I realized I ran the cable through the same hole as the dc power cable to the motor. In addition It was also inside the spindle housing close the the motor. I de-soldered the connector and pulled the cable out. I re-soldered the connector back on and still no change. The signal cable is not near anything that would induce interference.

    I tried to take a couple photos of the O Scope screen, They are attached here. The first is at 3000 rpm, the second is at 800 and the last is at 600. I don't know much about the shape but it seems acceptable to me? Let me know what you think?

    Thanks,

    Jeff

    Attached Thumbnails Attached Thumbnails Spindle speed optical sensor for Pokeys57cnc-dsc00632-jpg   Spindle speed optical sensor for Pokeys57cnc-dsc00630-jpg   Spindle speed optical sensor for Pokeys57cnc-dsc00627-jpg  


  12. #12
    Member
    Join Date
    Oct 2016
    Location
    United States
    Posts
    29
    Downloads
    1
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    those traces look great to me, they are from the output of the 7414 i assume? before or after the caps installed? (just so I can learn a little too)
    I was reading the pokey manual a little- there is a lot of settings in there!! What do you have pin 13 set as in the encoder configuration?
    and how is the cheetah board connected to the pokey board?



  13. #13
    Member
    Join Date
    Jul 2009
    Location
    USA
    Posts
    36
    Downloads
    3
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    No! I could not get the 7414 to output anything but a steady 1.25v. I don't think I was using the proper resistor capacitor combination? The trace is with the two resistors for the cyn70 and a .1uf cap across the signal and 0v. The filter cap had little effect if any!

    The pokeys manual is a bit confusing and almost seems contradictory. I say this because you need to look at the plug in manual as it has much fewer settings. You are not able to use a lot of the settings in pokeys outside of Mach3 plugin. There was a post in the Mach support forum about this problem. The poster used a different sensor but with the 7414 for filtering. He finally solved his problem with some setting adjustments but they were in the Mach4 plugin and Mach3's plugin dose not have those settings. Every time I try to post over there it gives me an error and then when you try to post later it says you have already posted yet it has been 48 hours and I do not see my post?

    I sent a new ticket into Pokeys support and hope they will answer today! Sometimes you get several reply's in a day and other times you need to wait a few days? They are real slow with Mach3 problems as they are expending all their efforts on Mach4. I have several machines running Mach3 and am reluctant to trade one set of problems for a different set. I purchased the board from Arturo at CNC4PC and he tried to help with some of the issues but would prefer I switched to Mach4. I would then have to learn LUI language and rewrite all of my visual basic scripts.

    I built a tool changer and wrote the script for it and it works well except it will not do a tool change in MDI? It works great inside a program though? Well I digress I need to solve this problem so I can move on to the next one. I am still trying to decipher Poblocks so I can figure out how to make the spindle closed loop with PID. They do not support it but say it can be easily done with Poblocks. I say everything is easy if you know how!!!!

    Thanks,

    Jeff



  14. #14
    Member
    Join Date
    Oct 2016
    Location
    United States
    Posts
    29
    Downloads
    1
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    1.25 V is not either of the 2 possible outputs for the 7414!! -is the pokey terminal 13 set for an output vice input?
    Your square wave looks perfect-drop the caps and 2k output resistor on the 7414.
    try disconnecting the pokey term 13 and hook the oscope up to the 7414 output solo-to make sure the 7414 isn't blown.
    if it is at least you have 5 more to play with!!



  15. #15
    Member
    Join Date
    Jul 2009
    Location
    USA
    Posts
    36
    Downloads
    3
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    Well I am fried! I just don't understand what I am doing wrong. Pokeys plugin only gives the option of Index pulse input! I stayed late after I received your post and bread boarded the 7414 again. I had read a post over at the Mach form (PoKeys57CNC, spindle speed measurement jumps like hell) and this guy had the same problem but was using Mach4. If you have the time please take a look. It is one paragraph and a schematic with photos of his scope trace. His trace was better then mine before he added the 7414 and he was having problems.

    I tried his schematic on the bread board and it was a no go. The only difference is he is using a cyn37. I think I am using the wrong set of resistors and caps and am having a current problem. I am guessing here? My power supply for my bread board is a 5v 1 amp wall wart. I have a bench supply but I don't drag it out for a small circuit. Am I feeding the 7414 too much current and blowing it? I can not find a max current for the supply voltage. It just says 7v max. I tried all three that i had purchased with the same results. 4.5v with the new layout.

    I came home tonight and looked through my component drawers thinking I would try a two transistor schmitt trigger. I found a dozen 7414 I did not know I had! I waited three days for the one's I ordered.

    I told you I posted to Pokeys support. They replied with a copy of the guys schematic I am asking you to look at! I replied back that I already did that and then they told me to go out side the Mach plugin and try adjusting the filter slider for fast encoders? I did that and it had no effect so I replied with that.

    I'm lost and am wondering why this seems so difficult?

    Jeff



  16. #16
    Member
    Join Date
    Oct 2016
    Location
    United States
    Posts
    29
    Downloads
    1
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    Carsten's circuit looks fine-putting the load resistor on the other side of the phototransistor allows you to get closer to 0volts when off at the expense of a lesser on voltage. note that he is using 1k ohm load resistor to bump up the current, higher currents tend to swamp out any noise and improves the delta V between on and off of the phototransistor
    the 0.1 uf cap on the 5V supply is common and a good practice. low pass filter looks good as well, but i would still like to see an oscope trace on the 7414 output when connected and unconnected.
    the 7414 hardly draws any current- 10-20 ma, any 5 V source would do.
    edit-i'm still confused on the 1.25V output of the 7414, could you be in oscillation? oscope would show that.

    Last edited by jimairth; 03-28-2017 at 11:59 PM.


  17. #17
    Member
    Join Date
    Jul 2009
    Location
    USA
    Posts
    36
    Downloads
    3
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    Jim,

    I came in early to breadboard the circuit as Carsten drew it. I decided to power it with The pokeys board and then check it with the scope both connected and disconnected. I

    I had powered down the system last night and shut down the computer. I finished the circuit and started the computer, powered the system and warmed up the scope. I went to connect to the pokeys board and When I started Mach3 no Pokeys found! Closed out of Mach and went to the Pokeys software and no Pokeys found. I have but a few hairs left on my head to pull out!!!

    I had to restart everything and attach the Pokeys via USB as it no longer recognizes Ethernet?

    Back to the test. No good! I get a flat line steady dc signal. I tested after the 1k ohm resistor with the rest of the circuit disconnected and I get no voltage swing. The problem is the CYN 70 must have a different rating then the CYN 37 he is using? As for the led resistor the higher the resistance the lower the current. The CYN 70 need somewhere in the neighborhood of 180 - 220 ohm to be bright enough to reflect back to the photo transistor. As to the photo transistor's load, 1K ohm is not enough to get a swing in voltage to feed the input of the 7414. The original load I started with was 33K ohm and it looked great until I connected it to the Pokeys board. After much back and forth with Pokeys support it was determined that the 33K ohm caused too high an impedance. Reffering back to the CYN 70 data sheet I decided to use the 10K ohm they show in there example. After doing so and then adjusting the distance of the sensor to the black and white surface I finally got what you saw on the scope.

    Now when I hooked that signal into the 7414 I got 1.25 v. If I add the Carstens filter before the 7414 and the .1 uf cap I get 3.05v. If I change the load resistor from my 10k to 1k I get over 4v. No matter what I do I get a steady dc signal from the 7414??????????

    So now I am back to square one with Pokeys with no Ethernet connection! and I am still in electronic hell with feed back and I am sure they are going to get frustrated with me again.

    I do diagnostics all day at work to determine the cause of a problem. I always take the scientific approach and try to determine what variable changed. when I attempt to repair the problem or process I try to stick to one variable at a time. Not having the knowledge base in electronics I feel like I am stabbing in the dark.

    I am so sorry for the long post and I hope you are not growing weary of trying to help me. I really do appreciate all your help thus far.

    Jeff



  18. #18
    Member
    Join Date
    Oct 2016
    Location
    United States
    Posts
    29
    Downloads
    1
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    Well, this IS confusing for an armchair quarterback- if the 7414 output is disconnected from the pokey then the only 2 states it can output iare 0.3 V or 3.3 V, if its anything else
    then its broken-maybe only 1 inverter maybe all of them(if the 5V supply was bad)
    I like your approach-1 thing at a time-lets return to what works-10 k load resistor on photo transistor-verify it works
    2. switch load resistor to emitter side-check on and off volts(this will bring the off volts down which I think was part of the prob initally)



  19. #19
    Member
    Join Date
    Jul 2009
    Location
    USA
    Posts
    36
    Downloads
    3
    Uploads
    0

    Default Re: Spindle speed optical sensor for Pokeys57cnc

    I am sure this is equally frustrating for you at this point as you have to trust I am setting things up correctly! I did not address the comment you made earlier about the load resistor on the collector side as I looked at the schematic and it was on the emitter side. the only difference I saw was that he placed the current limiting resistor for the diode on the +5 volt side and I am on the 0v side. I was under the impression it did not matter what side the current limiting resistor was on?

    Ok while I was typing this I turner the power back on and started working backwards. I am getting all kind of readings! with the caps and filter inplace the 5v supply from the pokeys board dropped considerably. As I started to work the circuit back and the voltages changed you need to adjust the distance of the sensor to get a high and low reading.

    I need to do this in a logical order starting with the working circuit. BTW when I hook the sensor wire to the Pokeys board all of my voltages changed again. I think I need to do this one step at a time with the supply coming from the pokeys board and the sensor line connected to the board as well. I can then record the supply voltage and adjust the sensor and record the high and low. Then add the filter circuit and record the same measurements, readjust the sensor distance and record the same measurements again. If I can get that far I can then add the 7414 and follow the same procedure. I will report back the results.

    If I am forgetting something please let me know? In the end I can replace the resistors with variable ones on the bread board so we can adjustments on the fly?

    Thanks again for the patience!

    Jeff



  20. #20
    Member
    Join Date
    Oct 2016
    Location
    United States
    Posts
    29
    Downloads
    1
    Uploads
    0

    Default 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.



Page 1 of 3 123 LastLast

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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Spindle speed optical sensor for Pokeys57cnc

Spindle speed optical sensor for Pokeys57cnc