Extra inputs for Devo Tx's

More
10 Feb 2016 16:36 #42954 by Epitaph
Replied by Epitaph on topic Extra inputs for Devo Tx's
It's probably just a case of matching the pots to the PPM out within a margin. For example, I have 3.62v now on the PPM out and 3.24 on the pots, and it works fine. When I had the full 4.9V from the battery on the pots, the power on the Arduino was the same and so was on the PPM out as it is now, so the pots were giving a much higher voltage than what was going out, and this was giving me -100 to 100 but before the pot even reached the end. On the other hand, putting 2S in the transmitter was giving the Arduino the full 2S voltage, and the output on the PPM line was 4.8V, but this was with the pots still wired up to just 3.24V from the gimbals, meaning the voltage in was a lot less than that going out, and that was giving just -100 to 56 of range.

Remember, when I was having more problems with the 2S and the pots direct from what I thought was 5V regulated then, the problem was actually having 8+V on the pots, and 4.8 on the PPM output.

From what I see, if the PPM out and the pots voltage are within a margin of each other there is no problem. If the voltage on the pots is too much higher than the PPM out, then it reaches the end before the pot does, and if the PPM out is too much higher than the pot voltage, then it doesn't even reach the end of the -100 to 100 scale.

From this, and what Deal57 has just said, I would elaborate that when you have your power from 4x NiMH batteries, then the PPM out is only 3.6V and therefore you need less voltage on the pots to make it work. On the other hand, when you're feeding the transmitter from a 2S, then the PPM out goes up to 4.8V, and the pots need to be such also for it to work. As long as you keep to either way there shouldn't be a problem. Wiring direct means that you can wire it for ONLY LiPo or ONLY NiMH... But if you're only going to stick to one type of power supply without switching from one or the other, then what's the point of worrying... a change would only have to be made if you decide to change from NiMH to LiPo for example.

I might make the change if I can find some decent 14500 Li-Ion batteries that actually have the capacity that is stated on them and not the fraction they usually hold, and in this case, I would have 8V going into the Arduino, 4.8 coming from the PPM out, and therefore I would need to either find a trusty 5V source on the transmitter, or use a pololu to feed the pots. But until then...

Please Log in or Create an account to join the conversation.

More
10 Feb 2016 21:02 #42962 by Epitaph
Replied by Epitaph on topic Extra inputs for Devo Tx's
OK, small update on this, there is an issue with the battery level...

I have fully charged the battery, which is showing 5.75V on the screen, and now the pots are ranging from -100 to 76, they don't go all the way up to 100. I have just tried the PPM out voltage and it's registering as 4.29V

By the looks of it, the voltage out for this to work properly has to be 5V on the arduino constant, as if it is too high, the range shortens, and if it drops too much, it will just not reach the end of the pot travel. The voltage of the pots is constant via the gimbal pots, it's just the feed to the Arduino that needs to be regulated. So, either a 5V constant feed needs to be found on the board to solve the issue, or the Pololu regulator would be the only option...

Please Log in or Create an account to join the conversation.

More
10 Feb 2016 22:35 - 10 Feb 2016 22:37 #42968 by Epitaph
Replied by Epitaph on topic Extra inputs for Devo Tx's
I have been testing all over with the multimeter, and there is nowhere where I can get a regulated 5V output, but there are plenty of places from where to get 3.24V no matter what battery is used (NiMH or 2S). I have been looking into the Pololu, and basically it's impossible for me to get one without paying a fortune in shipping... in fact, the official website doesn't even accept my address (they say the street address has to be written in a specific way, and happens to be a way which is totally backwards to how it is written here, add to that you have to use "Rd." or "St." in it, as if the postal service actually understands those things!! Basically it would just never arrive!! So much for international shipping when they only accept it written in a certain way that in incompatible with many other countries).

So, I was thinking, I wouldn't need a regulator to keep it at 5V independently on if it's higher or lower, all I would need is a step up and wire it into a 3.24V point on the transmitter, which will always be such no matter what battery I use. So I was thinking about getting a step-up from Banggood (who give no problem shipping to my actual address), but I'm trying to find a regulated one... seems they all have USB ports which is all good and well, but they usually turn out to give 5.2V or something like that, never spot on 5V, so it would be too much...

I have found one in Ebay which is REALLY cheap and adjustable... I wonder what you guys think (yeah, I know, Pololu is quality and all that, but they don't want to sell me it, then I don't want it, and especially at their shipping prices!!)

Regulator
Last edit: 10 Feb 2016 22:37 by Epitaph.

Please Log in or Create an account to join the conversation.

More
11 Feb 2016 05:20 #42980 by Richard96816
Replied by Richard96816 on topic Extra inputs for Devo Tx's
Been thinking about encoders lately. Thought something like this might be interesting/useful:

ams.com/eng/Products/Position-Sensors/Ma...ition-Sensors/AS5040

Please Log in or Create an account to join the conversation.

More
11 Feb 2016 07:03 - 11 Feb 2016 07:03 #42989 by Epyon
Replied by Epyon on topic Extra inputs for Devo Tx's

Richard96816 wrote: Been thinking about encoders lately. Thought something like this might be interesting/useful:

ams.com/eng/Products/Position-Sensors/Ma...ition-Sensors/AS5040

I put one in my 8. The only thing I use it for so far is to select model config (for the Arduino).
These are the cheapies I got, they work good so far.
www.aliexpress.com/item/Rotary-encoder-s...ndle/1545402448.html
Last edit: 11 Feb 2016 07:03 by Epyon.

Please Log in or Create an account to join the conversation.

More
11 Feb 2016 14:39 #43004 by Cereal_Killer
Replied by Cereal_Killer on topic Extra inputs for Devo Tx's
Anyone kown anything about these? Is there a typical button press (pull up or down) signal when you press it?

m.aliexpress.com/item/1476952050.html?pr...ail2mobilesitedetail

Taranis X9E | DEVO 10 | Devo U7E | Taranis Q7

What I do in real life: rivergoequestrian.com/

Please Log in or Create an account to join the conversation.

More
23 Mar 2016 09:49 - 23 Mar 2016 09:54 #45039 by Epitaph
Replied by Epitaph on topic Extra inputs for Devo Tx's
Hi guys!!

My stepup finally arrived, and it was a total disaster... I got a dud!! No matter what I set it up with, the output is 0.2V lower than the input, and that is supposedly stepping UP!!

Anyway, rather than mess around with that, I decided to change the battery type on my transmitter to make it easier to solve the issue, as well as making the transmitter lighter, and also faster to charge, as well as freeing up 4 NiMH batteries that are pretty good (Turnigy LSD 2400mAh) for other applications like Rx packs on slopesoarers.

As I said before, I don't like the idea of having a huge battery just hanging on the back because it doesn't fit anywhere else, I am a bit of a neat freak when it comes to these things and I like a smart finish to everything. So, I've opted to go with removing the battery cage inside the transmitter, and putting a 2S Li-Ion battery inside which doesn't give any problems with charging if it's charged properly and slowly (like 2 or 3 hours charge, which is still a LOT faster than NiMH!!). I opted for a DSLR camera battery, specifically a 2100mAh Olympus spare battery that has good reviews, although we'll see as to the capacity being what it really says. The battery comes with 4 pins, which is the typical 3 like cellphone batteries have, plus the series pin, meaning I can just add a 2S balance wire to it and have that accessible via the battery flap on the bottom of the transmitter, and I wouldn't have to open the transmitter at all (something I wouldn't do with a LiPo, I don't like the idea of charging LiPo inside the transmitter). I can just fix it to the inside of the transmitter case with a little hot glue, and wire it directly into the JST inside.

After the battery is fitted, just add a UBEC to reduce down to 5V, which I found a nice small one which a friend of mine got one of and reduces down to 4.99V, which is perfect for feeding the Arduino with.

One question I was thinking about, not for this particular transmitter as I have it perfect with 2 POTs as is, but if I decide to use this application somewhere else, can you use digital pots with it, as in one button for up and one button for down?? Might be good for things like flaps and stuff with just 2 push buttons on the back of a transmitter you can control with a finger? Or, even better, can you add 2 push buttons straight into the Arduino and have a sketch that would output a PPM channel in the same way a digital pot would do? If so, then it could even be adapted to the user's use, like how many steps from minimum to maximum according to preference... something like what the trim buttons do.
Last edit: 23 Mar 2016 09:54 by Epitaph.

Please Log in or Create an account to join the conversation.

More
07 Apr 2016 10:55 - 07 Apr 2016 11:06 #46008 by Epitaph
Replied by Epitaph on topic Extra inputs for Devo Tx's
Hi guys!!

I'm trying to figure out an Arduino code to add switches via PPM to a Devo F4... I have modified a code from here (can't remember what page or who wrote it) to add in two 2-way switches to the original sketch, giving a total of two pots, two 2-way switches and two 3-way switches... I have very little experience with writing Arduino, so I basically copied what was already on and adjusted as I thought it should be. Can someone check me on it to see if it's right?

Pin A1 = Pot 1 (channel 1)
Pin A2 = Pot 2 (channel 2)
Pin 2 = 3-way switch #1 position 1 (channel 3)
Pin 3 = 3-way switch #1 position 3 (channel 3)
Pin 4 = 3-way switch #2 position 1 (channel 4)
Pin 5 = 3 way switch #2 position 3 (channel 4)
Pin 6 = 2-way switch #1 position 1 (channel 5)
Pin 7 = 2-way switch #2 position 1 (channel 6)
Pin 10 = PPM out
// Devo 7e PPM input
// For use with Arduino Nano V3.0
// Based on sketch by Ian Johnston

// Analog pin assignments
int AI_Pin_A1 = 2;    // potentiometer #1 pin
int AI_Pin_A2 = 3;    // potentiometer #2 pin
int AI_Raw_A1;        // Analog In raw var - 0->1023....
int AI_Raw_A2;
int A1_uS = 750;      // potentiometer #1 us
int A2_uS = 750;      // potentiometer #2 us
int sw1_uS = 750;     // 3-way switch #1 us
int sw2_uS = 750;     // 3-way switch #2 us
int sw3_uS = 750;     // 2-way switch #1 us
int sw4_uS = 750;     // 2-way switch #2 us


int Fixed_uS = 300;       // PPM frame fixed LOW phase
int pulseMin = 750;       // pulse minimum width minus start in uS
int pulseMax = 1700;      // pulse maximum width in uS

// Digital pin assignments
int outPinPPM = 10;     // PPM out
int inPinD2 = 2;        // 3-way switch #1 pin for position 1. Positions 1 and 3 combine for middle position.
int inPinD3 = 3;        // 3-way switch #1 pin for position 3
int inPinD4 = 4;        // 3-way switch #2 pin for position 1
int inPinD5 = 5;        // 3-way switch #2 pin for position 3
int inPinD6 = 6;        // 2-way switch #1 pin for position 1
int inPinD7 = 7;        // 2-way switch #2 pin for position 1

ISR(TIMER1_COMPA_vect) {
    ppmoutput(); // Jump to ppmoutput subroutine
}

void setup() {
  
  pinMode(outPinPPM, OUTPUT);   // sets the digital pin as output
  pinMode(inPinD2, INPUT);      // sets the digital pin as input
  digitalWrite(inPinD2, HIGH);  // turn on pull-up resistor
  pinMode(inPinD3, INPUT);
  digitalWrite(inPinD3, HIGH);
  pinMode(inPinD4, INPUT);
  digitalWrite(inPinD4, HIGH);
  pinMode(inPinD5, INPUT);
  digitalWrite(inPinD5, HIGH);
  pinMode(inPinD6, INPUT);
  digitalWrite(inPinD6, HIGH);
  pinMode(inPinD7, INPUT);
  digitalWrite(inPinD7, HIGH);
  
   // Setup timer
  TCCR1A = B00110001; // Compare register B used in mode '3'
  TCCR1B = B00010010; // WGM13 and CS11 set to 1
  TCCR1C = B00000000; // All set to 0
  TIMSK1 = B00000010; // Interrupt on compare B
  TIFR1  = B00000010; // Interrupt on compare B
  OCR1A = 22000; // 22mS PPM output refresh
  OCR1B = 1000;
}

void ppmoutput() { // PPM output sub routine

 // Channel 1 - Analog 1
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);
  delayMicroseconds(A1_uS);  // Hold for A1_uS microseconds      

 // Channel 2 - Analog 2
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);
  delayMicroseconds(A2_uS); // Hold for A2_uS microseconds

// Channel 3 - 3-way switch #1
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);
  delayMicroseconds(sw1_uS);     // Hold for sw1_uS microseconds 

// Channel 4 - 3-way switch #2
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);
  delayMicroseconds(sw2_uS);     // Hold for sw2_uS microseconds

// Channel 5 - 2-way switch #1
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);
  delayMicroseconds(sw3_uS);     // Hold for sw3_uS microseconds

// Channel 6 - 2-way switch #2
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);
  delayMicroseconds(sw4_uS);     // Hold for sw4_uS microseconds

// Synchro pulse
  digitalWrite(outPinPPM, LOW);
  delayMicroseconds(Fixed_uS);    // Hold
  digitalWrite(outPinPPM, HIGH);  // Start Synchro pulse
}

void loop() { // Main loop

 // Read analog pins
   AI_Raw_A1 = analogRead(AI_Pin_A1);
   AI_Raw_A2 = analogRead(AI_Pin_A2);
   
 // Map analog inputs to PPM rates for each of the channels
   A1_uS = AI_Raw_A1 + pulseMin;
   A2_uS = AI_Raw_A2 + pulseMin;

 // Potentiometer limits
  if (A1_uS <= 750) A1_uS = 750;     // Min
  if (A1_uS >= 1625) A1_uS = 1625;   // Max   
  if (A2_uS <= 750) A2_uS = 750;
  if (A2_uS >= 1625) A2_uS = 1625;
  
// 3-way switch #1
  if (digitalRead(inPinD2) == 0) {
           sw1_uS = 750;
 }
  if ((digitalRead(inPinD2) == 1) && (digitalRead(inPinD3) == 1)) {
           sw1_uS = 1190;                 // Center us, may need to adjust this  
 }
  if (digitalRead(inPinD3) == 0) {
           sw1_uS = 1625;   
 }

// 3-way switch #2
  if (digitalRead(inPinD4) == 0) {
           sw2_uS = 750; 
 }
  if ((digitalRead(inPinD4) == 1) && (digitalRead(inPinD5) == 1)) {
           sw2_uS = 1190;                 // Center us, may need to adjust this
 }
  if (digitalRead(inPinD5) == 0) {
           sw2_uS = 1625; 
 }
 
// 2-way switch #1
  if (digitalRead(inPinD6) == 0) {
           sw2_uS = 750; 
 }
  if ((digitalRead(inPinD6) == 1) && (digitalRead(inPinD6) == 1)) {
           sw2_uS = 1625;                 
 }
 
// 2-way switch #2
  if (digitalRead(inPinD7) == 0) {
           sw2_uS = 750; 
 }
  if ((digitalRead(inPinD7) == 1) && (digitalRead(inPinD7) == 1)) {
           sw2_uS = 1625;                  
 }
}

The choice of pins aren't final, I might change them once I get to soldering... it's mainly the adjustments in the code I made for the 2-way switches I added to see if it's correct.

Thanks
Last edit: 07 Apr 2016 11:06 by Epitaph.

Please Log in or Create an account to join the conversation.

More
07 Apr 2016 11:37 #46013 by ursus69
Replied by ursus69 on topic Extra inputs for Devo Tx's
Sorry, for the break :p
It's possible to add pots to Devo7e without arduino??...like 2x3 switch mod...?

Please Log in or Create an account to join the conversation.

More
07 Apr 2016 11:47 #46014 by Epitaph
Replied by Epitaph on topic Extra inputs for Devo Tx's
From what has been said, no, because all the inputs like the 2x3 switches are all digital, and pots are analogue.

Please Log in or Create an account to join the conversation.

More
07 Apr 2016 12:42 - 07 Apr 2016 15:56 #46025 by Cereal_Killer
Replied by Cereal_Killer on topic Extra inputs for Devo Tx's
Right, the inputs for the added on 3-way switches are digital (on/off) cause they're part of the button matrix.

If you can code I think you may potentially be able to swap one of the original 2-way switches for a pot* but no one has ever done that so it'd literally be all on you (and not and all worth it when this is a tried and true method that just works and all for <$10 in parts).

*but even with the stock 2-way switches, those could also be digital pins, I just don't know if the little F103C8T6 has any more ADC's than the 4 for the sticks.

Taranis X9E | DEVO 10 | Devo U7E | Taranis Q7

What I do in real life: rivergoequestrian.com/
Last edit: 07 Apr 2016 15:56 by Cereal_Killer.

Please Log in or Create an account to join the conversation.

More
07 Apr 2016 14:09 #46030 by Deal57
Replied by Deal57 on topic Extra inputs for Devo Tx's
@Ursus69: If you wish to solder directly to the processor, there are two pins that have been used for analog input. However it isn't part of the 7e build now and we don't know if it'll be too large. So the solution Epitaph is showing is the working alternative.

@Epitaph: the arduino code you listed is basically the code I used. So you should be good to go... you may need to tweak the PPM input delta and center. I also built a smaller version with 2 pots and 1 3-way switch on a Digispark if space is an issue.

Deviation Devo7e 3way switch mod, A7105, NRF24L01
Devo6s 2x2 switch mod, trim mod, haptic, multimodule, A7105, NRF24L01, CC2500
Devo12e 4-in-1 with voice mod -- it speaks!!

Please Log in or Create an account to join the conversation.

More
07 Apr 2016 14:14 #46031 by Epitaph
Replied by Epitaph on topic Extra inputs for Devo Tx's
You mean you actually got the Digispark version to work in the end?? Great!!

I don't have a problem with room with this particular application as it's for a Devo F4, which is half empty inside, so plenty of space!!

Please Log in or Create an account to join the conversation.

More
07 Apr 2016 16:03 #46039 by ursus69
Replied by ursus69 on topic Extra inputs for Devo Tx's
Thanks for the info Epitaph, Cereal & Deal57! I will follow the thread!!

Please Log in or Create an account to join the conversation.

More
07 Apr 2016 18:34 #46050 by mwm
Replied by mwm on topic Extra inputs for Devo Tx's

Deal57 wrote: @Ursus69: If you wish to solder directly to the processor, there are two pins that have been used for analog input. However it isn't part of the 7e build now and we don't know if it'll be too large. So the solution Epitaph is showing is the working alternative.


For those who haven't heard yet - once the release happens, the 7E will probably vanish from the nightly build. There's literally no space left in it at all, and it's holding back development. There are some things on my todo list that will get some room back, but if they don't free up enough space for the 7E to build again, it may not be in the release after that.

The button matrix stuff is particularly nasty. The extra switch inputs on the 6 are normal switches, so I can use one for a third extra module without changing the code. You can't even do that with the button matrix "switches".

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

More
07 Apr 2016 22:04 - 07 Apr 2016 22:06 #46074 by Fernandez
Replied by Fernandez on topic Extra inputs for Devo Tx's
Why not freeze the latest nightly build or the new V5 deviation release for devo 7e as final build?

But we continue new builds for the ultimate 7e, everyone who likes to get most out, has to solder the new cpu in.
With some tutorial and youtube instruction, it is not rocket science, cpu cost only few bucks pretty sure that many of us will do the cpu mod.

7e is just so nice to carry and comfortable light controller, many love it!! And deviation is fantastic!
Last edit: 07 Apr 2016 22:06 by Fernandez.

Please Log in or Create an account to join the conversation.

More
07 Apr 2016 23:15 #46078 by HappyHarry
Replied by HappyHarry on topic Extra inputs for Devo Tx's

Please Log in or Create an account to join the conversation.

More
08 Apr 2016 00:02 #46081 by Epitaph
Replied by Epitaph on topic Extra inputs for Devo Tx's
The whole 7E issue is more like the pet project for developers (as they live to develop) rather than a necessity. I have my 7E with a nightly build from about 9 months ago, and I really have no reason to change it whatsoever. As it is, it suits more than my needs, especially with the added pots. I know people are mad about more protocols, but then it seems a bit of a contradiction to me: most people say they buy RTFs because they don't have time or the expertise to make a decent homemade quad, yet they have the time and resources to mod a transmitter to the hilt.

Really, if you want a transmitter that gives you so much more, then you shouldn't stop at just a cheap $60 one from some chinese online shop... why don't those people save their money from a couple of crappy RTFs and buy a Devo 10 for example, and that way be able to have the room to do so much more...

The whole getting more and more when you have so much on the 7E just really doesn't make any sense to me, especially with how great it is a transmitter now with Deviation and the available mods!! I love mine to take in a backpack on a walk with a small model, or especially for slopesoaring, as it's nice and light and takes up very little room, but for a more going out and travelling to fly transmitter, I would go for something bigger, and in fact I do already with my MPX

Please Log in or Create an account to join the conversation.

More
08 Apr 2016 08:20 #46098 by ursus69
Replied by ursus69 on topic Extra inputs for Devo Tx's

Fernandez wrote: Why not freeze the latest nightly build or the new V5 deviation release for devo 7e as final build?

But we continue new builds for the ultimate 7e, everyone who likes to get most out, has to solder the new cpu in.
With some tutorial and youtube instruction, it is not rocket science, cpu cost only few bucks pretty sure that many of us will do the cpu mod.

7e is just so nice to carry and comfortable light controller, many love it!! And deviation is fantastic!



It would be great!!

Please Log in or Create an account to join the conversation.

More
08 Apr 2016 20:08 #46123 by mwm
Replied by mwm on topic Extra inputs for Devo Tx's

Fernandez wrote: Why not freeze the latest nightly build or the new V5 deviation release for devo 7e as final build?


Um, isn't that what "may vanish after the next release" means?

7e is just so nice to carry and comfortable light controller, many love it!! And deviation is fantastic!


But it's no smaller and far less capable than a 6S. Which makes me think that most people love it because it's cheap.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

Time to create page: 0.082 seconds
Powered by Kunena Forum