This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:eval:user-guides:eval-adicup3029:reference_designs:demo_cn0415 [29 Aug 2018 14:40] – [General Description/Overview] Andrei Drimbarean | resources:eval:user-guides:eval-adicup3029:reference_designs:demo_cn0415 [19 Aug 2021 07:12] (current) – title word spell edit erbe reyta | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | The **ADuCM3029_demo_cn0415** provides a solution | + | The **ADuCM3029_demo_cn0415** provides a solution |
===== General Description/ | ===== General Description/ | ||
- | The **ADuCM360_demo_cn0415** project uses the **EVAL-CN0415-ARDZ** shield which is a control module that uses **PWM** to control current in solenoid actuators. The end product is an **Arduino** compatible daughter board for rapid prototyping platform that can be deployed to a robust Industrial environment and application. Its design is optimized | + | The circuit |
+ | |||
+ | The supply | ||
+ | |||
+ | Overcurrent fault and Overcurrent Reset block, controlled by general-purpose input/ | ||
+ | |||
+ | The sense block, consisting | ||
- | The circuit can be divided into three parts for the purpose of analysis: the supply block, the sense block and the actuator block. The supply block consists of DC-DC converters and protection circuits. The main supply is a 12V and 1A limited source that must be connected to **P1**. This is compatible with most power supplies available in an automobile. Alternatively the controller can be powered from a regulated 3.3V source on the Arduino connector. | ||
- | The current sense block contains a sense resistor of 0.1Ω that converts the current passing through the solenoid into a voltage drop that is picked up by an instrumentation amplifier. The resulting voltage is fed to the ADC that converts it to a 14 bit value and sends it via SPI to the **ADICUP3029**. | ||
The voltage fed to the ADC with respect to current passing through the solenoid is given by the equation: | The voltage fed to the ADC with respect to current passing through the solenoid is given by the equation: | ||
Line 27: | Line 31: | ||
</ | </ | ||
- | The actuator block consists | + | The actuator block, consisting |
- | {{ : | + | The software implements several functions with the sense and actuator blocks. PWM frequency and duty cycle can be controlled directly. This mode of operation would normally be combined with an outer feedback loop in a control system. One example would be a system in which the solenoid controls |
+ | |||
+ | A PID control loop allows the solenoid current to be accurately controlled, compensating for variations in supply voltage and coil resistance. This mode of operation allows for optimum drive current for 2-state solenoids, minimizing power dissipation. An additional function allows a higher initial “pull in” current to be applied for a short time, after which current drops back to a lower “hold” current. | ||
+ | |||
+ | {{ : | ||
Using the data gathered form the sense block the a **PID controller** is implemented that can be used to set a specific current value or duty cycle. To use the **PID controller** it must be first tuned with the right values of **Kp**, **Ki** and **Kd**. Various methods can be used for tunning. The proposed method, which is easy, but does not yield perfect results, is: | Using the data gathered form the sense block the a **PID controller** is implemented that can be used to set a specific current value or duty cycle. To use the **PID controller** it must be first tuned with the right values of **Kp**, **Ki** and **Kd**. Various methods can be used for tunning. The proposed method, which is easy, but does not yield perfect results, is: | ||
Line 35: | Line 43: | ||
- Start increasing **Ki** constant until the actuation time is reasonable and the current overshoot is within 5% of the wanted value. | - Start increasing **Ki** constant until the actuation time is reasonable and the current overshoot is within 5% of the wanted value. | ||
- Pick **Kd** as 25% (1/4) of **Ki**. | - Pick **Kd** as 25% (1/4) of **Ki**. | ||
+ | |||
+ | A dither function allows a low-frequency AC signal to be superimposed, | ||
===== Demo Requirements ===== | ===== Demo Requirements ===== | ||
Line 52: | Line 62: | ||
* Serial Terminal Program (Required for running in release mode only) | * Serial Terminal Program (Required for running in release mode only) | ||
* Such as Putty or Tera Term | * Such as Putty or Tera Term | ||
+ | * [[https:// | ||
===== Setting up the Hardware ===== | ===== Setting up the Hardware ===== | ||
- | - Connect **EVAL-CN0415-ARDZ** board to the **EVAL-ADICUP3029**. | + | - Connect **EVAL-CN0415-ARDZ** board to the **EVAL-ADICUP3029**. |
- Connect a micro-USB cable to **P10** connector of the **EVAL-ADICUP3029** and connect it to a computer. | - Connect a micro-USB cable to **P10** connector of the **EVAL-ADICUP3029** and connect it to a computer. | ||
- Connect a solenoid actuator to the **P8** connector with the positive wire on pin 1 and negative wire on pin 2. | - Connect a solenoid actuator to the **P8** connector with the positive wire on pin 1 and negative wire on pin 2. | ||
- | - Connect a 12V power supply to the **P1** connector with the positive wire on pin 1 and negative wire on pin 2.FIXME! | + | - Connect a 12V power supply to the **P1** connector with the positive wire on pin 1 and negative wire on pin 2.{{ : |
- Turn on power supply. | - Turn on power supply. | ||
===== Configuring the Software ===== | ===== Configuring the Software ===== | ||
Line 65: | Line 76: | ||
**vref** - Reference voltage of the **ADC** set by supply method as described above. Set to **4.096** if the supply is the 12V on **P1** or to **2.048** if supply is the **Arduino** 3.3V. | **vref** - Reference voltage of the **ADC** set by supply method as described above. Set to **4.096** if the supply is the 12V on **P1** or to **2.048** if supply is the **Arduino** 3.3V. | ||
+ | |||
+ | ^ Supply voltage | ||
+ | | 3.3V | 2.048 | | ||
+ | | 12V | 4.096 | | ||
+ | |||
< | < | ||
/* Reference voltage of the ADC */ | /* Reference voltage of the ADC */ | ||
Line 72: | Line 88: | ||
===== Outputting Data ===== | ===== Outputting Data ===== | ||
- | ==== Serial Terminal Output ==== | + | {{page>/ |
- | The program outputs data and **CLI** interface to a serial terminal through **UART**. | + | ==== Available commands ==== |
- | - In order to view the data, you must flash the program to the EVAL-ADICUP3029. | + | Typing **help** or **h** after initial calibration sequence will display |
- | - Then follow | + | |
- | Following | + | ^Type ^ Command |
- | | + | |System| //h// | Display available commands | |
- | Baud rate: 115200 | + | | | // |
- | Data: 8 bit | + | | | // |
- | | + | | | // |
- | Stop: 1 bit | + | |Control |
- | Flow Control: none | + | | | //d//\\ ex: **d 5234< |
- | \\ | + | | | //r// | Read and display the value of the ADC | |
- | The terminal program must interpret | + | | | // |
+ | | | // | ||
+ | | | //df//\\ ex: **df 50< | ||
+ | | | //da//\\ ex: **da 200< | ||
+ | |PID | // | ||
+ | | | // | ||
+ | | | //kp//\\ ex: **kp 5000.0< | ||
+ | | | //ki//\\ ex: **ki 1.5< | ||
+ | | | //kd//\\ ex: **kd 0.25< | ||
+ | | | //spf//\\ ex: **spf 100< | ||
+ | | | //sps//\\ ex: **sps 2500< | ||
+ | |Digital | ||
+ | | | // | ||
+ | |Proportional | ||
- | ==== Available commands ==== | ||
- | Typing **help** or **h** after initial calibration sequence will display the list of commands and their short versions. Bellow is the short command list: | + | {{ :resources: |
- | ^ Command | + | ===== Obtaining |
- | | //h// | Display available commands | | + | |
- | | //f// | Set frequency to the specified value\\ <// | + | |
- | | //d// | Set duty cycle to the specified value\\ <// | + | |
- | | //r// | Read and display the value of the ADC | | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | | // | + | |
- | FIXME! | + | There are two basic ways to program the ADICUP3029 with the software for the CN0415. |
+ | | ||
+ | - Building, Compiling, and Debugging using CCES | ||
- | ===== Obtaining | + | Using the drag and drop method, the software is going to be a version that Analog Devices creates for testing and evaluation purposes. |
- | We recommend not opening | + | Importing |
- | The source code and include files of the FIXME!**ADuCM3029_demo_cn0415** can be found here: | + | The software for the **ADuCM3029_demo_cn0415** can be found here: |
<WRAP round 80% download> | <WRAP round 80% download> | ||
- | + | Prebuilt CN0415 Hex File | |
- | FIXME! | + | |
- | + | Complete CN0415 Source Files | |
- | [[https://gitlab.analog.com/Platformation/ | + | |
</ | </ | ||
Line 147: | Line 155: | ||
==== Project Structure ==== | ==== Project Structure ==== | ||
- | FIXME! | + | The program is composed of three main parts: |
+ | | ||
+ | - Calibration; | ||
+ | - Main process. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | The boards initial parameters can be given in the software in the main function | ||
+ | The program initializes timers and UART, SPI, GPIO and FLASH controllers. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | **Calibration** is done to minimize full scale error. It sets control signal | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | The **main process** is the infinite loop in which the program implements **CLI**, **PID** and **dither** functionality. The **UART** is used for the **CLI** and three different timers implement the **PWM** signal, the **PID** periodic calculation and the **dither** functionality. | ||
+ | |||
+ | {{ : | ||
// End of Document // | // End of Document // | ||