Re: [neonixie-l] A "small" project

83 views
Skip to first unread message

Mich...@aol.com

unread,
Nov 25, 2013, 9:45:50 AM11/25/13
to neoni...@googlegroups.com
Pretty.
 
I didn't see the order form.  :)
 
Michail Wilson
206-920-6312
 
In a message dated 11/25/2013 3:00:40 A.M. Pacific Standard Time, pete...@gmail.com writes:

https://lh4.googleusercontent.com/-LS5WWI-ky2c/UpMk2OK4BrI/AAAAAAAAAEc/yf_bxteNyBE/s1600/Altoid+Nixie1.jpg

I put this little guy together recently - I always wanted to see if it could be done. I figure the audience here will appreciate it. It has multiplexed IN16 tubes, driven by an ATmega168 AVR processor that keeps the time and also generates the high voltage.





--
You received this message because you are subscribed to the Google Groups "neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neonixie-l+...@googlegroups.com.
To post to this group, send an email to neoni...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/e532d1d4-faf2-42ca-aa57-2f3fad7578d0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Chris Stalin

unread,
Nov 25, 2013, 10:13:52 AM11/25/13
to neoni...@googlegroups.com
LOL, Love it. Great work!

Are you PWMing a FET for power from the atmega158?

Thanks

petehand

unread,
Nov 25, 2013, 2:55:12 PM11/25/13
to neoni...@googlegroups.com


On Monday, November 25, 2013 7:13:52 AM UTC-8, Chris Stalin wrote:
LOL, Love it. Great work!

Are you PWMing a FET for power from the atmega158?

Yes I am. Given the current discussion here about AVR and Arduino, the technical details are probably of some interest.

Timer 0 is set up as fast PWM on the undivided 8MHz clock, with PWM output to the OC0B pin (PORTD.5 in this case). The register settings are TCCR0A = 0x23, TCCR0B = 0x09. I have the output compare register A (OCR0A) set at 250 – this is the top limit of the counter and sets the PWM rate about 40kHz. You can make it lower for higher frequency operation. Output compare register B (OCR0B) sets the pulse width and is initially set low, around 40. The OC0B pin goes high when the counter resets to 0 from 250, and goes low again when the count matches OCR0B. The FET gate is connected to this OC0B pin and turns on when the output is high. This counter is completely free running and never stops, but the OC0B pin only drives the FET when its port pin is set as an output, so the converter can be suspended without disturbing the PWM by changing the port to an input. The port is initialized as an input to avoid accidents, and is only set as an output by the regulating routine once this is on the job.

Regulation is performed with ADC channel 0. This is set to interrupt on completion. The register settings are ADMUX = 0xE0, ADCSRA = 0xDE, ADCSRB = 0. The high voltage is divided down with a couple of resistors – 200k to the high voltage, 1k to ground, with the ADC input connected to the junction. The ADC then reads 1/200 of the high voltage, comparable with the ADC internal reference of 1.25V. The interrupt routine compares the read value to a constant setpoint value, determined by experiment (200 for 175V in my circuit). If the voltage is lower it increments the value of OCR0B, and if higher, decrements it. If OCR0B is ever decremented to zero it sets the OC0B port pin as an input to suspend the PWM, otherwise it sets it as output. Finally it triggers a new conversion. Everything then happens automatically, with no program intervention. Timer 0 OCR0B ramps up until the set point is reached and thereafter hunts around that point as the load changes, giving essentially constant voltage output.

For switching, I use an IRL640 MOSFET. This is a logic level FET with a 200V rating, about the highest voltage rating you can get in logic level devices. Its gate is connected directly to the AVR OC0B pin, with a 2.2k resistor to ground to make sure it stays turned off when the pin is set as input. The inductor is a Coilcraft MSD-1278-224 – this is a 220uH SEPIC choke with dual coils. In my application the coils are connected in series. The FET drain is connected to one end of the pair, the other end to the rectifier, and 12VDC comes in at the junction. With this arrangement the FET only sees half the peak voltage, so it has a good overload margin.


 
schema.jpg

petehand

unread,
Nov 25, 2013, 2:57:31 PM11/25/13
to neoni...@googlegroups.com
Oops, I meant the 12V comes in one end and the FET is connected to the junction. The schematic is correct.

Michel van der Meij

unread,
Nov 25, 2013, 4:15:31 PM11/25/13
to neoni...@googlegroups.com
> The inductor is a Coilcraft MSD-1278-224 – this is a 220uH SEPIC choke with dual coils.
> In my application the coils are connected in series. The FET drain is connected
> to one end of the pair, the other end to the rectifier, and 12VDC comes in at the
> junction. With this arrangement the FET only sees half the peak voltage, so it
> has a good overload margin.

That is neat, I had not seen that before. Interesting!

Is that FET not warming up too much when you drive it directly from the AVR output? In my clock I drive it from a 555 output but it get's quite warm, not too much I think because it runs like that for more than 6 months already. Using a gate driver chip with very low output resistance reduces the switching losses quite significantly. I use a TC4432 in another circuit, drive it from a PIC12F1840 output pin, since you already have a 12V supply, you then have a much larger choice for FET selection and can use a coil rather than transformer.

Michel
 

AlexTsekenis

unread,
Nov 25, 2013, 4:46:21 PM11/25/13
to neoni...@googlegroups.com
Since you are doing a gated oscillator switching converter, you could consider using the on-board comparator of this particular MCU instead of the ADC. Might save you some code/CPU time.

Alex

petehand

unread,
Nov 26, 2013, 12:43:16 AM11/26/13
to neoni...@googlegroups.com


On Monday, November 25, 2013 1:15:31 PM UTC-8, Michel wrote:

Is that FET not warming up too much when you drive it directly from the AVR output?

The FET doesn't warm up at all. The only reason it would warm up is slow turn-off time - the turn-on time is already limited by the inductor - and the AVR has plenty of drive, it can sink more than 40mA in brief pulses. Since the FET only sees half the output peak there's much less Miller effect, and careful layout also helps reduce feedback capacitance. I've actually had this circuit running with an SOT-23 FET, generating 50V at 100mA for VFDs.

 

Michel van der Meij

unread,
Nov 26, 2013, 3:41:56 AM11/26/13
to neoni...@googlegroups.com
Nice. At that time, I thought it would be "safer" to use the MOS driver rather than a controller output. It was for a 2 phase unipolar stepper motor, a big one, 10A per winding maximum current and up to 200V per winding (100V each side of the center tap). I never actually tried to do without the MOS driver, but perhaps for a 10A drain current it would still be wiser to use the driver.

 
 
--
You received this message because you are subscribed to the Google Groups "neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neonixie-l+...@googlegroups.com.
To post to this group, send an email to neoni...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages