You are on page 1of 4

CONFIDENTIAL INFORMATION !

Embedded Software Requirements For


Portable PWM Signal Function Generator
Release version 1.2

8/31/2023 1
USER CONTROL CONFIDENTIAL INFORMATION !

Release version 1.2


SPWM/PWM MODE
INTRUDUCTION
After turning the device “POWER ON” every single time on screen will popup introduction HELLOW WORLD ! message for 3 Seconds.
Then will switch to PWM or SPWM menu mode .

MODE
MODE is configuration function. There are two modes PWM and SPWM.
• SPWM is Sinusoidal Pulse Wide Modulation.
• PWM is Basic Pulse Wide Modulation. (Low Priority).

MENU
After changing the switching mode SPWM or PWM we can see the indication on LCD top left corner.
• S FREQ is switching frequency set point value. Limits 5Hz – 100,000Hz Min step 1Hz.
• F FREQ is fundamental sinusoidal frequency set point value. Limits 1Hz – 1,200Hz. Min step 1Hz.
• DUTY is duty cycle percentage value of PWM/SPWM signal. This value defines the maximum duty cycle limits 1 % - 99 %. Min step 1%.
• DT is a dead time which is the minimum off time between high side and low signals. This provides safe operation to converter/inverter by avoiding transistors to create unexpected Shoot-throughs. Range 100ns – 3,000ns. Min step 100ns.
• RUN T is PWM Run time (off timer); this is the period to transfer from old value to the new value. If selected value is 0ms, transitions are performed instantly. Limits 0ms – 100,000ms. Min step 1ms.
• TRNS T is transition time . This value define how long we want the PWM signal will stay ON. If the setpoint value, is INF it mean the device will run until we stop. Limits 100,000ms – INF. Min step 1ms.
• S METH is technique how to generate sinusoidal waveform. There are two switching methods UNI-POL (Uni-polar switching 180 Deg) and BI-POL (Bi-polar In same phase).
• DEFAULT is the default settings. After pressing ENTER on this parameter and holding for 3 seconds the device will erase EEPROM and will set all values to the default parameters.
• BACK command will direct back to the MODE menu.

NOTES AND STEPS


1. By default, SPWM/PWM will delay 50ms to start after pressing single push button RUN/START from STOP.
2. All set values should be saved in EEPROM after enter. The default values are approximately half of the maximum variable values. Those default parameters can be set in firmware.
3. SPWM or PWM current state values should reflect on screen in real-time, so we can see the status. (Low Priority).
4. In SPWM/PWM modes the High and Low output signals can be protected by DT from overlapping.
5. On both modes by pressing START/STOP single push button the PWM on output will immodestly react to change the state ON or OFF. Also, we can see on LCD on top right corner -ON- or -OFF- indications.
6. When PWM is ON the GPIO 8 should be High(1) when PWM is OFF the GPIO 8 should be Low(0) with 0 delay.
7. In SPWM mode the minimum switching frequency is around 50.0 Hz. Nevertheless, depending on fundamental frequency set point the software should define max and minimum switching frequency and duty cycle limits.
8. During selection, the cursor movement on menu will show symbol then after pressing Encoder on screen the variable will be covered with square brackets on each side for example > S FREQ [100050Hz] .
9. To adjust the variable simply need to rotate the encoder knub to CW or CCW direction. After repressing the encoder will set the value and will move to menu selection stage.
10. If we need to change the adjustment resolution, we can choose one of those 5 numbers 1, 10, 100, 1000, 10000. By pressing and holding encoder (about 400ms). Then on top middle side of the screen will be indicate resolution number.
11. To define the resolution set point during adjustment on variables will be indicate underline. For example. If resolution is 10, we can see underline under second digit from right. 100050Hz. Follow the screenshot examples.

8/31/2023 2
USER CONTROL CONFIDENTIAL INFORMATION !

ENCODER KNUB CONTROL Release version 1.2


Encoder knub:
CW – Menu line Up or Right/ increment of number (Debouncing time is 1ms )
CCW – Menu line Down or Left/ decrement of number (Debouncing time is 1ms )
PUSH – Select (Debouncing time is 5ms )
GPIO Designators for left encoder are DT- GPIO 2, CLK-GPIO 3, PB-GPIO 4

START/STOP BUTTON CONTROL


To START and STOP PWM signal in output we are using single push button connected to GPIO 7 (Active Low).
The button debouncing time is 5ms and interval between START and STOP is 500ms

LCD
For LCD we use 20x4 Liquid Crystal with I2C interface.
For communications we use GPIOs dedicated for I2C they are GPIO UNO A4/ MEGA 20 - SDA, GPIO UNO A5/ MEGA 21 - SCL

PWM AND LED OUTPUTS


The PWM outputs In Arduino MEGA dedicated on GPIO 9 (high side) and GPIO 10 (Low side).
When Device is in OFF state GPIO 9 and 10 should be Low (0). The LED output is GPIO 8, It will be high when PWM is ON.

MAIN COMPONENTS
1 PCS – Arduino MEGA or similar controller
1 PCS – Liquid Crystal LCD2004 20X4 (LCD communication can be done with I2C Interface between LCD and controller)
1 PCS – Rotary encoder switch integrated with push button
1 PCS – Momentary Push Button
1 PCS – LED (With Resistor)
1 PCS – USB Cable
ENCODER SWITCH LCD 2004(20X4) WITH I2C ARDUINO MEGA JUMPER WIRE SET PUSH BUTTON LED USB A to USB B
1 PCS 1 PCS 1 PCS 1 PCS 1 PCS 1 PCS 1 PCS

8/31/2023 3
CONFIDENTIAL INFORMATION !

Release version 1.2

8/31/2023 4

You might also like