web statistic
AVR LED/Level shifter Board
none ATMega328 AVR 
Schematic and Images(335KB)

How often do you find that you need to hook up an LED or do some level shifting during the hardware prototyping of your project? I use LEDs quite a bit for debugging and kept a few on my breadoard for just that purpose and so I decided to create an extension board that contains the items that I am constantly using. I am defining external component as a working group of components located on a single board that serves a function. The board I have created for this article contains a group of 8 LEDs and 4 Bi-directional channels of Level Shifting using the 2N7000 N-Channel Exhancement Mode FET. I used an LM317 voltage regulator to provide the 3.3V for the level translation so decided to run it to the header so as to provide 3.3V external to the board.

I don't normally recommend Radio Shack products but they have 2 "Multipurpose PC Board with 417 /780 Holes" that I use for prototyping. I just found out recently that the larger board existed, don't know whether the local store didn't carry em or they just saw the need and put it on the shelves either way they're a fairly decent inexpensive board.

ATMega328p Development Board

I will however recommend a prototype/developement board from Evil Mad Scientist which can be had [here]. These little boards contain the bare essentials that can serve as a base for many types of experiments or proof-of-concepts and can be used as the final board in most simple projects. The following image displays the one I use, it has a 16mHz external crystal and I added a 10K pullup resistor on the reset line.

DIY LED/Level Shifting Extension Board

The image that follows is the completed board with just the power applied, it's layed out with the LEDs in line on left and the power and level groups on the right with the level shifting components at the mid to top right and the power in the lower right portion of the board. In the following sections we will get a closer look at each section and describe how it's used.

Found a little trick when laying out the components, I made a photo copy of the board and since the board is layed out uniformly I can draw the components on the drawing before doing any physical placing saving a lot of headaches. I get in a hurry quit a bit and this simple trick has made me stop and spend more time during the design phase and has dramatically decreased the amount of soldering/resoldering that is done. As an example before using this trick I resoldered the power regulator section twice before moving it to a completely different section of the board. After that I layed out the Level shifting logic on paper several time before I got it optomized and finally on the board. Now I do; layout on paper, test it on breadboard then when done solder on final board.

Extension Board - LED Section

I've layed out the boards components into logical groups and am presenting these groups with an explanation and schematic in the sections that follow.

Extension Board - 3.3V Power Section

The 5V input power is converted to 3.3V using the LM317 voltage regulator and fed back out to the boards header where it may be used external to the board. This voltage conversion used in conjuction with the signal level shifters is makes interfacing to 3.3V devices very easy.

I used an LM317 Calculator found here to determine the value of the resistors needed for the 3.3V that I required. The actual formula for this circuit is Vout = 1.25 * (1 + R2/R1)

Extension Board - Level Shifting Section

Level shifting is accomplished using a 2N7000 FET and two resistors as can be seen. I'm a software guy with a rudimentary knowledge of electronics so I am not able to go into the specifics. i.e. I got it off the Net. Only one of these devices is shown in the image below so just duplicate whats shown below for as many channels as you need.

The Level Shifting section requires 5V as a reference voltage but other than that it is a stand alone unit in that the input and output terminals are on there own header.

Summary

This is a very simple extension board that will see a lot of usage in future projects to help debug code, LEDs can serve as indicators and interface to 3.3V devices. I plan on developing other extension boards in the near future and will post them as they are completed.

Comment Section


Care to Comment
Name:
Url:
Upon submission your comment will be queued for approval.