Exact match. Not showing close matches.
PICList
Thread
'[EE]: I need to perform a hw full adder'
2001\03\21@215410
by
Chris Eddy
Folks, I need to perform an integration on a complex wave. It is too
fast to use the PIC A/D directly, as the 50+KHz complex waveform will be
converted at say 500KHz. I plan to use an A/D converter and then create
some sort of full adder after that. I must make it work for signed
values.
The goal is to accurately measure energy in Joules.
Does anyone know of any device which does this? If there is no such
device, I will have to go the CPLD or FPGA route. If I do, does anyone
have any good advice for me??
When the full adder rolls over, I will catch the results with my PIC.
Chris Eddy~
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuT
mitvma.mit.edu with SET PICList DIGEST in the body
2001\03\21@221942
by
rottosen
|
Maybe an SX is just barely fast enough. No need to go to an alien (CPLD
or FPGA) device. :-)
-- Rich
Chris Eddy wrote:
{Quote hidden}>
> Folks, I need to perform an integration on a complex wave. It is too
> fast to use the PIC A/D directly, as the 50+KHz complex waveform will be
> converted at say 500KHz. I plan to use an A/D converter and then create
> some sort of full adder after that. I must make it work for signed
> values.
>
> The goal is to accurately measure energy in Joules.
>
> Does anyone know of any device which does this? If there is no such
> device, I will have to go the CPLD or FPGA route. If I do, does anyone
> have any good advice for me??
>
> When the full adder rolls over, I will catch the results with my PIC.
>
> Chris Eddy~
>
> --
>
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
> email
.....listservKILLspam
@spam@mitvma.mit.edu with SET PICList DIGEST in the body
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listserv
KILLspammitvma.mit.edu with SET PICList DIGEST in the body
2001\03\22@081825
by
Olin Lathrop
> Folks, I need to perform an integration on a complex wave. It is too
> fast to use the PIC A/D directly, as the 50+KHz complex waveform will be
> converted at say 500KHz. I plan to use an A/D converter and then create
> some sort of full adder after that. I must make it work for signed
> values.
>
> The goal is to accurately measure energy in Joules.
>
> Does anyone know of any device which does this? If there is no such
> device, I will have to go the CPLD or FPGA route. If I do, does anyone
> have any good advice for me??
You might be able to find a DSP that can do this. My recent DSP projects
handled audio frequencies, so I'm not up on what is available for 500KHz
sampling rate.
********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, .....olinKILLspam
.....embedinc.com, http://www.embedinc.com
--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUT
TakeThisOuTmitvma.mit.edu
2001\03\22@082237
by
Eisermann, Phil [Ridg/CO]
I remember using a 74LS283 way back when. That's a 4-bit binary
adder. There's also (or was, back then) the 74LS181, 74LS381, and 74LS382.
Those are 4 bit ALUs The '181 has 4 control inputs for the type of
operation, the '381 and '382 have three (e.g. less functions) However, they
do perform A-B, B-A, A+B, A XOR B, A OR B, and A AND B. The addition and
subtraction have carry-in and carry-out, so it's easy to cascade two
4-bitters together to make an 8-bit.
{Original Message removed}
2001\03\22@095007
by
Roman Black
> > Folks, I need to perform an integration on a complex wave. It is too
> > fast to use the PIC A/D directly, as the 50+KHz complex waveform will be
> > converted at say 500KHz. I plan to use an A/D converter and then create
> > some sort of full adder after that. I must make it work for signed
> > values.
> >
> > The goal is to accurately measure energy in Joules.
Have you considered the hardware option?
I remember seeing a circuit once for an op-amp
based high accuracy integrator, within a fraction
of a percent. This could make your life very easy.
Just how accurate do you need it to be?
:o)
-Roman
--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-request
spam_OUTmitvma.mit.edu
2001\03\22@104625
by
Chris Eddy
|
Roman;
I have thought about this option, but have no hard data on how to do
it. I must get it to tick off counts like a geiger counter.. And I am
uncertain as to whether the integrator will work well with arbitrary
waveforms, or if it works better at repetitive waveforms. Also, I need
to prove that the whole system works within a certain error, without a
real standard against which to compare. Typical.. If anyone out there
knows about integrators with pulse output/reset, do tell.. or possibly a
good design reference book??
Thanks
Chris~
Roman Black wrote:
{Quote hidden}>
> > > Folks, I need to perform an integration on a complex wave. It is too
> > > fast to use the PIC A/D directly, as the 50+KHz complex waveform will be
> > > converted at say 500KHz. I plan to use an A/D converter and then create
> > > some sort of full adder after that. I must make it work for signed
> > > values.
> > >
> > > The goal is to accurately measure energy in Joules.
>
> Have you considered the hardware option?
> I remember seeing a circuit once for an op-amp
> based high accuracy integrator, within a fraction
> of a percent. This could make your life very easy.
> Just how accurate do you need it to be?
> :o)
> -Roman
>
> --
>
http://www.piclist.com hint: To leave the PICList
>
@spam@piclist-unsubscribe-requestKILLspam
mitvma.mit.edu
--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-requestKILLspam
mitvma.mit.edu
2001\03\22@110245
by
Roman Black
|
Chris Eddy wrote:
>
> Roman;
>
> I have thought about this option, but have no hard data on how to do
> it. I must get it to tick off counts like a geiger counter.. And I am
> uncertain as to whether the integrator will work well with arbitrary
> waveforms, or if it works better at repetitive waveforms. Also, I need
> to prove that the whole system works within a certain error, without a
> real standard against which to compare. Typical.. If anyone out there
> knows about integrators with pulse output/reset, do tell.. or possibly a
> good design reference book??
If I read you right you want to measure average
power usage or something. Just using an RC network
(also called an integrator) will give the short
term average voltage of the waveform.
This is a "smoothed" lower frequency, which you
can sample with the PIC's ADC and use the PIC to
do the average/time calc and generate pulses to
run your mechanical pulsecounter.
Now it depends on the output inpedance of your
signal, and the load of the capacitor etc. You can
use an op-amp as a unity gain amp which draws
next to nothing from the signal but has enough
oomph to drive the RC integrator with reasonable
accuracy. I would expect much better than 1%
accuracy from this, with a simple setup.
-Roman
--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuT
mitvma.mit.edu
2001\03\22@112122
by
Eisermann, Phil [Ridg/CO]
|
One such book is :
"IC Op-Amp Cookbook"
Walter G. Jung
The title is somewhat misleading, because I don't think it is really a
'cookbook' that just shows you a bunch of circuits with no explanation. The
author goes into a bit of detail on the principles of op-amps in general, in
various configurations, error analysis, etc. There is a chapter on
integrators and differentiators, with reset and hold. Can be used to
integrate over precise periods.
I'd love to hear other titles & recommendations. Always looking to add to
the collection :)
-----Original Message-----
From: Chris Eddy [spamBeGoneceddyspamBeGone
NB.NET]
Sent: Thursday, March 22, 2001 8:49 AM
To: TakeThisOuTPICLISTEraseME
spam_OUTMITVMA.MIT.EDU
Subject: Re: [EE]: I need to perform a hw full adder
[snipped]
If anyone out there
knows about integrators with pulse output/reset, do tell.. or possibly a
good design reference book??
Thanks
Chris~
--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-request
TakeThisOuTmitvma.mit.edu
2001\03\22@120708
by
Bob Ammerman
2001\03\22@120711
by
Bob Ammerman
How accurate does the A/D have to be?
How do you determine the starting and ending sampling time?
How many samples (max) need to be integrated?
How big can the final answer get?
How precise does the final answer have to be?
Depending on these answers, I think that a 5MIPS 16F or 10MIPS 18C PIC might
be able to do the job directly, with a little careful coding.
Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)
{Original Message removed}
2001\03\22@122549
by
David Minkler
|
Chris,
Roman is on the right track here. Do your integration in the analog
domain. There is no way you'll do a better (or cheaper) job in the
digital domain.
Burr Brown
www.burr-brown.com/products/selection-trees/SPEC-analog.html
offers integrators with built in remotely (PIC) controlled switches
(IVC102) which are nearly perfect for what you are describing. They
also offer the DDC112 which has a built in converter (although it's more
complicated to drive).
The easiest way to test your integrator would be to send a repetitive
waveform through a (small non-critical audio) transformer. Feed
waveform to primary. Bias one leg of the transformer secondary with
carefully controlled DC. Feed integrator from other leg of secondary.
As long as you integrate only full cycles of your repetitive waveform
your integrator should report the DC value regardless of the waveform
shape.
Regards,
Dave
--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuT
spammitvma.mit.edu
2001\03\22@141457
by
Chris Eddy
|
The dirty little secret in this thread is that the signal is the energy
used to drive an ultrasonic transducer. The system must accurately
measure the energy in Joules invested in the transducer. The circuit is
actually a tank, with an L in the driver that balances out the C in the
transducer. So the phase is off of 0. So my instantaneous power
waveform is a complex wave above and below 0. Also, the voltage comes
in peak to peak packets of 2400V, but I am on that issue. Divide and
conquer, so to speak.
First, to Roman's point, I cannot RC average the signal, it is a complex
wave and also comes in bursts at line frequency. See below.
Bob Ammerman wrote:
>
> How accurate does the A/D have to be?
>
I want to use a 12 bit A/D, but may settle for an 8 bit if I must.
> How do you determine the starting and ending sampling time?
>
The signal of interest starts on the press of a button and may last for
a few days. The goal is to calculate total energy in Joules. The
signal is not a continuous wave.. not only is the product of V and A a
complex wave ( I plan to use an analog multiplier), but the 40-50KHz
comes in bursts at the AC line frequency. It is a very complex wave.
> How many samples (max) need to be integrated?
>
The sig is 40-50KHz, but somewhat complex. I gut feel 500KHz until I
build it and know better.
> How big can the final answer get?
>
Plenty big, but once I roll over into the digital domain, the rest is a
ballroom dance.
> How precise does the final answer have to be?
>
Final answer would be nice at 1% error, but will settle.
> Depending on these answers, I think that a 5MIPS 16F or 10MIPS 18C PIC might
> be able to do the job directly, with a little careful coding.
>
Hmm.. I believe that the 18C has a very nice interrupt context deal
where the stuff is saved ultra quick. I will have to peruse the data
sheet some.
> Bob Ammerman
> RAm Systems
> (contract development of high performance, high function, low-level
> software)
>
> {Original Message removed}
2001\03\22@151321
by
Olin Lathrop
2001\03\22@155244
by
David Minkler
Olin Lathrop wrote:
>
> > Roman is on the right track here. Do your integration in the analog
> > domain. There is no way you'll do a better (or cheaper) job in the
> > digital domain.
>
> As long as you don't have to measure current and voltage, for example,
> separately and then multiply before integrating.
Right. He did indicate (after I posted) however, that he intended to
use an analog multiplier (presumably four quadrant) on his front end.
I'd still put my money on an analog integrator, storing intermediate
integrations (digitally, in a PIC) every second or so to avoid leakage
induced errors. The cost and complexity of a purely digital (purely
digital except for the A/D front end) integrator with an equivalent
error would be many times that of an analog integrator feeding a slow
digital accumulator.
Regards,
Dave
--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestSTOPspam
spam_OUTmitvma.mit.edu
2001\03\22@161327
by
Bob Ammerman
2001\03\22@170152
by
David Minkler
2001\03\22@222223
by
Alejandro Lavarello
|
Hi Chris!
Years ago,I have worked with a Hewlett-Packard's "True RMS voltmeter" .
This instrument can measure RMS value from DC to 30 MHz from
arbitrary waves (not only senoidal).
The principle of measuring was a kind of retroalimentation system:
one branch of the system is heated by input signal, and the other
by a DC current. In fact, the A/D converter only reads the DC
needed to balance the system.
The heat to voltage converter was two paired transistors;
each transistor has a heating resistor.All integrated in a IC.
Increasing temperature will down Vbe.
If the input signal increases, the heating resistor number 1
heats the first transistor.
The Vbe of the first transistor decreases; then, a operational amplifier
senses this Vbe variation and increases the DC current of the other
heating element.
This action down Vbe of the second transistor.
Finally, the system achieves a balanced state. Current in heating resistor
number 2 was proportional to the RMS value of input signal.
Well, perhaps this is no applicable to your idea...But analog computing
techniques are fast; may be you can use an analog multiplier in
order to obtain the square of the input signal, or integrate
the wave with a amp-op . Amp-ops of today are very fast.
Once a DC representation is obtained, the PIC can "do the math"
with it.
Or, make your own full adder using a FPGA ! :-)
Cheers!
Alejandro.
At 19:55 21/03/01 -0500, you wrote:
{Quote hidden}>Folks, I need to perform an integration on a complex wave. It is too
>fast to use the PIC A/D directly, as the 50+KHz complex waveform will be
>converted at say 500KHz. I plan to use an A/D converter and then create
>some sort of full adder after that. I must make it work for signed
>values.
>
>The goal is to accurately measure energy in Joules.
>
>Does anyone know of any device which does this? If there is no such
>device, I will have to go the CPLD or FPGA route. If I do, does anyone
>have any good advice for me??
>
>When the full adder rolls over, I will catch the results with my PIC.
>
>Chris Eddy~
>
>--
>
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
>email
EraseMElistserv
EraseMEmitvma.mit.edu with SET PICList DIGEST in the body
>
>
>
--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-request@spam@
spam_OUTmitvma.mit.edu
2001\03\23@025534
by
Roman Black
Bob Ammerman wrote:
>
> Yeah, except he wants to integrate over a _VERY_ long time period. This
> won't happen in the analog world!
Sure, that's why its best to use a hybrid system,
the analog front end gives short term integration,
the PIC then samples at a low freq (100Hz??)
and does the final integration/time calcs.
He mentioned that the source was pulsed, this should
be ok if the PIC only samples the integrator during
the "on" period and allows for that in the calc.
-Roman
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
2001\03\23@075046
by
Chris Eddy
Well gents, to wrap up this one, I will do the analog mltiplier and then
at least try out the integrator idea first. If it works properly, at
least it saves a massive amount of work.
Thanks
Chris~
Roman Black wrote:
{Quote hidden}>
> Bob Ammerman wrote:
> >
> > Yeah, except he wants to integrate over a _VERY_ long time period. This
> > won't happen in the analog world!
>
> Sure, that's why its best to use a hybrid system,
> the analog front end gives short term integration,
> the PIC then samples at a low freq (100Hz??)
> and does the final integration/time calcs.
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
2001\03\23@130424
by
Harold M Hallikainen
|
On Fri, 23 Mar 2001 00:01:57 -0300 Alejandro Lavarello
<spamBeGonealejol
KILLspamADINET.COM.UY> writes:
> Hi Chris!
>
> Years ago,I have worked with a Hewlett-Packard's "True RMS
> voltmeter" .
> This instrument can measure RMS value from DC to 30 MHz from
> arbitrary waves (not only senoidal).
>
> The principle of measuring was a kind of retroalimentation system:
> one branch of the system is heated by input signal, and the other
> by a DC current. In fact, the A/D converter only reads the DC
> needed to balance the system.
>
> The heat to voltage converter was two paired transistors;
> each transistor has a heating resistor.All integrated in a IC.
> Increasing temperature will down Vbe.
> If the input signal increases, the heating resistor number 1
> heats the first transistor.
>
Linear Technology makes an RMS to DC converter based on this idea. See
http://www.linear-tech.com/prod/datasheet.html?datasheet=198
Harold
FCC Rules Online at http://hallikainen.com/FccRules
Lighting control for theatre and television at http://www.dovesystems.com
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today! For your FREE software, visit:
dl.http://www.juno.com/get/tagj.
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
2001\03\24@023754
by
Peter L. Peres
|
>Yeah, except he wants to integrate over a _VERY_ long time period. This
>won't happen in the analog world!
Worse, the error of his short term integrator will sum up to something
astronomical in a few days. Ditto any nonlinearity in the multiplier that
will bias the output in some direction. I think that some serious
considerations need to be given to error and error propagation. E.g. a
0.1% F.S. bias offset (~1lsb at 10 bits) in the A/D or anywhere before it
with 500k samples/second becomes 500% F.S. in a second. Integrators are
actually error magnifiers ;-). One trick is to notice that the higher
readings contain most of the power, and throw away low readings (near
zero). This will still not get you very far with an integration period of
a few hours at most. In the analog world one way to do this is to drive an
analog integrator through a push-pull NPN-PNP pair in clss B. Low signals
cannot open either BE junction and are attenuated.
I propose to measure the power using a piezo microphone. Its output
amplitude will be proportional to power^2 and frequency. This can be
rectified (by squaring probably), integrated and digitized, assuming
constant average frequency. By calibration it could be 1% accurate.
The other way would be to put the oscillator in a calorimeter and measure
input (mains) power and calorimeter heat generation. A simple calorimeter
can be obtained by putting all the power oscillator parts on a heat
conductive surface and exposing it to constant high speed laminar (not
turbulent) airflow. Its temperature should be an almost linear function of
dissipated power for 'reasonable' fan speeds. This would require
calibration and ambient temperature monitoring. It could misread a little
on some days ;-).
Peter
--
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
2001\03\24@023808
by
Peter L. Peres
You do not say how many bits are to be added. A 20 MHz PIC can add 8 bit
2's complement data from a port at 500kHz and 16MHz clock. It is probably
necessary to sync the phase of the A/D readout clock with the PIC clock
phase. This could be done using a counter synced by an output pulse edge
from another PIC pin. Its output would drive the A/D clock. A Scenix would
be fast enough to clock the A/D itself and also count the samples. Neither
would handle overflow and underflow nicely (although the Scenix might be
able to do ceil and floor in the loop).
Peter
--
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
2001\03\24@114542
by
Chris Eddy
|
Peter, I like this idea. I discarded it at first, but that was on the
assumption that I was using an interrupt and the PIC did other things.
If I make it do nothing else, I could do the one task.. A/D in, totalize
with signed math, and roll a single bit out. I could simply run around
and around and wait each time for a status bit on the A/D. Hmm.. I
might even do assembly for the first time in a few years!!
Your previous thought on calorimeter is what they do now, and they are
somewhat unhappy with it. Thus the exercize.
Thanks
Chris~
"Peter L. Peres" wrote:
{Quote hidden}>
> You do not say how many bits are to be added. A 20 MHz PIC can add 8 bit
> 2's complement data from a port at 500kHz and 16MHz clock. It is probably
> necessary to sync the phase of the A/D readout clock with the PIC clock
> phase. This could be done using a counter synced by an output pulse edge
> from another PIC pin. Its output would drive the A/D clock. A Scenix would
> be fast enough to clock the A/D itself and also count the samples. Neither
> would handle overflow and underflow nicely (although the Scenix might be
> able to do ceil and floor in the loop).
>
> Peter
>
> --
>
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
--
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
2001\03\25@163927
by
Peter L. Peres
|
> Your previous thought on calorimeter is what they do now, and they are
> somewhat unhappy with it. Thus the exercize.
Chris, I'd suggest a study of the existing device and improve its accuracy
by using a PIC that measures airflow and perhaps humidity in the
calorimeter. I am also almost sure that the 'calorimeter' was not designed
as such from start (i.e. it's a hack). The laminar airflow is crucial for
it to work reliably. The only time I did such a thing I mounted all the
parts in the power circuit on a single long strip of 50x250x5mm Al and had
this inside a 55x55 (inside) square Al profile, with a fan at one end and
several thermistors on the strip which was insulated on teflon posts. My
driver was CMOS and it drew constant power (located outside the
calorimeter). I did not aim for and did not attain 1%. The driver was
class B using FETs.
Peter
--
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
More... (looser matching)
- Last day of these posts
- In 2001
, 2002 only
- Today
- New search...