Current Transducer LEM 306-S Connecting Solar Monitoring System

I have been stumbling all over google to try and figure out how to connect a LEM 306-S Current Transducer to my Mega2560 board. I have read lots of posts on this forum but don't seem to get the information I need.

Spec Sheet: http://www.lem.com/docs/products/lf%20306-s%20e.pdf

I have a somewhat grasp on this and what I think I need to do but so far have failed at getting reliable results.

I am supplying the LEM with 12v dc via a dc-dc buck boost to keep it consistent and connecting the grounds together with the arduino ground.
Then I put a 37 ohm resistor across the signal wire and the ground to step the voltage down so it does not blow the analog input.

I am wanting the measure the output current from the charge controller and the load current draw from the batteries.

The mega is being powered from a 12v to 5v dc-dc converter connected to the system batteries.

When I test I can't seem to get consistent readings or even valid readings some times. I have seen where some connect a burden resistor then run the output through a voltage divider. This sounds correct but I'm not sure how to accomplish this with my 12v input to power the ct and 5v to the arduino.

So my questions are these am I on the right track? What would be the proper way to connect the LEM to the arduino to get consistent readings?

Any help would be appreciated.

Thanks,

It seems that this device needs a dual-rail supply. +12volt and -12volt.
And that it has a current output that outputs 150mA@300Amp.
That calculates to 5.5volt across a 37ohm resistor, or 4.95volt across a 33ohm resistor.
Wise to have a (10k) resistor between that 33-37ohm resistor and the analogue input (pin protection).
Only one way currents can be measured that way, with a resolution (steps) of ~0.3Amp.

For 2-way currents, you need a second 10k resistor from the analogue input to 5volt.
That voltage divider will bias the analogue input to 2.5volt with 0volt (no current) on the 33ohm measuring resistor. Resolution drops then to ~0.6A/step.

Post a diagram, and code. So we can check.
Leo..

I have attached a generic schematic of what I have tried. Below is the only relavant code that I use to calculate the input on A1 to a value of current.

=400*(A1 - 512)/1024

I am only measuring the current in one direction. IE + direction. So I don't think I need a duel rail supply only if I was to measure both. I could be wrong.

Note on the schematic I used fritz to generate it never used it before so I just used a place holder for the CT but it gets the point across. I simply put a 33 ohm(My last attempt I used a 33ohm 3 Watt) resistor on the signal pin to ground. The 12v in is actually 12.25v that is what the dc-dc puts out.

So I have done some more testing tonight and here is what I have got. I am reading the proper voltages on the resistor with a DMM but the arduino is not reading properly on the analog pin. I put a 1.2 amp load through the ct and was reading around 1.5v on the signal wire. But the arduino was only reading a 1 on the analog pin. It should have been around 3-4.

Now strangely if I wrap the wire and go through the CT twice I get 5 on the analoge pin. Then if I wrap it again I get 10. IE it doubles from 2 to 3 but 1 to two it adds 4???

Anyone have any ideas what I could be doing wrong or need to do?

Thanks,

That C.T. NEEDS a dual supply ... spec sheet linked shows the internal block diagram on about page 3 ...

spryoshi:
I am only measuring the current in one direction. IE + direction. So I don't think I need a duel rail supply only if I was to measure both. I could be wrong.

You are almost certainly wrong.

You can't just choose to power it with a positive voltage if you want to measure a current in the positive direction, or power it with a negative voltage if you want to measure a negative current. It needs both supplies to function correctly.

spryoshi:
Now strangely if I wrap the wire and go through the CT twice I get 5 on the analoge pin. Then if I wrap it again I get 10. IE it doubles from 2 to 3 but 1 to two it adds 4???

Without the correct supplies it is likely to give a non-linear response. By putting more turns on the primary you will have just moved to a more linear part of it's characteristics.

Ok I will try a duel rail supply once I salvage one. But this question remains why am I measuring say .015 volts with a DMM on the Analoge input but the arduino is only reading ~.004? I tried a couple different Arduinos and had similar results.

I am not doing any math in the code just reading the value on pin A1.
A1 = 1

DMM says .015v

That should be a 3-4 on the A1 pin.