# Load cell feedback

• your link does not work. why not attach image to the post so it is stored on this server?

1) read pinned topic: READ FIRST...

2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

3) read 1 and 2

• AD

• That should work now

• That TIP120 should be unnecessary. The digital input is going to be a high-impedance, low-current load. The "output" side of the optocoupler just needs to support 24VDC, a few hundred mA, and act (when active) very much like a "dead short" to the digital input. Remember, these digital inputs are designed to work with simple switches and relay contacts, which are dead shorts when closed.

It looks like B2 is a lamp? I'm assuming a high-current incandescent, which draws enough current that might explain the TIP120.

• Built the the circuit in previous posts shown below on a simulator and only getting an output of 9V

• You don't need a resistor on the output side.

Although, even with the resistor, it should still work -- both the resistor, and the input, should see 24VDC (minus the ~1.6V of diode loss in the optocoupler). I think your simulation has some errors.

• because something with that simulation is not right... i see no part number or ANY parameters related to simulated optocoupler....

there is something called CRT (current transfer ratio) and varied a lot from one optocoupler to another

also there is something called rise time and optocouplers are slow... it take time for output to settle.

looking at signal after only 5micro seconds is wrong. your EL1809 will not even respond to signals faster than couple of ms. that is hundreds of times slower.

also circuit is given as an idea not as set in stone solution for your exact needs. this means SIZING of resistors for example need to be done.

assuming Vf of 1.25V and 8mA input current, first resistor should be

(5V-1.25V)/0.010A = 468 Ohm. this one looks very good.

if the CTR is very low, (60% for example) then output current would saturate at some 4.8mA (maximum that this opto can do if input current is limited).

4.8mA*1k = 4.8V

if CTR is 100%, then output current may be as high as input current or up to 8mA. this means

8mA*1k = 8V.

if the CTR is high (400% for example) then output current could be 4x larger than input current.

400% of 8mA is 32mA.

32mA*1k = 32V but since this is above supply voltage, real output would be clipped to supply voltage which is 24V.

do we need output that can handle up to 32mA? well it better be above whatever input of your EL1809 expects. most PLC inputs are expecting something on the order of 2-5mA. if the input is able to switch with lower current, then you could use opto with low CTR (and you can increase 1k output resistor to some higher value such as 4k7) but keep in mind that high sensitivity also means more susceptible to noise.

so you think great, here the opto with high enough CTR, then you go and use your typical breadboad kit resistor - 1k 1/4W ... and it works for a while but it gets hot and blows up. that's because you need to consider power as well. if your "24V" is really DC taken from KRC4, then voltage is actually 27V (or 27.1V)

P = V^2 / R = 27V*27V/1k = 729mW which is way more than rating of resistor your use which in this example was only 250mW

so if you use 1k, it need to be at least 1W in this case, which is 4x more than initially assumed.

see how this goes? just because there is a schematics of some circuit that someone created, it does not mean that all info is shared and that your build will be successful. so if you are building something yourself, you still need to do proper calculations yourself. hope this is an eye opener. simulation is good tool but it is only as good as person using it.

what else could go wrong? well, you do want optocoupler to be either on or off for use with digital I/O.... you do not want it to operate in analog regime. analog is used for different applications and cannot take much power. here output stage of optocoupler would be stressed a lot if CTR is insufficient. for example one of the calculations was 8mA and 8V across resistor, this means that remaining (27V-8V = 19V) is across optocoupler. and 19V*8mA is 152mW. you want to keep this within optos specs but note that in analog regime, operating point constantly moves... at some point V*I may exceed power rating.

so staying below max Pd curve is required. colored line show example of operating condition on a transistor dissipation graph.

green segments are fine but red is not.

oh, and there is also something called signal polarity. you want logic levels to match. so when Arduino says output is TRUE, KRC should also see that signal on corresponding input is really TRUE and not the opposite.

1) read pinned topic: READ FIRST...

2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

3) read 1 and 2

• my question again:

what type of sensor do you want to use?

Until now all discussion was quite interesting, but useless)

• my question again:

what type of sensor do you want to use?

Until now all discussion was quite interesting, but useless)

Load cell is handle by an arduino. At a certain force, a 5v output is set to high and want to use the output on Arduino to turn on a input on the beckoff el1809 which has a '1' signal voltage of 11-30V

• now I got it

You are using a s type load cell (range probably up to 750 N) and the module HX711 as amplifier and for higher resolution for the input voltage(s).

The robot should not monitor (or display) the values on the way to reach the required force. A threshold is set (maybe changeable) which activates an output to the robot control and via interrupt the robot motion will stop.

If you want to reach 500 N then you probably want to set the threshold to 490 N so when the interrupt is executed and the robot came to a stop the 500 N are reached.

As an arduino output I just want to mention, that are EtherCAT modules for arduino available wich may be used as well

• Hi,

i want to be able to use the existing modules on the robot hence trying to use the 1809. i could probably use a relay to switch voltages but liked the idea of optocoupler.

Could you provide more info on ethercat modules for arduino like setup and what modules work

• using optocoupler is the fastest way to get the signal from Arduino to KRC.

1) read pinned topic: READ FIRST...

2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

3) read 1 and 2

• Hi,

Eventually with the on-going pandemic, I am able to get back to this. I was able to get optocoupler working and now load cell is triggering input into robot. In terms of programming, I was looking to use a Repeat Until loop. but I don't want to repeat set LIN points, i want to repeat a Z- or Z+ direction until DI1 is turned on.

I have Universal Robots UR10 and have done it on them

Any help much appreciated

• Simplest way is to generate a point at the max distance in the Z direction and execute the motion with an interrupt active. There's really not any added benefit from doing it incrementally in a loop.

• Hi,

I have never used interrupts before so don't know much about them. the program needs to be looped as it is running 25k times as part of a test. Is there any guidance on interrupts that you can give me?

Thanks

• So, you're not talking about running a loop of tiny motions with an "If Input, exit loop" statement inside?

The forum archives are full of in-depth discussions of interrupts and how they're used -- there was a thread about them just last week. Bottom line, if you want to terminate an active motion based on an input, Interrupts are about the only way to do that.

• Hi,

No not running tiny motions.

I see that I need to use interrupts to stop motion. Can the motion, not be a programmed lin point rather a continuous move in z direction and the input with be the endpoint as this test is a fatigue cycle test on an assembly which over time will move down depending on what happens during the test hence why I dont want to use Lin move

• i don't understand your reasoning or explanation about LIN move...

LIN move is just a move... it is different from other motions by type of motion path. you can use PTP or CIRC if you like... the principles are the same.

to make robot move "continually" in some direction, just use single motion (such as LIN or PTP or CIRC) with target point that is far enough and in the desired direction of travel. far enough means at (or beyond) point you really need to reach.

without interrupt robot will keep moving until either gets there or there is something preventing it from getting there (reach or obstacle etc).

with interrupt, one can stop before reaching the target point and optionally abandon the rest of the journey.

1) read pinned topic: READ FIRST...

2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

3) read 1 and 2

• I see that I need to use interrupts to stop motion. Can the motion, not be a programmed lin point rather a continuous move in z direction and the input with be the endpoint

What kind of input? If you have a means to get a number to the robot, you can use that to build or adjust your motion points. Or, you could do an open-loop calculation and adjust your motion points per cycle.

I'm not sure what you mean by "continuous motion." Standard robot motions are always programmed as "end" points in space. The spatial coordinates of these points can be mathematically manipulated easily enough, but once the motion begins executing, that's it -- you can't change it anymore. You have to complete the move, or terminate it with an Interrupt (or an E-Stop or similar, but that's not practical).

• Hi,

What I mean by continuous motion when i was doing this on the UR robots, I was able to set the tool to move in the X, Y or Z direction. I could then either stop this by a distance from 1st way-point or an input. In my case, it was a digital input which stopped the robot moving in the z direction

Sorry if I wasn't clear on this but hopefully this clears it up.

In terms of the kuka, perhaps i cant sent the robot to move in the Z direction. I will have to create 2 points and use interrupt. Creating the 1st point is no issue but the second point which has to be further in the Z- direction is an issue due the tested part being in the way and I don't want to put excess load on it. Can I set a distance at which the 2nd point is away from the 1st, say 300mm Z- and then use interrupt to stop motion.

The program is really only 3 way points, so 1 at 0 position, the other in Z- and the other Z+. so 450N down and 450N up.

Thanks

## Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Sign in
Already have an account? Sign in here.