Go Down

Topic: creating code for a square wave output and sine wave output (Read 1 time) previous topic - next topic

Feb 18, 2013, 04:18 pm Last Edit: Feb 20, 2013, 12:27 pm by basementjacks Reason: 1
hi im just wondering about finding code to create a square wave output  and a sine wave input&output for the Arduino UNO rev3. i need to measure the voltages and currents going in and out of the board with an oscilloscope and signal generator. any help would be greatly appreciated

KeithRB

Since the UNO has no DAC output, a sinewave is kind of tricky. You can filter the PWM output, but it might not be very clean.

AWOL

I hope your lecturer isn't a member here - many are   :)
You can build a four or five bit DAC easily with an R-2R resistor ladder (useful Google search term)
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

DuaneB

For generating output waveforms you should try Direct Digital Synthesis, this project uses it for the waveforms you mention and also has some useful links -

http://rcarduino.blogspot.com/2012/08/the-must-build-arduino-project-illutron.html

Duane B

rcarduino.blogspot.com

Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

Quote
You can build a four or five bit DAC easily with an R-2R resistor ladder (useful Google search term) 


is there a way to do it using the circuit i already have for my project? the schematic is below
  http://www.instructables.com/file/F6DPG7PGZMIUHMJ 

Go Up