Arduino and Oscilloscope Latency-Glitch Fun

  Рет қаралды 521

BrendaEM

BrendaEM

Күн бұрын

Пікірлер: 9
@kentvandervelden
@kentvandervelden 6 жыл бұрын
You might dig into the main() function that the Arduino IDE pulls in, which in turn calls loop() . There's some additional overhead that can be found with the source code pulled in by the IDE. I don't remember the explanation, but when I had this problem I switched to AVRStudio. If you just want to ignore the jitter, try looking for trigger holdoff or pulse width trigger options.
@BrendaEM
@BrendaEM 6 жыл бұрын
Thank you. It was interesting to see it. If I had time, I would try another Arduino Micro, just to be sure.
@NiHaoMike64
@NiHaoMike64 6 жыл бұрын
Make sure the probe is calibrated if you see overshoot or rounded edges where you're not expecting it.
@BrendaEM
@BrendaEM 6 жыл бұрын
I am fairly sure it was. Generally, I check it before each use.
@NiHaoMike64
@NiHaoMike64 6 жыл бұрын
@@BrendaEM Then it must be some weird transmission line effect causing it.
@BrendaEM
@BrendaEM 6 жыл бұрын
@@NiHaoMike64, I have a friend who specializes in signal integrity. He says that the over/undershoot can be fixed with a pull-down resistor. Still, it was better than I thought--except for the jitter.
@fuzzy1dk
@fuzzy1dk 6 жыл бұрын
I assume the jitter is from the arduino code installing a timer interrupt behind the scenes, disable interrupts if you need deterministic timing
@TimGremalm
@TimGremalm 6 жыл бұрын
You're getting pretty close to what your 16 MHz Arduino can handle with the Arduino-overhead. Arduinos loop-function i probably interupted by one of it's timers. "One major disadvantage is that any interrupts will affect the timing, which can cause considerable jitter unless you disable interrupts. " Bit-banging Pulse Width Modulation - www.arduino.cc/en/Tutorial/SecretsOfArduinoPWM You can disable the timer that Arduino uses, and get rid of the interrupts. I got a very stable output by disable timer0. gist.github.com/TimGremalm/61bc54f473bec4809122d3489f1793af There's a lot of other cheap microcontrollers out that is far more powerful and easier to use than the Arduino Nano. ESP32 for instance is like 10 times faster than the Nano, but only twice the price. The MCU have a buildt in PWM driver that that is uper easy to call. docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/mcpwm.html#_CPPv219mcpwm_set_frequency12mcpwm_unit_t13mcpwm_timer_t8uint32_t
@BrendaEM
@BrendaEM 5 жыл бұрын
Thank you. I wish the timers didn't mess with the ports.
How to Use an Oscilloscope - Mega Guide
18:53
Keysight Labs
Рет қаралды 172 М.
Basics of using an oscilloscope
9:43
Steven Bell
Рет қаралды 62 М.
Glitch Capturing, Automotive Oscilloscope Study Course
8:19
ADPTraining
Рет қаралды 1,1 М.
Spike Capture with Oscilloscope Deep Memory
11:11
Kiss Analog
Рет қаралды 1,9 М.
Using Rotary Encoders with Arduino
32:10
DroneBot Workshop
Рет қаралды 718 М.
6 Horribly Common PCB Design Mistakes
10:40
Predictable Designs
Рет қаралды 216 М.
How To Use an Oscilloscope | BEGINNER
9:03
KatVoltage
Рет қаралды 69 М.