Problem with optocupled pwm signals SOLVED

Topics and questions about AMC, h-bridges, JRK's etc.

Problem with optocupled pwm signals SOLVED

Postby eldeejay » Fri 1. Mar 2013, 14:20

Good morning, I'm testing all the electronics with mechanics and occurs a problem with the sensors and positioning axes.

I'm using radiometric sensors SS495a with mounting magnets similar to that Tronic described in your post and also similar to the user vicpopo explains in his post.

The problem that occurs is that in the stanby state Y = X = 128, the controller tries to position the motors in 128 but fails, an effect does forward / backward without stopping, ie active forward and passed the poscion and then reverse active and re-pass. The effect is like a "vibration".
The controller fails to stably position the axes in position "128".

Can someone help me with this problem?

____________________________________________________________________________________ (in spanish):
Problema con sensores SS495a

Buenos días, estoy probando toda la electronica con la mecanica y me ocurre un problema con los sensores y el posicionamiento de los ejes.

Estoy usando sensores radiometricos SS495a con un montaje de los imanes similar al que Tronic explica en su post y tambien similar al que el usuario vicpopo explica en su post.

El problema que ocurre es que en el estado de reposo Y=X=128, la controladora intenta posicionar los motores en 128 pero no lo consigue, hace un efecto adelante/atras sin parar, es decir que activa avance y se pasa de la poscion y entonces activa retroceso y se vuelve a pasar. El efecto es como una "vibracion".
La controladora no consigue posicionar establemente los ejes en su posicion "128".


Alguien me puede ayudar con este problema?
Last edited by eldeejay on Tue 12. Mar 2013, 11:55, edited 2 times in total.
User avatar
eldeejay
X-Sim Supporter
 
Posts: 41
Images: 6
Joined: Tue 3. Jul 2012, 10:37
Location: Spain, Alicante
Has thanked: 4 times
Been thanked: 0 time

Re: Problem with sensors SS495a

Postby value1 » Fri 1. Mar 2013, 19:09

Hi eldeejay
I also tried the Hall effect sensor approach (actually with an A1321EUA-T rather than the SS495A). The benefit would have been no mechanical connection between the rotating axe and the static sensor --> no tensile stress in the sensor. But it appeared the rotation around the sensor had to be unrealistically homogenous and I never got a useable signal out of the Hall sensor :(. So I went back to the potentiometer approach.
A break-through though for me was sirnoname’s post about the “Pot hardware mounting” and silver-lacquer-rotation-angle-reduction here (about in the middle of the page).
User avatar
value1
 
Posts: 69
Images: 3
Joined: Tue 20. Mar 2012, 14:18
Location: Zug, Switzerland
Has thanked: 12 times
Been thanked: 1 time

Re: Problem with sensors SS495a

Postby vicpopo » Fri 1. Mar 2013, 19:44

Hi Eldeejay,

Which amc did you use with this sensor? Amc 1.6 ?
I've got a little oscillation around middle position but it's as far not a problem.When I 'm seating on the sim the position is well hold.

Did you use shielded cables ?
Which Kp PID did you setup . if you setup high kp and not good I und D factor you can increase a lot the phenomenom of shaking.
Last edited by vicpopo on Fri 1. Mar 2013, 19:57, edited 1 time in total.
User avatar
vicpopo
 
Posts: 645
Joined: Fri 20. Apr 2012, 18:04
Location: Strasbourg France
Has thanked: 39 times
Been thanked: 80 times

Re: Problem with sensors SS495a

Postby vicpopo » Fri 1. Mar 2013, 19:54

value1 wrote:Hi eldeejay
I also tried the Hall effect sensor approach (actually with an A1321EUA-T rather than the SS495A). The benefit would have been no mechanical connection between the rotating axe and the static sensor --> no tensile stress in the sensor. But it appeared the rotation around the sensor had to be unrealistically homogenous and I never got a useable signal out of the Hall sensor :(. So I went back to the potentiometer approach.
A break-through though for me was sirnoname’s post about the “Pot hardware mounting” and silver-lacquer-rotation-angle-reduction here (about in the middle of the page).

Hi value1,

The sensivity from the a1321 is 5mv/G , it's the reason why you had some problem.
The ss495a sensitivity is 3,125 mv/G you have to choose this sensitivity.For allegro you can choose the a1325 .
You can test the a1326 with 2,5 mv/G sensitivity (i've got two not tested yet) but forgot the one with lower sensitivity (1,3mv/G) the motors didn't hold positions and run continuously.
User avatar
vicpopo
 
Posts: 645
Joined: Fri 20. Apr 2012, 18:04
Location: Strasbourg France
Has thanked: 39 times
Been thanked: 80 times

Re: Problem with sensors SS495a

Postby eldeejay » Sat 2. Mar 2013, 14:03

Hi Value1, thanks for exposing your experience, I have ruled out using potentiometers by mechanical wear that can quickly suffer. Anyway, I will consider the information on the exhibit I Sirnoname post.

vicpopo wrote:Hi Eldeejay,

Which amc did you use with this sensor? Amc 1.6 ?
I've got a little oscillation around middle position but it's as far not a problem.When I 'm seating on the sim the position is well hold.

Did you use shielded cables ?
Which Kp PID did you setup . if you setup high kp and not good I und D factor you can increase a lot the phenomenom of shaking.




Hi vicpopo, i´m using AMC 1.6 whit firmware v1.1h and yes, i´m using shielded cable. The KP setting i tested with 1, 5, 7, 15, and the result is identical with any of the values.
I'm lost, it worked fine before but now that I have installed on the platform started giving me this problem.
I will review all the signals with an oscilloscope, you may find some fault in the PWM control signals (I understand that sort should not shake to be close to the required position, ie, if x = 128 and the actual position is 125 , PWM has to be soft to move the axis up to 128 without exceeding, in fact this movement is abrupt, as if the PWM pulse width to send a very high and therefore activating position 128 exceeded then the opposite movement as abruptly and becoming a perpetual motion etc ...)

Any ideas?



Regards
User avatar
eldeejay
X-Sim Supporter
 
Posts: 41
Images: 6
Joined: Tue 3. Jul 2012, 10:37
Location: Spain, Alicante
Has thanked: 4 times
Been thanked: 0 time

Re: Problem with sensors SS495a

Postby vicpopo » Sat 2. Mar 2013, 15:23

Hi Eldeejay,

What motor did you drive.Did you use dc or ac motors.

I puted a capacitor 0,1 micro Farad between + and - from hall sensor.I didn't notice a big difference but any way you can try.

The notice you made the pwm on first positioning is too strong , we talked a little bit with Thanos together.
Normally it happens just when you start your similator ,when it reaches its middle position.When playing it's not a problem and even its the opposite because you want fast positioning.
Thanos said that he could maybe adapt the pwm when the game is not started and when game started full pwm.But he has to recognize off game and on game to do that.

For me amc1.6 works great with ac motors and wiper motor.The problem happens with big powerfull dc motors.
User avatar
vicpopo
 
Posts: 645
Joined: Fri 20. Apr 2012, 18:04
Location: Strasbourg France
Has thanked: 39 times
Been thanked: 80 times

Re: Problem with sensors SS495a

Postby eldeejay » Tue 5. Mar 2013, 12:49

Hi Vicpopo, thanks for your interest.

I´m using DC motors, I have done tests on motors big and small, with 12 and 24VDC.
I have been researching my problem and seems it hall efect sensors work perfectly.

(explain background) I have implemented some optocouplers in the control signals for the H-bridge mosfet, and I have an external hand controller with PWM signal ("pwm controller manual"), have a joistyck and active the 2 channels on the 2 H bridge and has a potentiometer to adjust the width of the PWM pulses, namely the rotational speed and direction of the motors.

1245 (end explain background).

Reviewing the PWM control signals, I found a problem in the resulting signal after optocoupling and thoughts about being given the frequency at which the PWM signal is working (almost 21MHz).
At the IN of the optocouplers, the signal is perfect but the optocoupler output signal response is deformed by the internal transistors (hysteresis). This deformation causes the MOSFET to continue conducting in the lower zone PWM pulse and are immediately with the next rising flank of the PWM pulse, with the result that the control signal for the mosfet is almost full at the inlet although the optocouplers this perfectly modulated signal.

In the following my oscilloscope screenshots you can see the behavior of the signals have explained, PWM_MANUAL in capturing the signals is input / output optocouplers is perfect using my "pwm controller manual".

1244

In PWM_AMC capture is the problem that occurs when using PWM signals AMC controller at a frequency of approximately 21MHz.

1243


Maybe I need to use some smith trigger element to avoid hysteresis, or using optocouplers with faster transistors .... If the PWM control signal in embers lower range, for example 5 MHz, 2 MHz, 1 MHz ... hysteresis problem would be eliminated, but it is necessary that the Tronic AMC1.6xxx firmware be adjusted for a lower PWM frequency. Tronic modify the firmware for this test?...

I have to investigate further.


Any idea?


Regards
User avatar
eldeejay
X-Sim Supporter
 
Posts: 41
Images: 6
Joined: Tue 3. Jul 2012, 10:37
Location: Spain, Alicante
Has thanked: 4 times
Been thanked: 0 time

Re: Problem with sensors SS495a

Postby prilad » Tue 5. Mar 2013, 14:27

eldeejay wrote:At the IN of the optocouplers, the signal is perfect but the optocoupler output signal response is deformed by the internal transistors (hysteresis). This deformation causes the MOSFET to continue conducting in the lower zone PWM pulse and are immediately with the next rising flank of the PWM pulse, with the result that the control signal for the mosfet is almost full at the inlet although the optocouplers this perfectly modulated signal.


Hi.
First - I strongly recomend you to use "signal normalisation" after optocouplers. Like this:



Second - To increase speed of optocoupler you should decrease resistor in the collector of optocoupler transistor. Try to decrease it to 330..470 Ohm.

Reagards,
Ale
User avatar
prilad
 
Posts: 174
Images: 1
Joined: Tue 3. Apr 2012, 14:20
Location: Dubna, Moscow reg., Russia
Has thanked: 3 times
Been thanked: 37 times

Re: Problem with sensors SS495a

Postby eldeejay » Tue 5. Mar 2013, 14:52

prilad wrote:Hi.
First - I strongly recomend you to use "signal normalisation" after optocouplers. Like this:

opto_isolator for H-Bridge.jpg


Second - To increase speed of optocoupler you should decrease resistor in the collector of optocoupler transistor. Try to decrease it to 330..470 Ohm.

Reagards,
Ale


Hi Prilad,
you mean the resistance pull-up R20=4,7K change to 470ohm?

buy the optocoupler SFH6705 yesterday and I'm hoping to distribute the transport agency for testing.
http://www.vishay.com/docs/83683/sfh6700.pdf
User avatar
eldeejay
X-Sim Supporter
 
Posts: 41
Images: 6
Joined: Tue 3. Jul 2012, 10:37
Location: Spain, Alicante
Has thanked: 4 times
Been thanked: 0 time

Re: Problem with sensors SS495a

Postby prilad » Tue 5. Mar 2013, 16:33

eldeejay wrote:Hi Prilad,
you mean the resistance pull-up R20=4,7K change to 470ohm?

Hi, Eldeejay.

I carefully studied your pictures :D and saw that you use 4n25 optocoupler. I think you have Thanos isolator schematics.

On the oscilloscope we can see that the output transistor simply can't be fully opened (this is not "hysteresis"). This means that the current through the input LED is too small. In 4n25 datasheet they recommend to set forward current = 10 mA. In Thanos board input resistors (1.5 K) can provide current only (3.75 V / 1,5 K) = 2.5mA.

From other side - In datasheet we can see, that for max switching speed you should use only 100 Ohm resistor (instead 1.5 K) in the collector of output transistor.

So I recomend to use resistors 330 Ohm for input size and 200..300 Ohm for output size. For the begining. And if you have oscilloscope, you can choose the most suitable resistors to ensure the best performance

Regards,
Ale
User avatar
prilad
 
Posts: 174
Images: 1
Joined: Tue 3. Apr 2012, 14:20
Location: Dubna, Moscow reg., Russia
Has thanked: 3 times
Been thanked: 37 times

Next

Return to Controllers and Drivers

Who is online

Users browsing this forum: No registered users and 3 guests