Jump to content

1S Wattmeter


Recommended Posts

I just tried your values in a spreadsheet. If I scale your readings by 0.95 and add 0.1, then your readings match the multimeter values almost exactly up to 3A.

One solution might be to provide a "wetting voltage" to the analog input to bias the A2D. I would try something like reducing R1 form 10K to 2K2, then adding a 470K resistor between the "top" of R1 and VCC (3.3V). This would provide an A2D count of about 14 when no current is flowing. Then use:

#define AOFFSET 14
Amps = (((Atemp+LOOPS/2)/(LOOPS))-AOFFSET+1)*(1.1/1023.0)*48*TrimA ;

If you just add the offset as you suggest, try also testing for ((Atemp+LOOPS/2)/(LOOPS) being zero and set Amps to zero if it is, otherwise do the calculation. This would give a reading of zero when no current is flowing, but jump to 150mA to 200mA (correctly) when current is flowing. You just would not be able to measure a current of less than the offset value. From your data, I think you would need to add 2 rather than 1.

Above 3A, since you say the tracks are getting warm, then you are seeing the track resistance increasing causing the wattmeter to read too high. Either declare the meter only reads to 3A, or you could try to compensate for the overreading in the software. The amount of heating is a square law (of course).

Peter, I think you are correct, the A2D is starting from -200mA in effect. What I saw was the wattmeter value reading 0 when 200mA was still flowing.

Mike

Link to comment
Share on other sites

Mike thanks again for your input.

This morning I've been seeing what I can do just in the software. I led myself up a garden path last night.

We (I) have to remember that due to the simplicity of the design, and that we're trying to keep volts drop right down, we're only using around 90 of the 1024 A/D steps. Only 60 if we Declare 3A max, which I'm inclined to do.

I've come up with this line for amps. Almost the original with an offset added.

Amps = (((Atemp+LOOPS/2)/(LOOPS))*((1.1/1023.0))*45*TrimA)+0.11 ;

This tracks the multimeter much better but leaves a reading of 0.11A whenever no current is flowing.
The reading does ahow 0.15A when multimeter says 0.149 and this is step 1 of the A/D.

So I've changed the lines just after setting 2 decimal places to read:

if (Amps <0.12)
{
Amps = 0;
}

Peter it would be really useful if you could try this.

Link to comment
Share on other sites

The final adjustment (I hope). I've just changed my C2 to a1uF tant and I'm getting nice stable current readings even at partial throttle.

The only thing I haven't addressed now, is the fact that all three of the Max/Min readings are now triggered by the Power being greater than previously recorded.
This has the advantage of taking all three at the same moment and I think is actually what we're looking for, rather than recording separate Max amps, Max power and Min volts, as and when they occurr separately.

A startup surge is still recorded, I did consider trying to miss that out. But it's real and the meter shows what's going on. If we want to miss it, we have to be gentler with the throttle.

Link to comment
Share on other sites

  • 2 weeks later...

Chris, (and anyone else with a working setup), I’ve just tried to use the wattmeter to measure the startup current & operating current (mostly no load) & cannot get much visible current.

My setup uses a 4 cell NiMn Rx battery connected via a switch to both a servo driver and the IN side of the wattmeter. The servo under test is then connected to the Load side of the Wattmeter, plus servo signal output from the servo driver.

Checked that I get no current with no servo connected & approx. 5v shown - thus not seeing the servo driver power.

Interesting thing is that with HS81MG, CS239MG or HS225MG servos I get the same 220mA max current reading (sometimes zero) for all servos, but normal current stays at zero unless I really load the servo (goes up to a couple/three hundred mA with servo virtually stalled. Max current copies instantaneous if higher than previous Max. (as expected).

My reading of this is thus either that modern servo currents are very low or, (probably likely to be a bit of both) that the current/voltage sampling rate is such that the peaks are short enough to be missed. As the device is intended to be used as a power train wattmeter, then the motor currents will be much longer term & easily caught by the sample rate.

I’m just wondering if anyone else has noticed the same thing.

Link to comment
Share on other sites

Hi Peter. I think, just from your results, that this is asking too much from our very simplistic design. Are you able to test with a multimeter for comparison?

These came today

img_20200513_102345__01.jpg

Of course I'm out of Arduinos so ordered some to arrive last week. A parcel finally came yesterday but it contained an HDMI cable, so I'm now going through a returns procedure. I'll get the money back 14 days after they receive the cable back. (Why is nothing straightforward?)
So more have been ordered and I'm at the mercy of the mail service, again.

I'm just contemplating whether to retrieve a used one from a previous project. Can I guarantee it will still be a working one by the time I have it unsoldered? I'll ponder a little longer and let you know if/when I have any progress.

Link to comment
Share on other sites

Thanks Danny.

Right - we now need to discuss kits of parts etc. I'd like to keep costs down as far as possible for everyone. I'm up to around £120 spent on development parts. I don't need to make that back or break even or anything but would like to make a dent in it at least.

Which way would anyone interested like to go?

I will list a set of part numbers available from bitsbox.co.uk. (There are plenty of other suppliers).

As well as that list, builders will need PCB, 3d Printed case, 4 screws, flying leads to suit your batts/models.

I could do pre-programmed arduinos, I could supply full kits, I could build fully tested units.

So, my first stab at prices are these:-

  • Complete, built and tested - £40 you'll still need to add flying leads - post at cost.
  • Full kit - £30 - you'll still need screws and flying leads. - post at cost.
  • PCB - £2 each + £1 postage (I've done that before)
  • 3d Printed case - £10 - post at cost.
  • Pre programmed arduino on it's own - £5 - post at cost.

Obviously I'd combine post, not interested in profiting from that.

I'm not keen on buying stock just in case I get an order, so all orders would be subject to a short delay while I get the parts.

Here are the parts that can be had from bitsbox.co.uk

bitsboxbom.jpg Plus p&p

I'm quite happy to be flexible, take suggestions, buy in the right flying leads if we can identify them and a suplier, etc etc.

Edited By Chris Bott - Moderator on 23/05/2020 11:52:47

Link to comment
Share on other sites

So with one kit, two cases and two PCB posted out and a fully built one on order I thought I'd better post how I finished the built one off.

I think the pics are self explanatory. There's a little bit of "dressing" of the wires to do to make sure the PCB isn't lifted off its connectors. Some heatshrink has been added to try to afford a little strain relief and the case has been filed to accommodate the flying leads.

img_20200519_120236.jpg

img_20200519_121714.jpg

img_20200519_123038.jpg

img_20200519_125344.jpg

Edited By Chris Bott - Moderator on 19/05/2020 15:48:22

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...