Deviation for Devo F4?

More
06 Apr 2016 23:45 #45979 by PhracturedBlue
Replied by PhracturedBlue on topic Deviation for Devo F4?
Also, you should note that I'm sure very bad things will happen if you run out of space. the code has absolutely not been tested in an out of space condition, so make sure you don't get there.

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

More
06 Apr 2016 23:45 #45980 by Epitaph
Replied by Epitaph on topic Deviation for Devo F4?

xJustiinsane wrote: Cool! I ordered an 7E couple weeks ago. I'm waiting for that to build that module in. I'd like to get one from the Cheerson CX-10 controller, is that the same? (Same protocol, yes, but does harvesting work the same and how?)


That transmitter you would have to cut the actual PCB the module is on, and I'm not even sure it's harvestable just like that... you're probably best getting a new module because you can get the nRF24L01+PA+LNA which has a power amplifier which will give you a lot more range, as well as being compatible with a lot more models because it is the "+" version.

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

More
06 Apr 2016 23:51 #45981 by Epitaph
Replied by Epitaph on topic Deviation for Devo F4?

PhracturedBlue wrote: Also, you should note that I'm sure very bad things will happen if you run out of space. the code has absolutely not been tested in an out of space condition, so make sure you don't get there.


What I would do is export the FS file every couple of models so i can check on its size to make sure it doesn't go above 59kb (the 60 you said with a margen). Also, if the video is setup outside of the individual model and as a common-to-all models, that would be a couple of lines saved per model, no? hehehe

Mainly I would be using the transmitter for Naze32 based quads (max 7 channels) and FPV flying wings (max 4 channels), both of which are pretty simple as far as mixes go, so they aren't complicated or long .ini files... as I've said many times, for other models, including more complicated, non-FPV ones, I have my 7E and my MPX

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

More
07 Apr 2016 02:05 #45989 by PhracturedBlue
Replied by PhracturedBlue on topic Deviation for Devo F4?
Can someone provide me with a video of the DevoF4 enabling video (without a Rx transmitter in range) and how the screen works?

I just tested my F7 with the original firmware (0.6A) and as soon as I turn on video, the screen goes blank. I do not see any text overlay. When I press 'EXT' I get the menu back (and the video switches off). Once I ht 'EXT twice more to get back to the main display, the video turns back on and I get a completely blue screen with no text at all. If I turn on the Receiver, I think the text will come back once a signal is received, but I can't seem to ever see the text if there is no video signal available.

This matches with what I see in Deviation Tx. If this is the same behavior as the F4, that implies there is no way around it, and we need to setup a method to toggle in and out of video (on Th F7 this is most easily done by assigning a switch). If the F4 can display the menu when in video mode without a signal present I want to see that behavior.

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

More
07 Apr 2016 04:52 - 07 Apr 2016 04:55 #45992 by PhracturedBlue
Replied by PhracturedBlue on topic Deviation for Devo F4?
Here is a model file that should enable video for you
It maps the left-vertical trim-up to be a toggle for the video display. Press the left-vertical-trim-up once to toggle video mode on, and the same button again to toggle video mode off. That assumes you use Mode2 (throttle on left). If you want to change to throttle on right, go to the Model->Trim and change the 'Virt1' Trim from 'VERT-L+' to 'VERT-R+' (note that the '+' shows as a solid box, since the Devof4 font doesn't have a '+' character)

This should be sufficient for you to test out the video on the F4.

Note that the trim state is sticky, so if you turn off your Tx with the Video on, it will still be on when you power back on. Just press the trim button to switch it off again.

Let me know if this works for you.

Note: To install the model.ini:
start the Tx in USB mode,
extract the filesystem with 'buildfs -x'
copy the included file to the extracted dir as models/model1.ini (overwrite the existing file)
rebuild the fs with 'buildfs -c'
Make sure to unmount the drive in Windows before turning it off, otherwise your data could be lost
Attachments:
Last edit: 07 Apr 2016 04:55 by PhracturedBlue.

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

More
07 Apr 2016 09:59 #46005 by Epitaph
Replied by Epitaph on topic Deviation for Devo F4?
I would if I could, but I can't get Devention back on my transmitter to show you what it does: the Dfuse program will not recognise my transmitter at all in order to permit me to send it, no matter what drivers I put in, and the Deviation uploader doesn't upload devention if I use the Deviation drivers, and tells me it's a 7E if I use the Devention drivers, so it won't even let me upload it. Basically I'm stuck with Deviation only option (not that I'm complaining, that's what I wanted!! But I can't go back)

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

More
07 Apr 2016 10:18 - 07 Apr 2016 10:20 #46006 by Epitaph
Replied by Epitaph on topic Deviation for Devo F4?
Right, well that .ini file seems to work fine!! With video on I have the info overlay on the screen, and if the signal is lost then I just use the trim button to get back to the menu screen. The only thing I would change on that myself particularly is where to go to change video channel, because as I said before, having to go all the way into the model menu to change it and that per model is a bit of a hassle when at an FPV meet... if that could be put onto the first main menu and be for the transmitter and not the model, I think it would be much better. But other than that, I'd say that activation solution for the video is just what was needed!!

Last edit: 07 Apr 2016 10:20 by Epitaph.

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

More
07 Apr 2016 11:00 #46009 by SirDomsen
Replied by SirDomsen on topic Deviation for Devo F4?
@ Epitaph: Have you tried putting devention back using your XP-Laptop? That worked fine for me as I never installed the deviation-uploader-driver there. I just used the Walkera driver and the Walkera uploader there

Once I'm back home, I could try out devention. The only thing that could bother is that I din't have a working vTX at the moment. Needs a little solder time, too.

But doing a video without vTX would be no problem this evening

@PB: I have a few toggle switches on the way to me. Could you explain how the switches are wired on the F7? Do the switches push GND to the CPU Pins or how does that stuff work out? Looking at the circuit diagram for the F4 someone posted here, I cans see a few unused pins on which at the devoF7 the switches are wired to. So if switches could be attached the F7 way, it would be far easier to use more than just 2 additional switches as on the 7e.

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

More
07 Apr 2016 11:15 - 07 Apr 2016 11:17 #46010 by Epitaph
Replied by Epitaph on topic Deviation for Devo F4?
Problem is I don't have my XP laptop here now, I'll have to wait till I get it back here to try it out... :(

I'm experimenting with some Arduino code right now, seeing if I can figure it out, but I'm not much up on code (as you've probably already figured out), but I'm trying to aim for a 2x2-way switch, 2x3-way switch and 2xpot on an Arduino via PPM input, which should be able to use for a variety of things... but if the FMODE and HOLD switches can be figured out, then that's 2 switches saved from going through an Arduino, and the code that I'm basing the sketch from was originally 2 pots and 2x 3-way switch, and it was a working sketch.

Those unused pins you mention I saw them to, but I have no idea what they connect to, although I would assume it's GND, but not sure if it's direct or via something other than the switch...

Here's the code if you want to look it over see what you think of it...
// 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;                  
 }
}
Last edit: 07 Apr 2016 11:17 by Epitaph.

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

More
07 Apr 2016 11:24 #46012 by xJustiinsane
Replied by xJustiinsane on topic Deviation for Devo F4?
Anybody knows if Trainer mode works on Deviated Radio's? (F4+7E)

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

More
07 Apr 2016 12:08 #46016 by PhracturedBlue
Replied by PhracturedBlue on topic Deviation for Devo F4?
The Deviation Uploader will but the Devention firmware back on. just use the same procedure you have now but use Walkera's DFU.

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

More
07 Apr 2016 12:12 #46017 by Epitaph
Replied by Epitaph on topic Deviation for Devo F4?
When I did that with the Deviation driver, the bar went to the end but it didn't change anything in the transmitter... and if I change the drivers to the second option on the installer for Walkera Devention, it recognises it as a 7E, and won't let you upload.

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

More
07 Apr 2016 12:28 #46019 by PhracturedBlue
Replied by PhracturedBlue on topic Deviation for Devo F4?
the 2x3-way switch mod for the 7e should work fine on the F7 without the Arduino. I thin think the 3x2-way switch mod could work as well, but I've never done that one myself.
If you want to use the open pins on the MCU, the digital switches just tie the signal to ground when switches. The analog dials are just tied to the center lead of a potentiometer that is tied 3.3V to GND
But to wire them to the tx will require some delicate soldering directly to the MCU pins. Certainly not for the faint of heart.
The arduino method is probably much easier to actually do. If you don't want to sacrifice the PPM port, it may be possible to attach to the SPI1 prot, but I've not thought that all the way through.

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

More
07 Apr 2016 12:31 - 07 Apr 2016 12:31 #46020 by PhracturedBlue
Replied by PhracturedBlue on topic Deviation for Devo F4?
Epitaph, You don't need to change the USB drivers. DeviationUploader only works with its own driver. The Walkera software only works with its own driver. The switcher should let you go between them, but if it doesn't work, then stick with one or the other. Did you try switching back using the latest DeviationUploader I provided above (with its corresponding USB driver)? I have switched between the Walkera Devention and our Deviation software using this method without issue
Last edit: 07 Apr 2016 12:31 by PhracturedBlue.

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

More
07 Apr 2016 12:34 #46021 by PhracturedBlue
Replied by PhracturedBlue on topic Deviation for Devo F4?
Trainer mode between a 7e and F4 should work fine, but I haven't tested it myself.

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

More
07 Apr 2016 12:35 #46022 by Epitaph
Replied by Epitaph on topic Deviation for Devo F4?
corresponding USB driver? You only uploaded a revised version of the uploader, no driver program with it, I only have the original "H" icon driver program you sent at the beginning and the original Dfuse ones... I'll try on the XP laptop when I get it back, and TBH, with the Deviation system working, there's not really any reason for me to go back to Devention anyway!!

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

More
07 Apr 2016 12:39 #46023 by Epitaph
Replied by Epitaph on topic Deviation for Devo F4?
Personally the loss of the PPM port isn't a loss to me, as I don't use it for anything at all... even simulators I do over DSMX protocol with a dongle I modded with a PPM capable receiver, and I am in my lonesome so no one to trainer with, so for me, the Arduino option isn't a loss at all. I don't have a problem soldering to the MCU directly, it reminds me of the days chipping Playstations hehehe

I need to order some switches first!!

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

More
07 Apr 2016 18:08 - 07 Apr 2016 18:18 #46044 by SirDomsen
Replied by SirDomsen on topic Deviation for Devo F4?
concerning the switches:
Will they work with the current verSion of the f4 code or means that that you'll have to change there, PB?
I'm not afraid of soldering direct to the MCU, and just thought, if everything in the code and in the hardware is already there, why not use it?

The arduino method seems to be interesting, too. Just read a little around that in the corresponding 7e thread. Crazy what some people do with their 7e :woohoo:

edit: is the video of the video function still required? I could do it later...
Last edit: 07 Apr 2016 18:18 by SirDomsen.

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

More
07 Apr 2016 19:05 #46056 by Epitaph
Replied by Epitaph on topic Deviation for Devo F4?
I know, some 7E's are really over the top crazy, looks like they are trying to control a nuclear power plant with the baby of the Devo family!! I have quite a bit in my 7E, but nothing compared to what some of these guys have, but that's mainly because of neatness... I'm a slave to my pet hates, and I hate having things strapped on all over the place like batteries and modules, so, seeing as nothing else fits inside mine, I won't add anything else. I have the 2x3 mod, I have added 2 extra pots with careful attention to colours used on the knobs to match the switch nuts and stick ends, with an Arduino Nano V3 inside for that, I have 2 added modules inside (no CC2500), and the last mod I am going to do is add a 2S Li-Ion inside from a DSLR camera, as they are pretty safe for charging inside, take up little room and won't need a big LiPo strapped on the back because it doesn't fit in the battery bay, and this is mainly because I am having problems with the pots centring and EPA because I can't feed 5V, it's either above or below depending on the power the NiMH batteries have, which with the Li-Ion I can use a UBEC (also ordered) to feed it constant... so it's mainly to solve a small issue.

Right now, I have in mind what I would like to do with the F4, and we are VERY close to it now the video is working, I just need to get switches and pots to solve that, I already have it working with LiPo so no voltage issues for the Arduino inside, and I think it's going to be a very pleasing, cheap and nasty transmitter hehehe

I might get my hands on a Devo 10 to keep up with development and for expanding into, but I haven't decided yet...

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

More
07 Apr 2016 20:01 #46062 by SirDomsen
Replied by SirDomsen on topic Deviation for Devo F4?
Devo 10 - my favorite. Great TX, really

Concerning powering arduino: Have you ever heard about pololu?

watch here:
www.pololu.com/product/2119

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

Time to create page: 0.107 seconds
Powered by Kunena Forum