Register Help Remember Me? . .

1. Hello, said id throw up my project to document and try get some help.

it was built in 98 and its partially stripped to check the ball screws and condition. My Plan is to use the existing hardware, drivers, spindle controller and run it from a Linuxcnc PC.

This is the Chinese BOB iv ordered. Seems to have a 0-10v output for the spindle.
https://www.aliexpress.com/item/3298...62b94c4dSy2CSf

The circuit diagram below if i understand correctly. The drives output a 12v step and dir. The step and Dir is connected to the collector from the transistor and the emitter to ground. The 5v output from the BOB is connected to a 2k resistor and connected to the Base. When ever the BOB pulses the 5v it pulls 12v from the driver to ground?

[
Last edited by JohnT; 19-01-2021 at 08:13 PM.

2. Originally Posted by JohnT
The circuit diagram below if i understand correctly. The drives output a 12v step and dir. The step and Dir is connected to the collector from the transistor and the emitter to ground. The 5v output from the BOB is connected to a 2k resistor and connected to the Base. When ever the BOB pulses the 5v it pulls 12v from the driver to ground?
That circuit - if the BoB is outputting 5V, it will let the input to the stepper driver float to 12V as reported. If the BoB output is 0V then the input to the stepper driver will be dragged to 0V.

You draw the BoB with an output transistor - as shown this inverts the 'step' signal from the BoB - is this your intent?
Last edited by Doddy; 19-01-2021 at 06:35 PM.

3. Iv ordered Bc547c transistors , I'm trying to figure out how to connect up that circuit in the diagram. Am I correct above ? That diagram I found on the net isnt mine.

4. this is another diagram I found on the net

5. These sketches are not my own, im trying to figure out what they do. Am i correct with the above explanation? Once 5v is active the Step or Dir inputs 12v go to ground activating the steppers ?

6. Your first schematic confuses me a little - because you show one transistor on the BoB and one on the machine. If the one on the BoB is intended to represent the output stage of the BoB (fairly common thing to do) - the problem is that it's not likely to represent the actual output stage of the cheap Chinese BoB (they use push-pull outputs rather than open collector) - the net result of this is I wouldnt recommend that diagram (I apologies - the earlier answer answered against the schematic, but I don't think the schematic represents quite what you're likely to achieve with the BoB).

The second schematic ("this is another diagram I found on the net") makes no assumption or assertion about the implementation or design of the output stage of the BoB, but instead just shows that (5V TTL...) driving a transistor. Two signals - Step/DIr, each with their own base resistor and transistor. That circuit implements the open-collector drive as shown in the BoB on the earlier diagram. This second schematic is "better".

The behaviour is, as the input (5V TTL) rises "high" (5V) then the transistor conducts, and the voltage on the collector ("12V from motherboard") will be shunted to ground. So, 5V in = 0V out.

When the input (5V TTL) drops "low" (0V) then the transistor stops conducting, and the collector->emitter is high resistance, and the 12V from the ("12V from motherboard") remains unaffected.

So 5V in = 0V out; 0V in = 12V out.

Note, and this is important if you don't want to blow the transistors up. The "12V from motherboard" I expect is either the Step or Dir input to the existing stepper driver - it's not connected directly to 12V, but rather through an internal resistor on the stepper driver to 12V. It's that resistor that presents the voltage drop when the transistor is conducting. So don't connect the circuit to a 12V supply, but do connect it to a Step/Dir input (... that might read 12V on a meter).

Just to demonstrate (a picture is worth a thousand words), I've sketched out your schematic in a circuit simulator (LTSpice)...

The circles - the one on the left in the "BoB" is a 5V voltage source, that starts at 0V and spikes to 5V after 1 second, then returns to 0V....

The one on the right represents the machine's 12V supply. The resistor is the aforementioned internal resistor.

Simulating this for 5 seconds gives the following waveform...

The lower, green trace is the 5v signal from the BoB. The upper blue trace is the resulting voltage measured on the input to the Stepper driver.
Last edited by Doddy; 19-01-2021 at 10:00 PM.

7. ok thank you very much for the reply. still waiting for my parts to come. once they come i will try this diagram. i will keep this updated.

8. Ok so I managed to get control of the axis with Linuxcnc and parallel card. The next thing is figuring out these balluff 2 wire numar sensors. these don't switch on or off like a normal switch. They seem to change the resistance inside the sensor. Something quite sensitive like a 200ma difference.

Question is how can I measure the change in current so I can switch a pin on something like an Arduino?

I know people don't bother with these and switch them out for normal sensors. But I'd like to try and get these working.

9. Without data sheet (I've googled for 5 minutes and given up to watch the F1 qualifying instead) - and without knowing the sensor supply voltage range, but assuming it's good for 12-24V, I'd suggest buying an opto-isolator (maybe mounted on a board)... or 3 (however many sensors you have) and, with suitable current limiting resistor for the supply voltage, wire the input in series with the sensor. From the little I've gleaned of the internet these. devices have an activated current of <1mA and a de-activated current of what you say - 200mA? Provided the 1mA is insufficient to transfer through the opto-isolator then it's an easy solution.

You question use of an Arduino... yes, you could, but it's a sledgehammer solution, plus you have to think about your power-up behaviour before IO is configured. For the Arduino the obvious solution is to use an analogue input to measure the voltage across the sensor with a current-limiting resistor in series with the supply voltage to the sensor. You would have a simple threshold (with hysteresis?) measuring software to drive the digital output,

Beyond that, you could use a comparator circuit - op-amp, preset-pot and, again, series resistor on the sensor, monitor the voltage across the sensor (nee the voltage drop across the series-limiting resistor).

My 'can't-be-arsed-making-this-into-a-project' solution would start with a cheap opto-isolator board, checking that the board has mounting holes. (so many small boards omit these!),

More complex solutions (and the real high-integrity solutions) would likely have multiple comparators and logic to detect nominal current levels, fail-open and fail-short faults. Easy to do but heading into 'project' mode.

10. Thank for the lengthy reply. Would one of these comparators work?

https://a.aliexpress.com/_vFHhhU
I have the data sheet for the sensor but can't upload it. It's 24v supply

Load capacitance max. at Ue1 µF Min.
operating current Im0 mA
No-load current Io max., damped5 mA
No-load current Io max., undamped2 mA
Operating voltage Ub10...30 VDC
Output resistance Ra33.0 kOhm + D Protection classII Rated insulation voltage Ui250 V AC
Rated operating current Ie200 mA
Rated operating voltage Ue DC24 V
Rated short circuit current100 A

Page 1 of 4 123 ... Last

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

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