Looking for someone to write a program for Uno

Hello, I am a builder of large scale remote control airplanes. I have a project where I want to use a Uno and a Jeti Transmitter / Jeti Receiver PWM signals to turn solid state switches on/off that are mounted in the airplane. Contact me ASAP if you can program and you take PayPal.

Thanks

Keith

just to clarify

you have a Jeti Transmitter which sends commands to the on plane Jeti Receiver which translates this commands into a PWM value on a specific channel.

Your ask is to have an Arduino UNO (probably should go for something smaller than UNO and solder stuff) listen to the PWM signal to detect an incoming command and use that to drive a solid state switch.

is that it ?

if so how many channels and do you have details about the PWM ? a link to the receiver's datasheet would help too.

Being a RC aircraft modeller/flyer myself can you tell a bit more about the solid state switches you want to operate? I have built numerous RC aircraft related gadgets for members of my flying club (including myself). Sometimes it works best if you just explain your problem/project, so others can be proactive in suggesting the easiest solution.

e.g. Someone asked me once to build a print that can take 3 channels to switch navlights, stobelights and landing lights, where we ended up doing all of that with just one channel.

Here is what I want to do: Should be fairly simple as I have written a sketch that is close but I can't figure out how to get it all there. Maybe the UNO or Arduino can't do what I want so I am open to other microprocessors if they are small and will work for what I want. Using Jeti DS-16 Transmitter and in the plane is a Jeti CB310 Power Board with a Jeti Duplex REX 10 Receiver interfaced with the CB310. The PWM signal will come from port 17 on the CB310 and the port is set up to normally control a servo. I only want one channel on the CB310 to be used as the input into the Uno. I "might" be able to use Two seperate switches on the Jeti Transmitter and two seperate ports on the CB310 but I don't want to go that route if at all possible. The output of the Uno (HIGH +5v) will go to a Solid State relay board input to turn a relay on and off. All of the electronics work fine as I wrote a simple sketch (LED on/off) and the output of the Uno worked just fine with the Solid State Relay Board.

Primary Goal:
Use a switch (two position or three position) on the Jeti DS-16 Transmitter to:

Off Position - no output on the Uno Pin

On Position 1 (Mode1) - turn on a Uno (pin) output that cycles (High to Low) at a rate that is adjustable: High - constant to 1 second cycle (High is +5v and LOW is Ground)

On Position 2 (Mode2) - Change the (same) output to a slower cycle rate - .5 seconds to 5 seconds.

NOTE: If I use a two position switch, it is OK if when power is applied to the UNO that the output pin goes to mode #1 then when the switch is changed it would go into mode #2.

Secondary Goal:
I don't think the Uno is capable of running a second program but I thought I would ask, just in case. In this scenario I want to have the first program running but also want to use another port (channel PWM) from the CB310 - 16 to turn On/Off another solid state relay board using a different two position switch on the Jeti Transmitter. This would only be HIGH or LOW output from the Uno pin as I want the solid state relay to be either ON or OFF with NO delay .

Let me know what you think.......

Keith

a basic code to test

const int pwmPin = 2; // Change this to match your pin where you receive the PWM signal
unsigned long chrono = 0;

void setup() {
  pinMode(pwmPin, INPUT);
  Serial.begin(115200);
}

void loop() {
  if (millis() - chrono >= 10) { // 100 Hz {
    Serial.println(pulseIn(pwmPin, HIGH));
    chrono = millis();
  }
}

ensure the pwmPin does not get more voltage than it can support

➜ what do you see on the Serial monitor set @ 115200 bauds when you operate the emitter?

Since you are a RC guy you should understand what I am trying to do.

My Primary Goal is to turn on two solid state relays that go to the glow plugs on two engines. It is a B25 Bomber.

In Mode 1 it will be start mode, with glow plugs on constant or very fast cycle time.

In Mode 2 it will be after takeoff where the glow plugs will cycle on/off slowly just to ensure the engines keep running.

I will program the Mode 2 either with a dedicated switch or put it on my gear switch so that when gear is UP it will go into Mode 2 and when gear is down it will go back to Mode 1.

My secondary goal is to have the glow program running but also be able to turn lights On or Off using another transmitter switch / port from the CB310. These would either be On or Off.

Thanks

Keith

I wrote (copied a sketch from a YouTube video actually - LOL) a sketch last night that worked fine that is similar to yours.

I saw the state change from High to Low on the monitor.

// Define Input Connections
#define CH1 2


//Boolean to represent switch value
bool ch1Value;

int readChannel(int channelInput, int minLimit, int maxLimit, int defaultValue){
  int ch = pulseIn(channelInput, HIGH, 30000);
  if (ch < 100) return defaultValue;
  return map(ch, 1000, 2000, minLimit, maxLimit);

}
//Read the switch channel and return a boolean value
bool readSwitch(byte channelInput, bool defaultValue){
  int intDefaultValue = (defaultValue)? 100: 0;
  int ch = readChannel(channelInput, 0, 100, intDefaultValue);
  return (ch > 50);
}

void setup() {
// Set up serial monitor
Serial.begin(115200);

// Set all pins as inputs
pinMode(CH1, INPUT);

}

void loop() {
  // Get values for each channel
  ch1Value = readSwitch(CH1, false);

  // Print to Serial Monitor
  Serial.print("Ch1: ");
  Serial.print(ch1Value);

  delay(500);
}

please learn to use code tags when posting code. I added them for you this time (read How to get the best out of this forum)

Okay, will do........ I have no clue what I am doing really. I can do anything with electronics but programming makes my brain hurt...

The code you posted will say true or false based on the PWM being above or below a given threshold

I used that code to test the concept and I copied it from a YouTube video.

I have no idea on how to write the code for the sequence of events I want.

I am willing to pay someone to write the code for me.

Keith

I find this a nice programming challenge and I think that logic should be doable with one Uno, assuming your Jeti transmitter has decent programming options.

What I would do is reserve two third of ch17 servo range for the first function and the upper one third of the servo range to implement a on-off toggle for your second application.
This would require you to program a 3-way switch to your channel 17 that would send approximately the following pulses to your servo 1000 (off), 1300 (fast cycle), 1600 (slow cycle)
This would then require you to program a second 2-way switch to do the following
off = do nothing. leave the output to channel 17 to the 3-way switch.
on = OVERRIDE the other switch and send a servo PWM value of 2000 to channel 17
My FRSky Taranis can do that without problems, but other than Jeti being top notch equipment I know nothing about them.

The Uno can recognize that if suddenly a value of 2000 comes in (from ch 17) it will do nothing to off, mode1 and mode2 from your first function but toggle the on-off state of the second solid state relay instead.

So a spring loaded two way switch would be ideal to operate this (most transmitters I know have that switch bottom right side). Everytime you activate that 2-way switch briefly it will toggle your second function from what it is not at that time. You would have to decide what value (on or off) it needs right after powering up the UNO.

One question: You mention you want the "rate to be adjustable" Do you mean if it is adjustable in the software of the UNO, or via a potmeter you solder to your UNO? Or do you mean it has to be adjustable in flight? In that case it gets more complicated and would require another channel.

I am starting to get curious what this application is for. Operating a smoke system?

The variable cycle rate would be set in the Sketch code for the Uno. I want it variable so I can have flexibility just in case I need to make changes once the engines have broken in more.

The project is to control the glow plugs on two engines. First is to start the engines (Mode 1) then to have the glow plugs cycle on/off during flight (Mode2).

The second part is to turn navigation lights on/off.

Keith

My goal is to come up with hardware and software at a low cost so other RC flyers can purchase. One RC switch is $ 75 USD so a UNO or other microprocessor and solid state relays are much less expensive and can be configured for many different applications.

Did you already fly with that modulating plug? I would be surprised if that helps getting a better running engine. At low throttle or idle you would want some support for your plug, especially when running a 4-stroke, but aren't you afraid that you cause more pre-ignition at full throttle with an energized glowplug? Or blow the plug prematurely?

A few years back I created firmware and PCB for a solenoid driver that commands a (Stihl) solenoid valve the fuel metering in an RC aeroplane engine. Thread on RCGroups. The approach is to clone your throttle channel and create a multipoint curve in your transmitter for that cloned channel and output it on another channel. In your case Ch17. The firmware generates a 25Hz pulse, with 0% to 100% duty-cycle depending on the incoming servo signal.
So in your case your curve would then determine the amount of glowsupport for every throttle setting. At throttle idle you can set your curve at 100% support, which is fine for a cold start. For a warm start you may want a different setting, but that would be a matter of a switch to override the cloning of your throttle and give it any value you want.

+1 for using your TX. You can use any cheap brushed speed controller as a switch, no need to spend 75 bucks on snakeoil.

Oh, if you have EdgeTX then you could use LUA programs, too.

I think the RC switches that do a simple on/off are way cheaper than $75 USD. I see them for between $5 and $10 on Ebay.
10 years ago I made these poor mans strobelight kits that people could solder together themselves.

Yeah, no problem for the Arduino. That's just adding another function.

Just my two cents worth: Once the engine is running, you don't have to power the glow plug.

Thanks to all who replied. I found a solution so i will not require additional help.