It is possible to get fairly high precision with those cheap wall warts. I generally use a 680uH inductor at the power input followed by a 470uF capacitor. Then a 5v Regulator (typically LM2940). After the regulator is additional bulk capacitance. The final test is to place a pi network of 100 Ohms between two 0.1uF capacitors as the bypass capacitor for EACH IC ON THE PCB. For PICmicro's with seperate analog supplies I use a seperate pi network. All digital signal lines get 100 ohms in series to prevent ground transients and to round off the rising edges. The power is brought into the PCB from a central location with noisy stuff on the one side and clean stuff on the other. As the components are laid on the PCB, a straight line is assumed for ground current from the component to the power entry point. This straight line is left uninterrupted by breaks in the ground path or other IC's. The boards are typically laid out two layer with the second layer 90% ground plane. Surface mount components are used whenever possible. With this attention to detail I have seen 1/2 lsb error in 10bit ADC's using wall warts for power. This technique does not use seperate grounds for digital and analog. Just lots of filtering, watching the ground path and eliminating sharp signal edges. On Monday, October 13, 2003, at 07:14 PM, Ian McLean wrote: > Yes, I have had this problem also with a small switch-mode wall wart > that I > was using for PIC testing before I had my own "real" power supply. > Could > not understand why the AD readings off some tempurature sensors were > inaccurate and "jittery" in the first couple of bits ... until I > scoped the > output voltage of the wall wart that is, very noisy ;) ... After I > built my > own big linear power supply (2 independant 0-24V @ 15A max. in the one > box), > which cost a small fortune to build, weighs a lot, but sits in my rack > now > and for which I would never be without ... all these problems > disappeared. > > Take this as a warning about using small, cheap, noisy switch mode plug > packs/wall warts for PIC testing, especially if using AD ;) > > Rgs > Ian > > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of John Pearson > Sent: Tuesday, 14 October 2003 5:36 am > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC:] Low voltage detection > > > I had mentioned earlier that at the slowest ADC clock speed, and a > couple of > sucessive samplings through 10 meg ohm resristors produced somewhat > flakey > LSbits, after trying it in my actual battery powered circuit, the > numbers > are rock solid. > > I guess my evaluation board, powered by a wall wart with all its extra > chips > and goings-on, was producing a lot of noise that the resistors were > picking > up. > > ----- Original Message ----- > From: "Mike Harrison" > To: > Sent: Monday, October 13, 2003 2:06 AM > Subject: Re: [PIC:] Low voltage detection > > > On Mon, 13 Oct 2003 09:50:29 +0100, you wrote: > >>>> Olin wrote: >>>> A better solution would be to only turn on the divider >>> circuit for a short >>>> time around each reading. It can then draw more current, >>> but it's average >>>> current draw will be very low > > For situations where the battery supply is higher than the PIC's supply > (e.g. 9V battery), things > get complicated by level shifting. > > Here's a neat way round this (use ficed pitch font): > > Vbat > | > +----+ > | Q1 | > | | R3 > \| | C1 > |--+--R4--||--- /| > | > R1 > | > +------>Vsense (ADC/Comparator input) > > | > R2 > | > +-- 0V > > Q1 = any PNP, emitter to VBat > R1,2=10K > R3,4 = 100K > C1 = 100n > > R1/2 divide the supply voltage, e.g. both 10K for a 9V supply and 5V > PIC > supply > C1 acts as a level-shifter > The 'Switch' line is normally held high, and taken low briefly to turn > on Q1 > for long enough to read > the voltage. The 'Switch' line can often be shared with other > functions. > Where space is at a premium, use a digital transistor for Q1 so R3 and > R4 > aren't needed. > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu