Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: hoggy on July 13, 2006, 02:31:22 PM
-
Hi All,
Have just finished cnc taig lathe,petol here in the uk but would very much like to add cnc screw cutting ,am now stuck with the problem of spindle encoder(lack of knowledge) here's the one's I have been looking at,don't know if it will do the job or what one or what one to go for RS Stock no: 301-8442 ,RS Stock no: 303-1192 ,RS Stock no: 455-8020 ,so do these not need a PCI encoder interface card if not how do you wire it all up to mach3 pins,do I need a resister etc,if so which one, a diagram would be a great help. ,sorry for my lack of knowledge on this, am ok on the machine side of things ex toolmaker but know bugger all about the rest.
Regards Steve
-
I used this one for my mill 455-0896 for both a speed sensor and also a limit switch for the Z Axis. You also need a 220 ohm resistor.
Hood
-
Many Thanks Hood,
Have you a diagram of how to wire it into mach 3,as this is something I know very little about.
Steve.
-
I made up a wee circuit board to connect my limits and spindle sensor so my wiring diag will not do for you but its fairly straightforward. If you get the sensor I used you connect the green and black wires to ground, the white wire to 5V the Red wire is connected to the 5v through a 220 ohm resistor and finally the blue wire is connected to any of the input pins on the parallel port (breakout board) I got my 5v and ground from my breakout board. All you then need to do is enable the Index on Inputs page and set it to the pin you connected to.
Hood
-
Great stuff,
Many thanks Hood,
Just so I make sure I get this right both the white and red wire are to +5v,but only the red one goes through the 220 ohm resistor?,also is it then just a case of having a disc spinning on the back of the chuck with one slot in it i.e 1 pulse per rev,or is it a white painted mark.
Steve.
-
yes thats correct and yes a disc with a slot is all you need. I have a 10mm wide slot and it works great. See pic of the setup on my mill.
BTW a big thanks goes out to John Prentice for helping me out with this when I was starting up.
Hood
(http://mysite.wanadoo-members.co.uk/hoodsmachiningpages/BOSScomplete/SpeedSensor.jpg)
-
Many thanks Hood,
This has saved me many hours of searching and head scratching.
Thanks Again
All the best
Steve.
-
No problem, just passing on the knowledge that John P passed to me :)
Hood
-
Hi, I just purchased the speed sensor 455-0896 from RS, but I'm having a little trouble getting it to work, I've connected it as described using a old mobile phone charger 5v dc for testing. I'm connecting my multi meter to the negative and to the blue wire but I don't see any output. Is there something more to this circuit?
Any information would be gratefully received
Regards
Dale gribble
-
Did you remember the resistor for the LED side?
Hood
-
Dale,
Check the output from your charger, some phone chargers don't put out anything until connected to a load such as a flat battery.
Tweakie.
-
i've used one of these before, and they work well.
http://cncdoctor.co.uk/index-pulse_62.html
-
Hi all, thanks for the reply,
I have checked there is 5v coming from the power supply, I also remembered to add the 220k resistor. I have rechecked the data sheet Manufacturers Part No. OPB916B
( http://uk.rs-online.com/web/search/searchBrowseAction.html?method=searchProducts&searchTerm=455-0896+ )
from RS website and from reading hoods description I think I can make a little sense of the circuit. 5v power goes to power the led and the sensor with a resistor across the sensor 5v input and the output wire. if that's make any sense to anybody. if only i could upload an image. It's late now here in the UK. I'll try again tomorrow with the resistor across the white and blue wires.
P.S. thanks for posting the link for cncdoctor, if I can't get this circuit to work I'll purchase one from them.
-
See attached pic, if you didnt have the resistor in line with the red you may have blown the LED.
Hood
-
Hi hood,
I've upoaded a photo of my test set up, this is how I,ve had it set up from the start. Is it correct?
Regards
Dale gribble
-
I have checked there is 5v coming from the power supply, I also remembered to add the 220k resistor.
Ah ... better check the specs again. I think that resistor is the current limit for the LED, and it should be 220 ohms, not 220 kilohms.
Cheers
-
Bingo it work's, I didn't have a 220 ohm nearest i had was a 250 ohm and it worked perfect.
Thanks rcaffin and everybody that contributed.
Regards
Dale Gribble ;D
-
Hi, I'm back for some help, I've got the sensor mounted and can see with my meter 0 to 5v when i manually turn my spindle. The problem is when I connect it to my BOB pin 10 the volts drop to 1.1v to 0. Not enough for a high signal. I've taken power from the 5v pin next to pin 10 on my BOB. Do I need to power this with it's own supply. I've added an image of the sensor and my BOB. Any information would be gratefully received.
Regards
Dale gribble
-
Dale,
Try setting the 'pull up / pull down' jumper for pin 10 (input configuration) to the opposite of what it currently is.
Tweakie.
-
Hi, I tried in mach input setting, active hi and low. it made no difference. If you are referring to the BOB the model i have only has built in pull down resistors. I since add a separate supply and this seems to work I can see a clean 5v - 0v on my meter. problem now is i seem to have blown my BOB with all this messing around. Just another in joyable day in the life of owning a cnc.
Thanks
Dale gribble
-
You may already be doing this but if powering externally you will likely need to connect the 0v of your supply to your BOBs 0V.
Hood
-
Hi Hood, Got machine back up and running again, found blown fuse's on my drives, BOB is working okay. Just tried running mach with index sensor on, but no input signal on mach's diagnostic page. thanks for the heads up on the 0v common on my BOB I'll give that a try tomorrow.
Kind regards
Dale gribble
-
You remembered to set the correct pin and port for the Index and also enable it?
Hood
-
Hi, yes I entered in the correct pin and port number. I'll have another go tomorrow with the 0v common on the BOB.
Regards
Dale gribble
-
Hi Dale
We really need a bit more information than you have provided so far. I see that the BOB uses pull-DOWN resistors on the inputs: the optical interrupter circuit you have may be designed for pull-UP resistors. They are not really compatible without some little interface or redesign. Perfectly possible to do; but more info needed.
Cheers
-
Hi, Ok I've had another go this morning, I'm getting strange results, I've tried using an external power supply which give the same result as the on board power, which is when connecting the 0v to common on BOB volts drop on my input wire (blue) pin 10 from 5v to 1v. I have no ideal what going on any help would be gratefully received
Regards
Dale gribble
-
It could well be as rcaffin has said, I am not an electronics guy so I will leave that up to others. One thing though is if you have a second parallel port you could easily connect via that, take the power from a USB socket or a 5v molex in the computer and just put the input direct to the port, thats the way I did it on my first mill.
Hood
-
Hi,
Hood I don't have a 2nd port so that option is not available to me.
Rcaffin what info do you need? As you can tell I have limit knowedge of electronics's. do i need an additional circuit to maybe switch to and from 0v - 5v using the output wire from the sensor.
Kind regards
Dale gribble
-
Might be worth looking at another port if other methods dont work. As long as you have a PCI slot free then the ports are cheap enough, heres one
http://cgi.ebay.co.uk/High-IEEE-1284-Parallel-Port-PCI-Printer-I-O-Card-UK-/270695334553?pt=UK_Computing_ComputerComponents_InterfaceCards&hash=item3f06b30299
Hood
-
Hi,
Thanks hood for the info and maybe I might need to go down that route of a second parallel port. But I have been doing a bit more research and think I might have found a solution, it is to use a transistor as a switch. Here's what I thinking. I'll power the sensor with it's own 5v supply, I will use the blue output wire from the sensor and connect this to the base to switch the transistor on and off. I'll connect the 5v from my BOB to the collector and then connect the emitter to input pin 10 on BOB. I've uploaded a image of the circuit i found online. If anybody can confirm I'm moving in the right direction I would much appreciate your input.
Kind regards
Dale gribble
-
it is to use a transistor as a switch.
Yes, that is the right approach. But the exact circuit shown may not be the right or best one for your case. What I need is a bit more information about the optical sensor you are using - like the circuit diagram for it, or whatever information you have. Your problem is certainly fixable, and without much effort, but the details matter.
I'll power the sensor with it's own 5v supply, I will use the blue output wire from the sensor and connect this to the base to switch the transistor on and off. I'll connect the 5v from my BOB to the collector and then connect the emitter to input pin 10 on BOB. I've uploaded a image of the circuit i found online.
Well, what you describe may work, but it is different from the circuit diagram you posted.
Fwiiw, yes, I have about 40 years experience with electronics.
Cheers
Kind regards
Dale gribble
[/quote]
-
Hi rcaffin, I uploaded the data sheet for the sensor.
regards
Dale
-
OPPS... forgot which model it is
OPB916B
Regards
Dale
-
Hi Dale
OK, good sensor.
Um ... I was going to attach an image showing how to wire this up, but apparently I can't actually upload pictures to this site????
OK, doing it the long-winded way.
You need to convert what is essentially a signal referenced to the +5 V rail to one referenced to the Ground.
Connect 220 ohm resistor from Red Anode to White Vcc (done already?).
Connect Black Cathode to Green Ground (done already?)
Connect Green Ground to BOB ground (done already?).
Connect White Vcc to +5 V on BOB - assuming the BOB has a suitable output pin. (It should not affect the BOB at all.)
Connect Blue output to base of a small NPN transistor which you supply.
Connect Collector of small transistor to White Vcc.
Connect Emitter of small transistor to Input Pin on BOB.
Test with voltmeter and then Mach Diagnostics.
Cheers
-
Use the additional options button on the reply page to attach images etc.
Hood
-
Ok, let's see...
-
Hi Rcaffin, thanks for the info, If I can find a transistor I'll have ago tonight. I well update the forum with my results.
Many thanks
Dale gribble
-
Hi Rcaffin, I'm just being over cautious before I wire up my sensor. I've altered your diagram just to make sure I'm doing the right thing. If you could have a look at it and make sure I'm on the right track.
Kind regards
Dale gribble
P.S. I found a 2n3904 transistor I hoping to use for this circuit
-
I've altered your diagram just to make sure I'm doing the right thing. If you could have a look at it and make sure I'm on the right track.
P.S. I found a 2n3904 transistor I hoping to use for this circuit
Hi Dale
* The circuit diagram for the BOB did say it had a pull-down resistors on every input, so *in theory* you should not need an extra pull-down resistor. However, the diagram did not say what the value of the resistor is. If the circuit works at low speed but seems unreliable at very high speed, add a 1 kilo-ohm resistor from emitter to ground.
* The 2N3904 is an excellent transistor for this job.
* The use of an external +5 V supply is no problem. Personally I doubt it is needed just for this one thing, but if you have other things to hook up it is always a good move to have the extra capacity there. You must join up all the 0 V connections of course.
We confidently await a loud cry of joy ... :-)
Cheers
-
Hi,
Still puzzled. I've connected things as you describe and am getting a clean signal from the emitter when it is not connected to the input on the BOB. as soon as I connect to the BOB it drop's to 1.5v. Just to clear up I'm not doing anything stupid on my part, I taking 5v from a pin on my BOB (next to pin 10 on BOB) to give 5v to the sensor and to the collector on the transistor.
Kind regards
Dale gribble :'(
-
I've connected things as you describe and am getting a clean signal from the emitter when it is not connected to the input on the BOB. as soon as I connect to the BOB it drop's to 1.5v. Just to clear up I'm not doing anything stupid on my part, I taking 5v from a pin on my BOB (next to pin 10 on BOB) to give 5v to the sensor and to the collector on the transistor.
Hi Dale
No worries. We'll get there.
It may be that the 10k pull-up resistor in the OPB916B cannot send enough base current into the 2N3904 to pull the emitter any higher than 1.5 V, but I find that rather hard to believe if everything is per the book. You see, with 1.5 V on the emitter that's 2.1 V on the base, or 2.9 V across the 10 k pull-up. That puts ~0.29 mA into the base. Allow a typical beta of 100 and you get 29 mA out the emitter - although most 2N3904 transistors should do better than that. Anyhow, 29 mA through 4.7 k should give well over 100 V drive! Odd, very odd, and not believable.
One possibility is that the front end of the buffer chip has been damaged, such that it can effectively short out any input current. (They all run on smoke: let the smoke out and they don't work any more.) You can check this by connecting the input pin to +5 V on the BOB and measuring the voltage at the pin. It should be of the order of 4.1 V. If it is much lower than this then I would suspect damage to the input buffer chip.
Fortunately, all the chips on the C11 appear to be in sockets, and they can be easily replaced. Spares can be bought through CNC4PC or through many electronics stores (Tandy?). But first, do the check with a 1 k resistor and let us know the results.
Cheers
Roger Caffin
-
Thanks Rcaffin, I'll check the volts across my input first to see if it's ok, I have checked on mach diagnose page to see the input is working by manually adding the 5v to the input and it is flashing up ok on screen.
Do I add the resistor to the base pin?
Thanks for the heads up on the spares, I checked out cnc4pc a few day ago when I thought I smoked the BOB.
Kind regards
Dale gribble
-
I have checked on mach diagnose page to see the input is working by manually adding the 5v to the input and it is flashing up ok on screen.
Good check for the opto isolator etc, but does not check the buffer chip which may still be damaged. Howeevr, obviously not totally cremated. odd...
Do I add the resistor to the base pin?
Not for the test. Disconnect all the sensor wires from the BOB and just put the 1 k resistor between the input pin and +5 V and measure the voltage on the pin. This will tell us what the BOB input looks like electrically.
Cheers
Roger
-
Hi roger,
Volt without resistor 4.29
-
Hi roger,
Volts without resistor = 4.29v
volts with 1k resistor = 2.96v
Regards
Dale
-
Volt without resistor= 4.29 V
volts with 1k resistor = 2.96 v
Hi Dale
Sorry - I don't quite understand this.
Do you have the BOB internal resistor tied to the +5 V or Gnd?
Did you add the 1 k resistor between the input pin and +5 V, or between the input pin and Gnd?
Cheers
-
Hi roger,
Resistor between 5v and the input pin.
Dale
-
Resistor between 5v and the input pin.
In that case I am mystified ...
Aha - are you measuring the voltages between gnd and input pin, or between pin and +5 V?
Cheers
Roger
-
Volts without resistor = 4.29v
volts with 1k resistor = 2.96v
Hum ... I will assume that you are measuring the voltage between pin and +5 V. I will translate that to between pin and gnd, and assume BOB input resistor is connected to gnd. Please confirm.
No pull-up resistor: 0.7 V wrt gnd
1k pull-up resistor: 2.0 V wrt gnd
That means that there is 3 mA going through the 1 k resistor to a 4k7 resistor to gnd and the input pin of the buffer. Now at 2 V above gnd, the 4k7 resistor will account for ~0.4 mA to gnd, leaving 2.6 mA going into the buffer pin. That is a shade high! It is possible that the buffer chip has been cooked and needs replacing.
Can you read a part number off the top of the buffer chip? I can look up its specs if I know what it is.
Cheers
Roger
-
Hi roger,
re checked input pin with 1k resistor with reference to grd
volts output from BOB 5.12v (
volts @ input pin with I k resistor 2.16v
Don't know if these figures make more sense, so I've add an image to help explain what I've checked
Regards
Dale
-
re checked input pin with 1k resistor with reference to grd
volts output from BOB 5.12v (
volts @ input pin with I k resistor 2.16v
Hi Dale
If a 1k pull-up resistor only gets the input to 2.16 volts, then I think the chip is almost certainly damaged - sort of lightly toasted. Next step is to replace it. Worth having some spare parts anyhow.
Cheers
Roger
-
Hi Roger,
Thanks for your help, much appreciated. I'll get the repair kit from cnc4pc, it will probably take a couple of weeks to arrive here in the UK. I post my results when the new IC's arrive.
Kind regards
Dale Gribble
-
I'll get the repair kit from cnc4pc, it will probably take a couple of weeks to arrive here in the UK. I post my results when the new IC's arrive.
Hi Dale - if you can photo the top of the chips I might be able to figure out what they are, and maybe you could buy a couple locally - RS Components or similar in the UK.
Cheers
Roger
-
Hi roger,
Thanks for your offer on identifying the chips, I ordered the repair kit from CNC4PC at a very reasonable price of $9.
Regards
Dale