4908Views12Replies

Author Options:

how do i make an analog clock with an arduino and an oscilloscope? Answered

i would like to make an analog clock that displays on an oscilloscope using an arduino. Is this possible? and i would like some help with the code.i will also have buttons to set the clock. the picture is what i would like to do with my arduino

Discussions

0
lemonie
lemonie

Best Answer 10 years ago

Kits/boards are not that expensive to buy. (click)

L

temp.JPG
0
devicemodder
devicemodder

Answer 10 years ago

thanks for the info

0
[AV3NG3R]
[AV3NG3R]

10 years ago

Seems like an awesome project.

At a guess, though, I'd say that one in the photo is just hooked up directly to the screen, not hooked into the standard inputs (i.e. voltage vs. time).

0
Opcom
Opcom

Answer 9 years ago

The scope is in the "X-Y" mode. The inputs apparently are through the regular probes shown. Most scopes have an X-Y mode. It takes a 1-2Mhz bandwidth scope, preferably dc coupled, to display the sparkfun clock well. Here are some pics. The big display is a Wavetek electromagnetic XY. It's real slow, like an arcade game display. When the sparkfun scopeclock DAC write delay was increased hugely, it started to look better. But, a better display (deflection system) is what is really needed. I've ben wrking at this a while. Hope to have soon a project that will help anyone to do the scopeclock or arcade, on any CRT. It will require a lot work on their part though.

clock and the vertical waveform.JPGplayroom.JPGslowie XY with extremely slowed scopeclock.jpgslowie XY with slowed scopeclock 8Hz refresh.jpgsparkfun board.JPGthis XY display too slow.JPGwaste of a 7900.JPG
0
devicemodder
devicemodder

10 years ago

i am just learning to code in C even numbers for a digital clock would be nice

0
steveastrouk
steveastrouk

10 years ago

Tricky. Clocked flat out, and running in assembler, you could do it...

0
devicemodder
devicemodder

Answer 10 years ago

arduino is c

0
steveastrouk
steveastrouk

Answer 10 years ago

Precisely, and its considerable abstracted from the hardware. You'll need to program closer to the metal to get fast enough output rates to do it. I think you need to do some math, and work out the data update rate, and resolution you need, do you do a raster, or vector display ? I've done similar on different processors by vectors.

0
orksecurity
orksecurity

Answer 10 years ago

Simply drawing vector images for the hands ought to be relatively easy -- two analog outputs (X and Y) and one additional output for "Z" (beam on and off, which most serious scopes will let you do). I'd start by drawing simpler figures to get a feeling for how to program this, how quickly the image fades (ie, how quickly you have to get back and redraw), and so on. Then get the hands running and updating as time passes. Then see how much additional detail you can add before the blinking becomes intolerable.

Note: Don't even think about trying to calculate sine/cosine while plotting the endpoints of the hands. Precalculate those constants for the 60 angles you need, and do a table lookup. MUCH faster.

0
steveastrouk
steveastrouk

Answer 10 years ago

Pray you have a long persistence phosphor....

0
NachoMahma
NachoMahma

Answer 10 years ago

> Don't even think about trying to calculate sine/cosine while plotting the endpoints of the hands. Precalculate those constants for the 60 angles you need, and do a table lookup.
.  Great idea when processing power is limited.

0
BIGHAIRYDUDE
BIGHAIRYDUDE

Answer 10 years ago

WOW!