Page 2 of 5

Re: FrSky Amp/Current Sensor.

Posted: Mon Jul 16, 2012 10:59 pm
by MikeB
I'll get to it, on my (longish) todo list.

Mike.

Re: FrSky Amp/Current Sensor.

Posted: Tue Jul 17, 2012 5:49 am
by derFrickler
Why do you use er9x, i swithced from er9x to open9x and like it more, don't miss anything from er9x

Re: FrSky Amp/Current Sensor.

Posted: Tue Jul 17, 2012 6:58 am
by Rob Thomson
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:

Re: FrSky Amp/Current Sensor.

Posted: Fri Aug 17, 2012 6:49 pm
by janekx
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

Re: FrSky Amp/Current Sensor.

Posted: Fri Aug 17, 2012 7:43 pm
by Kilrah
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.

Re: FrSky Amp/Current Sensor.

Posted: Fri Aug 17, 2012 9:01 pm
by janekx
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 ??

Re: FrSky Amp/Current Sensor.

Posted: Fri Aug 17, 2012 9:12 pm
by Kilrah
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.

Re: FrSky Amp/Current Sensor.

Posted: Fri Aug 17, 2012 9:14 pm
by PNaz
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

Re: FrSky Amp/Current Sensor.

Posted: Fri Aug 17, 2012 9:32 pm
by janekx
I ordered external voltage sensor from fesky a week ago, but I today installed DHT and wanted to try it thanks

Re: FrSky Amp/Current Sensor.

Posted: Sat Oct 13, 2012 6:13 pm
by herrkirk
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!

DIY FrSky Amp/Current Sensor.

Posted: Thu Jan 24, 2013 11:57 am
by isvedic
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.

Re: FrSky Amp/Current Sensor.

Posted: Thu Jan 24, 2013 7:15 pm
by jhsa
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

Re: FrSky Amp/Current Sensor.

Posted: Thu Jan 24, 2013 7:24 pm
by Rob Thomson
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

Re: FrSky Amp/Current Sensor.

Posted: Thu Jan 24, 2013 8:00 pm
by jhsa
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

Re: FrSky Amp/Current Sensor.

Posted: Thu Jan 24, 2013 8:11 pm
by rainer
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.

Re: FrSky Amp/Current Sensor.

Posted: Thu Jan 24, 2013 8:15 pm
by jhsa
Great.. Thank you guys..

João

P.S. - So, in other words we would just connect it without the divider, right?

Re: FrSky Amp/Current Sensor.

Posted: Thu Jan 24, 2013 8:27 pm
by rainer
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.

Re: FrSky Amp/Current Sensor.

Posted: Thu Jan 24, 2013 8:38 pm
by jhsa
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!

Re: FrSky Amp/Current Sensor.

Posted: Thu Jan 24, 2013 8:47 pm
by rainer
just ordered a couple of sensors for testing 5A,20A and 30A might take a while though.. China to germany: about 1 month currently..

Re: FrSky Amp/Current Sensor.

Posted: Thu Jan 24, 2013 8:52 pm
by jhsa
I did just order 1 30A.. they are quite cheap.. It would be nice if we could read 60A instead of -30A to 30A..

Re: FrSky Amp/Current Sensor.

Posted: Thu Jan 24, 2013 9:22 pm
by gohsthb
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

Re: FrSky Amp/Current Sensor.

Posted: Thu Jan 24, 2013 10:51 pm
by kaos

Re: FrSky Amp/Current Sensor.

Posted: Thu Jan 24, 2013 11:41 pm
by jhsa
No, that one is biderectional..

This one:

http://www.digikey.de/product-detail/de ... ND/2415199

Re: FrSky Amp/Current Sensor.

Posted: Fri Jan 25, 2013 12:32 am
by kaos
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!

Re: FrSky Amp/Current Sensor.

Posted: Fri Jan 25, 2013 2:06 am
by jhsa
:mrgreen: :mrgreen: :mrgreen:

Re: FrSky Amp/Current Sensor.

Posted: Fri Jan 25, 2013 3:34 pm
by isvedic
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

Re: FrSky Amp/Current Sensor.

Posted: Fri Jan 25, 2013 4:42 pm
by kaos
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.

Re: FrSky Amp/Current Sensor.

Posted: Mon Jan 28, 2013 4:10 am
by Trieste
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.

Re: FrSky Amp/Current Sensor.

Posted: Mon Jan 28, 2013 11:27 am
by rainer
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

Re: FrSky Amp/Current Sensor.

Posted: Mon Jan 28, 2013 12:02 pm
by MikeB
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.