Archive for February, 2012

Breadboard Adapters for ATMega 16/32/164/324/644/1284 Back in Stock

Wednesday, February 29th, 2012

Find ’em here.

That was quick…

Thursday, February 9th, 2012

I had no idea there would be so much interest in the function generator kit, and ran out almost immediately.  More are on the way!  If you’d like to be notified as soon as we have more, you can click the “Notify me of updates to Tiny Function Generator Kit 1Hz-40KHz”   link in the right-hand column of the product page, or email me at info@allgaiershops.com.  Thanks for your patience!

ATTiny25-based function generator

Wednesday, February 8th, 2012

One of my very first forays into programming microcontrollers came when I needed a square-wave generator.  It was super simple, based on a Tiny25, only had sixteen discrete frequencies (each frequency was double the previous), and was housed in a rough wood container I made for it.  Now, I’ve made something better.

An ATTiny25 still forms the core of it, but it’s a whole lot better. The frequency range is 256 steps, increasing exponentially from approximately 1HZ to 40KHz. It outputs simultaneous sine, triangle, and square waves, with adjustable duty cycle/triangle wave shape. It has independent amplitude control on each output. And it’s all on one palm-sized, single-sided PCB.

The output isn’t perfect–it’s only 6-bit, although the firmware originally was 8-bit and can easily be reverted. The output filter could probably be improved (it’s currently a simple RC filter). The maximum frequency is limited by 1) the speed of the built-in PLL on the microcontroller (64MHz), which I use for the PWM clock and 2) how fast I can load the timer with the proper values for generating PWM. I have it down to 20 cycles + ISR overhead. And it updates the output 48 times per cycle maximum (and fewer at high frequencies, so the triangle and sine waves aren’t as accurate up there).

But it works pretty well. Here’s an o-scope screenshot (yes, someday I need to hook up the o-scope to the computer):

I got enough parts for several prototypes, and since it works, I’ve put together some kits in the store. You can find those here.

Also, if you’re interested in making improvements (and I’m sure there are plenty to be made), here is the source code, the schematic, and the board layout.

Shoot the engineer and start production

Wednesday, February 1st, 2012

A coworker at my previous job had a sign in his office that read:  “There comes a time on every project when you just have to shoot the engineer and start production.” Why?  Because engineers will continue to tweak a design ad infinitum, even if it’s already suitable for production.

Such was the case of a recent post on Hackaday, which detailed one person’s creation of a USB-powered LiPo battery charger.  One commenter suggested ditching the USB plug in favor of using the PCB itself for the USB connection.  So I did it.  But, being an engineer, I found that insufficient.  So I also managed to shrink the footprint.  And did it all on a single-layer PCB.  For fun.


And if you’re interested, here is the schematic and layout.