FrSky Amp/Current Sensor.

All mods related to the frsky telemetry series of the firmware
User avatar
MikeB
9x Developer
Posts: 16794
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: FrSky Amp/Current Sensor.

Post by MikeB » Mon Jul 16, 2012 10:59 pm

I'll get to it, on my (longish) todo list.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!


derFrickler
Posts: 46
Joined: Mon Jan 09, 2012 9:54 am
Country: -

Re: FrSky Amp/Current Sensor.

Post by derFrickler » Tue Jul 17, 2012 5:49 am

Why do you use er9x, i swithced from er9x to open9x and like it more, don't miss anything from er9x

User avatar
Rob Thomson
Site Admin
Posts: 4542
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: FrSky Amp/Current Sensor.

Post by Rob Thomson » Tue Jul 17, 2012 6:58 am

derFrickler wrote:Why do you use er9x, i swithced from er9x to open9x and like it more, don't miss anything from er9x
Choice. Each person likes there own firmware.

Me... I started on er9x... in my mind 'upgraded' to open9x, and love it. Same as many people 'upgraded' from th9x to er9x!

Each firmware is good, but no firmware is a 100% match for every user. Just because I like open9x, does not mean 'mr jones' will get on with it.

I think that the best bet is... try them all! Find the one that works for you :mrgreen: :mrgreen:
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!

User avatar
janekx
Posts: 90
Joined: Thu Aug 09, 2012 4:08 pm
Country: -
Location: Czech Republic

Re: FrSky Amp/Current Sensor.

Post by janekx » Fri Aug 17, 2012 6:49 pm

Hi
I have new RX D8RII-plus and installed DHT DIY module.
In RX is A1 port and when is connected with jumper it activate build in volt meter but I not see value in open9x menu only zeroes.
When I connect hub and add vario see 0 and 1m so data flowing.
Any setting I forget?

Thanks
Janekx

Odeslano pomoci Tapatalk, Samsung mobile

User avatar
Kilrah
Posts: 10485
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: FrSky Amp/Current Sensor.

Post by Kilrah » Fri Aug 17, 2012 7:43 pm

On the telemetry setup page you have to set "Range" for A1 according to the measurement full scale. In this case 13.2V (3.3V reference from the receiver, x4 due to the 1:4 divider that is wired inside the D8RII-Plus.


User avatar
janekx
Posts: 90
Joined: Thu Aug 09, 2012 4:08 pm
Country: -
Location: Czech Republic

Re: FrSky Amp/Current Sensor.

Post by janekx » Fri Aug 17, 2012 9:01 pm

thanks now it showsn but is this really good ? When ues ESC with BEC not BEC keep 5V all the time when batt goes lower ??

User avatar
Kilrah
Posts: 10485
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: FrSky Amp/Current Sensor.

Post by Kilrah » Fri Aug 17, 2012 9:12 pm

Well, the receiver measures the voltage that it receives from its supply - if its a BEC, then yes it's regulated, so it will never move.

You should use the external frsky voltage sensor or a self-made voltage divider, and measure voltage directly on the battery.

PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

Re: FrSky Amp/Current Sensor.

Post by PNaz » Fri Aug 17, 2012 9:14 pm

It will show if your BEC can supply proper voltage when all of your servos are operating. If your voltage drops below 5V when operating all of your servos at the same time on the ground then you may have a problem in the air when the servos have to push against the airflow loads. When the voltage drops below 5V to perhaps 4.5V or less then your servos will not be outputting full control power.

Paul

User avatar
janekx
Posts: 90
Joined: Thu Aug 09, 2012 4:08 pm
Country: -
Location: Czech Republic

Re: FrSky Amp/Current Sensor.

Post by janekx » Fri Aug 17, 2012 9:32 pm

I ordered external voltage sensor from fesky a week ago, but I today installed DHT and wanted to try it thanks

herrkirk
Posts: 5
Joined: Fri Oct 12, 2012 9:12 pm
Country: -
Location: São Paulo - Brasil

Re: FrSky Amp/Current Sensor.

Post by herrkirk » Sat Oct 13, 2012 6:13 pm

I made a current sensor using an Allegro ACS756 sensor (100A). I'm supplying 5V so the output to 0A is 2.5V. 100A will be 0V or 5V (depending on how you wire the sensor). Since the DHT analog input can read up to 3.3V I wired the sensor to output 0V for 100A. Now I think I'll have to customize my firmware!

isvedic
Posts: 25
Joined: Wed Jun 13, 2012 6:18 pm
Country: Croatia

DIY FrSky Amp/Current Sensor.

Post by isvedic » Thu Jan 24, 2013 11:57 am

As the title says, I was going to make one because the I figured it would work with Open9x.

First of all I needed a current meter, I found it easily on eBay: http://www.ebay.com/itm/400329737443?ss ... 1497.l2649

30A, enough for my needs. The next problem to 5v sensor input (you can use 5v from receiver), but I had one burnt ESC with LM78M05 so I tried to work with him and so far no problems. After that it was necessary to scale the voltage with voltage dividers to the level at the entrance to the A1/2 does not exceed 3.3V. I made this scheme:
DIYFrSkySensor.jpg
Current sensor came and work begins:
IMG_0187.JPG
IMG_0206.JPG
Hardwire part done, now you should then set up the 9x, which is not easily since ACS712 that I am using outputs 2.5V (1.25V scaled) when current is 0. Need to adjust the offset in telemetry page:
IMG_0274.JPG
End result:
IMG_0272.JPG
Woho, measuring mAh for under 4$! :)

Want to thank developers and all people involved in developing open9x and er9x because without them this would not be possible.

User avatar
jhsa
Posts: 19251
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: FrSky Amp/Current Sensor.

Post by jhsa » Thu Jan 24, 2013 7:15 pm

Now, it would be nice if we could interface this project with Rainer's Vario, altitude, temperature, etc ;) :D

Just an idea.. Rainer would it work?

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

User avatar
Rob Thomson
Site Admin
Posts: 4542
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: FrSky Amp/Current Sensor.

Post by Rob Thomson » Thu Jan 24, 2013 7:24 pm

Probably could.. But the beauty of his vario is the simplicity.

Anyone should be ok to make one!

Sent from my Nexus 7 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!

User avatar
jhsa
Posts: 19251
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: FrSky Amp/Current Sensor.

Post by jhsa » Thu Jan 24, 2013 8:00 pm

I know. but he said that the pins for other sensors are available. And if I'm not misataken he also said the code is already in??

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: FrSky Amp/Current Sensor.

Post by rainer » Thu Jan 24, 2013 8:11 pm

We just have to feed a voltage 0..5V to one of the arduino Analog pins. there are 8 of them A0..A7 on an arduino Mini Pro. A3 and A4 are being used for the I2C communication to the MS5611 sensor. The others are free to use.
those are the available analog inputs.
The current can be transmitted in packages with ID 0x28 0~100A with a 1A resolution. If we know which voltage means wich current, that´s just a couple of additional code lines to add.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)

User avatar
jhsa
Posts: 19251
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: FrSky Amp/Current Sensor.

Post by jhsa » Thu Jan 24, 2013 8:15 pm

Great.. Thank you guys..

João

P.S. - So, in other words we would just connect it without the divider, right?
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: FrSky Amp/Current Sensor.

Post by rainer » Thu Jan 24, 2013 8:27 pm

i agree with rob, we should try to keep the vario/hub as simple as possible. Everybody with a little bit of electronic knowledge should be able to assemble one on. It´s nice because it´s just 2parts and some servo wire...
But there´s no reason not to add more sensor support to the code. if somebody want´s to use it: activate it in the code, set the pin number and solder to additional wire to connect it to the sensor of choice. done.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)

User avatar
jhsa
Posts: 19251
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: FrSky Amp/Current Sensor.

Post by jhsa » Thu Jan 24, 2013 8:38 pm

Exactly, that is what i mean.. Also depends on what type of aircraft you have it in.. we could customise it.. ;) :D
From the seller page:

Description
1, current sensor chip: ACS712ELC-30A;

2, pin 5V power supply, on-board power indicator;

3, the module can be measured plus or minus 30 amps, corresponding to the analog output 66mV / A;

4, there is no the detection current through, the output voltage is VCC / 2;

5, PCB board size: 31 (mm) x13 (mm);

Note: ACS712 Hall detection principle, when you use to avoid magnetic field impact this!
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: FrSky Amp/Current Sensor.

Post by rainer » Thu Jan 24, 2013 8:47 pm

just ordered a couple of sensors for testing 5A,20A and 30A might take a while though.. China to germany: about 1 month currently..
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)

User avatar
jhsa
Posts: 19251
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: FrSky Amp/Current Sensor.

Post by jhsa » Thu Jan 24, 2013 8:52 pm

I did just order 1 30A.. they are quite cheap.. It would be nice if we could read 60A instead of -30A to 30A..
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: FrSky Amp/Current Sensor.

Post by gohsthb » Thu Jan 24, 2013 9:22 pm

Look around for an ACS758. Those have versions that go up to 200A, and some are unidirectional, or only read current in 1 direction.
-Gohst

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: FrSky Amp/Current Sensor.

Post by kaos » Thu Jan 24, 2013 10:51 pm


User avatar
jhsa
Posts: 19251
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: FrSky Amp/Current Sensor.

Post by jhsa » Thu Jan 24, 2013 11:41 pm

No, that one is biderectional..

This one:

http://www.digikey.de/product-detail/de ... ND/2415199
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: FrSky Amp/Current Sensor.

Post by kaos » Fri Jan 25, 2013 12:32 am

OK, this is cheaper but it is in US:
https://www.verical.com/#landingPage=ca ... 6589&_i_=4

OK, I will be waiting for wiki. ;)
edit: scratch that site, minimum order: 68 Ouch!

User avatar
jhsa
Posts: 19251
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: FrSky Amp/Current Sensor.

Post by jhsa » Fri Jan 25, 2013 2:06 am

:mrgreen: :mrgreen: :mrgreen:
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

isvedic
Posts: 25
Joined: Wed Jun 13, 2012 6:18 pm
Country: Croatia

Re: FrSky Amp/Current Sensor.

Post by isvedic » Fri Jan 25, 2013 3:34 pm

If someone don't want to solder and 30A is not enough RCTimer have perfect one for FrSky analog ports (voltages already scaled for 3.3v):
http://www.rctimer.com/index.php?gOo=go ... oductname=
I&Vsensor.png

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: FrSky Amp/Current Sensor.

Post by kaos » Fri Jan 25, 2013 4:42 pm

Great info. Thx. but I think it is a kit, soldering is needed from what I read from the web. but it has all the components needed. ;) Hope the shipping cost is low.

Trieste
Posts: 4
Joined: Mon Jan 28, 2013 2:38 am
Country: -

Re: FrSky Amp/Current Sensor.

Post by Trieste » Mon Jan 28, 2013 4:10 am

Mike,

I built a 200 amp self-powered current sensor based on the ACS759 (3.3v version) and a switching vreg. I am currently forced to read the raw volts from the sensor and do the math in my head. I'm familiar with C++ but after an [admittedly short] time of searching I was unable to find where you're performing the current calculations in the source code. I'm happy to make my own version of the code rather than request a change. Can you point me to the right place?

I need .00825v per amp.

So far the thread has been very helpful. Thanks! I'll keep looking in the meantime.

User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: FrSky Amp/Current Sensor.

Post by rainer » Mon Jan 28, 2013 11:27 am

Wouldn´t it be sufficient to specify 400 as the range of that channel with an offset of -200A
I don´t have my transmitter handy, but if it´s possible to set the range to 400 that should work.
like that 0v would equal -200A 1.60v = 0A and 3.2v=200A

Rainer
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)

User avatar
MikeB
9x Developer
Posts: 16794
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: FrSky Amp/Current Sensor.

Post by MikeB » Mon Jan 28, 2013 12:02 pm

In er9x.cpp:

Code: Select all

uint16_t scale_telem_value( uint16_t val, uint8_t channel, uint8_t times2, uint8_t *p_att )
{
  uint32_t value ;
	uint16_t ratio ;
	FrSkyChannelData *fd ;
	
	fd = &g_model.frsky.channels[channel] ;
  value = val ;
  ratio = fd->ratio ;
  if ( times2 )
  {
      ratio <<= 1 ;
  }
  value *= ratio ;
	if ( fd->type == 3/*A*/)
  {
      value /= 100 ;
      *p_att |= PREC1 ;
  }
  else if ( ratio < 100 )
  {
      value *= 2 ;
      value /= 51 ;  // Same as *10 /255 but without overflow
      *p_att |= PREC2 ;
  }
  else
  {
      value /= 255 ;
  }
	return value ;
}
The amp sensor scales to 65 at present
The line:
if ( fd->type == 3/*A*/)
Introduces specific code for the amp sensor (the /100)
Change this /100 to scale it differently.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!


Post Reply

Return to “FRSky Telemetry Mods”