Searching \ for '[PIC:] Floatingpoint multiplication, conversion et' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: piclist.com/techref/microchip/math/index.htm?key=multiplication
Search entire site for: 'Floatingpoint multiplication, conversion et'.

Exact match. Not showing close matches.
PICList Thread
'[PIC:] Floatingpoint multiplication, conversion et'
2000\08\26@180241 by 859-1?Q?Ole_Petter_R=F8nningen?=

picon face
(Reposting, forgot the brackets. Sorry.)

Hi all.

I am about to embark on my first project, so please be patient.. (BTW, I've
read the FAQ, but didn't really find the answers I was hoping for)

I am planning to make a two-channel powersupply (0-25VDC), with a
voltmeter/amperemeter (one for each channel) on a 16x2 LCD display. I havent
chosen wich chip to use yet, BTW, I was hoping to get some clues here..

1. From what I have gathered, all I need to do to use a 16xxx to measure
voltage is to reduce input voltage with a couple of resistors (anyone have a
comment/good design?) on an ADC to 0-5VDC, and read off the byte from the
register. Measuring current should be similar, except a different 'reducer'
would be needed(? hints anyone?) Here is my first question:

I would like to keep the ground on each of the channels separate. As far as
I have understood, I should be able to use RA3 as ground on the circuit
beeing measured, and measure voltage on another pin. If I am right, all is
well. But since I have 2 channels, are there any chips I can use so that I
can have two different "grounds" on two different AD's? (Well, 4 different
ADC's in two pairs, I guess; one pair for Volt/Amp on one circuit, and one
for the other. Unless I am mistaking..?)

Are there any chips that can do this? (using two separate pins as ground for
two*two other ADC's)

2. After I have sucessfully read a byte from ADC, I need to multiply that
with 25/256 to find the voltage (or xx/256 to find the amp). I'd like to
display the resulting number (16bit FP?) on the display, and so I need to
convert it to an ascii string.. (Preferably in the format of xx.xx.)

What would be the best way to do this? I have considered simply using two
tables of strings, and use the byte read from the volt-ADC/amp-ADC as
indexes. The tables would be about 1500 bytes each..

3. Okay, one more: The design I was planning to use for the powersupply
(http://home.maine.rr.com/randylinscott/apr20.htm) seems very simple. (I
would use two identical, separate circuits) It uses a 5K potmeter to adjust
voltage. What sort of component could I use in place of the potmeter, so
that I could control it from the PIC?

Thank you!
Ole Petter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\08\27@083815 by Oliver Broad

flavicon
face
Firstly: have you done the calculation, 1.5A at a low output voltage will
mean a lot of heat. Consider 28v in, 5v out, 1.5A. 23v drop, so about 35w
dissipation.

If you want a versatile variable bench supply rather than somthing to build
in then you should look at using a switching regulator. More later ...

You've got the current and voltage sensing idea right except that I would
not want to drop more than 1v across my current sense resistor so I would
expect to have to amplify the signal if I wanted to feed it to a PIC A/D.
For two completely seperate channels I think you are considering using
seperate ICs. This will be the most versatile solution.

If you want to program the output voltage in software the LM317 becomes a
bit of a pain. It's simplicity counts against it. A simple solution is to
develop an analog signal, say 0 to 5v (this could come from a DAC or from a
PIC PWM output, or even from a software PWM) then amplify that signal to
give your output. Since you want high current output you might use an
ordinary op-amp, then connect the op-amp output to the LM317 control
terminal and take the feedback from the LM317 output. This uses the 317 as a
sort of power transistor, so you get it's current limiting and ot protection
but the op-amp controls voltage. If you make the op-amp -ve a bit below
ground (about 4v) the output range will stretch down to ground. With care
most regulator designs can be adapted for voltage-control using similar
methods.

If you want the two channels to communicate I would recomend a simple
digital link using cheap optocouplers.


{Original Message removed}

2000\08\27@085305 by Olin Lathrop

flavicon
face
> I am planning to make a two-channel powersupply (0-25VDC), with a
> voltmeter/amperemeter (one for each channel) on a 16x2 LCD display. I
havent
> chosen wich chip to use yet, BTW, I was hoping to get some clues here..

If the LCD is just a raw glass, then the only available all in one solution
is a 16C924.  This PIC has the LCD module, and 5 channels of A/D.
Unfortunately the A/Ds are only 8 bit, so I don't know if that is good
enough.  The 16C925 and '26 are coming with 10 bit A/D, but are not
available yet as far as I know.

If your LCD comes with a driver chip, then you probably want the minimum PIC
that has two channels of decent A/D.  The smallest with 10 bit A/Ds is the
18 pin 16C717, although availability is questionable.  There are lots of
choices at 28 pins, with the high end probably being the 16F876.

> 1. From what I have gathered, all I need to do to use a 16xxx to measure
> voltage is to reduce input voltage with a couple of resistors (anyone have
a
> comment/good design?) on an ADC to 0-5VDC,

Note that analog inputs to PICs should have an impedance of no more than 10K
ohms.  Since you are dividing down a power supply, you could do this
directly.  Generally I prefer to use a buffer amp.

> and read off the byte from the
> register. Measuring current should be similar, except a different
'reducer'
> would be needed(? hints anyone?) Here is my first question:
>
> I would like to keep the ground on each of the channels separate. As far
as
> I have understood, I should be able to use RA3 as ground on the circuit
> beeing measured, and measure voltage on another pin. If I am right, all is
> well. But since I have 2 channels, are there any chips I can use so that I
> can have two different "grounds" on two different AD's?

Not that I know of.

{Quote hidden}

That should work, but uses a lot of code space and limits you to 8 bit
resolution.  Going to 10 bit resolution would quadruple the code space
requirements.

This is usually done by converting a value to digits.  An integer can be
converted to a string of decimal (or any other radix) by successively
dividing by the radix until the number becomes 0.  The remainders from the
divisions are the digit values in least to most significant order.  This is
what I would do (have done) as it is a more general approach and is easier
to modify.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, spam_OUTolinTakeThisOuTspamcognivis.com, http://www.cognivis.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\27@095240 by 859-1?Q?Ole_Petter_R=F8nningen?=

picon face
> Firstly: have you done the calculation, 1.5A at a low output voltage will
> mean a lot of heat. Consider 28v in, 5v out, 1.5A. 23v drop, so about 35w
> dissipation.
>
> If you want a versatile variable bench supply rather than somthing to
build
> in then you should look at using a switching regulator. More later ...
>

Any recommendations on which to build?

Thanks!

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\27@170412 by Oliver Broad

flavicon
face
> > Firstly: have you done the calculation, 1.5A at a low output voltage
will
> > mean a lot of heat. Consider 28v in, 5v out, 1.5A. 23v drop, so about
35w
> > dissipation.
> >
> > If you want a versatile variable bench supply rather than somthing to
> build
> > in then you should look at using a switching regulator. More later ...
> >
>
> Any recommendations on which to build?
>

The L4960 (STM) has been used successfully in a number of our designs. It
has an application circuit that works. The surrounding components are more
critical than on linear designs but an inductor is available that is known
to work.
We have not had to fit heatsinks, however the current handled in our designs
is relatively low. One problem is that the feedback circuit is not idealy
suited to remote control, but this should not be hard to overcome.

There is a family of related devices with DMOS switches (higher efficiency)
and outputs up to 10A, but these are more expensive and sourcing a
compatible inductor may be difficult.

The LM2576 series have a lower component count but I have no experience of
these.

Once you are familiar with the operation of this type of regulator it is
possible to build one up out of a descrete transistor/FET switch and
seperate controller IC for maximum versatility but this is best left until
you have one of the integrated versions working.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\30@150056 by jamesnewton

face picon face
You may also be interested in
http://www.piclist.com/../idea/ebb
aka
http://www.piclist.com/techref/default.asp?url=idea/ebb

---
James Newton (PICList Admin #3)
.....jamesnewtonKILLspamspam@spam@piclist.com 1-619-652-0593
PIC/PICList FAQ: http://www.piclist.com or .org

{Original Message removed}

2000\08\30@151754 by jamesnewton

face picon face
www.piclist.com/burdetteswitcher
http://www.piclist.com/techref/default.asp?url=power

---
James Newton (PICList Admin #3)
jamesnewtonspamKILLspampiclist.com 1-619-652-0593
PIC/PICList FAQ: http://www.piclist.com or .org

{Original Message removed}

2000\08\31@202646 by Mark Willis

flavicon
face
Try this one:  http://www.seanet.com/~karllunt/junkbox.htm

Really cheap one, variable frequency.  Works for some needs.

"It uses an LM393, a P-channel power MOSFET, and darn little else."

 Mark

James Newton wrote:
> http://www.piclist.com/burdetteswitcher
> http://www.piclist.com/techref/default.asp?url=power
>
> ---
> James Newton (PICList Admin #3)
> .....jamesnewtonKILLspamspam.....piclist.com 1-619-652-0593
> PIC/PICList FAQ: http://www.piclist.com or .org
>
> {Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...