Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Power sensor signal conditioing

Status
Not open for further replies.
hi,
Set VR1 for 0.5V and adjust VR2 to give 1.5V out [Y]

That CA3140 seems to be limiting at a lower voltage than I would expect, I'll check it out.

Once you have set the VR1 pot to 0.5V and VR2 to give 1.5V out you can connect this to your PIC adc input and try your PIC program.
Adjust VR1 as you test with different voltages, but leave VR2 unchanged..OK

When you are happy with that test, connect the AD736 to the CA3140 as shown in the dwg,,, remove the test pot input first.
 
Seems to work fine,

I connected the CA3140 to my PIC and ran my code. It picked a reading starting from 2 to 900 where 2 represents 0 at x and 900 is the max x can provide.

If I leave it running at 900 there is small fluctuation between 890 and 900.


hi,
Set VR1 for 0.5V and adjust VR2 to give 1.5V out [Y]

That CA3140 seems to be limiting at a lower voltage than I would expect, I'll check it out.

Once you have set the VR1 pot to 0.5V and VR2 to give 1.5V out you can connect this to your PIC adc input and try your PIC program.
Adjust VR1 as you test with different voltages, but leave VR2 unchanged..OK

When you are happy with that test, connect the AD736 to the CA3140 as shown in the dwg,,, remove the test pot input first.
 
Why are breadboarded circuits such a mess of wires all over the place?
I make all my prototypes on neat and tidy Veroboard and it is easy to see which connects to what.
 
Last edited:
Will be moving over to veroboard soon.

I am currenlty doing the drawing for the veroboard. But it will take me a while.
 
Here is my Vero drawings.

Can you give it the once over?

I also have a small question:


The AD736 is producing say 0.4 mv when there is a 40 Watts load on the live wire, and when there is close to 2000 watts it goes up to 1.3mv.

Looking at those figures I would expect them to be proportional but they do not appear to be.

When connected to the CA3140 the change is almost negligible.

Also the moving up from 0.4 to 1.3 is almost a digit per second and the same for going down, appears to be a capacitor problem!!??


Thanks.

Will be moving over to veroboard soon.

I am currenlty doing the drawing for the veroboard. But it will take me a while.
 

Attachments

  • IMG_final0001.jpg
    IMG_final0001.jpg
    546.8 KB · Views: 141
  • IMG_final0002.jpg
    IMG_final0002.jpg
    517.9 KB · Views: 142
  • IMG_final0003.jpg
    IMG_final0003.jpg
    483.3 KB · Views: 138
  • IMG_final0004.jpg
    IMG_final0004.jpg
    484.5 KB · Views: 138
  • IMG_final0005.jpg
    IMG_final0005.jpg
    510.4 KB · Views: 138
  • IMG_final0006.jpg
    IMG_final0006.jpg
    519.9 KB · Views: 141
  • IMG_final0007.jpg
    IMG_final0007.jpg
    547.8 KB · Views: 145
  • verodiagram-web.JPG
    verodiagram-web.JPG
    125.8 KB · Views: 142
Last edited:
Here is my Vero drawings.

Can you give it the once over?

I also have a small question:


The AD736 is producing say 0.4 mv when there is a 40 Watts load on the live wire, and when there is close to 2000 watts it goes up to 1.3mv.

Looking at those figures I would expect them to be proportional but they do not appear to be.

When connected to the CA3140 the change is almost negligible.

Also the moving up from 0.4 to 1.3 is almost a digit per second and the same for going down, appears to be a capacitor problem!!??


Thanks.

hi,
I'll look at the vero layout.

According to the datasheet the current clamp on its most sensitive range is 1mV/0.1A, so thats 10mV/Amp, so for a 2KW [8 amps] you should get 10mV * 8 about 80mV. [ you did say sometime ago this what you did read OK]

This 80mV being amplified by 3 using the CA3140 should give a adc input voltage of 240mV, which for a 10bit adc with a 3Vref gives an adc conversion value of 81 decimal.

By scaling the output from the AD736 using the CA3140 the adc conversion value is directly proportional to current.!
In this case: 81 counts = 8.0Amps.
 
Last edited:
Yes the clamp itself when connected to my DMM I can see 0.008 volts AC for about 40 watts load and when I add a 2000 watts load it jumps up to 0.084 VAC which is just about matches the figures you have.

The AD736 on the other hand is showing 0.4mv dc to 1.3 mv dc, and would vary slightly 0.8 mv dc, 0.6 mv dc.

Looks like I need to make sure my AD736 is working properly.

Thanks

hi,
I'll look at the vero layout.

According to the datasheet the current clamp on its most sensitive range is 1mV/0.1A, so thats 10mV/Amp, so for a 2KW [8 amps] you should get 10mV * 8 about 80mV. [ you did say sometime ago this what you did read OK]

This 80mV being amplified by 3 using the CA3140 should give a adc input voltage of 240mV, which for a 10bit adc with a 3Vref gives an adc conversion value of 81 decimal.

By scaling the output from the AD736 using the CA3140 the adc conversion value is directly proportional to current.!
In this case: 81 counts = 8.0Amps.
 
hi,
Layout looks OK, always leave the pcb corners clear for pcb mounting pillars.:)

I think your comps list R5 is wrong.:)


Yes the clamp itself when connected to my DMM I can see 0.008 volts AC for about 40 watts load and when I add a 2000 watts load it jumps up to 0.084 VAC which is just about matches the figures you have.

This look OK.

Be sure to meter in the correct points when measuring the AD763.
 

Attachments

  • vero1.JPG
    vero1.JPG
    141.5 KB · Views: 146
Last edited:
There is one thing I should mention:

The PIC has a battery and can provide +5 vdc, so I am using that to power the CA3140, will this has any effect? it is just that when I connect the +5v and the Vout and the GND to the PIC I get a reading of 2-3 decimal and when I removed the GND it jumps up to 1023 (max) and thats because the ADC is now receiving +5vdc.

I am somehow confused as to why the ouput of the AD736 is between 0.4mvdc and 1.3 mvdc.

Edit:

When nothing is connected to the PIC the ADC reading is at 51 decimal.

hi,
Layout looks OK, always leave the pcb corners clear for pcb mounting pillars.:)

I think your comps list R5 is wrong.:)
Yes I realised and corrected it accordingly, seems you picked the earlier version :)



This look OK.

Be sure to meter in the correct points when measuring the AD763.
 
Last edited:
There is one thing I should mention:

The PIC has a battery and can provide +5 vdc, so I am using that to power the CA3140, will this has any effect? it is just that when I connect the +5v and the Vout and the GND to the PIC I get a reading of 2-3 decimal and when I removed the GND it jumps up to 1023 (max) and thats because the ADC is now receiving +5vdc.

I am somehow confused as to why the ouput of the AD736 is between 0.4mvdc and 1.3 mvdc.

Edit:

When nothing is connected to the PIC the ADC reading is at 51 decimal.

Never disconnect the 0V gnd from the PIC while applying +5V to Vss, especially when the other pins of the PIC maybe connected to other voltage sources,

The 2~3 mV is most likely noise pickup, you can trim this out with 10K thats normally on pins 1/5 of the CA3140 or do it in the program.

If the adc input pin is floating you will get pickup, low mV's.

It will be OK to power the CA3140 from the PIC's +5V.
I thought you said earlier that the PIC was powered by 3V.???
 
The pic can produce both +3vdc and +5vdc it has a chargeable battery.

here are some info of battery status:
Power controller version : PCTRL-1.101
Battery charging current : 2 mA
Current drawn from battery: 89 mA
Max current drawn : 317 mA
Battery voltage : 4077 mV
Main board I/O voltage : 3099 mV
ARM CPU voltage : 1790 mV
External voltage : 0 mV
USB voltage : 82 mV

Find attached the datasheet for the PIC.

Few questions:
* Is the output of the AD736 ok at as it is showing?
* with CA3140: 40 watts load DMM reading is showing 7.6MV, 2000 Watts laod it shows 9mv is this correct?

On a side note:

I was thinking maybe I can power the CA3140 from the same 9VDC:

If I add a 20k VR and tune it to produce +5 v then I should be able to connect the +v to PIN7 and the 0V to PIN 4.

Never disconnect the 0V gnd from the PIC while applying +5V to Vss, especially when the other pins of the PIC maybe connected to other voltage sources,

The 2~3 mV is most likely noise pickup, you can trim this out with 10K thats normally on pins 1/5 of the CA3140 or do it in the program.

If the adc input pin is floating you will get pickup, low mV's.

It will be OK to power the CA3140 from the PIC's +5V.
I thought you said earlier that the PIC was powered by 3V.???
 

Attachments

  • eDEMO_sch_assy_rev_5_2.pdf
    113.8 KB · Views: 224
hi,
We seem to be going around in circles.:rolleyes:
 
I am trying to get my head round what is happening.

A 0.4 mvdc is the change difference between 40 watts and 2000 watts. :confused:

The CA3140 seems to be doing its job right, however the AD736 is not. :D I think :confused: .

I totaly understand this,
According to the datasheet the current clamp on its most sensitive range is 1mV/0.1A, so thats 10mV/Amp, so for a 2KW [8 amps] you should get 10mV * 8 about 80mV. [ you did say sometime ago this what you did read OK]

This 80mV being amplified by 3 using the CA3140 should give a adc input voltage of 240mV, which for a 10bit adc with a 3Vref gives an adc conversion value of 81 decimal.

By scaling the output from the AD736 using the CA3140 the adc conversion value is directly proportional to current.!
In this case: 81 counts = 8.0Amps.

but it only makes sense if the CA3140 matches those figures and currently it does not, and since I know the CA3140 has been tuned correctly, it seems to me that the ouput of the AD736 is not right.

The output of the transducer clamp is correct withtout the AD736, however the output from the AD736 is as follows:

Clamp..................... AD736 output (No CA3140)
not connected..................... 00.0 mvdc
40 watts load...................... 00.8 mvdc
2000 watts load................... 01.3 mvdc.

How is this possible?
if 40 watts is 00.8 then 2000 should be 40.0 (50 times more)

Thanks.

hi,
We seem to be going around in circles.:rolleyes:
 
Last edited:
Post a circuit diagram of how you have the AD736 and CA3140 connected showing ALL the power supply lines.
 
Here are a couple of high res pics.

Was this the ADC conversion formula you used? :

ADC = Floor(2^M/VrefHi - Vref Lo * Vin - Vref Lo)

Where m is the number of bits in this case 10.
Vref Hi is +3V and Lo is 0.
Vin is 0.240 V

ADC = Floor(81.92) = 81



Thanks.
 

Attachments

  • IMG_all_final0002.jpg
    IMG_all_final0002.jpg
    1.7 MB · Views: 150
  • IMG_all_final0003.jpg
    IMG_all_final0003.jpg
    1.9 MB · Views: 149
Last edited:
hi,

Questions ref the HR pic.
Q1:
Are V1 and V2 board sockets connected or isolated from each other.?
IF they are isolated, then how does pin4 of the 736 get its 0v connection.?

Q2:
Fig28 of the data for the 736 shows pin1 has be connected to pin8 via a 10uF capacitor.
Its hard to be sure looking at the pic, but the cap maybe in pin1.?
BUT its going the clamp [red wire] output.

You are showing the other output from the clamp [blue wire] going to pin 2,
its supposed to goto the Vs/2 [junction of the two 100k's]

Q3:
Why are the resistors marked '????' in the circuit.?
If its because you dont have a 4K7, then the pin3 resistor value is not critical, just use one of those 3 resistors.

Q4: Looking at Fig28 of the 736 data, pin2 requires a 1M0 connected to pin8 [Vs/2]
also Vin [clamp red wire] to pin2 is via a 100nF cap.

I did ask for a circuit diagram not a picture, I have had to reverse 'engineer' the pic into a circuit.

Look at my marked up image, the lines are just my tracing guides.

BTW: I thought you had decided to use fig28 of the 736 datasheet for the circuit.


The calculation for the 10 bit conversion is fairly simple.

Adc Value = [Vsig/Vref]/1023

You cannot power the CA3140 from the 9Vbty thats powering the AD736
because you have a virtual 0V Gnd at the junction of the two 100K's
Its a split battery.
 

Attachments

  • final0003.gif
    final0003.gif
    1.9 MB · Views: 167
Last edited:
hi,

Questions ref the HR pic.
Q1:
Are V1 and V2 board sockets connected or isolated from each other.?
IF they are isolated, then how does pin4 of the 736 get its 0v connection.?

The upper row is connected. The lower is not. The black line and red line indicate connection.


Q2:
Fig28 of the data for the 736 shows pin1 has be connected to pin8 via a 10uF capacitor.
Its hard to be sure looking at the pic, but the cap maybe in pin1.?
BUT its going the clamp [red wire] output.

You are showing the other output from the clamp [blue wire] going to pin 2,
its supposed to goto the Vs/2 [junction of the two 100k's]

The cap is in pin 1 connected to the clamp output. This does not match whats in Fig 28, it is more like figure 24. What intially i was going with Fig 24 however to get the battery power I used Fig 28, so I ended up with a combination, Fig 28 did not clealrly indicate where my other clamp output should go. Now it is clearer for me.

Q3:
Why are the resistors marked '????' in the circuit.?
If its because you dont have a 4K7, then the pin3 resistor value is not critical, just use one of those 3 resistors.

The connection from from pin 6 (AD736 output) to CA3140 Pin 3 requiire a 10K Resistor, so the current ones total is 10k.

Q4: Looking at Fig28 of the 736 data, pin2 requires a 1M0 connected to pin8 [Vs/2]
also Vin [clamp red wire] to pin2 is via a 100nF cap.



Check the attached new diagram. As opposed to the current one (same attached image).

I did ask for a circuit diagram not a picture, I have had to reverse 'engineer' the pic into a circuit.

My veroboard drawings and my previous diagrams macth my actual one. Only reason I chose to post the actual is just incase I made a mistake somewhere, and I think that paid off :D. Sorry for the hassle though. :eek:

Look at my marked up image, the lines are just my tracing guides.
BTW: I thought you had decided to use fig28 of the 736 datasheet for the circuit.

Originally it was not the intention however when it came to battery power I had to go down the Fig28 route. All my drawing show my connections as is and since I got no comment I assumed they were ok :confused: .

The calculation for the 10 bit conversion is fairly simple.

Adc Value = [Vsig/Vref]/1023
Thanks. for the formula.

You cannot power the CA3140 from the 9Vbty thats powering the AD736
because you have a virtual 0V Gnd at the junction of the two 100K's
Its a split battery.

Ok thanks.
 

Attachments

  • diagram_new.JPG
    diagram_new.JPG
    133.4 KB · Views: 257
Last edited:
Hi,
The proposed layout is the way that I would do it.:)

Lets know how it goes.
 
Will do this evening :)

With regards to the formula is it supposed to be:
Adc Value = [Vsig/Vref]/1023

or

Adc Value = [Vsig/Vref]*1023

E.g.:
Adc Value = [0.240/3]*1023 = FLOOR(81.84) = 81.

With the formula I had (complex version :) ) was (see attachment) :

Where:
Full scale measurement range = VRefHi − VRefLo = 3v - 0v
M is the ADC's resolution in bits. 10bits: 2^10 = 1024
Vin = Vsig = 0.240
The value would be: 81.92

Thanks.

Hi,
The proposed layout is the way that I would do it.:)

Lets know how it goes.
 

Attachments

  • adcformula.JPG
    adcformula.JPG
    6 KB · Views: 131
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top