ATmega328 nixie tube clock - Page 1
Forum section: electronics / projects

author: carbon dude oxide
author_rank: Frequent Contributor
timestamp: January 28, 2013, 07:37:22 pm
content: hello, i have been designing a circuit that uses an atmega328 to control 8 nixie tubes to function as a clock and a divergence meter (those who have watched steins;gate will understand the divergence meter). this is the design after experimenting on breadboards. I have incorporated the atmega328 into the board design itself to save space as this all needs to go into a small enclosure.I was wondering if I have put the schematic on here correctly as I am hopefully going to get this made properly.Here is what the circuit is meant to do:ATmega328 controls 4 PCF8574 port expanders over I2C which each control 2 74141 nixie tube drivers which drive the nixie tubes. also on the I2C bus is a real time clock to keep the timethere are also some transistors on certain decimal points on the tubes as they need to perform specific functions.the other parts of the circuit are for power regulation and an external pin header so that i can connect it to other things in my room to make lights turn on in my room at specific times ectplease could you let me know if you see something wrong as i do not want to send a broken board to the manufacturer.Im sorry if this is on the wrong board but i thought it fitted my question most.

author: jeroen74
author_rank: Frequent Contributor
timestamp: January 28, 2013, 09:13:20 pm
content: There's not a single decoupling cap in there!

author: svofski
author_rank: Regular Contributor
timestamp: January 28, 2013, 09:18:11 pm
content: Multiplexing the tubes isn't an option? You said you need smaller size, but with so many chips I don't see this making a very small board.My first nixie clock,Patashnik, is also multiplexless but I used ATmega8535 which has a buttload of I/O. I also only have 4 tubes in there.Some nixies are pretty sensitive to the current, so e.g. with one value of resistor you might get a nice 8 but purplish 1, or a nice 1 and partially blacked out 8. Some people remedy this by using different resistors at cathodes instead of using one at the anode. I couldn't be bothered with this, but I think I managed to help it somewhat by changing duty cycle depending on the displayed symbol.Just being grouchy here, but maybe for the future consider drawing all transistors in the same orientation (collector goes up, emitter down) and using busses and/or named nets. It's a funny task to trace these wires that meander through the entire sheet. It's also convenient when within a logical block of the circuit + is up and - is down.

author: carbon dude oxide
author_rank: Frequent Contributor
timestamp: January 28, 2013, 09:20:34 pm
content: first time ive used eagle so im still a bit iffy with ithow would i go about multiplexing them?

author: carbon dude oxide
author_rank: Frequent Contributor
timestamp: January 28, 2013, 09:32:53 pm
content: could I use a couple of HV5622 andcommunicate to them via the serial on the arduino?

author: c4757p
author_rank: Super Contributor
timestamp: January 29, 2013, 12:19:50 am
content: Quote from: carbon dude oxide on January 28, 2013, 09:32:53 pmYes. They're expensive but I bet those Nixie drivers are too. I just used a heap of 300V transistors when I did mine.If you're going to use this current configuration, why not use 74HC595 instead of PCF8574P? All four of them will cost less than one PCF8574P (at least on Mouser, the PCF8574P is $1.49 and you can get a SMD 74HC595 for $0.30). SPI is just as easy as I2C, and I'll tell you from experience that you can easily route an indefinitely long chain of 74HC595s, even the surface mount ones, on a single layer board with no links that you can etch at home. If you're sending the board off to be made it'll be even easier.

author: carbon dude oxide
author_rank: Frequent Contributor
timestamp: January 29, 2013, 10:58:47 am
content: following from what jeroen74 said.where would i need to put decoupling capacitors? and what do they do?

author: m
author_rank: Newbie
timestamp: January 29, 2013, 03:34:54 pm
content: Quote from: carbon dude oxide on January 29, 2013, 10:58:47 amYou use decoupling capacitors to avoid several problems related to the power supply for integrated circuits (and for other circuits as well). When your circuit is switching it temporarily needs more power than when it's stable. The faster it is switching the more power it needs for a short moment. It's during that moment when decoupling capacitors act as power supply to your circuit. Due to the inductance of power supply lines and due to its limited regulation speed your power supply alone would not be able to respond adequately to that short-term power requirement.If you omit decoupling capacitors you may face several problems:1. more high frequency noise on power supply rails. Your circuit might emit RF.2. more high frequency noise on signal lines3. higher rise/fall times of signals4. instability (even unwanted oscillation) of your analog circuit5. instability, incorrect behaviour of your digital circuit (bits being misinterpreted, or being stored incorrectly)but also:6. your circuit might be more susceptible to reception of noise from outside the circuit.The symptoms may not seem obvious in a practical circuit you build, but your circuit may seem to work correctly while it actually is emitting RF and disturbing other equipment. It might also work occasionally incorrectly even though you can't find a bug.You place decoupling capacitors close to the power supply pins of your ICs. Some microcontrollers or other modern ICs will have power and ground pins placed in pairs close to each other. If that is the case then connect a decoupling capacitor close to each pair.Capacitor values may differ according to the type of IC you're using. 10nF to 100nF is usually ok, 100nF is used commonly. High end stuff may have special requirements (your AVR board isn't high end in that sense).So, for your clock: place 100nF to each pair of power supply pins of the microcontroller and to each power supply of the other ICs.HTH,m

author: carbon dude oxide
author_rank: Frequent Contributor
timestamp: January 29, 2013, 04:04:49 pm
content: so i should put a 100nf cap between Vdd and Vss or Vcc and GND on each ic?

author: svofski
author_rank: Regular Contributor
timestamp: January 29, 2013, 07:16:18 pm
content: QuoteThat, and one or two larger, say 10uF capacitors in different places on your board. Also 100nF at the input and output of the voltage regulator.Re: multiplexing, you will need high-side switches to multiplex the tubes. Check outSatashnikschematic to get an idea. I don't know if by multiplexing 6 tubes you're going to get bright enough digits though — with 4 tubes it looks good. You can experiment to see how it turns out. Or you could combine both things, multiplex 3 groups of 2 tubes for example.

author: carbon dude oxide
author_rank: Frequent Contributor
timestamp: January 29, 2013, 08:49:59 pm
content: ok thanks il look into itive been experimenting with eagle a bit more and the initial schematic edited with decoupling capsand i can get everything into the board size that i need to fit inside the enclosure.My only concern is the 155V supply lines to the tubes... what should be the distance between it and other traces on the board and is 0.016mil a wide enough track for it when it has a 21mA load going through it?

author: jeroen74
author_rank: Frequent Contributor
timestamp: January 29, 2013, 08:58:40 pm
content: 0.016 mil? that's microscopicI guess you mean 16 mil. Should be wide enough.

author: carbon dude oxide
author_rank: Frequent Contributor
timestamp: January 29, 2013, 09:45:24 pm
content: yea i meant 16mil (don't normally work in inches)

author: carbon dude oxide
author_rank: Frequent Contributor
timestamp: January 30, 2013, 08:36:00 am
content: ok this post probably exists but i am unable to find it. Which pcb manufacturing company's would be best for me to use (i live in uk

author: jeroen74
author_rank: Frequent Contributor
timestamp: January 30, 2013, 10:50:56 am
content: I have good experience withPCB Poolbut they are not the cheapest.

author: svofski
author_rank: Regular Contributor
timestamp: January 30, 2013, 11:57:58 am
content: You are not bound to use inches or mils. Click on the grid icon and select units = millimeters. You can keep the trace widths as they are (like 0.254 etc) or you can enter some easier to address numbers like 0.2, 0.3, 0.4 etc.

author: deephaven
author_rank: Frequent Contributor
timestamp: January 30, 2013, 12:07:36 pm
content: Quote from: carbon dude oxide on January 30, 2013, 08:36:00 amTry Itead Studio - They're in China but extremely cheap. I have used them successfully for several designs.

author: carbon dude oxide
author_rank: Frequent Contributor
timestamp: January 30, 2013, 01:56:06 pm
content: hmmm there about to go on there holiday periodi can probably wait but they look pretty good thanks