Jump to content

Build your own telemetry sensors.


Recommended Posts

  • 3 weeks later...

Hello. Sorry to be a bit tardy replying to your post. Due to health problems and other distractions I have put the project to one side for now.

I do have a working variometer and a voltage/current sensor using your supplied pcb give accurate cell readings but the standby current is reported to be about 130 A, with no VFAS detection.

I am using the latest sketch that has only config.h. not configbasic and configadvanced.

In config.h about line 130 there is define VFAS_SOURCE ADS_VOLT_6.

Suspect this line should be changed to VFAS_SOURCE VOLT_6

I don't like to give up so will continue when energy reserves return.

Link to comment
Share on other sites

  • 1 month later...

Having recently received a batch of PCBs from Chris, I have just made up my first sensor using the AMASS XT60 module for VFAS & current sensing, intended to be fitted in an electrified glider.

The PCB has had the current sensor end cut off along the left hand line of the Arduino silk screen outline to reduce the electronics unit size.

I have swapped the normal A3/A6 usage to allow the use of a 3 way R/A header for connection to the XT60 sensor, current on A6 & VFAS on A7. This just needs a single break in the A6 track & a short link wire to the A3 pin. With a 47K resistor between the XT60 sensor output and Gnd (as used by Chris on his experimental XT60 sensor), I get accurate current readings (at least up to 8A using a bench PSU & halogen lamp load) with zero offset & 30mv/A settings in the advanced configuration file. As for Chris's test unit, I have fitted a mating XT60 connector to the sensor module via short power cables, and with a flying servo type connection to the 'electronics, this gives the option of easy insertion between battery & ESC when required.

I have used a 5 pin R/A header for Lipo balance lead connection instead of a JST-XH header in order to allow any LiPo up to 4S to be easily connected - just need to make sure the connector is the right way round!.

I have some pictures on my PC, but need to work out how to include these in a post!

Further testing is now required with an ESC to see if the calibration remains true.

By the way, inspection of the OpenXsensor code indicates that current sensor readings are averaged over 200mS & Voltage readings over 500mS. FrSky telemetry setup also allows further smoothing if the 'Filter' box is ticked in the individual sensor setup screen.

667ff85f-2176-41b2-af9b-ff0deecf8acc.jpeg
59c76cdf-5ffd-4dd8-9d68-74db29237bad.jpeg

727080df-5e2d-4bfc-a539-4f9fd1943a70.jpeg

Edited By Peter Balcombe on 02/11/2019 20:11:43

Link to comment
Share on other sites

  • 4 months later...

Hi Dennis and welcome.

Do you mind if I have a look in the morning?

I'm fairly sure that the situation is this:-

I may have one or two of the latest version boards.

I'm sure I have plenty with the incorrect resistor numbering, these are electrically correct and work fine. They're not difficult to work out.

I'd like to check though and will send a PM here once I have.

PS - I ordered some PCBs for a different project over a month ago and there's no sign of them yet, so I think in the current climate, I'll not be placing an order for more sensor ones any time soon.

Link to comment
Share on other sites

Posted by Michael Hadaway on 27/09/2019 12:49:14:

Hello. Sorry to be a bit tardy replying to your post. Due to health problems and other distractions I have put the project to one side for now.

I do have a working variometer and a voltage/current sensor using your supplied pcb give accurate cell readings but the standby current is reported to be about 130 A, with no VFAS detection.

I am using the latest sketch that has only config.h. not configbasic and configadvanced.

In config.h about line 130 there is define VFAS_SOURCE ADS_VOLT_6.

Suspect this line should be changed to VFAS_SOURCE VOLT_6

I don't like to give up so will continue when energy reserves return.

Hi Michael, I must apologise, I've only just seen your post.

I've just downloaded latest version and see it does indeed only have a config file called oXs_config.h

I'm not familiar with this version but it looks like a lot of work has gone into it to make it easier to understand configuration. The key is to read ther relevant section in oXs_configuration_description.h

It does look like you need to change that line 130 to define which voltage you wish to be used. I'd also think that the line:

// ***** 6.2 - Voltage parameters *****
#define PIN_VOLTAGE

needs the pins listing in order, to correspond to the PCB layout. Thus generating Voltage_1, Voltage_2 etc etc - in order.

However: I think your rather large curent offset is likely to be caused by the line:

#define MVOLT_AT_ZERO_AMP 2500 // in millivolt

needing correcting by measuring the sensor output voltage at zero amps and entering that value here.

Link to comment
Share on other sites

Hi Chris, Peter,

I would like to make up 6 units and currently have 3 of the Arduino boards with the oblong reset button. I could take 3 of the older boards and 3 of the newer boards as a precaution to when I buy new processors, then I can be certain that they will fit without a problem. If that is ok.

Dennis

Link to comment
Share on other sites

Hi Chris,

Received the boards and all the parts have been bought so I’m ready to make a start, as I’m in lock down I have plenty of time on my hands! Being new to programming I intend to start slowly with the current and voltage sensor. I have decided to go with the HGLRC XT60 unit as it’s a nice and tidy unit.

I noticed form your photo’s back on page 3 (17/4/19) you have a potential divider across the Lipo +ve & -ve. These resistors look to be 15K & 270 ohms. Am I correct in thinking you are looking to monitor a 5 cell lipo, but they don’t quite match the table in the RCME article? Also, you have a 47K resistor between the -ve and CRNT which I presume is the current sense to the Arduino but why 47K?

Finally, I intend to use the S Port port on my receiver but there are 3 options for to choose from in the “config_basic.h” file. FRSKY_SPORT, FRSKY_HUB, FRSKY_SPORT_HUB. I take it FRSKY_HUB is for the old telemetry hub used with the D series receivers but what are the other two?

Thanks Dennis

Link to comment
Share on other sites

Hi Dennis

It's quite a while since I did that XT60 unit and to be very honest, I really can't remember. The resistor values were probably something I had to hand that worked for whatever I was doing. The important thing is that the input to the Arduino shouldn't ever go above the supply voltage, be that 3.3V or 5V.

The 47K from CRNT to ground was added purely experimentally, I was seeing good readings at 0 throttle and full throttle but not when at part throttle. Having assumed that tis was due to the DC being PWMd I tried a number of filter circuits, but the 47K seemed to be as good as anything.

I'm sure someone else has done much more with these sensors since, and may be able to help?

The choice of FRSKY protocols:-

FRSKY_SPORT_HUB is indeed for D series type telemetry.
FRSKY_SPORT is for the SPORT protocol used in X series receivers.
FRSKY_SPORT_HUB detects and switches to whichever in use. I understand that this detection isn't 100% reliable which is why the other two are provided. Having said that, it has always worked for me.

Link to comment
Share on other sites

Dennis, I posted info on my sensor using theXT60 a while ago. I think the resistor divider for voltage was the 5S one from the table, so resistor to ground was 2k7 as for the others on the PCB. As Chris says, the 47k across the current output was needed to get good results. Check my earlier post for volts/Amp, but it may have been 30mV.

Link to comment
Share on other sites

Hi Chris

Lots of spare time now to try and get a current sensor working. As I remarked before I had downloaded a latter version of openXsensor, but had difficulty finding the correct settings us most of this thread was concerning the earlier software. I have now downloaded the earlier software and found how to set up VFAS for pin A7.

The voltage at A3 is 1.648 which I have entered in the config. Cant manage to paste a screen but the results are.

TELEMETRY

3: Cur 230.1A

4: Cells 11.1V

5: Cel1 3.70V

6: Cel2 3.74V

7: Cel3 3.61V

8: VFAS 11.14V

I wonder if I have a hardware problem. I have used one of your PCBs and wired up as you recommend, but left out the resistors for cell4 and used 10k and 2.7K for the voltage divider R2,R3.

Wont give up yet.

Cheers

Mike

Link to comment
Share on other sites

Hi Michael, it looks like you're so close.

If you change the voltage on A3 does the reading change?

You could do this by say, adding a resistor between A3 and Gnd.

This would test whether the software config is correct for using A3.

If the voltage is different but the reading stays at 230.1A then we need to look at the config.

Link to comment
Share on other sites

Dennis, my post was on 2nd Nov last year.
My current sensitivity was 30mV/A as I thought. Note that the XT60 sensor should give 0v output at zero current & increase from there, so offset should be zero. The voltage resistor divider used normal values for a 5S source.

As you will see from my post, I modified Chris’s boards to remove the normal current sensor section, plus changed the input connections to use Arduino A0-A3 for the balance connector inputs, A6 & A7 for current sensor voltage & current.

Link to comment
Share on other sites

Mike, see my post above, but - I just had another thought about your current reading.

You report an A3 voltage of 1.648 which is incredibly close to half of 3.3V - the supply volts.

Could your ASC758 be one of the bi-directional ones? These give a volts at zero current of Vcc/2

This shouldn't be an issue, though. We just need to set the MVOLT_PER_AMP to suit, and the MVOLT_AT_ZERO_AMP to 1648

Link to comment
Share on other sites

Hi Chris

Well spotted.

I do have the wrong ASC758. You advised 100u and I have 100b (unidirectional).

Looking back in the thread Mike Blandford on 18/5/19 shows " define RESISTOR_TO_GROUND_FOR_CURRENT,"

and "define RESISOR_TO_CURRENT_SENSOR," both as 0.

I had entered 2700 and 10000 here.

Correcting this has given me a current reading of 0 but no change when throttle increased.

Taking A3 down to GRD via a 10k did not alter the reading.

I will go through the config files again making the alterations you recommend, but also some ASC758 lcb100u sensors and make a breadboard circuit to check individual components.

Link to comment
Share on other sites

Hello Chris

Just updating you. I have ordered some ACS758 100u (unidirectional) sensors.

In the meantime I have run the software on a Arduino Nano (5v), having change were 3.3v was expected.

Instead of using a current sensor I wired three 6k resistors in series across the 5v supply.

I then applied the voltages obtained from this resistance ladder, to pin 4 on the Arduino.

Results were :

0v 0A, 1.68v 31.3A, 3.35v 68.5A, 5.03v 106A.

This looks very encouraging and I hope when the sensors arrive, in a week or so, that all will be well and I can do some final calibration.

Thanks again for this project

Mike

Link to comment
Share on other sites

  • 2 weeks later...

Hi Dennis and David.

The one cell wattmeter project has been on hold but I should pick it up again very soon.

The reason being that I'd got to the point where the prototype needed to move on from being of "birds nest" construction to something more structured so I designed and ordered PCBs in mid Feb.

These seem to have got lost in the post so another batch has been made and sent. Once these arrive I'll find whether I've made any mistakes etc.

There's also a little more software development to do.

What I think I'll do is start a new thread here on the forum. Rather than a mag article. An article would be months away, while a thread is likely to tease out some ideas better than mine. (If there's also an appetite for an article, that could still happen).

I'll take some pics of the colour screen version today, and post a new thread. So look out for that.

Thanks for the interest

Chris

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...