Best practice incorporating a Microcontroller into a product

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
soggybag
 
Posts: 35
Joined: Sat Mar 01, 2008 3:28 am

Best practice incorporating a Microcontroller into a product

Post by soggybag »

First let me thanks everyone for all of the help I received on the forum.

I'm working on a guitar effect pedal thing. I have a small program loaded on to an attiny13 that I want to incorporate into the project. What's the best practice for this? The device runs off a 9V battery or a 9V wall wart.

For testing I have been using a 78L05 type 5V regulator, one of the small ones in a TO-92 case. Should I add any special filter caps beyond what's in the app notes?

Should un used pins be grounded, left disconnected, or?

What about ground, are there any issues concerning digital noise coming from the ground connection of the chip that could be a problem in an audio application?

I guess the question could be broken down into software and hardware. What's the standard for placing this chip in an application in these areas?

User avatar
amberwolf
 
Posts: 310
Joined: Wed Oct 08, 2008 2:42 am

Re: Best practice incorporating a Microcontroller into a product

Post by amberwolf »

For power, try this instead:
http://www.BANNED.com/smps/smps.htm
There are several versions of it, with links to them farther down the page, including three 5V output versions, all of which should be better than using the 7805, which will waste a lot of power, of which the 9v doesn't have much to start with, and will generate heat with that power.

You could probably increase the efficiency, at the expense of making it more complex. You can also increase the power output a bit by using different transistors (just pick ones that are like the ones used but with higher current ratings), but remember that you can't get much power out of a 9V battery anyway.

The 7805 has an advantage that it's VERY simple to use and takes little real-estate, and introduces no switching noise. The SMPS may introduce noise if you aren't careful with layout and placement of components and traces near your audio sections, but it should be more efficient, if battery life is a concern at all.

If you can, you are best off keeping analog and digital grounds and power supplies separate, but in a tiny portable device like a pedal you may not have the luxury of independent power supplies.

(wierd note: I did a quick google search on "7805 efficiency" to see if I could find the efficiency rating of the 7805 from a 9V source, and one of the first hits was Ladyada's instructable for the MintyBoost. How's that for small world? :) But the point really is that you should read that particular page of the instructable regarding the 9V to 5V regulation topic. ;))

minerva
 
Posts: 58
Joined: Sun Dec 06, 2009 11:12 pm

Re: Best practice incorporating a Microcontroller into a product

Post by minerva »

I don't consider using a linear regulator to be a big deal for a simple microcontroller project... using a switchmode regulator adds extra complexity, extra points of failure, and cost.

The power dissipated in a linear 78xx series regulator is just P = I * (Vin - Vout)

If you've got 9 V in, 5 V out, and say, 250 mA output current draw, then the power dissipation in the regulator is only 1 W, which is not a big deal.

User avatar
zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: Best practice incorporating a Microcontroller into a product

Post by zener »

minerva wrote:the power dissipation in the regulator is only 1 W, which is not a big deal.
It is if you are running off of a battery!

User avatar
westfw
 
Posts: 2008
Joined: Fri Apr 27, 2007 1:01 pm

Re: Best practice incorporating a Microcontroller into a product

Post by westfw »

Should un used pins be grounded, left disconnected, or?
If your PCB has room, tie them each to an otherwise empty pad for "possible patches."
In the SW, set them as outputs or enable the internal pullups (in contrast to nearly every Arduino example ever written...) Floating inputs are potentially bad for several reasons.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”