HC-12 433MHz RF serial module range test

As I mentioned in my first post about HC-12 433MHz radio modules, I’ve put my interest in them for telemetry purposes. While S.Port telemetry I’m using in FrSky Taranis radio might have higher range than HC-12, it is closed environment. Since $10 for a pair of HC-12 is not much, I’ve decided for more open DIY solution.

Setup on a quadcopter consist of one HC-12 configured for FU3 mode and baud rate 9600bps connected to SPRacingF3 UART3 port and “air cooled” (shortened with a coil) 433MHz whip antenna. Well, to be precise, it’s 450MHz since I changed working frequency. Antenna is not tuned or scientifically computed. Just 433MHz version shortened a little using proportions. Antenna is mounted on GPS mast. In next version I will probably replace whip antenna with Vee antenna.

HC-12 Rf 433MHz module in quadcopter

"Air cooled" antenna on quadcopter

Continue reading “HC-12 433MHz RF serial module range test” »

Read More

Improving cheap radio range

Radio range of my first drone, UDI 829A was pretty pathetic. OK, it was (still is, I only have to finally replace motors) pretty indestructible, quite stable and reasonably priced. But effective radio range as quite short. More less 50 meters. Above that limit strange things started to happen. The reason was pretty simple. Just take a look at this picture.

Antenna too short

Can you see the transmitter antenna? Yeap, that it this short cable. Not only it does not go into “antenna cover” of the receiver, it is also horizontally polarized and when receiver is held in a normal way, pointing into a drone, it emits almost no signal in this direction. This and an additional single whip antenna on the receiver makes it virtually impossible to have a good radio range.

So, I’ve decided to fix that and install external antenna that would work with vertical linear polarization and actually emits some power in drone’s direction.
This tutorial shows how to do it for UDI 829A, but will work almost all cheap drones. Their transmitters are very similar inside and as long as there is antenna pad or connector, it can be done. Continue reading “Improving cheap radio range” »

Read More

How to flash firmware to ESP-01 ESP8266 WiFi module

One can think that internet know everything about everything. Yesterday I’ve learned the hard way that is does not. It took me better part of evening to find a working way to flash firmware, any firmware, to cheap ESP-01 ESP8266 WiFi modules. There are many tutorials, most of them were just wrong in my case. If I had Windows PC, that might have been simpler. But I don’t.

ESP8266 ESP-01 Version 2

So, if you want to flash ESP8266 on any PC (Windows, Mac, Linux) here is what you should do: Continue reading “How to flash firmware to ESP-01 ESP8266 WiFi module” »

Read More

10 channels for FlySky FS-i6 radios

This news might be not super fresh, but somehow it missed my attention. There is a good news for all owners of FlySky FS-i6 radios: there is an unofficial firmware that turns this cheap 6 channel radio into 10 channel one. Of course, there is a small catch, or even a few of them:

  • All 10 channels are available as PWM only using FS-ia10 receiver
  • PPM on FS-ia6B is still only 6 channels wide. To have all 10, iBus connection to flight controller or iBus to PPM converter required
  • PPM output still only on FA-ia6B and FS-ia10 receivers. No support for FS-ia6 RX module

FlySky FS-i6 (Turnigy TGY-i6) 6 channel 2.4GHz radio system with FPV mount

New firmware, as well as few additional mods, is available on GitHub. I did not checked that, since I no longer own FS-i6 radio, but I’ve read good oppinions: it is stable and functional. So, who will give it a try?

Read More

Improve Boscam BOS 600 cooling with thermopad

Boscam BOS 600 is a 5.8GHz 600mW 32 channel video transmitter well suited for long range (> 1km) FPV flights. Its design makes the whole casing a radiator. This is good, since 600mW of RF means a lot of heat. Unfortunately, Boscams BOS 600 design has a serious bug there: so what if whole casing can act as a radiator, since connection between RF module and casing is poor? Just look at picture below.

Boscam BOS 600 poor cooling

RF chip is not even touching casing, gap is filled with a blob of thermal compound. Add far from perfect quality control and you will have overheating transmitter that will loose output power or even burn. But it can be fixed with a small piece of 2mm thick thermopad.

  1. Open casing by removing 4 screws on the sides of transmitter
  2. Clean RF chip and casing from existing thermal compound
  3. Cut a pice of thermopad similar in size to metal block screwed to bottom part of casingThermopad cut
  4. Remove protective film from thermopad and put it in metal blockThermopad BOS 600
  5. Assemble whole unit and screw both parts together. Thermopad will tightly fit the gap between RF chip and casing, making heat transfer easier
  6. As a final touch I have added an additional aluminium radiator that I’ve bought for my Rasperry Pis. But this is not needed, and can be skippedBOS600 radiator

Final note of thermopads. They come in different thicknesses. 1mm and 2mm should be fine for DIY projects, and can be bought cheap from eBay or any other internet store. Strip big enough to improve dozen of BOS 600 transmitters should cost not more than few dollars or euros.

Read More

Programming ATtiny85 and ATtiny45 with Arduino IDE

What is ATtiny

ATtiny is a fimily of microcontrollers by Atmel, the same company that provides ATmega series used widely in “real” Arduinos. Comparing to ATmega, ATtinys are much simpler, smaller (usually), with less features. But also cheaper, easier to connect, using less energy, and trust me, in many many cases you do not need 32kB of flash memory. If, for example, you want to build a device that will beep every 10 minutes which microcontroller would you use: huge DIP-28 ATmega328P from Arduino UNO R3 or small DIP-8 ATtiny25 that ususes way less power and costs around 1EUR? I would use ATtiny.

ATtiny85 as light sensor with I2C bus

There are many microcontrollers in ATtiny family. In this tutorial and all future in this series I will concentrate on ATtiny85 with 8kB of flash memory. There are 2 simpler versions of it: ATtiny25 and ATtiny45 with respectively 2kB and 4kB of flash, but price difference between them is so small, that I see no point of trying to use them. When buoght from China, it might be even possible to buy ATtiny85 cheaper than its smaller brothers. Continue reading “Programming ATtiny85 and ATtiny45 with Arduino IDE” »

Read More

Read RC PWM signal with Arduino

Arduinos are cheap and simple development board. You can do a lot with even the simplest of them. For example build you own quadcopter and flight controller (after all MultiWii = Arduino + MPU6050). Of course, this is not as simple as one might imagine and there are few (actually a lot) obstacles that needs to be overcomed. One of them, and very basic, is how to read RC PWM signal provided by radio receiver.

Signal to decode

RC PWM signal passed from radio receiver to servos, ESC, flight controllers is encoded with a length of pulse. Pulse length of 1000us (micro seconds) is minimum stick position and pulse of 2000us length is maximum stick position. Pulses repeat every 20ms for standard 50Hz refresh rate. Like this:

RC PWM Signal

So far, nothing fancy. Continue reading “Read RC PWM signal with Arduino” »

Read More

DIY FPV LC power noise filter

Both electrical motor and ESC are source of electrical noise that influences all devices connected to the same battery. This is why, very often, on airplanes or big multirotors FPV circuit is powered from separate battery. On small or medium drones this can be hard to archive: additional weight will influence both flight performance and flight time. So, when your setup is suffering from a power noise manifesting itself as vertical bars or other image distortions on goggles/monitor, you can do 3 things:

  • use separate battery to power camera and video TX,
  • cut the noise using LC low-pass power filter.

I would choose low-pass filter. Cheaper and lighter. You can buy one for a few dollars/euros or make 10 by yourself for the same price.

LC power noise filter for FPV

Continue reading “DIY FPV LC power noise filter” »

Read More

Raspberry Pi: reset external I2C devices (not only I2C)

Electronic, and specially computerized, devices likes to hang from time to time. There are many reasons: software bug, hardware error, voltage drop, interference, too long wire, random incident. I’ve learned this hard way during work on my Raspberry Pi based weather station. From time to time external DTH22 temperature/humidity sensor refused to work. Only solution was to cut power to DHT22 for a second (or less). It was kind of irritating to go the attic, unplug sensor and plug in again. Later on I had similar issues with HD44780 LCD display over I2C bus. Device was hanging and only solution was to cut power. So, I’ve found a solution: as a prevention cut power for a second every 30 minutes with a simple electronic device I’ve called “Power Cutter”.

Raspberry Pi power cutter

Continue reading “Raspberry Pi: reset external I2C devices (not only I2C)” »

Read More

Raspberry Pi + MOSFET = High power switch

With all the possibilities, Raspberry Pi requires additional hardware to turn on and off any additional hardware. GPIOs built in power limit is low: 3.3V, 16mA per GPIO, but not more that 50mA total). And while it might be enough to light a small LED, it is not enough for anything else. Forget about motors, strong LEDs, relays. Anything that uses more that 16mA on input will destroy Raspberry Pi.

Luckily, there are things called MOSFET. To keep things short: they are special kind of transistors that can be used to turn on and off devices with high power requirements. Unfortunately, most MOSFETs require more that 3.3V Raspberry Pi GPIO provides. So you either have to use 3.3V logic compatible MOSFETs or add few other elements and use more common 5V compatible MOSFET like 30N06. And 30N06 MOSFET transistor can handle a lot of thing: up to 30A and 60V. So it’s more that enough to handle most 12V motors, relays, lights, LEDs, etc.

30N06 MOSFET Raspberry Pi


Required elements:

  • NPN BC547 (or compatible) transistor,
  • PNP BC640 (or compatible) transistor,
  • 30N06 MOSFET transistor,
  • 3x 10kOhm resistors,
  • 4.7kOhm resistors,
  • 1N4001 (or similar) diode

If it was Arduino with 5V logic, transistors would not be required. But with Raspberry Pi’s 3.3V logic they are required to bump voltage from 3.3V GPIO port provides to 5V MOSFET needs. Additionally, if we would be powering any coil device (motor, relay), flyback diode would be required to secure MOSFET from voltage spikes. Even if there is no coil, flyback diode still can be used. Just to be safe.

Read More