Atmel DC-DC converter prototype

138 views
Skip to first unread message

DavidRowe

unread,
Aug 31, 2007, 5:40:11 AM8/31/07
to Low Cost ATA
Hi Guys,

I have been doing a little prototyping work with an Atmega16
development system. I assembled this <a href="http://www.rowetel.com/
images/psu.png">circuit</a> which is based on the DC-DC converter used
for the Si labs 3210 FXS chips.

I then worked out how to generate a fixed PWM frequency from the
atmega16, using this C code:

/* enable 8 bit PWM from timer 1 */
TCCR1A = 0xc1;
TCCR1B = 0x9;

/* switch on pulse at count 240/256 */
OCR1A = 240;

/* Enable PD5/OC1 as output. */
DDRD = _BV (OC1);

This just generates a short pulse (H for only 16/256 cycles) at about
31 kHz from the PD5 pin. I used this to drive the circuit above, via
an inverter to generate the PWM and nPWM signals.

With Vunreg set to 12V I can generate a Vbat of -42VDC! This
demonstrates that a microcontroller and a few discretes can be used to
generate the high voltages we need for analog telephony which is
pretty cool. Even without the other ATA work this could be useful as
a very low cost telephony voltage power supply.

Next steps:

1/ A feedback loop via the AVR A/D to regulate the DC voltage.
Currently this is just open loop, I have a 15k resistor as a load.

2/ Some protection logic/hardware, e.g. to shut down the DC-DC
converter if VBat gets shorted.

3/ Try modulating the PWM signal, for example if we vary the PWM code
using a 20-30Hz sine wave, we should generate a ring signal, hopefully
at several hundred volts peak-peak, enough to ring an analog
telephone.

Tim and I also did a little work yesterday to try and get a PIC to
sample audio signals thru it's A/D and replay them via PWM. However
we had some problems with the PIC hardware. We would like to prove
that a micro can sample/playback signals at telephone audio quality.
Tim is pretty busy from now on with a new job, so if anyone else would
like to work in this area (A/D & D/A of audio signals) that would be
great.

Cheers,

David

Andrew Nording

unread,
Aug 31, 2007, 7:09:06 AM8/31/07
to low-co...@googlegroups.com
Hi, David,

Great job!

Let me add a couple of thoughts:
1) Can we run this DC/DC at higher frequency? this will lower requirements to capacitors and choke, so we can push BOM even lower.
2) If we are going to make a closed-loop voltage regulation via ADC and software, same circuity/soft can be used to short-circuit emergency shutdown.
3) Keep going with AVR, it holds more MIPS, that PIC ;-)

Uderman

unread,
Aug 31, 2007, 10:15:28 AM8/31/07
to Low Cost ATA
Hello David and Others,

David, wich Atmega16 development board and processor are you using?
Are you using a atmega16, or a variant of it, like atmega161 or
atmega169. I will try to see how a DC-DC convertor works. I also plain
to buy a development board. Thank you!

David Rowe

unread,
Aug 31, 2007, 7:03:41 PM8/31/07
to low-co...@googlegroups.com
Hi Andrew,

> Great job!

Thanks :-)

> Let me add a couple of thoughts:
> 1) Can we run this DC/DC at higher frequency? this will lower
> requirements to capacitors and choke, so we can push BOM even lower.

Yes I would like to run it at about 64 kHz, but I need to do some more
reading of the Atmel data sheet to see if it's possible. Using a
multiple of the sampling rate for the voice signal is a good idea, as it
reduces noise.

> 2) If we are going to make a closed-loop voltage regulation via ADC
> and software, same circuity/soft can be used to short-circuit
> emergency shutdown.

Yes, although maybe a little op-amp based overcurrent shutdown would be
nice insurance, e.g. if the micro hangs.

> 3) Keep going with AVR, it holds more MIPS, that PIC ;-)

Heh, well the PICs do have some nice chips with Ethernet and USB built
in. Right now I am focusing on algorithms, i.e. "building blocks" for
the ATA. I hope that this will make it easy to port to many different
micros.

Cheers,

David


David Rowe

unread,
Aug 31, 2007, 7:13:40 PM8/31/07
to low-co...@googlegroups.com
> David, wich Atmega16 development board and processor are you using?

I am using this board:

http://www.futurlec.com/ATMegaDevBoard.shtml

> Are you using a atmega16, or a variant of it, like atmega161 or
> atmega169. I will try to see how a DC-DC convertor works. I also plain
> to buy a development board. Thank you!

Its an Atmega163.

Cheers,

David

> --
Free Telephony Project
open embedded IP-PBX hardware and software
http://www.rowetel.com/ucasterisk

Reply all
Reply to author
Forward
0 new messages