Since this is a single supply with no reference common to anything else, put the current sense resistor in the ground lead. No problem! dwayne At 04:28 PM 10/29/02 -0800, William Chops Westfield wrote: >I have a hypothetical "hobbyist power supply" that I'm thinking about >(partially inspired by the recently mentioned dead bench power supply I'd >mentioned elsewhere, and also by accidentally buying too many LM317s.) It >would provide CCCV output, 0-20V or so at about 1A max. I'd use a 24V or so >wall wart input, a bunch of LM317 style regulators, and a PIC with LED/LCD >to display voltage and current. This is, in theory, the sort of thing a >hobbyist could build easilly and cheaply from surplus parts, but would cost >a pretty bundle if you tried to make it from NEW parts. > >There are a couple of complications that have already turned up... >The obvious way to measure the not-so-large currents I'm thinking of >is to put something like a 0.1 ohm power resistor in the output, and >measure the maximum voltage of I*R (.15V) to get current (at 1.5A max, >you only need to dissipate about 1/4W...) HOWEVER, unless your PIC >has a completely separate and isolated power supply, you're not measuring, >0.15V, you're measuring the difference between two voltages that are... >quite high compared to what you can connect to a PIC input, or even your >average opamp. Isolated power supplies might be tempting (add another >$0.99 wall wart), but lack elegance :-) Batteries might be OK for an >LCD display... > >LM317 info is sketchier than I'd have thought as well. The data sheets all >have a basic switching regulator, and a circuit that uses a separate LM317 >as a pre-regulator, but little in the way of explanation, and no obvious >extension of "switching pre-regulator." There's circuits that parallel 317s >for increased output capability, but again there is little explanation, and >those circuits aren't combined with the current limitter circuits... If >anyone knows of any more complete ... tutorials on using the LM317, please >let me know! > >BillW > >-- >http://www.piclist.com hint: PICList Posts must start with ONE topic: >[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 18 years of Engineering Innovation (1984 - 2002) .-. .-. .-. .-. .-. .-. .-. .-. .-. .- `-' `-' `-' `-' `-' `-' `-' `-' `-' Do NOT send unsolicited commercial email to this email address. This message neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads