Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ NOTE: SPEKTRUM SATELLITE RECEIVERS ARE 3.3V DEVICES! Application of more than 3.
The following schematic details the circuit used for this binding process. The GPIO pins in the diagram do not match the pin assignments in the code!

![BindCircuit](https://user-images.githubusercontent.com/104041016/182746055-f7c7d6db-a366-4edc-8f20-23109ccb1560.png)

Alternative circuit setup, with no BEC, using onboard 3.3V line from the Raspberry Pi Pico and a simple switch. Pinout can be seen in the photo, only hidden component is a 1.2K pulldown resistor on pin 9 the other side of the PCB.

![PhotoCircuit](images/PhotoCircuit.jpg)
42 changes: 27 additions & 15 deletions SpektrumBind.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@

//Pin Assignments
static const uint8_t receiverVcc = 0;
static const uint8_t switchSignal = 15;
static const uint8_t switchSignal = 9;
static const uint8_t receiverSignal = 10;
static const uint8_t numBindPulses = 9; //Use Universal


void setup() {
// put your setup code here, to run once:

pinMode(LED_BUILTIN, OUTPUT);

pinMode(switchSignal, INPUT); //Switch imput to read when reciever is powered on. Use External 10K Pulldown Resistor

pinMode(receiverVcc, OUTPUT); //Reciever Power
Expand All @@ -30,26 +32,36 @@ void setup() {
digitalWrite(receiverVcc, HIGH); //Power On
digitalWrite(receiverSignal, HIGH); //Allows for falling pulses

delay(5000);
delay(500);

}

void loop() {
digitalWrite(receiverSignal, LOW);
digitalWrite(LED_BUILTIN, HIGH);
// Use a physical switch to power on reciever and begin pulses immediately
while(!digitalRead(switchSignal)){
delay(10);
}
Serial.println("High");
digitalWrite(receiverSignal, HIGH);
digitalWrite(LED_BUILTIN, LOW);
delay(100); //Ensure reciever powered on before delivering pulses

for(uint8_t pulseCount = 0; pulseCount < numBindPulses; pulseCount++){ //Deliver Falling Pulses
digitalWrite(receiverSignal, LOW);
delayMicroseconds(120);
digitalWrite(receiverSignal, HIGH);
delayMicroseconds(120);
}

if (digitalRead(switchSignal)){
Serial.println("High");
delay(100); //Ensure reciever powered on before delivering pulses

for(uint8_t pulseCount = 0; pulseCount < numBindPulses; pulseCount++){ //Deliver Falling Pulses
digitalWrite(receiverSignal, LOW);
delayMicroseconds(120);
digitalWrite(receiverSignal, HIGH);
delayMicroseconds(120);
}

Serial.println("Pulses Sent");
delay(15000); //Power on transmitter in bind mode within this delay period
Serial.println("Pulses Sent");
while(digitalRead(switchSignal)){
//Power on transmitter in bind mode within this delay period
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500);
digitalWrite(LED_BUILTIN, LOW);
delay(500);
}

}
File renamed without changes
Binary file added images/PhotoCircuit.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.