UC300-USB

This Section is for users to discuss hardware

UC300-USB

Postby Mike Kann » Tue Dec 06, 2016 3:26 pm

Hi - new to the forum so hopefully won't sound too daft.

I'm refurbishing my HAAS VF0E VMC with a UC300-USB motion controller - at the time I bought it the ethernet variety didn't exist.

So I am having trouble with my USB connection failing when my servo enable contactor kicks in, also my contactor for the VFD - it's running through one of the mosfet drain outputs on my HDDB2 board. I'm wondering how to get rid of this problem without buying an ethernet uc300.

I also have realised that the inputs are set up as default with a high input signal but can't for the life of me work out how to set it low to accept an incoming 5v signal from an optoisolator board I have.

Any ideas>

Thanks,

Mike
Mike Kann
 
Posts: 3
Joined: Tue Dec 06, 2016 3:21 pm

Re: UC300-USB

Postby cncdrive » Tue Dec 06, 2016 4:10 pm

Mike, I've just sent an e-mail reply to you about the first part of your question which you asked in e-mail too.

The second part:

The UC300 has it's inputs high when unconnected because there are pullup resistors to 5Volts on the pins, this is the same configuration as it is done in LPT/printer ports.
Optocouplers are mostly has NPN transistor open collector outputs which then connects to the UC300 input pins.
You can connect the output Collector of the optocoupler directly to the input of the UC300 without any other parts used, because there is the internal pullup resistor, so it will have the bias.
And then you can drive the input (LED) of the optocoupler. LEDs are current driven devices, so you have to make the LED inside the optocoupler to light in order to have a signal on the output.
You can drive the optocoupler input 2 ways:

Connecting the Cathode to a fixed 0Volts and driving the Anode with positive Voltage which can be your signal.
Connecting the Anode to a fixed positive Voltage e.g. to 5Volts and driving the Cathode with 0Volts which can be your signal.

One more thing is to make sure you not overloading the LED of the optocouplers, most opto LEDs accept 5-20mAmps of current (some only 5-10mA) , but the datasheet will tell the exact values for the particular device, so make sure to use a properly sized series resistor which limits the current in the opto's LED to the acceptable range with your input voltage level.
If it is an optocoupler on a breakout board then the series resistor is probably fitted on the board, but check the datasheet if an external series resistor is needed or not with the voltage you will connect.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: UC300-USB

Postby Mike Kann » Tue Dec 06, 2016 5:02 pm

OK - so I have 5v coming out of my opto breakout board and 5v coming out of the UC300 input, so I assume I need to put a pull down resistor to ground the input 5v - is there any particular size I should use?
Mike Kann
 
Posts: 3
Joined: Tue Dec 06, 2016 3:21 pm

Re: UC300-USB

Postby cncdrive » Tue Dec 06, 2016 5:18 pm

Mike Kann wrote:OK - so I have 5v coming out of my opto breakout board and 5v coming out of the UC300 input, so I assume I need to put a pull down resistor to ground the input 5v - is there any particular size I should use?


This does not makes sense, what 5Volts coming out means?
Any TTL signals can be 0Volts or 5Volts, so if you have an output on your opto board that can produce 0Volts in one state and 5Volts in the other state.
By "states" I mean the on and off, triggered and not triggered states.

The question is if your optocoupler output is a NPN, a PNP or pushpull output.
If it's NPN or pushpull then it should work without any pullups and pulldowns, if it it PNP then a pulldown will be required.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: UC300-USB

Postby Mike Kann » Tue Dec 06, 2016 5:31 pm

I've powered the Optocoupler board with 5v seperately and it fuctions as it should. When you put a vol meter across the output of the opto and gnd it reads 5v in an active state. When you put th volt meter across the input on the UC300 and ground it reads 5v. So the two counteract one another and nothing reads on the input. So I assume you need to add a pull down resistor so that the 5v from the input pin is sunk to ground... is that right?
Mike Kann
 
Posts: 3
Joined: Tue Dec 06, 2016 3:21 pm

Re: UC300-USB

Postby cncdrive » Tue Dec 06, 2016 5:39 pm

Well, it is still not clear to me if the optocoupler's output is a PNP and if that is the problem or if you don't understand how it works. The information provided yet is not enough to decide...

Tell me please: If you have the optocoupler disconnected from the UC300 and then measure voltage between the GND of the opto output and the output of the opto for 2 states:
1.) The optocoupler input is not triggered.
2.) The optocoupler input is triggered.

If it changes states, if 0V is in one state and 5V in the other state then make the same measurement with the UC300 connected.
If it still changes states then it's fine, then you only have to configure the active polarity in software (Active low checkboxes) to fit your input signal.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: UC300-USB

Postby A_Camera » Fri Dec 09, 2016 8:21 am

Mike Kann wrote:So I assume you need to add a pull down resistor so that the 5v from the input pin is sunk to ground... is that right?

Normally you don't put any pull down resistors on inputs. Inputs are controlled by an output signal from another device and those devices should take care of the switching between high and low. A pull down resistor on an input would function as a voltage divider and would pull down the input signal even when there is absolutely no need for that.
A_Camera
 
Posts: 638
Joined: Tue Sep 20, 2016 11:37 am


Return to Hardware

Who is online

Users browsing this forum: No registered users and 2 guests