Project “GPS Racer” – worklog #1

I know that I should not start new project when old one are still in progress. I really, really know that. But since I’ve somehow lost my interest in Project Dualcopter and I have a real need for a new quadcopter, Project “GPS Racer” has finally started.

What is GPS Racer? During my work as INAV developer, I’ve realized that I do not have a good platform for it. The only GPS enabled multirotor I own is Sparrow Hawk. And it has a gimbal, weight 2kg and is hard to transport. When Sparrow Hawk crashes, there is always something broken.

So, to be able to test navigation related features of INAV, and not have to rebuild every single crash, I’ve decided to build dedicated UAV. For most elements I will be using parts that I already have. I only had to order frame, propellers and GPS module. Continue reading “Project “GPS Racer” – worklog #1” »

Read More

ESP8266 and DS18B20 – wireless ThingSpeak sensor

Here is another small project of mine: battery operated ESP8266 ESP-01 WiFi thermometer using DS18B20 and ThingSpeak API to collect data.

Before we proceed, you should:

esp8266 ds18b20 thingspeak sensor

Continue reading “ESP8266 and DS18B20 – wireless ThingSpeak sensor” »

Read More

Project Dualcopter – worklog #2

3 weeks after my first post on Project Dualcopter, it's time for small update. The plan was to install servos and control surfaces. Instead, I've done:

  • Basic electrical wiring for motors and ESCs. They have power now and are ready to be connected to flight controller
  • To level shelf (above propellers) designed to hold flight controller and radio receiver
  • Think for a moment about landing gear. Yeap, there will be some sort of shock absorbers
  • Think for a moment where battery will be placed: as low as possible to keep center of gravity below center of thrust
  • Decide which propeller should run clockwise and which should run counterclockwise: top should go clockwise, bottom should go counterclockwise

dualcopter esc soldering

dualcopter esc

Read More

ATtiny85 Light Sensor – I2C slave device

I love AVR ATtinyx5 series microcontrollers. They are cheap, easy to use, they can be programmed just like Arduinos and comparing to their size they offer great features. For example, they can be used as remote analog to digital converters connected to master device using I2C bus.

Background: few year ago I've build a weather station based on Raspberry Pi. It collects various data and displays them on dedicated web page and Android app. Every few months I try to add a new sensor to it. Last time it was a daylight sensor. Raspberry Pi does not offer ADC inputs and I has few ATtiny85 on hand that time. One to another, few hours later: photoresistor based daylight meter sensor connected via I2C bus.

ATtiny85 as light sensor with I2C bus

Electric assembly is pretty simple: ATtiny85 directly connected to Raspberry Pi via I2C, photoresistor with 10kOhm pull down connected to ATtiny85 and signal LED.

attiny85 i2c slave light sensor with photoresistor

Code driving this rig is also pretty simple: watchdog timer wakes up ATtiny every few minutes, measures voltage, filters it and stores in memory. Every time read operation is requested, last filtered ADC value (10 bits as 2 bytes).

I2C support is provided by TinyWireS library that configures USI as I2C slave.

/**
 * This function is executed when there is a request to read sensor
 * To get data, 2 reads of 8 bits are required
 * First requests send 8 older bits of 16bit unsigned int
 * Second request send 8 lower bytes
 * Measurement is executed when request for first batch of data is requested
 */
void requestEvent()
{  
  TinyWireS.send(i2c_regs[reg_position]);

  reg_position++;
  if (reg_position >= reg_size)
  {
      reg_position = 0;
  }
}

/*
 * Setup I2C
 */
TinyWireS.begin(I2C_SLAVE_ADDRESS);
TinyWireS.onRequest(requestEvent); //Set I2C read event handler

Example code to read from device might look like this:

Wire.requestFrom(0x13, 2);    // request 2 bytes from slave device #0x13

int i =0;
unsigned int readout = 0;

while (Wire.available()) { // slave may send less than requested
byte c = Wire.read(); // receive a byte as character

if (i == 0) {
    readout = c;
} else {
    readout = readout << 8;
    readout = readout + c;
}

i++;
}

Serial.print(readout);

Full source code is available on GitHub and my Weather Station with almost a year of light level history is available here.

Read More

Project Dualcopter – worklog #1

Flying season 2016 is slowly coming to an end on northern hemisphere. That means less time spent on an airfield and more time spent behind a desk. For this autumn I've found a very interesting, small project: Dualcopter.

Dualcopter is an UAV with two coaxial contra-rotating propellers and 2 control surfaces driven by servos. Lift and yaw are controlled by propellers, while pitch and roll by ailerons placed below motors. This video illustrates how it looks like:

My Dualcopter will be slightly different. Instead of foam and wood I will use 3D printed parts connected together CA glue and zip ties. Maybe it will not be super strong and probably will not survive any crash, but should be enough to make it fly for a minute or so. Almost all parts would be either 3D printed or taken from spare box. I'm not planning any new purchases.

Planned specs:

  • Motors: Turnigy MT2213 935KV
  • Props: APC 1045 MR
  • ESC: Afro 20A
  • FC: Flip32 probably with INAV inside
  • Battery: 1300mAh 3S
  • Weight: around 800g with battery

dualcopter 1

So far, after 2 evenings I have this:

dualcopter 2

Two motors mounted on a frame.

Next step would be to build bottom section with ailerons and battery compartment.

Read More

RedCruiser – DIY Depron airplane for FPV

Few months ago I’ve wrote about my first handmade Depron airplane. It was cool design. Super simple, with KFm-2 airfoil, durable and easy to fly. But it had few serious flaws:

  • motor mounted in front of fuselage is great for flight characteristics, but propellers breaks all the time. Even with prop savers,
  • big fuselage is not the same as fuselage with a lot of space inside.

Depron KFm-2 airplane with pusher propeller

That’s why, I have build a second Depron airplane. This time with pusher propeller mounted on a tower behind wing. Wing is almost the same design as in my first airplane. It is still an KFm-2 (Kline-Folgeman, modified) airfoil, 150mm chord, 12mm thick. But is a little shorter: 1200mm instead of 1250mm. The main difference is inside wing. Instead of carbon fiber spars I’ve used two carbon fiber 6mm pipes. That gives plenty of stiffness. Wing almost does not bend in flight, even during hard maneuvers. And generates more than enough lift to give nice, slow flying experience without danger of heavy stall. You really have to want to stall it. And event when it stalls, it recovers nicely: drops a nose, dives for a second or two, and you have lift again. No need to work with rudder, just let it dive and gain speed and then level.  Continue reading “RedCruiser – DIY Depron airplane for FPV” »

Read More