How to create very fast square pulses with Arduino ( up to 4 MHz with Arduino NANO, UNO, & MEGA2560
digitalWrite command of Arduino is very slow and with that you can only achieve 150 kHz signals (full period, ON and OFF) at best.
In this video I show you that using port manipulation and while loop you can get up to 4 MHz signals (ON period less than OFF period) and 2.66 MHz with 50% duty cycle.
Also you will learn how to produce multiple signals at exactly the same time. this is something which is useful if you want to make a pulse with a multilevel converter, I mean at sometimes you want to drive the switches independently to make sine wave or other waveform, but if you want make a lightning impulse with the multilevel converter, it is necessary to turn on all switches at the same time.
At the end I summarized the results and based on this experimental work I concluded the number of clock cycles that it takes to run each command. If you see some mistake somewhere, let me know.
The probe and scope should have sufficient bandwidth to capture the signals properly. I used the probe at 10X to increase the bandwidth. Even so steel the signal is filtered a bit.
The following pages/videos are good references to look at:
https://www.arduino.cc/en/Reference/PortManipulation
https://roboticsbackend.com/arduino-fast-digitalwrite/
https://www.youtube.com/watch?v=UhTRrjYXqPU&t=606s
Видео How to create very fast square pulses with Arduino ( up to 4 MHz with Arduino NANO, UNO, & MEGA2560 канала High Voltage Engineering by MG Niasar
In this video I show you that using port manipulation and while loop you can get up to 4 MHz signals (ON period less than OFF period) and 2.66 MHz with 50% duty cycle.
Also you will learn how to produce multiple signals at exactly the same time. this is something which is useful if you want to make a pulse with a multilevel converter, I mean at sometimes you want to drive the switches independently to make sine wave or other waveform, but if you want make a lightning impulse with the multilevel converter, it is necessary to turn on all switches at the same time.
At the end I summarized the results and based on this experimental work I concluded the number of clock cycles that it takes to run each command. If you see some mistake somewhere, let me know.
The probe and scope should have sufficient bandwidth to capture the signals properly. I used the probe at 10X to increase the bandwidth. Even so steel the signal is filtered a bit.
The following pages/videos are good references to look at:
https://www.arduino.cc/en/Reference/PortManipulation
https://roboticsbackend.com/arduino-fast-digitalwrite/
https://www.youtube.com/watch?v=UhTRrjYXqPU&t=606s
Видео How to create very fast square pulses with Arduino ( up to 4 MHz with Arduino NANO, UNO, & MEGA2560 канала High Voltage Engineering by MG Niasar
Показать
Комментарии отсутствуют
Информация о видео
23 ноября 2020 г. 7:01:40
00:18:03
Другие видео канала
![AD9833 Programmable Waveform Generator](https://i.ytimg.com/vi/PWj3QBuNFv8/default.jpg)
![DIY Radio Controller - Arduino & NRF24 + amplified antenna](https://i.ytimg.com/vi/aztm_8qGVfc/default.jpg)
![Arduino MCUs and MCP48XX/MCP49XX Family DACs – The Basics](https://i.ytimg.com/vi/bj57xuQS7L8/default.jpg)
![How Rotary Encoder Works and How To Use It with Arduino](https://i.ytimg.com/vi/v4BbSzJ-hz4/default.jpg)
![This Toy Can Open Any Garage](https://i.ytimg.com/vi/CNodxp9Jy4A/default.jpg)
![Top 10 Arduino-Sensors with Projects for Beginners](https://i.ytimg.com/vi/cAKnTSJb-SE/default.jpg)
![Auto-aiming bow vs. FLYING targets](https://i.ytimg.com/vi/1MkrNVic7pw/default.jpg)
![Timer Interrupt ISR + Examples | Arduino101 | Set Registers & Modes](https://i.ytimg.com/vi/Uv9UeYUsA8A/default.jpg)
![How to generate high frequency PWM signal using Arduino for buck boost converter](https://i.ytimg.com/vi/o5LtqnXdIDY/default.jpg)
![Arduino - What is a Pulse and How to Use the pulseIn() Function (with example)](https://i.ytimg.com/vi/lYP9Sz5g4nU/default.jpg)
![Arduino Home Security System](https://i.ytimg.com/vi/dRCnccv_dVE/default.jpg)
![Arduino Basics Change your PWM Frequency](https://i.ytimg.com/vi/gMB88fXOZ-g/default.jpg)
![HOW TO CONNECT A ROTARY ENCODER TO ARDUINO | DIY | ARDUINO LESSONS](https://i.ytimg.com/vi/D5KCloB11Fw/default.jpg)
![DIY simple Arduino Frequency Meter up to 6.5MHz](https://i.ytimg.com/vi/LIN5rKICg4w/default.jpg)
![Learn Oscilloscope Basics with an Arduino Uno and RTM3004 | AddOhms #28](https://i.ytimg.com/vi/kzVXf_oiHeE/default.jpg)
![Circuit Skills: Perfboard Prototyping](https://i.ytimg.com/vi/3N3ApzmyjzE/default.jpg)
![How PIR Sensor Works and How To Use It with Arduino](https://i.ytimg.com/vi/6Fdrr_1guok/default.jpg)
![Arduino Due Simple Function Generator Example](https://i.ytimg.com/vi/uDiWY4X8NMw/default.jpg)
![Variable Frequency Driver | Variable Inverter](https://i.ytimg.com/vi/FElPFGyNI3k/default.jpg)
![How to see the results while a COMSOL simulation is running ( using probe )](https://i.ytimg.com/vi/eW9LMx-oseA/default.jpg)