Close

555 Timer Pulse Generator @ Approx 1020 Hz

A project log for DAV5 V3.01 Raman Spectrometer

The only thing worth doing, is the thing worth doing right!

david-h-haffner-srDavid H Haffner Sr 03/29/2017 at 13:160 Comments

I put together a simple pulse generator, using a 555 timer chip from a schematic from an old Forest Mims notebook of mine, so I could calibrate the MCU and MegunoLink Pro to work together when I get ready to link the CCD to the ATmega1284.

These are the results below and they are beautiful :)

Final Plot, 4.47vdc @ 0.26mA

Code used for this test;

#include "MegunoLink.h" // Helpful functions for communicating with MegunoLink.

// Millis value when the data was last sent.

long LastSent;

// Interval (milliseconds) between sending analog data

const unsigned SendInterval = 200; // [ms]

// The plot we are sending data to.

TimePlot MyPlot;

void setup()

{

Serial.begin(115200);

LastSent = millis();

MyPlot.SetTitle("PulseTestProgram");

MyPlot.SetXlabel("Frequency Hz");

MyPlot.SetYlabel("MilliSeconds");

MyPlot.SetSeriesProperties("GeneratorValue", Plot::Magenta, Plot::Solid, 2, Plot::Square);

}

void loop()

{

if ((millis() - LastSent) > SendInterval)

{

LastSent = millis();

int DataValue = analogRead(PA0);

MyPlot.SendData("GeneratorValue", DataValue);

}

}

This plot is using a 10k Pot @ 4.53vdc

Pulse at 4.98vdc

Pulse at 4.13vdc

Pulse at 4.27vdc

Discussions