After my bad experiance with this topc I decided to give it another try.

I assumed that my issue from last time was that the receiver did not get enough power (after all it was a bad idea to power the satellite from a GPIO pin directly) so I decided to fix this: I just had a DRV8833 motor controller at hand, so I used this to manage the power line for the Satellite Receiver.

I was using a ESP32 instead of an Arduino because

  • it uses a 3.3V logic and therefore is compatible with the Satellite Receiver Signal Pin
  • it provides a 3.3V power line.
  • it can remap the RX pin and use it as output pin. This is handy because we can check if the binding was successful.
  • it supports 2 Serial interfaces: We can use Serial2 for the communication to the Satellite and still have Serial for logging.
  • has a built in LED that we can use to signal the state

I am using the following wiring:

ESP32 DRV8833 Satellite
3V VCC
3V In1
GND GND
GND In2
16 (RX2) Signal
23 EEP
Out1 +
Out2

We use the GPIO 16 pin to receive (and send signals) and GPIO 23 to switch the power on via the enable pin of the motor driver. Before connecting this setup to the Satellite you need to double check the polarity of Out1 and Out2! I used my Voltmeter and was getting 3.22V which should be sufficient and confirmed that Out1 was +.

And finally I am using the following Sketch which is based on my Spektrum Satellite Library:

#include "SpektrumSatellite.h"
#include "SpektrumCSV.h"

#define ONBOARD_LED  2

SpektrumSatellite<uint16_t> satellite(Serial2); 
SpektrumCSV<uint16_t> csv;
int rxPin = 16; 
int powerPin = 23; 

// blinking the LED
bool led_state = true;
int led_interval;
long led_timeout;

// print buffer for csv
uint8_t buffer[1024];


void setup() {
  // Setup logging
  Serial.begin(115200);
  Serial.println();
  Serial.println("setup");
  satellite.setLog(Serial);

  pinMode(ONBOARD_LED,OUTPUT);
  digitalWrite(ONBOARD_LED, HIGH);

  // we set the receiver into binding mode
  satellite.setBindingMode(External_DSM2_11ms);
  satellite.startBinding(powerPin, rxPin);

  // start blinking
  led_interval = 1000;

  // switch rxPin to receive data on Serial 
  Serial2.begin(SPEKTRUM_SATELLITE_BPS);

}

void loop() {
  // when we receive data we 
  if (satellite.getFrame()) {  
     led_interval = 0;
     led_state = false;
     // write data to log
     csv.toString(satellite, buffer, 1024);
     Serial.print((char*)buffer);     
  }

  // update led
  if (millis()>led_timeout){
     if (led_interval>0)
         led_state = !led_state;
     led_timeout = millis()+led_interval;
     digitalWrite(ONBOARD_LED, led_state);
  }
}

In the setup we switch the LED on and set the Satellite into binding mode and then start blinking. In the loop we just switch led off when we receive any data and update the led status.

Binding Instructions

  • Set up the connections and load the bind sketch to the microcontroller
  • After powering on the ESP32 the LED on the microcontroller starts to light up.
  • After a couple of seconds the ESP32 LED starts to blink and the Satellite receiver starts to blink as well.
  • power on the Spektrum Radio with the bind switch activated
  • Release the bind switch
  • After some seconds the LED on the ESP32 will go off and the one on the Receiver go to stable
  • In the log you see the received channel data as CSV

Using other Microcontrollers

You can exchange the ESP32 with a ESP8266 w/o loosing any functionality. You can also use an Arduino, but then you will need to use a Logic Converter on the rxPin (or a voltage divider) and comment out the receiving part; but if you do this an Attiny might be an even better choice.
I started my Spektrum Radio with the Bind switch activated. Then I released it and moved the controls: The led on the ESP32 went off and the one on the Satellite switched to a stable light. So every

Conclusion

I agree that this is a little bit too complicated and it is much simpler to buy a Satellite Receiver with built in bind switch or a separate Bind Module. On the other hand, if you just use one motor on your RC Plane, you have one spare motor output on your motor controller board that you can put to good use.


0 Comments

Leave a Reply

Your email address will not be published.