How do I connect +5V index pulse to UCBB?

This Section is for users to discuss hardware

How do I connect +5V index pulse to UCBB?

Postby DavoH » Tue Jun 23, 2020 3:03 am

Hi all,
I have my mill spindle controller connected to the UCBB OK but don't know how to connect the index pulse to it.
The index pulse is a 0V -> +5V square wave.
I can see the pulse on the UCBB input terminal it's wired to but its UCBB LED doesn't light up and software does not display any speed and the diagnostic page doesn't show any Index pulse on that pin, or the other pin I tried.
Sorry, I can't remember what pins/ports I tried as I'm not sitting in front of the machine right now - but they are both input pins.

I've wired up my limit switches OK (that's shown how to do it in the manual) but don't know what to do with the Index pulse input - I used the same port as the limit switches.
I am mystified by the fact that all input pins have a negative and a positive designation.
I tried connecting the negative one to ground but all that did was to reduce the index pulse voltage somewhat.

Secondary question:
I want to buy a Differential Rotary Encoder to mount on the spindle so I can control speed from software.
Top speed of the spindle is 6,000 rpm.
How many pulses per revolution of the encoder should I get? There are so many to choose from!

Hope you can help.
Thanks,
Davo.
DavoH
 
Posts: 23
Joined: Sat Dec 16, 2017 9:49 am

Re: How do I connect +5V index pulse to UCBB?

Postby cncdrive » Tue Jun 23, 2020 5:00 am

Hi,

Did you check the UCBB wiring?
It has some nice drawings about how to connect the inputs.
The inputs are optocoupler inputs therefor there are + and - input terminals.
This is the most flexible solution, because you can interface NPN and PNP sensors as well as positive and negative side connected switches and even line drivers.
But please check the users manual of the UCBB to see how to make the wiring.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: How do I connect +5V index pulse to UCBB?

Postby DavoH » Tue Jun 23, 2020 11:28 pm

Thanks for the reply.
Yes, I have checked the wiring and as I said there is a pulse on the UCBB terminal I wired it to.
I have also read and re-read the manual so many times I could reproduce every page from memory.

The 'nice drawings' you refer to may be good for someone who has a knowledge of electronics but I do not have that knowledge and they mean nothing to me.
I have no idea whether my index pulse is NPN or PNP, all I know is that it is a square wave that alternates between 0Volts and 5Volts, one pulse per revolution.
The manual would be more helpful if it showed (like the limit switches diagrams) how to wire up an index pulse!

The spindle speed controller has a ground wire from the UCBB connected to it as well as an enable wire and I can get the spindle to move OK using the PWM signal but:
I do not understand how to connect ONE wire, carrying the index pulse, to TWO terminals that are marked + and -

As I mentioned previously, I connected a ground wire to the - terminal and the index pulse wire to the + terminal and all that did was to reduce the pulse voltage by a few millivolts with no result in the software or the LED on the UCBB.

I am now contemplating connecting the 24V line to the + terminal and the index pulse to the - terminal. However I am reluctant to do that in case I damage something.

I cannot make it any plainer what I am trying to do, what I have tried and what I need to do!
DavoH
 
Posts: 23
Joined: Sat Dec 16, 2017 9:49 am

Re: How do I connect +5V index pulse to UCBB?

Postby cncdrive » Wed Jun 24, 2020 8:34 am

I'm sorry, but if those drawings mean nothing to you then it is impossible to help you.
Any sensors like an index sensor could be NPN or PNP or buffer output (totem pole) or line driver output,
we have no knowledge of your index sensor and so it is impossible for us to tell how to connect it.
You must collect that information from the index sensor datasheet otherwise you will be unable to decide how to connect it to the UCBB.
You would also be unable to connect it safely to any breakout board if you do not know what type of output your sensor has.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: How do I connect +5V index pulse to UCBB?

Postby DavoH » Wed Jun 24, 2020 11:53 am

I have had it working successfully with three different breakout boards before I bought the UCBB.

I have basic electronics knowledge but Page 7/14, section 3.5 Inputs, of the UCBB manual shows a circuit diagram for a type of input that I am not familiar with and it says that it is expects a 12V to 24V input signal range, so am I wasting my time trying to use a 5V square wave signal?
If so, how can I boost that 5V square wave signal to the required voltage level that will work?
If someone can tell me what components to use and give me a circuit diagram I am quite capable of assembling something to do the job.

I have attached two JPG's showing relevant information in the speed controller's manual, I hope you will be able to help me after looking at those.

Thanks.
Attachments
Index2.jpg
Index1.jpg
DavoH
 
Posts: 23
Joined: Sat Dec 16, 2017 9:49 am

Re: How do I connect +5V index pulse to UCBB?

Postby cncdrive » Wed Jun 24, 2020 3:05 pm

Yes, the UCBB inputs were designed to be used with 12 to 24Volts input Voltage as described in the users manual, but it also works with 5Volts.
5Volts is just on the edge, so we advice to use 12 to 24V Voltages.
That being said it works with 5Volts Voltage also furthermore all inputs of the UCBB are tested also with 5Volts with our automatic tester boards when we manufacture the boards.

The issue with your system (I'm saying this cased on the circuit diagram you showed) is that the output is with a series 390 Ohm resistor, this resistor will drop Voltage when it is connected to the UCBB's optocoupler input which has a 2.2k Ohm resistor in series as you can see in the circuit diagram in point 3.5 in the UCBB manual.

So, your sensor output is push-pull (totem pole), but it has a 390Ohm resistor in series and this is why it does not work with the UCBB inputs.

What you could do is you could place an external NPN transistor between the sensor and the UCBB input and then you could use higher Voltage too.
Connect the NPN transistor Base to your sensor's output, connect the transistor Emitter to 0Volts and connect the transistor Collector to Input- of the UCBB and connect a positive 12 to 24V Voltage to the UCBB input+.
Then your sensor output will drive the NPN transistor and when the transistor is on then the current will flow from the 12 to 24V through the UCBB optocoupler (input+ to input-) and then through the transistor Collector to Emitter.
One thing is that the transistor will invert your signal, but that is not a problem for an index signal.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: How do I connect +5V index pulse to UCBB?

Postby DavoH » Thu Jun 25, 2020 11:59 am

Thank you very much for the reply. 8-)
I've just realised I need to do the same with my MPG, that only puts out just over 4V per phase.

I've been looking for a suitable NPN transistor, looks like a TIP31 would do the job?
If that is no good would you be kind enough to tell me which would be a suitable one.

Thanks.
DavoH
 
Posts: 23
Joined: Sat Dec 16, 2017 9:49 am

Re: How do I connect +5V index pulse to UCBB?

Postby dezsoe » Thu Jun 25, 2020 12:53 pm

TIP31 with 3 A is a bit overkill... :) You can use any small one, you need to switch only a few mA. (I don't know the exact value, it depends on your voltage too, but it cannot be more than 20-30 mA.)
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: How do I connect +5V index pulse to UCBB?

Postby cncdrive » Thu Jun 25, 2020 6:26 pm

Yes, a small signal NPN transistor will do the job. A 2N2222 or similar should be fine.
Just make sure it has the Voltage rating above the Voltage that you will switch.
The 2N2222 is rated to 40Volts if I recall.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: How do I connect +5V index pulse to UCBB?

Postby DavoH » Fri Jun 26, 2020 12:25 am

Thank you to dezsoe and cncdrive.
Yes, I realised some time after I posted that it was way overkill.
Just checked 2N2222A specs and that will do fine.

Many thanks for all the help. 8-) 8-)
DavoH
 
Posts: 23
Joined: Sat Dec 16, 2017 9:49 am

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 17 guests

cron