Hello Guest it is August 22, 2019, 06:57:34 PM

Author Topic: cnc screwcutting???  (Read 18697 times)

0 Members and 1 Guest are viewing this topic.

Offline rcaffin

*
  •  1,003 1,003
    • View Profile
Re: cnc screwcutting???
« Reply #30 on: January 23, 2011, 04:12:54 PM »
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.

Quote
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]
Re: cnc screwcutting???
« Reply #31 on: January 23, 2011, 05:59:18 PM »
Hi rcaffin, I uploaded the data sheet for the sensor.

regards

Dale
Re: cnc screwcutting???
« Reply #32 on: January 23, 2011, 06:02:42 PM »
OPPS... forgot which model it is

OPB916B

Regards

Dale

Offline rcaffin

*
  •  1,003 1,003
    • View Profile
Re: cnc screwcutting???
« Reply #33 on: January 23, 2011, 07:44:08 PM »
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

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: cnc screwcutting???
« Reply #34 on: January 23, 2011, 07:45:26 PM »
Use the additional options button on the reply page to attach images etc.
Hood

Offline rcaffin

*
  •  1,003 1,003
    • View Profile
Re: cnc screwcutting???
« Reply #35 on: January 23, 2011, 07:51:11 PM »
Ok, let's see...
Re: cnc screwcutting???
« Reply #36 on: January 24, 2011, 10:20:40 AM »
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
Re: cnc screwcutting???
« Reply #37 on: January 24, 2011, 12:59:55 PM »
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

Offline rcaffin

*
  •  1,003 1,003
    • View Profile
Re: cnc screwcutting???
« Reply #38 on: January 24, 2011, 03:33:00 PM »
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
Re: cnc screwcutting???
« Reply #39 on: January 25, 2011, 01:44:50 PM »
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    :'(