Site icon BBBlimp

EDF preparations

As discussed before we need multiple EDFs (Electric Ducted Fan) to push our blimp through the air. So I started thinking how to build it internally. The plan is to build something like on a picture below (see original article here), while wrapping the EDF unit around the motor there.

I did some shopping first:
1/ 4x Racerstar RS30A Lite 30A Blheli_S 16.5 BB1 2-4S Brushless ESC Support Dshot150 Dshot300 for RC Drone

2/ 1x Racerstar BR2830 1300KV 2-4S Brushless Motor For RC Airplane

Followed with some nice EDF design:

And after months it all together looks like this:

Not knowing much about ESCs (Electric Speed Control) I’ve put together a tiny program to explore how to operate it “brute force”. Following code starts sending speed signal to the motor starting with value 50 and scaling up to 110 and back. Then it stops.

#include <ESP32Servo.h>
#include <Streaming.h> 

Servo myservo;  // create servo object to control a servo

// Possible PWM GPIO pins on the ESP32: 0(used by on-board button),2,4,5(used by on-board LED),12-19,21-23,25-27,32-33 
int servoPin = 18;      // GPIO pin used to connect the servo control (digital out)
// Possible ADC pins on the ESP32: 0,2,4,12-15,32-39; 34-39 are recommended for analog input
int potPin = 34;        // GPIO pin used to connect the potentiometer (analog in)
int ADC_Max = 4096;     // This is the default ADC max value on the ESP32 (12 bit ADC width);
                        // this width can be set (in low-level oode) from 9-12 bits, for a
                        // a range of max values of 512-4096
  
int val;    // variable to read the value from the analog pin

void setup()
{
	// Allow allocation of all timers
	ESP32PWM::allocateTimer(0);
	ESP32PWM::allocateTimer(1);
	ESP32PWM::allocateTimer(2);
	ESP32PWM::allocateTimer(3);
  myservo.setPeriodHertz(50);// Standard 50hz servo
  myservo.attach(servoPin, 500, 2400);   // attaches the servo on pin 18 to the servo object
                                         // using SG90 servo min/max of 500us and 2400us
                                         // for MG995 large servo, use 1000us and 2000us,
                                         // which are the defaults, so this line could be
                                         // "myservo.attach(servoPin);"
}

static inline unsigned get_ccount(void)
{
        unsigned r;
        asm volatile ("rsr %0, ccount" : "=r"(r));
        return r;
}

void loop() {
  //while (!Serial);
  Serial.begin(9600);
  while (!Serial);
  //Serial.print ("hello world");
  
  bool up = true;
  float speed = 50;

  //Arm
  Serial << "arming" << endl;
  myservo.write(70);
  delay(5000);
  Serial << "arming done" << endl;
  while (true) {
    time_t _time;
    time(&_time);
    
    /*val = analogRead(potPin);            // read the value of the potentiometer (value between 0 and 1023)
    val = map(val, 0, ADC_Max, 0, 180);     // scale it to use it with the servo (value between 0 and 180)
    myservo.write(val);                  // set the servo position according to the scaled value
    */
    if (_time > 50)
      break;

    if (up)
      speed += 0.1;
    else
      speed -= 0.1;

    Serial << "[" << _time << "] speed: " << speed << endl;
    
    myservo.write(speed);
    delay(50);
    
    if (speed < 50)
      up = true;
    else if (speed > 110)
      up = false;
  }
  
  myservo.write(0);

}

Having all together we started doing some testing with the assistance of Richard, Adam, Vilem and Martin. We started with 4.6V battery, but that didn’t seem to give a proper umpf so we quickly moved to the 12V car battery (3 cells). The very first test got documented on video. 🙂

Next stage included propeller replacement (PLA -> ABS) and another boost – getting the 16.8V lithium-Ion-4-cell battery. Note the multi-meter – it is reaching almost 10 Amps – that makes it some serious 168W output!

We had few more runs, while the final one came with the idea to check if we have enough thrust to actually start moving things … and it felt great!

Exit mobile version