BX-24 Input Impedance for ADC conversion of small 50 Hz Voltage

Started by gouardopatrick February 13, 2009
Hello everybody,

To measure the current in my 3 phases house electricity system and
in the neutral, I am using 4 Honeywell Current Sensors CSLA2CD
powered with 5V.
5 V is on the low end of the specifications!
I send the outputs of the current sensors to the Input pin (Pin 13
to 16) of the BX-24.
The Current sensor give a DC voltage of 5V / 2 = 2.5 V when I have
no current in the sensor.
The AC voltage is around 300 mV RMS on Input pin when I have 15 A in
the phase, measured with a standard DVM.
The idea is to search the Max AC voltage in a loop faster than the
50 Hz frequency.
The RMS voltage is then given by dividing the Max Voltage by 1.414
(Square root of 2).
The RMS Voltage is proportional to RMS current flowing in the phase
wire.
This is the basic.

My problem is to try to remove the DC voltage of 2.5V by putting a
serial capacitor but I like to know if somebody as the input
impedance of the pin 13 to 16 (ADC Inputs) of the BX-24 for 50 Hz
frequency?

Any idea what should be the value of the capacitor?
I put one Micro Farad (1 f) but when I have no current the
capacitor remain charged to 5 V and when I apply a current, it take
very long time to reach the right value (the capacitor remain
charged) .

Thanks for your feedback and best regards.

Patrick

Hi,

I checked the sensor output and I could not  come up if the voltage output was Dc or AC. Since they are using +5 in the power supply I assumed that is DC.
 I try using the capacitor in parallel to the input instead serial and if it is too noisy I use a 1k resistor in series.

rosarite



-----Original Message-----
From: gouardopatrick
To: b...
Sent: Fri, 13 Feb 2009 3:58 pm
Subject: [BasicX] BX-24 Input Impedance for ADC conversion of small 50 Hz Voltage





Hello everybody,

To measure the current in my 3 phases house electricity system and

in the neutral, I am using 4 Honeywell Current Sensors CSLA2CD

powered with 5V.

5 V is on the low end of the specifications!

I send the outputs of the current sensors to the Input pin (Pin 13

to 16) of the BX-24.

The Current sensor give a DC voltage of 5V / 2 = 2.5 V when I have

no current in the sensor.

The AC voltage is around 300 mV RMS on Input pin when I have 15 A in

the phase, measured with a standard DVM.

The idea is to search the Max AC voltage in a loop faster than the

50 Hz frequency.

The RMS voltage is then given by dividing the Max Voltage by 1.414

(Square root of 2).

The RMS Voltage is proportional to RMS current flowing in the phase

wire.

This is the basic.
0AMy problem is to try to remove the DC voltage of 2.5V by putting a

serial capacitor but I like to know if somebody as the input

impedance of the pin 13 to 16 (ADC Inputs) of the BX-24 for 50 Hz

frequency?

Any idea what should be the value of the capacitor?

I put one Micro Farad (1 µf) but when I have no current the

capacitor remain charged to 5 V and when I apply a current, it take

very long time to reach the right value (the capacitor remain

charged) .

Thanks for your feedback and best regards.

Patrick

















> ... I put 1 f but when I have no current the capacitor remain
charged to 5 V and when I apply a current, it take very long time to
reach the right value...

No surprise. If you look at the ADC input specifications of the
ATMEGA8535 processor, you'll find that RAin is ~100megohms. The time
constant of that in series with 1F is 100 seconds.

It sounds to me that you need do nothing but directly connect the sensor
output to the ADC input pin. Since it is already biased at 2.5v and the
maximum swing is well within the 0v and 5v rails, a direct connection
should work. However, 300mVRMS is only about 1vpp, so you will not see
the best resolution. Still, you'll have at least eight bits. To get
best resolution, you'll need some AC-coupled amplification - or a sensor
with more sensitivity, I believe.

Tom

I said:
> It sounds to me that you need do nothing but directly connect the sensor...

I left out an important constraint. If the supply voltage is 6vDC, the output will be biased at 3vDC and should be able to be directly connected. Higher sensor supply voltages will decrease the maximum current that can be measured with a direct connection.

Also, it might make sense to put a series resistor between the sensor and the ADC input pin to limit current caused by AC current spikes. Since the ADC input impedance is very high, almost any value will suffice, like 5k, which will limit the overvoltage input pin current to 1mA.

Tom

Hello Rosarite,

Thanks for your reply.

Yes, the output of the sensor without current in the sensor is a DC
voltage equal to 1/2 of the VCC.
Vcc mini should be bigger than 8 V Dc.

On this DC voltage, is "superposed" the useful signal when current
go thought the sensor.

Yes, I will try to put a smaller capacitor (0.1 F) to reduce the
noise and see.
Too big capacitor will short circuit of the 50 Hz useful signal.

I keep you inform of my trial.

I am also going forward using an LTC 1966 circuit to convert AC in
DC RMS.
It is a simple IC and will avoid the loop in BX-24 programming to
find the Max. So the overall result will be a faster program.

Thanks for all the comments which are useful and welcome.

Best Regards

Patrick.
--- In b..., rosarite@... wrote:
>
>
> Hi,
>
> I checked the sensor output and I could not  come up if the
voltage output was Dc or AC. Since they are using +5 in the power
supply I assumed that is DC.
>  I try using the capacitor in parallel to the input instead
serial and if it is too noisy I use a 1k resistor in series.
>
> rosarite
>
>
>
>
>
>
>
> -----Original Message-----
> From: gouardopatrick
> To: b...
> Sent: Fri, 13 Feb 2009 3:58 pm
> Subject: [BasicX] BX-24 Input Impedance for ADC conversion of
small 50 Hz Voltage
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Hello everybody,
>
>
>
> To measure the current in my 3 phases house electricity system and
>
> in the neutral, I am using 4 Honeywell Current Sensors CSLA2CD
>
> powered with 5V.
>
> 5 V is on the low end of the specifications!
>
> I send the outputs of the current sensors to the Input pin (Pin 13
>
> to 16) of the BX-24.
>
> The Current sensor give a DC voltage of 5V / 2 = 2.5 V when I have
>
> no current in the sensor.
>
> The AC voltage is around 300 mV RMS on Input pin when I have 15 A
in
>
> the phase, measured with a standard DVM.
>
> The idea is to search the Max AC voltage in a loop faster than the
>
> 50 Hz frequency.
>
> The RMS voltage is then given by dividing the Max Voltage by
1.414
>
> (Square root of 2).
>
> The RMS Voltage is proportional to RMS current flowing in the
phase
>
> wire.
>
> This is the basic.
>
>
> 0AMy problem is to try to remove the DC voltage of 2.5V by putting
a
>
> serial capacitor but I like to know if somebody as the input
>
> impedance of the pin 13 to 16 (ADC Inputs) of the BX-24 for 50 Hz
>
> frequency?
>
>
>
> Any idea what should be the value of the capacitor?
>
> I put one Micro Farad (1 µf) but when I have no current the
>
> capacitor remain charged to 5 V and when I apply a current, it
take
>
> very long time to reach the right value (the capacitor remain
>
> charged) .
>
>
>
> Thanks for your feedback and best regards.
>
>
>
> Patrick
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Thanks for your reply.

The reason for wanting to put a capacitor was to remove the bias
voltage going to the ADC input.
In fact for the moment I have power the sensor with 5 V which is too
low according to the specification which gives 8 V Dc mini.
With 5V the sensor apparently work OK but maybe not at it best!

With 8 V DC to the sensor, it give 4 V cc Dc Bias voltage and the
ADC max input is 5 v which give me only 1 V of ACMax voltage.
Ok, I could use a resistor divider but this will also divide the
useful signal.

>From what you said about the input impedance of the BX-24 ADC input,
I could reduce the value of the capacitor to 1 to 10 nF and I think
it will work.
I have a look on this idea.

I could also put a differential amplifier but it makes the circuit
more complicated to make.

In term of precision, a 5 % result is acceptable to me and the
resolution of the AQDC is 5/1024, is that right?

Thanks and best Regards.

Patrick.
, --- In b..., Tom Becker wrote:
>
> > ... I put 1 f but when I have no current the capacitor remain
> charged to 5 V and when I apply a current, it take very long time
to
> reach the right value...
>
> No surprise. If you look at the ADC input specifications of the
> ATMEGA8535 processor, you'll find that RAin is ~100megohms. The
time
> constant of that in series with 1F is 100 seconds.
>
> It sounds to me that you need do nothing but directly connect the
sensor
> output to the ADC input pin. Since it is already biased at 2.5v
and the
> maximum swing is well within the 0v and 5v rails, a direct
connection
> should work. However, 300mVRMS is only about 1vpp, so you will
not see
> the best resolution. Still, you'll have at least eight bits. To
get
> best resolution, you'll need some AC-coupled amplification - or a
sensor
> with more sensitivity, I believe.
>
> Tom
>

> ... a 5 % result is acceptable to me and the resolution of the ADC is
5/1024, is that right?

10 bits, 5v/1024, yes.

5%. How can you know the sensor is that accurate if you operate it
out-of-spec?

Assuming the sensor output is offset bipolar and you remove the DC bias,
beware of negative ADC input voltages; will you ignore negative currents?

If you are able to use opamps you can solve this excessively well, but
why use hardware when a subtraction in code can do it? Why not a 7806
regulator, an input resistor, and remove a 3v offset in code?

Tom
> ... I could also put a differential amplifier but it makes the
circuit more complicated...

Well, you could build a peak detector, too, for a no-code solution.

I do not understand your rationale, Patrick. Is this an exercise or do
you need to build an instrument?

> ... too low according to the specification which gives 8VDC minimum.

No, the specs do not specify an 8v minimum.
http://www.compel.ru/images/catalog/334/CSLA2CD.pdf If you don't have a
7806 you can use a 7805 with a diode in its ground to get 5.6v, within
spec, and have a 2.8v offset.

Respectfully, I suggest that you think this through some more.
Tom
Hello Tom,

Thanks for your reply.

I am writing on this forum because I thought it was a place top
discuss and exchange ideas on a subject we like.
Please tell me if I am wrong in my approach.

The specifications of the IC I use are at the following address:

http://sensing.honeywell.com/index.cfm/ci_id/140400/la_id/1/document/
1/re_id/0

The CSLA1CD as a minimum VCC of 8V and the CSLA2CD as a minimum VCC
of 6 V Dc.

This is a personal project that I am trying to build for my house.
I have in my house 3 phases and neutral electrical network and with
32 A max per phase.
In winter, when we use all the electric radiators, the input circuit
breaker often trip because we are over 32 A in one of the phase.
I want to switch the radiators using an X10 interface XM10E when we
reach 32 A.

I selected the BX-24 for the simple reason that he has both ADC
inputs and X10 command.

If I have managed for the moment, more or less, the AD conversion, I
have not been able to make basic X10 commands work, yet.
Now, in term of building items like differential amplifiers or peak
detectors, I have the background to do it but it is easier and
faster to put together black boxes with the proper basic function
tested by the manufacturer.

Here is the link for the LTC1966 RMS converter from Linear
Technology.

http://www.linear.com/pc/downloadDocument.do?
navId=H0,C1,C1154,C1086,P1701,D3396

Thanks for your help and suggestions.

Best Regards.

Patrick.
--- In b..., Tom Becker wrote:
>
> > ... I could also put a differential amplifier but it makes the
> circuit more complicated...
>
> Well, you could build a peak detector, too, for a no-code
solution.
>
> I do not understand your rationale, Patrick. Is this an exercise
or do
> you need to build an instrument?
>
> > ... too low according to the specification which gives 8VDC
minimum.
>
> No, the specs do not specify an 8v minimum.
> http://www.compel.ru/images/catalog/334/CSLA2CD.pdf If you don't
have a
> 7806 you can use a 7805 with a diode in its ground to get 5.6v,
within
> spec, and have a 2.8v offset.
>
> Respectfully, I suggest that you think this through some more.
> Tom
>

Sorry, the Linear Technology Address for the LTC1966 is as follow :

http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1154,C1086,P17\
01,D3396
701,D3396>

Best Regards.

Patrick.
--- In b..., "gouardopatrick"
wrote:
>
> Hello Tom,
>
> Thanks for your reply.
>
> I am writing on this forum because I thought it was a place top
> discuss and exchange ideas on a subject we like.
> Please tell me if I am wrong in my approach.
>
> The specifications of the IC I use are at the following address:
>
> http://sensing.honeywell.com/index.cfm/ci_id/140400/la_id/1/document/
> 1/re_id/0
>
> The CSLA1CD as a minimum VCC of 8V and the CSLA2CD as a minimum VCC
> of 6 V Dc.
>
> This is a personal project that I am trying to build for my house.
> I have in my house 3 phases and neutral electrical network and with
> 32 A max per phase.
> In winter, when we use all the electric radiators, the input circuit
> breaker often trip because we are over 32 A in one of the phase.
> I want to switch the radiators using an X10 interface XM10E when we
> reach 32 A.
>
> I selected the BX-24 for the simple reason that he has both ADC
> inputs and X10 command.
>
> If I have managed for the moment, more or less, the AD conversion, I
> have not been able to make basic X10 commands work, yet.
> Now, in term of building items like differential amplifiers or peak
> detectors, I have the background to do it but it is easier and
> faster to put together black boxes with the proper basic function
> tested by the manufacturer.
>
> Here is the link for the LTC1966 RMS converter from Linear
> Technology.
>
> http://www.linear.com/pc/downloadDocument.do?
> navId=H0,C1,C1154,C1086,P1701,D3396
>
> Thanks for your help and suggestions.
>
> Best Regards.
>
> Patrick.
> --- In b..., Tom Becker gtbecker@ wrote:
> >
> > > ... I could also put a differential amplifier but it makes the
> > circuit more complicated...
> >
> > Well, you could build a peak detector, too, for a no-code
> solution.
> >
> > I do not understand your rationale, Patrick. Is this an exercise
> or do
> > you need to build an instrument?
> >
> > > ... too low according to the specification which gives 8VDC
> minimum.
> >
> > No, the specs do not specify an 8v minimum.
> > http://www.compel.ru/images/catalog/334/CSLA2CD.pdf If you don't
> have a
> > 7806 you can use a 7805 with a diode in its ground to get 5.6v,
> within
> > spec, and have a 2.8v offset.
> >
> > Respectfully, I suggest that you think this through some more.
> >
> >
> > Tom
>