Alex Zarenin's Posts (3)

Sort by

DIY 10-channel transmitter


3689723701?profile=original

Somewhere in the corner on the third shelf is the box with my old RC stuff, and in that box was sitting my very, very old Hitec Laser 4 transmitter – 72 MHz, 4 channels, definitely not usable anymore. So, I decided to engage in a project to convert this outdated piece of equipment into a 10-channel DSM2/DSMX transmitter.

The goal was to use the case, existing gimbal assemblies and switches, and to add couple more switches and 2 potentiometers to create a transmitter with Throttle, Rudder, Aileron, Elevator, four on-off channels, and two continuous channels using potentiometers.

As the actual transmitter I planned to use OrangeRX DIY Transmitter Module, which I acquired some time ago. I did not intend to use any of the original electronics, so I also planned to design and implement custom controller module that would generate 10-channel PPM signal to feed into OrangeRX module.

After opening the Laser 4 case, I found out that the case was intended by Hitec to be used in different configurations of transmitters, so the holes for mounting various additional switches and POTs were already marked on the inside – this made drilling the holes for various additional components much easier. Also, the final look of the product was much more “industrial”.

After removing original electronics and installing all required additional controls, I measured available mounting places and designed the new control board accounting for all necessary connectors and allowing for subsequent placement of OrangeRX module. This control board was designed around the relatively new dsPIC33EP64GS504 44-pin microcontroller from Microchip. This MCU operates at 70 MHz and has an ample number of fast 12-bit ADCs.

This control board presented on the picture below mounted on my work table for programming and debugging. Besides connectors for various control elements and OrangeRX module, the board also has the ICSP connector for programming and serial connector compatible with XBee, which I used to upload real-time data for analysis and debugging. During development stage I used an LED to communicate the status of the board, which prior to mounting into the case was replaced by piezo buzzer.

After the software for the board was developed and successfully passed all tests, including communication with OrangeRX module, the board was installed into the case and all components connected to respective pins. This is how transmitter looked right before the case was closed:

3689723840?profile=original

This is how the final product looks like:

3689723864?profile=original

The red button in the upper right corner is the OrangeRX module pairing control:

3689723927?profile=original

 

 As I primarily fly drones which use my custom control boards, I did not need and thus did not provide any controls for mixing or reversing attitude controls – Rudder, Aileron, and Elevator controls provide signals corresponding to NED coordinate system. Thus, for example, when the Elevator stick is pushed forward respective control input moves toward minimum (from the central point) and when it is pulled back – the signal moves toward maximum.

On boot control board checks the position of all controls – throttle, all switches and POTs should be low, Rudder, Aileron, and Elevator should be at mid-point – the buzzer would issue a special tone if these conditions are not met. If the initial conditions are met, transmitter can be “armed” by toggling switch 3 (upper left) on and off again – arming will be indicated by a tone and controls will become enabled. Until controls are enabled, the board will provide OrangeRX module with the PPM signal corresponding to throttle, all switches and POTs being low, and Rudder, Aileron, and Elevator - at mid-point.

While today one may buy a 10-channel multi-protocol transmitter like Jumper T8SG, for example, for around $80, does it make sense to put time and effort in building your own? Probably, not – but this project was just a training exercise prior to building a transmitter that I really want for my drones the one based upon the XBee!

XBee modules provide encrypted full-duplex digital communication between modules at 250 Kb/sec at 2.4 GHz band with DSSS (Direct Sequence Spread Spectrum) at a distance up to 2 miles line-of-sight. XBee-based transmitter-receiver pair (actually, two equal nodes on the network) would allow to pass commands to the drone AND collect extensive telemetry without the need for additional telemetry receiver transmitter. However, this is the topic for another post.

For those interested, attached is the project code: V1.zip

Read more…

Yet another Flight Control Board

3689607630?profile=original

Encouraged by the success of my previous custom board (Version 2), which happily carries my quad in the air (maiden flight) with some advanced features like self-stabilization, course lock, control loop operating at 400 Hz, etc., I decided to jump on a more ambitious project - the board with more sensors, more ports, etc.

In summary, the new board (Version 3) has the following parameters:

  • PIC24EP512GP806 MCU operating at 64 MHz;
  • Two MPU-6050 sensors (in the hope to achieve better vibration rejection) - one on the left and another one - on the right side of the board ;
  • New HMC-5983 magnetometer;
  • MPL3115A barometric altimeter that can be configured to report altitude instead of the raw pressure;
  • On-board 3.3V 1A voltage regulator;
  • 8 PWM ports for quad-, hexa-, and octo-copters and/or quad and camera control;
  • 4 UART ports for GPS, US-100 ultrasonic sensor, UART-enabled RC receiver, and Data Logger;
  • ICSP port for programming;
  • On-board signal LED and header for connecting external LED or buzzer (powered through MOSFET);
  • Standard size with mounting holes matching KK and MultiWii boards.

Here is the board overview (above)

I will be documenting every step of developing (mostly - porting from V2) firmware for this boards as well as sensors' calibration on my blog. Obviously, all the code is Open Source under the MIT License located in the SVN repository.

Read more…

8chrxnosat_all-320x320.jpg

While working on my new autopilot control board (for quads) I realized that using 6 (or more!) MCU pins just to read data from the RC receiver is too taxing for the MCU as well as for the “real estate” on my board – there should be a better way to communicate with the receiver! A quick search on the Internet brought me to the Lemon-RX UART-enabled receiver (http://www.lemon-rx.com/shop/index.php?route=product/product&product_id=97). That same Internet search brought me to Jordi’s post (http://diydrones.ning.com/profiles/blog/show?id=705844:BlogPost:64228) – apparently Spectrum satellite receivers talking serial protocol back to main receiver. Another post (http://www.rcgroups.com/forums/showthread.php?t=922566) confirmed it.

I have a few Orange RX satellite receivers as well as Lemon-RX UART-enabled receiver, so I decided to check them for details of the serial communication.

For tests I use Orange RX 6-channel DSM2 radio with the end points on each channel configured for linear curve with the +/- 100% end points. I connected receivers to my computer using FTDI 3.3 serial cable.

The first one I tested was the Orange RX satellite; using the RealTerm application I analyzed the data stream – it is 115,200 bps serial stream with 16 byte frame. The frame starts with 0x0303 and ends with 0xFFFF; in between there are 12 bytes of the data for 6 channels:

3689565961?profile=original

After establishing the frame I used my Windows-based data capture program to get the data stream from the receiver and put it into Excel; the data stream was generated while I moved all the controls end to end and flipped back and force all the switches. Captured data represented in the chart where values for each channel are plotted against time:

3689566074?profile=original

It really looks like a digitized PPS signal – each channel has a center point at around (512 + 1024*N), where N – is the channel number starting from 0. The swing from min to max on each channel is 716, thus the Throttle goes from 0 to 100% in 716 steps and Aileron, Elevator, and Rudder channels go from 0 to +/- 100% in 358 steps – seems to be quite impressive resolution!

Then I tested the Lemon-RX UART-enabled receiver using the same settings on my radio. Serial frame for Lemon-RX provided on the documentation page – the frame starts and ends with 0x13 with 10 bytes – one byte per channel between the start and end sync bytes. Knowing the frame, I proceeded directly to capturing data stream into Excel and plotting results:

3689566088?profile=original

Each channel has a center point at around 127. The swing from min (38) to max (217) on each channel is 178, thus the Throttle goes from 0 to 100% in 178 steps and Aileron, Elevator, and Rudder channels go from 0 to +/- 100% in 89 steps. The resolution seems to be quite lower than the Orange RX satellite receiver, but still should be sufficient for most practical applications.

I ordered a few Lemon-RX satellite receivers and plan to test them as soon as they arrive. Meanwhile I have decided that my next control board will use serial interface to get the feed from the receiver and, probably, I will use just a satellite one.

Read more…