Tuesday, October 2, 2012

Receiver v1 after a year of flying

I found a set of pictures I had taken of my old receiver a couple of months ago, from around the time I switched to using my new receiver. The poor thing has gone through multiple hard impacts, which have resulted in torn and bent connectors and cracked solder joints. It has been through the rain and the snow. For all practical purposes however it still works today. I think I'll keep this one in my Elektro Rookie after I finally get my Skywalker in the air.

Top view. The sharpie markings used to read "5GS" to remind me of the incorrect pinout
You can see the deformations left behind by multiple crashes
The microcontroller (Atmel Atmega168)
A bodge wire routes 5V to the GPS. The original design had it connected to the 3.3V regulator
There is no antenna connected to the receiver in these pictures. I can't quite remember what I had done with it or why. Right now it has a 1/4 wave whip (that's just a wire about 82 millimeters long) connected and it works great.

Transmitter v1.5

After flying with my transmitter v1 for about 4 months, I thought it was time to upgrade. The biggest reason being that the PlayStation joysticks I ended up using were closer to digital than analog. What I mean by this, is that the joysticks had a very large dead zone and also the control saturated quickly. Moving the stick from the center to the right would change output for the first 1/3 of the range. It would then give a nice proportional output 1/3 of the range after that, and the last 1/3 of the range would again not change the output any further. This was not that big of a problem with an airplane, but I wanted eventually to fly also multicopters and I thought this was something that would really cause problems with them. Also, the way you trimmed the control in the old interface was horrible and I wanted to change that.

Randomly browsing through DealExtreme I came across this. That looked like something I could use! I would just remove all the electronics that were already in and replace them with my own. It would even have mechanical trims in place. Sure it was a bit on the expensive side, but the whole idea of building my own transmitter to save money was long gone anyway.

After a couple of hours of tinkering, I had removed the digitizer and transmitter boards from my old transmitter and moved them in the new enclosure and everything was working well.
Inside the transmitter it's a big mess of wires.
Front view of the transmitter. That antenna sure looks suspicious...
I originally used a small rubber ducky antenna with this transmitter and I never had any bigger problems with that during a couple of months of flying. I was planning to do FPV in the near future, however, and wanted to be sure my transmitter could do at least 1 kilometer. So I did what any sensible person does: I designed and built a 10dBi gain Yagi-Uda antenna and hot glued it to the back of the transmitter.
It is very awkward to carry this thing around. Flying with it is no problem though.
Based on RSSI (receive signal strength indicator) data sent in the plane telemetry, the antenna adds around 9 dB to the signal strength (so only 1dB less than what it was designed for), which is surprising considering it is made of scrap brass tubing, a couple of scrap pieces of pine and a lot of hot glue. Also the only sufficiently long piece of 50 ohm coaxial cable I could find in my scrap heap was RG-58, which I would not really consider ideal for the job. Like half of the stuff I do, this was first made as a prototype, which was to be refined later. But like always, this later never came and I was stuck with the prototype. And range wise, I've never run out of range with this thing. A simple extrapolation (with 5% packet loss) from the RSSI and range data of the telemetry would suggest a 6 km range at 100mW transmit power.

Monday, October 1, 2012

Transmitter v1

I had a receiver and I knew from testing it with my USB radio dongle, that it in fact worked. Now I needed a transmitter. So... you need two joysticks, a couple of buttons and that's it. Perhaps an LCD and a menu system later on for configuring and swapping models.

I was first considering using a ready made game controller, specifically one made for the Sony PlayStation. These were fairly cheap and readily available, and there were previous projects in which people had interfaced them with microcontrollers. I can't remember why I chose not to go with those. I guess it had to do with price.

I found thumb joysticks similar to those on the PlayStation controllers for a fairly cheap price on Sparkfun. They also provided the schematic symbol and the footprint of the component for CadSoft EAGLE, which made my work a lot easier. So I ordered a couple and made a couple of break-out boards for them (see schematic, layout). The 8 pin DIP in the board (misleadingly labeled IC1) is the 8 pin ribbon cable connector I was using.

The break-out boards are then to be connected to a digitizer board, which contained a microcontroller and would do the analog-to-digital conversion to read the position of the joysticks and would then communicate with the actual transmitter board via a serial link (see schematic, layout). Again, the 8 pin DIP parts in the board are the ribbon cable connectors.

I put the two joysticks and the digitizer in a plastic case, that was a nice size to hold in your hands.
The thumb joysticks use ribbon cables to connect to the digitizer, which in turn is connected to the PC via a RS232 serial link through a level shifter board I had made earlier (notice the bodge wire in the level shifter).
I guess I'm developing the digitizer software in this picture. Also, my bench is a mess.

Completed joystick and digitizer assembly on the dining room table, with some miscellaneous crap. 

The transmitter board itself was a bit more complicated, mostly because I wanted to add an extension port to it. I was planning on extending the two board design into a larger one, where I'd have an LCD and a menu system working on that. This never came to be, so most of the effort designing the more complex transmitter board was a waste (see schematic, layout). Both the transmitter and the digitizer use a 3.1V low-dropout regulator to be able to operate from a single lithium-polymer cell (and also because I happened to have a hundred of such regulators).
The transmitter board has just finished etching.
This picture was taken before removing the photoresist.
Top view of the transmitter board
Bottom view of the transmitter board
The software on the transmitter board basically does the following in an endless loop:
  1. Request a measurement from the digitizer board
  2. Wait a certain time for the digitizer board to respond
  3. Check integrity of received measurement
  4. Transmit packet to receiver over radio
  5. Wait a certain time for the receiver to respond over radio

It the digitizer doesn't respond within the window, a default (fail safe) control is sent. This is also the case, if the integrity of the measurement cannot be validated. I've actually never had the control fail due to problems with the transmitter, but the fail safe actions are still good to have there in place.

While the joysticks and digitizer did get a nice enclosure, the transmitter board wasn't so lucky. I ended up putting it inside an Orthex freezer container together with the battery I used to power the whole thing. Prior to operation, you'd have to put the box very close to your face (~1cm) to see if the green power LED was flashing inside the container. Any further away and the sun would prevent you from seeing the light. The whole process of using that transmitter was silly-looking.

And talking about silly, as I had never flown a model when I was designing all of this, I completely overlooked how important trimming the controls were. To set the trim on the left stick, you would move the stick so that control surfaces corresponded to your new zero, then you would tap the right stick. To trim the right stick, you would just do the same, but with sticks reversed. This effectively made it impossible to trim while in flight. I tried it a couple of times, and each time it ended badly. What I ended up doing, was I coarsely trimmed the plane on the ground, only eyeballing the control surface positions. In the air I would then just compensate. Even though I have proper trims on my current revision of the transmitter, I still tend to do this.

Probably the weirdest RC transmitter you've seen in a while.
Notice the strip of packing tape keeping the two halves together.
It turned out that the PlayStation thumb joysticks have a large dead zone and also their usable range is not to the very edge, which leaves them with quite a limited dynamic range, which I don't think is a very good thing for RC (especially multicopters). However, I did learn to fly my first plane (the Graupner Elektro Rookie) with this transmitter and it worked without any real problems. It might have been a bit easier to get a hang on things with a real transmitter, especially due to trimming the controls being very difficult.

The transmitter board and the digitizer board are still in use in my transmitter v1.5, which is what I use today. Basically I just changed the joysticks for something a bit nicer. I will write an article on that upgrade. However, I'm currently in the process of completely redesigning the transmitter to have support for an antenna tracker, a head tracker and most importantly: a ground-based OSD to my FPV video feed.