Hello,
In my project the DUE will pilot up to 6 three-phase frequency inverters controlling 6 220v tri-geared motors.
Each geared motor is connected to a crank rod system controlled in position by a 360 ° potentiometer. The normal working stroke will be + 60 ° / 0 ° / -60 °
For the drive control part (out of the internally managed position feedback loop in the Due, I need for each motor to:
1 ADC input (no problem at the moment)
2 digital outputs to control the direction of rotation at the input of the drives (subject treated on the post By the registers how to prohibit to have 2 digital pins at the same time in ON ? - Arduino Due - Arduino Forum )
)
1 PWM output having a high frequency so that at the output of second level RC filtering the signal is as continuous and pure as possible
In order to have the fastest possible PID management, I want to use the registers of the SAM AT91SAM 3X8E of the DUE
The PWM output will be used as speed reference at the drive input
Specifications for PWM outputs:
PWM 12 bits with a change of duty through the registers - How?
Maximum frequency usable in PWM 12 bits - What is it?
6 Pins among these 8 pins PWM Timer are destined in my project to the speed setpoint:
Inverter speed setpoint 1: Pin 2 (TIOA0)
Inverter speed setpoint 2: Pin 3 (TIOA7)
Inverter speed setpoint 3: Pin 4 (TIOB6)
Inverter speed setpoint 4: Pin 5 (TIOA6)
Inverter speed setpoint 5: Pin 10 (TIOB7)
Inverter speed setpoint 6: Pin 11 (TIOA8)
In reserve for extension: Pin 12 (TIOB8) and Pin 13 (TIOB0)
These 6 pins will be interfaced to adapt the voltage and output power with 2 OP amplifier TLV274IN or LM324N
About the 8 TIOx PWMs (pins 2 to 5 and pins 10 to 13), how often can they be operated in a sustainable way if you want to use a 12-bit PWM.
PWM TIOx Maxi: 10Khz in 12 bits? I am currently getting 10KHz in 12 bits by changing variant.h
1) Can you go higher in frequency without CPU heating?
2) How does changing variant.h happen? (10khz or more!)
3) How to vary the duty of PWM TIOx through the registers?
As for the PWM Lx and PWM Hx?
Purpose: Decrease response time by avoiding using digitalWrite (pin, value) ?
Thank you for all your valuable information that you will bring!
Note:
I had modified variant.h to have 40kHz in 12 bits, it worked well only a few hours before the deterioration of the Due CPU
Bonjour,
Dans mon projet la DUE pilotera jusqu’à 6 variateurs de fréquences triphasé commandant 6 motoréducteurs 220v tri.
Chaque motoréducteur est relié à un système bielle manivelle contrôlé en position par un potentiomètre à 360°. La course de travail normale sera +60° /0° / -60°
Pour la partie de commande du variateur (hors de la boucle de feedback de position géré en interne dans la Due, j’ai besoin pour chaque moteur de :
1 Entrée ADC (aucun problème pour l’instant)
2 Sorties digitales afin de commander le sens de rotation à l’entrée des variateurs (sujet traité sur le post By the registers how to prohibit to have 2 digital pins at the same time in ON ? - Arduino Due - Arduino Forum )
1 Sortie PWM ayant une fréquence élevée afin qu’en sortie du filtrage RC de second niveau le signal soit le plus continu et pur possible
Afin d’avoir une gestion du PID la plus rapide possible, je souhaite utiliser les registres du SAM AT91SAM 3X8E de la DUE
La sortie PWM servira de consigne de vitesse en entrée variateur
Cahier des charges pour les sorties PWM :
PWM 12 bits avec un changement de duty en passant par les registres – Comment ?
Fréquence maximale utilisable en PWM 12 bits – Quelles est-elle ?
6 Pins parmi ces 8 pins PWM Timer sont destinées dans mon projet à la consigne de vitesse:
Consigne de vitesse du variateur 1 : Pin 2 (TIOA0)
Consigne de vitesse du variateur 2 : Pin 3 (TIOA7)
Consigne de vitesse du variateur 3 : Pin 4 (TIOB6)
Consigne de vitesse du variateur 4 : Pin 5 (TIOA6)
Consigne de vitesse du variateur 5 : Pin 10 (TIOB7)
Consigne de vitesse du variateur 6 : Pin 11 (TIOA8)
En réserve pour extension : Pin 12 (TIOB8) et Pin 13 (TIOB0)
Ces 6 pins seront interfacées pour adapter la tension et la puissance de sortie avec 2 amplificateur OP TLV274IN ou LM324N
A propos des 8 PWM x (pin 2 à 5 et pin de 10 à 13) , quelle est la fréquence à laquelle on peut les faire fonctionner de façon durable si l'on souhaite utilisé un PWM en 12 bits.
PWM TIOx Maxi : 10Khz en 12 bits ? J’obtiens actuellement 10KHz en 12 bits par la modification de variant.h
1) Peux-t-on aller plus haut en fréquence sans échauffement du CPU ?
2) Comment se passe de la modification de variant.h ? (10khz ou plus !)
3) Comment faire varier le duty des PWM TIOx en passant par les registres?
Comme pour les PWMLx et PWMHx ?
But : Diminuer le temps de réponse en évitant de passer par digitalWrite(pin, value) ?
Merci pour toutes vos informations précieuse que vous allez m'apporter !
Nota:
J'avais modifié variant.h pour avoir du 40kHz en 12 bits , cela a bien fonctionné que quelques heures avant la détérioration du CPU de la Due