By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by CML

Build your own telemetry sensors.

May 2019 article - OpenXSensor

All Topics | Latest Posts

Search for:  in Thread Title in  

Chris Bott - Moderator02/05/2019 13:53:17
avatar
Moderator
6658 forum posts
1381 photos
1 articles

Hi Andy

Nice job, that looks to be working well. Do you find you have to let the vario settle after switching on and then do a telemetry reset to zero it before launching? I find that I sometimes get a starting height that's way off zero.

Yes if you don't need the current reading then leave the parts off. Those would be the ASC758, R1, C1 & C2.

You could even use the same pin as the highest cell one, as the full lipo pack reading too, meaning you could leave off R2 and R3. The downside would be that this would make the unit suit only a fixed number of cells. But leaving all those off would mean you could even cut that end of the PCB off. Should you wish.

I'll be very interested to see how folk get on sandwiching the pressure sensor board between PCB and Arduino, using 2 pins up and 2 pins down. It's fiddly but ends up tidy. It's not the only way to do it though.

Keep us posted.
Chris

Edit - Oh and yes, certainly in FrSky S.Port land, these can be connected on to other sensors. That's why there are two sets of telemetry pins.

Edited By Chris Bott - Moderator on 02/05/2019 14:29:20

Andy Halmshaw02/05/2019 15:06:27
avatar
15 forum posts
17 photos

Hi Chris

You are correct I do let the vario settle down after switching on and then do a reset before flying. Since mounting the Vario in a model and adding the foam it does appear to be much more stable.

Hopefully in the coming weeks the weather will get better and there might even be a chance of some thermals, it will be interesting to see the flight logs then and how stable the Vario is over a longer time.

I think I understand what you said about leaving the currect sensor off, but I am currently walking upright and hopefully as I play around and understand more I should get to the running stage!

Andy

Chris Bott - Moderator02/05/2019 17:22:24
avatar
Moderator
6658 forum posts
1381 photos
1 articles

Don't worry Andy, the beauty is that we can keep changing how it's programmed. Always easier if we remember (save) what we did last time, of course.

sgwlm05/05/2019 22:01:53
avatar
110 forum posts
84 photos

received my pcb's,

thankyou Chris,

more to add to list of projects

Andy Halmshaw06/05/2019 10:56:40
avatar
15 forum posts
17 photos

Hi Chris

I have found this Sensor Module on BangGood and EBay and was wondering if it could be used as an alternative to the ms5611. It only seems to accept 3.3V, but I do not see this as a problem as you suggest using the 3.3V Arduino. Below is the description and site link.

What do you think?

Andy

GY-BMP280-3.3 High Precision Atmospheric Pressure Sensor Module For Arduino

https://www.banggood.com/GY-BMP280-3_3-High-Precision-Atmospheric-Pressure-Sensor-Module-For-Arduino-p-1111135.html?cur_warehouse=CN

Chris Bott - Moderator06/05/2019 12:06:31
avatar
Moderator
6658 forum posts
1381 photos
1 articles

Hi Andy

Yes a BMP280 will work but is less accurate. It also has no voltage regulator of it's own so it must be fed from a 3.3V supply.That's fine if you're using a 3.3V Arduino as I recommended.

The baro sensor type will have to be set to BMP280 in the software.

This is from the config-descripton file:-

Best results are provided by the MS5611 barometric sensor. Such a sensor is usually mount on a board (like the GY-63 or the GY-86) which have a 3.3 voltage regulator and a I2C level shifter.
* Still it is possible to use a board with a BMP085 or BMP180 or a BMP280 sensor (which are cheaper but less accurate).

Peter Wedlake06/05/2019 22:14:37
2 forum posts

I was struggling to get the BMP280 to work on my vario, having just read Chris's post i realise why. I'd been using a 5V Arduino. Doh.... (should have read the specs) Put another BMP280 on a 3.3v Arduino and its working, But on the bench test it doesn't appear to be as sensitive as the MS5611, the vario note hardly changes when the model is lifted up and down with the BMP280, if i put in the vario with the MS5611 with just a small movement the vario note changes a lot...

I will add that I've built 3 of the current sensors (one with a MS5611 vario board) and there all working fine.

Chris Bott - Moderator06/05/2019 23:06:45
avatar
Moderator
6658 forum posts
1381 photos
1 articles

That's great to hear Peter. I'm really pleased to hear that 3 are out there working

Anyone else?

Chris Bott - Moderator07/05/2019 18:09:09
avatar
Moderator
6658 forum posts
1381 photos
1 articles

The new version boards have turned up.

I've built one up and there's a couple of issues, none insurmountable though.

The new board was designed to accommodate the different positions of A6 and A7 on some Arduino Pro Minis, but still be usable as designed before.

It serves me right for trying a quick tweak, but thankfully I didn't order many and have tested before sending any out.

First, the alternative position of the A7 pin sits directly in line with an unused connection on the pressure sensor board. So the pressure sensor cannot sit between Arduino and the mother PCB.

To get around this I've mounted the pressure board at the top now, and have had to use two jumper wires to the PCB. I don't think it looks too shabby but am thinking that maybe a blob of glue is needed to support the little board now it's only mounted on two pins. (This layout is only needed for one type of Arduino, but could be used for either)

img_20190507_164441.jpg

img_20190507_164143.jpg

The second issue is that I've lost a connection between the ground tracks at one end of the board and those at the other. The simplest fix has been a quick wire between two pins, there's a number of candidates but I chose those in this next pic, the outside two pins at the sockets end. Please excuse the rushed soldering, I just wanted to get this built and tested).

This one is dead easy to fix in the next PCB order.

img_20190507_164306.jpg

One other thing I found was to do with the Arduinos that I bought to test this with.They turned up as a dual voltage version. 5V or 3.3V can be chosen by means of a tiny solder bridge selection, see next photo.

What threw me though is that although I'd changed this one to 3.3V it appears to have stayed at 16Mhz. (Normally a 5V one will be 16Mhz and 3.3V will be 8Mhz) So to get it working I've ended up programming it with the Arduino IDE settings on 16Mhz 5V and my FTDI adapter set to 3.3V. Maybe I've gone about this the wrong way but It works and it only applies to these selectable voltage ones.

img_20190507_164231.jpg

Mike Blandford07/05/2019 18:50:34
avatar
531 forum posts
22 photos

Be aware that the maximum guaranteed clock speed when operating at 3.3V is 13.333MHz. 16MHz is not guaranteed to work across all devices and temperatures.

There is an option on the MEGA328 to divide the oscillator frequency by 2, and it is recommended to use this in the application firmware if running a 16MHz crystal with a supply of 3.3V.

Mike

Chris Bott - Moderator07/05/2019 19:23:24
avatar
Moderator
6658 forum posts
1381 photos
1 articles

Ooh thanks Mike. I think my best bet then, might just to run these (I only bought 2) at 5v with appropriate openxsensor tweaks and make sure they don't go in planes that have a 4.8v battery.

Chris Bott - Moderator07/05/2019 20:16:52
avatar
Moderator
6658 forum posts
1381 photos
1 articles

So, it seems I bought the 16Mhz version of the selectable voltage one. There is an 8Mhz one. Ah well, it's proved the PCB design and found the wrinkles. It also shows some of the risks of going for lowest price/clones.

Mike Blandford07/05/2019 23:12:44
avatar
531 forum posts
22 photos

The maximum operating frequency of a MEGA328 changes linearly from 10MHz at 2.7V to 20MHz at 4.5V. 16MHz therefore needs just under 3.8V, so works fine at 4.8V.

Mike

Chris Bott - Moderator08/05/2019 09:54:26
avatar
Moderator
6658 forum posts
1381 photos
1 articles

This is exactly what I was hoping for, to learn some more about these things, having only really scratched the surface myself. Thanks again Mike.

My thinking was really because I opted to use Vcc as the reference for voltage (and hence, the current) measurements. So using the on board regulator and giving it a little headroom seemed the best way.

The internal 1.1V reference could be used but all divider resistor values would have to be adjusted to suit.
There would have to be a divider for the current measurement added too.

All possible, and probably a better way to do things?

Paul Lewis 308/05/2019 22:48:18
avatar
6 forum posts
4 photos

I got some boards from someone who bought some of your first batch, and have completed building one, it works perfectly ( I had to wedge some header pins in to test the voltages, I thought I already had some 4S JST-XH connectors but I only had 3S and 6S so I have ordered some)

wp_20190508_22_27_50_pro.jpg

I have sandwiched my MS5611 between the Arduino and the PCB board.

wp_20190508_22_28_22_pro.jpg

Edited By Paul Lewis 3 on 08/05/2019 22:48:45

Edited By Paul Lewis 3 on 08/05/2019 22:51:32

Chris Bott - Moderator08/05/2019 23:07:52
avatar
Moderator
6658 forum posts
1381 photos
1 articles

Oh well done Paul that's great news, and thanks for the pictures.

It's very satisfying to see that people are having success.

Mike Blandford09/05/2019 00:11:00
avatar
531 forum posts
22 photos

The '328 datasheet shows the internal bandgap reference is between 1.0 and 1.2V, with a typical value of 1.1V.

One way of using this is to use VCC as the reference voltage, but then use the ADC to measure the bandgap voltage, This enables you to work out what the VCC value is and detect if it is lower than expected.

I use this method in er9x for the 9X radio where if the radio battery drops too low, the VCC drops and the actual measured battery voltage appears to increase.

Mike

Kevin Fairgrieve09/05/2019 06:42:32
avatar
1593 forum posts
2848 photos

I am still waiting on a few bits from Far Far away (China), before I can commence my build(s).

 

Keep posting so I can keep learning.

 

Thanks

Kev

Edited By Kevin Fairgrieve on 09/05/2019 06:43:02

Paul Lewis 313/05/2019 10:53:41
avatar
6 forum posts
4 photos

Hi looking at your HGLC XT60, I can see the potential divider fine but what is the resistor on the other side between the negative and the current sensing output for.

Also can you confirm what resistor values you using for the potential divider?

I think this is probably for 4s and the resistor values are probably:

2.7K to Ground

15K to Positive

47K for the resistor on the other side

Edited By Paul Lewis 3 on 13/05/2019 12:15:11

Chris Bott - Moderator13/05/2019 20:12:57
avatar
Moderator
6658 forum posts
1381 photos
1 articles

Hi Paul

Yes you have the correct resistor values there and they do suit up to 4S.

The 47K on the other side was added after I had trouble with linearity and scaling of the current values.

We know these are made for connecting to multirotor flight controllers but I've no idea what the input on the FC looks like. But putting that as a load between the current sensor output and GND made things work much better.

If I remember correctly, without that resistor the zero could be calibrated fine, along with full speed current, but in between readings were wildly out. I'm afraid I've forgotten exactly how I got to that conclusion.

All Topics | Latest Posts

Please login to post a reply.

Magazine Locator

Want the latest issue of RCM&E? Use our magazine locator link to find your nearest stockist!

Find RCM&E! 

Latest Forum Posts
Support Our Partners
electricwingman 2017
Pepe Aircraft
Gliders Distribution
Wings & Wheels 2019
Slec
Cambridge Gliding Club
CML
Advertise With Us
Sarik
Latest "For Sale" Ads
New Poll - Sticky situations...
Q: How often - when using superglue - do you end up with it on your fingers?

 Every time
 Occasionally
 Sometimes
 Rarely
 Never
 Wear rubber gloves

Latest Reviews
Digital Back Issues

RCM&E Digital Back Issues

Contact us

Contact us