Author Topic: High frequency pulse with arduino uno  (Read 1906 times)

0 Members and 1 Guest are viewing this topic.

Offline rauldmTopic starter

  • Regular Contributor
  • *
  • Posts: 155
  • Country: mx
High frequency pulse with arduino uno
« on: August 04, 2021, 04:49:53 am »
Few days ago, I found a post for work with high frequency pulses with arduino, I found a next code that can generate a 4 MHz pulse waveform, most interesanting thing was the performance, can reach 4.3 ns of rise time, I attach oscilloscope capture, I measure with tektronix 500 MHz passive probes. I hope this can works for someone that just needs low rise time pulse. This rise time is better even than  SDG 2042x waveform generator or the agilent 33120a.
Regards-.
 

Offline rauldmTopic starter

  • Regular Contributor
  • *
  • Posts: 155
  • Country: mx
Re: High frequency pulse with arduino uno
« Reply #1 on: August 04, 2021, 04:50:26 am »
Code: [Select]
#include <TimerHelpers.h>

// Timer 0

// output    OC0B   pin 11  (D5)

const byte timer0OutputB = 5;
 
void setup() {
   pinMode (timer0OutputB, OUTPUT);
   TIMSK0 = 0;  // no interrupts
   Timer0::setMode (7, Timer0::PRESCALE_1, Timer0::CLEAR_B_ON_COMPARE);
   OCR0A = 3;   // count to 4, zero-relative
   OCR0B = 1;   // duty cycle
}  // end of setup

void loop() {}
 

Offline jenniferkim

  • Contributor
  • Posts: 12
  • Country: ae
Re: High frequency pulse with arduino uno
« Reply #2 on: August 05, 2021, 01:29:03 am »
You have checked the frequency of the PWM pulse? This code doesn't look like one to generate a pulse of 500MHz.  :-//
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: High frequency pulse with arduino uno
« Reply #3 on: August 05, 2021, 03:19:10 am »
You have checked the frequency of the PWM pulse? This code doesn't look like one to generate a pulse of 500MHz.  :-//

His post is clear: it's a 4 MHz pulse with 4.3 ns rise time.

It's not a 500 MHz pulse.

You are confusing rise time with pulse frequency. They are independent parameters.

Rise time is purely a function of the output driver in the chip. I'm not surprised that an Arduino has a 4.3 ns rise time. That's nothing spectacular.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14445
  • Country: fr
Re: High frequency pulse with arduino uno
« Reply #4 on: August 05, 2021, 05:25:12 pm »
Rise time is purely a function of the output driver in the chip. I'm not surprised that an Arduino has a 4.3 ns rise time. That's nothing spectacular.

Yeah. Especially if the IO is only loaded with a high-impedance load such as a scope probe. Now try loading it a bit more and see what you get. Chances are, discrete logic gates - not even the fast ones - such as in the 74LVC series have shorter rise time than this kind of MCU (which I assume is an ATMEGA?) with any "significant" load.

As to rise time being shorter than a typical signal generator generating a square wave, it's to be expected. Digital arbitrary waveform generators use DACs to generate a given signal. You'll never get as short a rise time as with even a cheap logic gate. That's not what they are meant for.
 

Offline rauldmTopic starter

  • Regular Contributor
  • *
  • Posts: 155
  • Country: mx
Re: High frequency pulse with arduino uno
« Reply #5 on: August 09, 2021, 07:53:50 pm »
Many users of signal generator is happy with with rise time performance these equipments, I show like a simple arduino can do better rise time, I have seen some waveform generator with specific hardware for this.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: High frequency pulse with arduino uno
« Reply #6 on: August 09, 2021, 09:39:15 pm »
Yup!  This is typical of 74HC to LVC family pin drivers, and whatever equivalent is used in most MCUs, ASICs, etc.  Even a 5V ATMEGA is fast enough to cause signal quality issues on loose jumper wires and breadboards; I've demonstrated this myself with an external ADC (via SPI), for which I had to add ferrite beads to the wires.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf