Author Topic: Tiny VFD clock  (Read 25223 times)

0 Members and 1 Guest are viewing this topic.

Offline Len

  • Frequent Contributor
  • **
  • Posts: 553
  • Country: ca
Re: Tiny VFD clock
« Reply #25 on: October 24, 2013, 09:49:19 pm »
One last question, how accurate is an arduino without RTC as a clock? My nixie clock runs off the DCF77 signal (atom time baby O0) but for a little (gift)project like this a few seconds here and there won't matter but if it is minutes per month it'll be annoying.
Here's an example of a microcontroller-driven clock that uses a 32kHz watch crystal to keep time:
http://learn.adafruit.com/ice-tube-clock-kit/
It's also an example of how to drive an old-timey VFD (IV-18 not IV-6).
I have one and its timekeeping wasn't great until I trimmed it in the firmware. Now it's quite good.

If you want more accuracy, the Maxim DS3231 is excellent but costs around $10 I think.
DIY Eurorack Synth: https://lenp.net/synth/
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #26 on: October 24, 2013, 10:02:13 pm »
Yeah but I wanted to use the 16mhz crystal present on the arduino nano.

But I can always sacrifice my two remaing I/O for something like this http://www.ebay.com/itm/Arduino-I2C-RTC-DS1307-AT24C32-Real-Time-Clock-Module-For-AVR-ARM-PIC-SMD-/170910326110?pt=LH_DefaultDomain_0&hash=item27cb0c9d5e

14 I/O
-11 --> 4 for tube selection + 7 for the segments
-1 for the +60 volt psu
-2 left or for RTC
 

Offline Len

  • Frequent Contributor
  • **
  • Posts: 553
  • Country: ca
Re: Tiny VFD clock
« Reply #27 on: October 24, 2013, 11:27:39 pm »
Since the Nano seems to have a real crystal (not a ceramic resonator) it might be OK by itself for timekeeping. I'm not sure. But the RTC chip will keep track of minutes, hours, days, months for you which is convenient.
DIY Eurorack Synth: https://lenp.net/synth/
 

Offline Harvs

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: Tiny VFD clock
« Reply #28 on: October 24, 2013, 11:39:52 pm »
One last question, how accurate is an arduino without RTC as a clock? My nixie clock runs off the DCF77 signal (atom time baby O0) but for a little (gift)project like this a few seconds here and there won't matter but if it is minutes per month it'll be annoying.

As long as it's got a real crystal (just look for a shiny tin can), and you can continuously supply it power, then it'll be fine.  The reason for going to an RTC IC is to maintain time when you've got no power.  The watch crystal is no more accurate (in fact most are less accurate than a >1MHz crystal if you look at the specs), but in low power applications they consume a lot less current than running a timer at 16MHz.

Forgive me if I'm wrong but doesn't the Arduino already have a millisecond counter built into the software?  Then it becomes fairly trivial to convert that to hrs, sec, min.
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #29 on: October 25, 2013, 07:51:31 am »
Yeah they have a real 16mhz crystal an I know about the milis function. Power will be provided by a wall wart. But my idea is a button to increment the hours by one and a button for minutes +1 so setting the time after a power outtage wont be a much of a problem
 

Offline carbon dude oxide

  • Frequent Contributor
  • **
  • Posts: 429
  • Country: gb
Re: Tiny VFD clock
« Reply #30 on: October 26, 2013, 07:16:45 am »
I dd a project using the arduino as a clock an i found that it lat 4 second every hour, it might have been the code but it still lost that much time an hour, i had an ethernet sheild connected so i could sync the time every 30 mins to keep it relativly correct :) i would recomend using an RTC that way the time does not get affected by your code, and it can also be powered via an external backup battery so that you dont have to re program the time everytime you turn the clock off. Something like a DS1307 RTC works quite well, i use it in my clock and its nice and small :)
-----
Everything Should Be Made as Simple as Possible, But Not Simpler
-----
 

Offline Harvs

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: Tiny VFD clock
« Reply #31 on: October 26, 2013, 09:23:13 am »
10ppm is 26sec/month.  The cheapest 16MHz crystal on digikey is 50ppm tolerance, so at worst with no calibration will be just over two minutes per month.  If you do a small amount of calibration (add/sub milliseconds per day at midnight), and the temperature is just normal temp that a room would be, then the performance can be very respectable.

It sounds like your ethernet code may well have been completely hogging the processor (maybe disabling interrupts as part of it?).  It's not hard to just make sure that processor can always service something like a 1 ms interrupt off a hardware counter.

Sure you can put a DS1307, then calibrate the crystal on that, but unless you must have battery backup, the IC is more expensive than an ATmega328p.
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #32 on: October 26, 2013, 03:01:24 pm »
Yeah I'll try to get it going first, cramming a little extra pcb somewhere inside is always an option if it has trouble keeping time. But I have to say, even the cheapest chinese gadgets keep decent time nowadays. I may or may not have some time to draw a final schematic tonight but I already picked up some tiny 100uh coils at a local electronics store.
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3564
  • Country: us
Re: Tiny VFD clock
« Reply #33 on: October 26, 2013, 03:20:48 pm »
Yeah I'll try to get it going first, cramming a little extra pcb somewhere inside is always an option if it has trouble keeping time. But I have to say, even the cheapest chinese gadgets keep decent time nowadays.

They are usually trimmed.

Quote
I may or may not have some time to draw a final schematic tonight but I already picked up some tiny 100uh coils at a local electronics store.

Tiny coils are not good for DC-DC converters... resistance is too high, saturation current is too low.
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #34 on: October 26, 2013, 10:04:45 pm »
Oh no don't worry, they are not the resistor like coils. They are of the "can" type if you get what I mean, but one size smaller. Most often you see them about a cm thick but these are roughly half a cm. I'll post a pic next to a ruler tomorrow.
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #35 on: October 27, 2013, 10:21:26 am »
More like this...

I just wanted to start drawing but then I realized that I have no idea of the resistor values. how can I calculate those or what value should they be?
« Last Edit: October 27, 2013, 10:30:44 am by Mad_Hank »
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3564
  • Country: us
Re: Tiny VFD clock
« Reply #36 on: October 27, 2013, 06:17:33 pm »
More like this...

I just wanted to start drawing but then I realized that I have no idea of the resistor values. how can I calculate those or what value should they be?

R1 supplies the base current for the PNP... which should be the VFD current / minimum beta * safety factor (2 or 3)

R2 makes sure the PNP is turned off quickly enough... has to supply the leakage current (tiny) and discharge the capacitance (also tiny)... try 100K?
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #37 on: October 27, 2013, 09:47:53 pm »
Okay so for the grid 45 mA because it is multiplexed and the anodes <1.8 mA so I think ±1 mA should be alright.
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #38 on: October 30, 2013, 08:54:03 am »
It needs to be smaller :(

I made some sketches and the problem is that I have to fit everything in 18*24 holes, each transistor driver is 5*6  and I need 11 of them, so out of 432 holes I already used 330. SO i'll have to make concessions. I'll swap the arduino nanos for an atmega328 but since that won't give me the extra room necessary I was thinking of replacing the NPN transistor with an ULN2004 to save a bit of space. And adding a small board to connect the tubes to, since having 4 times a dozen of wires takes up 48 holes while I can switch that with 13 wires. 

My only other idea is to find out whether the IV-6 can run multiplexed at 45 volt or something so that I can swap all MPSA92, but I haven't found someone who can confirm this.
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #39 on: October 30, 2013, 04:22:21 pm »
Well I found out that my first design was very inefficient (space wise) 2*7 baby ;D



« Last Edit: October 30, 2013, 08:30:31 pm by Mad_Hank »
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #40 on: October 31, 2013, 09:51:20 pm »
I forgot the crystal, is it a bad Idea to add long wires to the crystal and place that above the power supply part?
On another forum someone said that the tubes often are bright enough to run at lower voltages, I might get away with a slightly lower part count but I think I can get away with this circuit. I just need to shift a bit with the  layout.
 

Offline richard.cs

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: gb
  • Electronics engineer from Southampton, UK.
    • Random stuff I've built (mostly non-electronic and fairly dated).
Re: Tiny VFD clock
« Reply #41 on: October 31, 2013, 11:20:19 pm »
You could put the crystal either on the underside of the board or on short wires on top of IC1
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #42 on: November 01, 2013, 09:32:02 am »
I think I can alter the layout a bit but I'm continuing this project after my exams.
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #43 on: November 10, 2013, 02:46:06 pm »
Back to the drawing board!

Someone helped me design a great enclosure but now I want to draw a schematic of my plan so I'm trying eagle at the moment.

For the resistors it was mentioned that   "VFD current / minimum beta * safety factor (2 or 3)" should give me the resistor value. So if I am correct that would be 0.0015/25*3 which is a very low number. Am I missing something?
 

Offline richard.cs

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: gb
  • Electronics engineer from Southampton, UK.
    • Random stuff I've built (mostly non-electronic and fairly dated).
Re: Tiny VFD clock
« Reply #44 on: November 10, 2013, 02:53:53 pm »
For the resistors it was mentioned that   "VFD current / minimum beta * safety factor (2 or 3)" should give me the resistor value. So if I am correct that would be 0.0015/25*3 which is a very low number. Am I missing something?

That very low number is the base current you need, not the resistor value. Divide the supply voltage by that current and get a large number that will be the resistance.
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #45 on: November 10, 2013, 03:16:27 pm »
schematic of drivers at this point


so:
0.0015/25*3 = 0.00018
60/0.00018 = 333333 = 330k Ohm
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3564
  • Country: us
Re: Tiny VFD clock
« Reply #46 on: November 10, 2013, 07:37:36 pm »
NPNs aren't connected right... looks like you couldn't decide if you wanted common base or common emitter :)
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16387
  • Country: za
Re: Tiny VFD clock
« Reply #47 on: November 10, 2013, 08:19:19 pm »
It is right, base current for the high side is slightly dependant on the high state voltage, but it will work very well as a current limited driver. Only issue is if a pin is tristated or set to a mode with a pull up which will turn the driver on. Leakage with open circuit base will tend to turn the drivers on at elevated temperatures, but is not a worry with an active low drive.
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #48 on: November 11, 2013, 10:04:21 am »
okay so as long as I actively set them to o or 1 in the software it won't be a problem.

0.0015/25*3 = 0.00018
60/0.00018 = 333333 = 330k Ohm for the segments
0.01/25*3 = 0.0012
60/0.0012 = 333333 = 50000 = 50k Ohm for the grid/tube selection.
 

Offline Mad_HankTopic starter

  • Contributor
  • Posts: 35
Re: Tiny VFD clock
« Reply #49 on: November 14, 2013, 06:31:19 pm »
Anyone has some experience with buying atmega328 chips from ebay? How big is the chance of these being fake?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf