Blog

Playing with my AVR Development Board

Some time ago I design and build a development board to play with. It uses an AVR ATMega 8535 microcontroller, that has plenty of cool features.

AVR Developing Board

AVR Developing Board Schematic

(schematic here)

This board has a buzzer, 4×4 keypad, lcd, two leds, a pressure sensor and a expansion connector. It runs a program that:

  • Take samples from the eight ADC channels (625 samples/sec for every channel).
  • Send sample data through the serial port.
  • Reads key inputs (and do a “beep”).
  • Display the analog level from an ADC channel in the LCD. Keys 1 to 8 select the channel.
  • Display air pressure and estimated altitude, when press button 16.

It also has a bootloader that allow easy updates (a program that allows send the code trough the serial port without special hardware).

Also time ago, I begin to develop a java program to show the input data in the PC. I left unfinished, and now that I want to test some sensors, I decided to make it usable. Tough not completely finished, now it will be useful.

To test the ADC, the board has a pot that allows swing between 0 and 5 volts, but I wanted to look something more interesting, so build a simple sine function generator around the XR2206 chip.

Signal Generator

signalgenerator_sch.png

This chip powers from 10 to 26 to volts (is use 12V), and the output is centered around half that. You can control the signal amplitude and try to lower the signal center (changing resistors values), but that saturates the signal at the lower level. So I took the basic application’s circuit, added some jumpers and a shift stage. Then build and after adjusting the amplitude and shift I get a nice signal between 0.2 and 4.8 volts, ready to feed my AVR board (please note that you shouldn’t use TL072, but a rail to rail opamp rather). That’s how it look:

ADCViewer Application

Due to the fact the serial of most computers is limited to 115200 bps, and that every sample takes two bytes, the max samples I can send per second is 5000, hence 625 per channel. Even low, it’s nevertheless useful for a lot of things.
Future enhancements will include showing two or more channels in the same window and the option of selecting the channels to acquire and so increasing the sampling speed per channel.

New Order Arrived

Littlemachineshop.com is a cool site with a lot of tools and accessories for the hobbyist machinist. This time I ordered:

  • Boring Bar Set, Carbide 3/8" Shank $15.95
  • Knurls, Fine Diamond $5.49
  • Dial Test Indicator, 0-15-0 x 0.0005" $29.95
  • Small Hole Gage Set, 4-Piece $12.95
  • Dovetail Cutter, 60° 3/4" Diameter $14.95>
  • Cutting Fluid, Re-Li-On 4oz $3.95>
  • Thin Parallels, 3" Long 4 Pairs $14.95


Boring Bar Set

Boring bars allows to work internal holes in the lathe or the mill.


This set has high endurance carbide tips. The dirty grease is to protect the shafts, that needs to fit fairly tight in the lathe or mill support.

Knurls

Mounted in a tool like scissors (there are other types), they make these pretty tiny rhombus finish some round handtools have.


Dial test indicator

This nice tool allows you to measure small deviations using a tiny ball end tip. A common use is to center the head of the mill to a piece with an already done hole, to enlarge or finish it.


Although cheap, doesn’t look bad. I wish to get a mitutoyo some day.

Small Hole Gage Set

This tools provide you a cheap method for measuring internal diameters. They has an expanding head, so you can copy the size of a hole an then measure it with a micrometer.


Well, I have to say that quality of this item is not very good. To be usable, I was to spend a couple hours with a file and sand paper (even one of the tips gets stuck). But for 13 bucks, you get what you pay for.

Dovetail Cutter

This type of end mill is used to cut these common”V” ways.


Tough it looks a bit rough, you will not find any cheaper, and looks great for occasional work.

Cutting Fluid

I usually use current oil (sometimes), but for harder materials a good cutting fluid would be a great help.

Thin Parallels

In pairs, these are usually used to rise a piece keeping parallelism to the base surface.


I took measures of every pair at two sides. This is the result:

A B Nominal
7/8″ 22.230-22.234 22.230-22.229 22,225
3/4″ 19.051-19.052 19.054-19.055 19,050
5/8″ 15.888-15.881 15.880-15.879 15,875
1/2″ 12.705-12.705 12.703-12.703 12,700

Not bad (parallelism is more important than nominal accuracy). The other sides are not very flat, but these are not supposed to be used. My only complaint: some box or bag would be great, as this type of tools must be handled and stored carefully (please note that my mic has 0.01 mm reading; the last digit was approximated by eye).OverallAll these are cheap tools, but fulfills in more or less grade the desired function. High quality tools will cost several times this ones; for example, a mitutoyo dial indicator will easily cost more than this whole pack. Also, as widely know, more importantly than the tool itself is how you use them.

A Lathe Project

This is a project I start to gain skills on design and metalworking. Usually I only do simple pieces.

1. The idea: A precision mini-drill aimed to drill pcb boards (only the drill, not stand). It will hold typical carbide drills with a mini collet and rotate to about 10.000 rpm. Future work will include doing a stand for manual drilling and, why not, using in an always wished cnc machine.

2. The draft: I start about two weeks ago doing some drawing in acad. Below is the current state.


Some tolerances are fairly tight (in the order of several um); for example, the fittings of the bearings must be done with a tolerance of 10 um or less.

I’m sure this is not the best design, with lot questionable things. But I’m also sure it would be a lot better than the cheap drill I actually use for pcb drilling (and even the dremel).

3. The first piece: And this is the first finished (almost) piece I do some days ago. It’s done on 2024 aluminium and looks pretty cool.


I’m satisfied with quality and precision. For example:

  • Diameter vary from to from 23.990 (front) to 23.983 (back). Maybe there’s a very slight misalignment of the spindle, fixable doing a simple adjust.
  • In the rear I measure 15.995 and the bearing fits without pressure, so interference fit was not achieved, but it’s ok.
  • Int the front, the bearing doesn’t fits easily; the measure I get from the hole is 15.975, so it’s a bit more tight than the target interference but I think that heating the piece will do the job. Thermal Expansion Coefficient Al 2024-T3 = 22.68 um/m C -> the hole will expand 18. 144 um raising temperature by 50 ºC.

I didn’t measure all sizes; only the critics ones.

4. The next: The next piece I want to do is the one in the center; but currently I don’t have the required tools (boring tools for deep hole), and after struggle myself if make or not the tools, I decided go the easy way and do an ebuy. May be meanwhile I try the main axis.

Overall

The more I detail the draft, the more find myself saying “how the hell will I do this piece?”. But that’s the idea.
Up to this time I have read several books on metalworking, but now I realize how different is theory and practice.