3732Views12Replies

Author Options:

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

Picture of

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

12 Replies

user
lemonieBest Answer (author)2010-05-04

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

L

Select as Best AnswerUndo Best Answer

user
[AV3NG3R] (author)2010-05-04

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).

Select as Best AnswerUndo Best Answer

user
Opcom (author)[AV3NG3R]2011-05-22

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.

Select as Best AnswerUndo Best Answer

user
devicemodder (author)2010-05-04

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

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)2010-05-03

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

Select as Best AnswerUndo Best Answer

user

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.

Select as Best AnswerUndo Best Answer

user
orksecurity (author)steveastrouk2010-05-03

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.

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)orksecurity2010-05-04

Pray you have a long persistence phosphor....

Select as Best AnswerUndo Best Answer

user
NachoMahma (author)orksecurity2010-05-03

> 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.

Select as Best AnswerUndo Best Answer