naked nixie - modern take on nixie clocks

More
1 year 2 days ago #7609 by vladco
i will keep you posted with my progress :)

its always nice to read how people solve different issues so it was a nice, helpful read!

Please Log in or Create an account to join the conversation.

More
11 months 4 weeks ago #7632 by vladco
so i have played a little bit with os timers (used by the ticker library) vs hw timer 1

the testing methodology looks something like: setup timer1 or ticker to generate an 1Hz (interrupt generated every 1ms) square wave datalog the frequency for a number of seconds, plot it. During the acquisition period the web app running on the ESP was accessed to see the influence on both timers.

For measuring the frequency i have used the nice library written by Paul Stoffregen (creator of Teensy board) www.pjrc.com/teensy/td_libs_FreqMeasure.html running on a arduino nano clocked @ 16Mhz, i may revisit the frequency measurement once i can get my hands on a frequency counter or DMM.

After running both tests for around 1000s (~16min) i got the following data regarding max,min, avg frequency:
maxminavg
os_timer1.0976710.9172120.999392
timer10.9978110.9977280.997769

Analyzing the frequency over time (plot attached at the end of the post) shows the following:

os_timer is closer to the 1Hz frequency, but one could clearly see that there is positive/negative drift, this result is totally expected since its stated that during wifi task the os timers will drift.

the timer1 data shows a much more stable frequency output which is not affected by the wifi tasks even though the frequency is a bit lower than the expected 1Hz (that could be easily solved in software)
Attachments:

Please Log in or Create an account to join the conversation.

More
11 months 4 weeks ago #7635 by Ty_Eeberfest
Interesting. At least at first glance, the hardware timer looks like it could do a good job of being the timebase of a clock.

One question: are the values you refer to as "average" the true arithmetic mean of a whole series of samples? Or did you just take the sum of the highest and lowest values and divide by 2? If it's the mean then that timer is pretty tight - stable to 84 parts per million by my rough fast math.

Look into it later when the dust is clearing off the crater.

Please Log in or Create an account to join the conversation.

More
11 months 3 weeks ago - 11 months 3 weeks ago #7636 by vladco
the values are averaged using the excel average which was used over the whole dataset, so it is the true arithmetic mean

I am curious now if i repeat the experiment with a frequency counter/ DMM what results do i get
Last Edit: 11 months 3 weeks ago by vladco.

Please Log in or Create an account to join the conversation.

More
11 months 3 weeks ago #7638 by Ty_Eeberfest

vladco wrote: the values are averaged using the excel average which was used over the whole dataset, so it is the true arithmetic mean


Okay just wanted to make sure. I did a few calcs that assumed that it was the mean. All I really did was look at how far away from the mean the min and max readings were and I was pleased to see they were almost exactly equally distant from the mean. What I think this means is that the variations are very evenly distributed on both sides of the mean, or in other words it runs very consistent over any substantial period of time (because it "evens out"). Which suggests that if you used the mean value as a basis for the software correction factor it should be a pretty accurate clock. At least I think so - lol - I'm not so good with statistical analysis.

vladco wrote: I am curious now if i repeat the experiment with a frequency counter/ DMM what results do i get


Maybe... When I was first playing with external 32KHz crystals and TCXOs I wanted to do that test, but couldn't come up with a meter or counter that had fine enough resolution. My point being that even at 32KHz a variation of only .001Hz or so will make a big difference over the long run, and no test equipment I had access to could measure with such resolution.

Look into it later when the dust is clearing off the crater.

Please Log in or Create an account to join the conversation.

More
11 months 3 weeks ago #7640 by vladco

Ty_Eeberfest wrote: I'm not so good with statistical analysis.

i think i know even less than you :laugh: - i could provide the dataset if you want to play around with it, and i will also redo the tests and acquire more data, i have heard more data is always good for statistics

Ty_Eeberfest wrote: My point being that even at 32KHz a variation of only .001Hz or so will make a big difference over the long run, and no test equipment I had access to could measure with such resolution.


i have access to some Keithley 2000 DMM and some Agilent/Keysight 34401a but none can't measure the 1Hz frequency, i could generate a higher frequency and use the above equipment for testing.

Please Log in or Create an account to join the conversation.

More
11 months 3 weeks ago #7648 by Ty_Eeberfest
Random idea... if you have access to that kind of test equipment then there's a good chance you also have access to a high accuracy function generator. If so, you could set your function generator to something sort of fast (say 100KHz maybe?), feed it to the counter, and gate it with your 1Hz signal. Then do a little minor math, e.g. if the counter counts up to 999,990 during the 1 second period then your 1 second signal is off by 0.000001Hz, and so forth. Indirect measurement of the slow signal, I guess you'd call it.......

Look into it later when the dust is clearing off the crater.

Please Log in or Create an account to join the conversation.

More
11 months 2 weeks ago #7664 by vladco
i have access to a frequency generator, not sure how accurate it is but i'm not sure i am going to investigate this anymore as I am pretty happy with the accuracy now that i moved to timer1 and since it has WiFi i can do an update whenever i want, NTP version 4 specifies a minimum of 15 seconds between requests to the same server im pretty sure i can keep 15 seconds of accurate time even now.

Anyway i have been working on the web interface a bit, gave it a nice orange color to go well with the nixie tubes, build with bootstrap (responsive) and jquery all requests are sent via GET/POST XHR requests (information retrieving via GET, data posting via POST) and the clock responds with JSON formatted data.

The hardware configuration part is not done on the clock side, so no dimming or OTA updates but i hope to have it work soon, at least the OTA since i don't think i can get the dimming to work.

Please Log in or Create an account to join the conversation.

More
11 months 2 weeks ago #7665 by judge
Interesting. I too have used the async web stack - initially because that is what fauxmo uses, and I wanted to add voice control to my clock. However the async programming style is very familiar to me and seems to lend itself better to this kind of 'real time' programming. I also ended up using the async web socket library for all of my browser comms. It really is a great protocol and it allows me to push data from the clock to all connected browsers whenever that data changes and for whatever reason.

i used jquery mobile rather than bootstrap - I found it to be better suited to mobile displays, though neither was particularly great I thought. I stored most of the static assets in spiffs, which meant I didn't have to muddy the code with a lot of string literals. Web sockets came in really useful here as I could render the basic page using HTTP get and then push all of the data to the page as soon as it was rendered (though I guess pulling it from the web page using AJAX would have worked too!).

I have started looking at what MCU I will use in my future clocks. I have bought several ESP8285 dev boards, in particular the PSF-B85 , this board from onehorse, and the D1 Mini Pro . The advantage for me is that it is a single-chip solution for WiFi+Flash RAM+GPIO + it is low power.

I've still to actually break one out and use it however :-( Life gets in the way! While it does, I am busy buying many different kinds of Nixies from ebay. I'm not sure which board I will try and use first. Probably the onehorse board.

The hardware timer experiment is very interesting - I'm looking forward to getting my hands dirty!

Please Log in or Create an account to join the conversation.

More
11 months 2 weeks ago #7667 by vladco

judge wrote: i used jquery mobile rather than bootstrap - I found it to be better suited to mobile displays, though neither was particularly great I thought. I stored most of the static assets in spiffs, which meant I didn't have to muddy the code with a lot of string literals. Web sockets came in really useful here as I could render the basic page using HTTP get and then push all of the data to the page as soon as it was rendered (though I guess pulling it from the web page using AJAX would have worked too!).


never used jquery mobile - went with bootstrap because i have used it before, and because it has a tone of examples, the interface is based on their dashboard example.

Because i wanted to limit the number of requests to the server everything is designed to go in a single file (html,css,javascript) which is compressed using gulp.js resulting in a single index.html.gz file which is stored on the SPIFFS. On requests the servers sets the Cache-Control header so the big file is downloaded once, the only problem i have with the UI right now is that the client has to always initiate a connection to the server, i should have looked into websockets more, but hey it works and i can always change it.

here is an example of using gulp with esp8266 tinkerman.cat/optimizing-files-for-spiffs-with-gulp/

judge wrote: I have started looking at what MCU I will use in my future clocks. I have bought several ESP8285 dev boards, in particular the PSF-B85 , this board from onehorse, and the D1 Mini Pro . The advantage for me is that it is a single-chip solution for WiFi+Flash RAM+GPIO + it is low power.


the D1 mini pro is perfect for development, the webui was developed on one, you get an insane amount of flash, USB to serial onboard and a pretty small form factor, all that for 5$ - you can't beat that, the onehorse looks interesting but a bit expensive compared with the others, one thing i really don't like is that they both require headers to be connected to another board. Castellated pads is the main reason why i go with ESP07/12 on my boards. Never heard of the one made by ITEAD but it has castellated pads, might give it a try someday.

judge wrote: I've still to actually break one out and use it however :-( Life gets in the way! While it does, I am busy buying many different kinds of Nixies from ebay. I'm not sure which board I will try and use first. Probably the onehorse board.


tell me about it, i started working on this around November last year and there are still some things that need to be done.

Please Log in or Create an account to join the conversation.

Moderators: AccutronTy_EeberfestIan
Time to create page: 0.497 seconds

Search

Tube Suppliers

Go to top
JSN Boot template designed by JoomlaShine.com