zondag 30 december 2012

Nokia LCD on Raspberry Pi GPIO


Using a Nokia PCD8544 LCD screen on a Raspberry Pi 

Old Nokia LCD screens, once used for playing snake, are now a great source for your DIY projects. They are widely available, cheap, graphical and easy to use thanks to all the PCD8544 libraries available on the Internet. PCD8544 is the name of the chip used to drive these displays.



Since this is a 3.3v display after all a 3.3V microcontroller (like the arduino mini and mini pro) or even the raspberry pi might be a better controller for this. These are the connections to use it with the library available from https://github.com/binerry/RaspberryPi/tree/master/libraries/c/PCD8544 . More instructions available at http://binerry.de/post/25787954149/pcd8544-library-for-raspberry-pi .
VDD => 3V3
SCK => GPIO0
SDIN => GPIO1
D/C => GPIO2
SCE => GPIO3
GND => GND
VOUT => x
RES => GPIO4
As long as you get these connections right there isn't much to worry about. Just double check that. On the below picture you can see how I got the small 1.5mm spaced connectors to something reasonable. You won't have to do this if you get a pcd8544 on a breakout board.


Now on a virgin raspbian wheezy image these are all the commands (in that sequence) you'll need to get the lcd working as a status screen. Open a terminal and ssh to your pi (ssh  with 0.0.0.0 matchin the ip of your pi). Default password for username pi is raspberry. Now from the shell execute these commands on your raspberry. You might have to hit ENTER when apt-get prompts for it.
sudo apt-get update
sudo apt-get install git-core
git clone git://git.drogon.net/wiringPi
Now you have the wiringPi library installed from https://projects.drogon.net/raspberry-pi/wiringpi/ Continue with the installation of the PCD8544 library. To simplify the compilation I also moved the sample into the current working directory. You can skip that but you'll need to check the paths in the cc command then.
wget https://github.com/downloads/binerry/RaspberryPi/Raspberry.Pi_PCD8544.Library.zip
unzip Raspberry.Pi_PCD8544.Library.zip 
mv ./samples/pcd8544_rpi.c ./
cc -o pcd8544_rpi pcd8544_rpi.c PCD8544.c  -L/usr/local/lib -lwiringPi
And at this point you'll have the pcd8544_rpi program compiled (if you didn't get any errors). Now to execute it run the following command. Again check your wires!
sudo ./pcd8544_rpi
You should get the following message on your terminal (and a working lcd screen) if all is OK.
Raspberry Pi PCD8544 sysinfo display
========================================
This is how it looks on the screen. Oh and don't mind the mess, once I moved in definitely all these wires will be running inside a wall hidden from human vision.




woensdag 26 december 2012

Turnigy 118B Needs a fix

Hit a real car some time ago and didn't find the time yet to repair this one. Had some great fun. Stock this is already a fast car.



If you'd like to get one of these this is the link for the Tunigy 118B product page on HobbyKing website. Don't mind the different shell. It has been updated since the introduction and I used another shell from ebay (check this blog for details).

Raspberry Pi power consumption

For everyone wondering what his raspberry pi might be consuming read this. You'll be happy to find out mine only measured 1,020W during boot with a raspbmc image on the sdcard. This is whit ethernet and hdmi connected, a real world usage example.



For comparing this is what my 24/7 intel atom based server takes with an SSD, no optical drive, no peripherals. I also added some other systems I had running here.

CPUMOBOPSUOSConsumption
AMD Athlon 64 X2 3200+AsRockATX 400WUbuntu Desktop80W
Intel Atom D525Intel D525MWATX 400WUbuntu Desktop40W
Intel Atom D525Intel D525MWITX 60WUbuntu Desktop19W
Intel Atom D525Intel D525MWITX 60WUbuntu Server16.5W

Edit


If someone is interested in more specific read outs please let me know and I'll see what I can do. 

maandag 24 december 2012

Copy files over ssh using scp command

Just a quick reminder on how to copy files from a remote location or vice versa over an ssh connection.
Copy files from your local computer to a remote server
scp somefile username@server:/home/username/
Copy files from a remote server to your local computer
scp username@server:/home/username/file_name /home/local-username/file-name
Original source: http://www.garron.me/linux/scp-linux-mac-command-windows-copy-files-over-ssh.html

zaterdag 8 december 2012

raspberry pi belkin n 300 wireless

Perform the following initial steps.
  • disconnect power from rpi
  • plug in belkin n 300 usb wifi adapter
  • power up rpi
Now check if the module is loaded with lsmod. This should show a 8192cu listing. With the latest raspbian image this driver is included. If not get the latest image or check where you can find a driver to compile yourself.

lsmod

Scan for available networks using iwlist. Write down the essid of the network you want to connect to.

iwlist scan

If using WPA encryption you'll have to generate the passphrase here with the following command. Replace the ESSID and the PASSWORD parameters. This will generate a hash that you'll need in the next step. 

wpa-passphrase [ESSID] [PASSWORD]

Edit the /etc/network/interfaces file for your network. 

sudo vi /etc/network/interfaces

And add the following content for a wpa protected network with dhcp:

auto wlan0
iface wlan0 inet dhcp
   wpa-ssid [ESSID]
   wpa-psk [PASSPHRASE]

Now you can restart your network interfaces with the following command. 

sudo /etc/init.d/networking restart

Now check if your network is live. Don't forget to unplug the cable if you configured all this over a wired connection :p.

All of this was tested with the latest raspbian image from http://www.raspberrypi.org/downloads and a brand new belkin N 300 wireless adapter. You can get a smaller belkin N 150 wireless adapter for the same price with only downside that the max speed of that smaller one is limited. However with 150Mbps it's still well over the 100Mbps your raspberry pi can handle anyway. The Belkin N 300 wireless adapter has a theoretical max speed of 300 Mbps.  

More information about wifi configuration on debian is available at http://wiki.debian.org/WiFi/HowToUse .

dinsdag 20 november 2012

Dropped Firebug in favor of Chrome

I'm probably way too late with this statement. But I didn't it and that's what counts. If you find yourself using Firebug all the time to get your javascripts debugged I can only suggest have a look at the Developer Console of Chrome (ctrl + shift + C). Simply better.

Simple functions like "pretty print" and true "variable inspection" make this Chrome implementation a far better option.

maandag 19 november 2012

Devoxx 2012

This year was a completely new experience for me. I've been visiting devoxx (and javapolis before) since I was a student. I know I skipped one year since then and that's probably it. Most of the t-shirts I still have. Some are gone though (too bad).

This year however I was on the other side. I was able to work along with the devoxx team! I'll get back to this post soon with more information of what I really did and how I experienced that. Need to recover first.

I've seen a lot of javascripting and javaFX and android this year. The cloud was less present (didn't mind either). Again a lot of interesting topics and speakers. Cool to see the NAO robots in action. Also attended the BOF about these nice little robots. Looks like the hardware is all set up, just need a lot more programmers now to put these nice things to work.

Talking about robotics and the future track of Devoxx. My ArduPilot session got a lot of attention. The BOF room was completely full and I didn't see much people leaving during the talk either. I had a flight instructor on the front row. Great to have some interaction and to be challenged! Too bad my demo failed at the end. I had everything with me twice so I could always use the backup instead. However I ran out of time before I realized my gear was not working and I needed the backup.

The NFC/Arduino/Raspberry PI/NodeJS project was also a success. We handled over 10k votes with this system. Still a few bugs to fix for Devoxx 2013. We're on it!


woensdag 31 oktober 2012

Spam you get as an Android Developer


The kind of spam you get as an Android developer is changing. It used to be those kind of messages asking to either deploy your application on their app store. Or to inform you about their ad campaigns that would get you so much more CPM.

Just ignoring most of these messages. This one I didn't want to hide from you. Sure I removed the personal details first!


Hey there!

I was just looking through some of your Android apps and was curious…Have you ever thought about selling the ownership of one of them?

Most developers don’t even know that there is a second market for apps (i.e. a market for mobile app acquisitions). Even crazier, this strategy will actually make you more money in most cases than keeping your app up in the Play Store.

Sorry for not introducing myself (admittedly I got over excited). This is Gerry from ******* (I run our acquisitions department). We broker mobile app acquisitions for Android and iOS developers.

Over the last 3 days alone we have made developers over $40,000.

Either way, I think it would be awesome to continue the conversation. Or at the very least answer any questions you had.

I’d love to make you some more money. I am here to help however I can.

Best,

Gerry

vrijdag 26 oktober 2012

Back to JavaScripting as a Java Developer

Rich clients were hot. They still are but the attention is drifting from anything rich client to just javascripting. The JS frameworks are literally popping up overywhere.

Before getting into these frameworks like jQuery, backbone, angularJS, ... or the even aging prototype you should really look into the basics of javascripting. A lot of Java developer are forced back in the Javascripting world. These are some articles to get you going again. 

https://developer.mozilla.org/en-US/docs/JavaScript/Introduction_to_Object-Oriented_JavaScript

http://arstechnica.com/information-technology/2007/08/javascript-for-all-ages/

vrijdag 12 oktober 2012

Running NodeJS on Raspberry PI

I'm curious how this blog post will show up in my traffic overviews. Should be fine with both nodeJS and Raspberry PI in the title :P

Anyway for a top secret project I needed to find out if it's possible to run these nodeJS applications on a Raspberry PI. This is what I found:


(really, I'm not even linking to my own content on this post :P)

woensdag 10 oktober 2012

svn missing on mac os x mountain lion

Check this post if you're looking for your svn command line after updating to mac os X 10.8 mountain lion. It's no longer included. You'll need to download the developer tools to get it back.

http://blog.grapii.com/2012/08/svn-missing-in-mac-os-x-10-8-mountain-lion/

vrijdag 10 augustus 2012

My first FPV experience

I had my first FPV experience some days ago. Since then I didn't find the time to go up again but I really loved it (despite the few mishaps).

All the information about my gear can be found at: http://redmine.hcpl.be/projects/fpv/wiki .

As usual darkness was my worst enemy. It was late and getting dark. I had no spotter so I switched from goggles to los all the time. When I had the goggles on I could hear the plane going towards me or away from me. That gave me some idea of the actual position.

I really need an OSD or at least height feedback from my telemetry system. It's way too hard to tell height from picture only.

Also I was too busy and too excited to really pay attention to what was in the picture. I had no time to think of my location.

I should have taken a spotter with me. At some point I didn't hear the plane anymore so I got worried and took off the goggles. I couldn't find the plane though. So I worried even more and was thinking if I should put the goggles on again to have at least some idea of what I was doing. After all the video was still crystal clear. After a few seconds I suddenly spotted my plane way too far away. It was dark also so it was very hard to tell orientation. I leveled out and took back some throttle. Hoping it was flying towards me. I didn't dare to bank too much to find out orientation since I was afraid to correct in the wrong direction causing a crash. Luckily for me I was coming back home.

All that way I had perfect picture. All thanks to the circularly polarized antenna's I made based on the threads on http://www.rcgroups.com . Mine weren't perfect at all so it's true that they perform really wel. I really was far away already. At least 500m. I still had my receiver mounted on my goggles so I could even improve that range by only mounting the VRX on a higher point.

For all this I was using my MS Composit Swift II flying wing. A great speed/glide envelope and even good duration on only 1000mah lipo's. However all the standard FPV equipment added a lot of weight to the airframe. I had to keep up the speed in order to stay up. I'll be looking for a much lighter setup for sure. All the fun was gone by adding this weight.

That, a spotter and the OSD are the next steps to improve my FPV experience.


woensdag 27 juni 2012

Simple arduino powered hexapod

Motivation

I needed a simple robotic platform for an Arduino DOJO workshop organised by BeJug. I started out with a quadpod (8 to 12 servo's) because I didn't want the complexity of a hexapod (18+ servo's). Once completed I started working on gathering information on the walking routine for the 8 servo powered quadpod.

It didn't take long to discover the much simpler (3 servo's only!) hexapod tripod configuration at pololu.com. Everything that follows is inspired on this simple hexabot from pololu.com.

Concept

I have 2 versions of this bot. If you really want to keep it simple and cheap you can go for the micro version using 3.5g servo's. Options on that one are limited though because of the minimal weight it can carry.

If you want to experiment with more sensors I would go for the bigger 9g servo's. It's basically the same but using bigger servo's. If you want to carry more load you'll also nee stronger steel wire.

Parts List 

  • 1x Arduino pro mini (the brains)
  • 3x 3.5g servo (the muscles)
  • 1x 3.3v bec OR 5v bec (OR none if you use a life or 1s lipo instead)
  • 1x small 1-2s lipo of around 300mAh (OR life OR any other type of battery)

Construction

For instructions on how to combine all the parts from the parts list you should visit the original website at http://www.pololu.com/docs/0J42/3. All I did was change the brain by an arduino mini pro.

So you can skip step 1 and 2 from that tutorial. Instead I made a small pcb with a common power rail (+ and -) with 3x 3 pin headers to connect the servo's to. The signal wires from the servo's (often white wire) go directly to the corresponding arduino pins. In my case pins 10, 11 and 12 (change these pins in the sketch if you use different ones).

The servo's are glued together using hot glue. Once together I glued them on the pcb with the arduino pro mini in front of the middle legs, center servo. This way I have the complete pcb underneath the center legs so I can attach the battery on the bottom of that plate at the middle of the spider. This thing needs to be balanced and the biggest weight we have is the lipo.

Once the legs are attached you're good to go. Make sure not to force the servo's. Use the sketch instead to center servo's before putting the arms on with the legs. Make sure the legs are all the same length. Play with the position of the battery to balance everything.

Programming

You can use the Servo library for controlling Servo's. All you need is to define a Servo object, call the servo.attach(int pin) method in the setup method and in the loop you can add the routine. You can set a servo to any degree from 0 to 180. 90 degrees would be a centered servo. You won't need the full range of the servo for this bot. The actual range should be tweaked to get a nice walk with your setup. 

The walking pattern is called the "tripod gait". Google it for more information and movies. 

The center legs are used to switch the balance point so that the pod is lifting all legs on one side (hence standing on 3 legs). The lifted legs can then be moved forward while the standing legs can be moved backwards to push the spider forwards. 

Next step is to switch weight again so that the other legs are in the air. Then again forward with the legs up high and backwards with the legs on the ground. 

Repeat this and the bot will be moving forward. You'll have to add some delay between the 2 positions of the walking routine. 200ms worked fine for me. If you want to watch the bot in slow motion you can increase this delay. Might be useful for debugging.

Backwards walking is the same routine in reverse. Turning is done by moving the legs the same way.

Improvements



  • better steel wire (lhs)
  • try on a single cell 
  • glue steel wire underneath the servo horns
  • legs better cut and formed to equal size
  • tweak amount of servo travel! 

Other Goals

Since this is such a small and cheap platform I'll look into the options to let a set of these communicate. For communication I could use infrared leds. These are ment to use indoors so GPS is out of the picture for positioning. Instead I'll have to find out a relative positioning system. 

More to come.

woensdag 2 mei 2012

Lesson learned, secure lipo

Just lost a lipo in flight. Lucky me this happened on my wing so it just came down very smooth with no damage at all to the foam. The only damage reported is a lost lipo and one of the esc wires being cut.


I was afraid that I lost more since I saw white pieces flying around on the moment I lost control. Since I don't have any foam damage I'm thinking this could be the lipo pack going through the propeller, being cut in pieces so that what  I saw were in fact the separate cells lit up by the sun. The more I think of this theory the more I believe it. After all these pieces came down faster than the wing itself so they must have been heavier. 

I wasn't able to find any of them so I can't say for sure. New battery is on the way. I'll look into a better securing system. I had it squeezed into the foam slot only. Should have at least added some velcro. 


dinsdag 1 mei 2012

My tips for beginner RC pilots

Now that I'm able to keep my planes up I look back at how I started flying and I have the following tips:

Start with a cheap foam scratch build

This way you don't have to worry too much if you break something and you can easily fix it. I personally preferred my Blu Baby (check rcgroups.com) above the Multiplex Easy Star.

3 channel first, more channels later

Don't try an aileron plane from the beginning. It will only make things harder to grasp. A good starter plane has only the tail (elevator & rudder) and gas to control. Also a high wing trainer with dihedral is preferred. Keep these nice looking warbirds for later.

A good second plane would be a wing. Simply because of it's great flight characteristics, both slow and speedy. Only third plane should be some scale or more advantage airframe.

Throttle management for altitude

One of the first big lessons for me was that I wasn't supposed to use the elevator for altitude control. Instead I had to try and keep the plane as level as possible with the elevator and only use throttle management to control altitude.

If you give more power your plane is flying faster so more wind is going over the wings creating more lift. Hence altitude increases.

Elevator however only changes the attitude of your plane. How much it's pointing up or down. For low speed you might want to have it a bit more up.

Fly into the wind, air speed != ground speed

Also a great lesson here. It's not how fast you move relative to the ground that is important for the lift and altitude of your plane. Imagine a windy day. If you fly into the wind the wind is causing more airflow over the wing thus more lift on the same ground speed without wind.

This is a big advantage since you can fly a lot slower now with that same airplane. In fact the day I grasped the complete concept of the throttle for altitude was on a very windy day. I would advice people to begin on a somewhat windy day. Not a stormy day, you'll have to know how much wind your plane can handle. it should still be able to fly forward.

Practice slow flight

Once you can keep your plane up it's time to think about landing. For this you need to know the slow flight characteristics of your airplane. Practice on high altitude so you have time to recover.


Decathlon equipped with frsky telemetry

You've probably seen the Graupner Bellanca before. It turns out the be a great testbed for my frsky telemetry projects. Here is how I have the GPS, VARIO and RPM sensor up on the front together with the frsky sensor hub on the dashboard.


zaterdag 14 april 2012

Android classdefnotfound exception

If you use external libraries in your Android project and you recently got the ADT 17 release you probably ran into java.lang.ClassDefNotFound exceptions.

For some reason the classpath options have changed. I missed on that but did find out the hard way. This is a good resource with all the options for managing external libraries in your android projects:

http://tools.android.com/recent/dealingwithdependenciesinandroidprojects

vrijdag 30 maart 2012

resolve ip of samba share on mac os x

Before OS X Lion you would 've used the nmblookup command. This however was removed from OS X Lion and replaced by the following command (with mybookworld being the samba share):

smbutil lookup mybookworld

Configure gmail for Redmine on ubuntu

This guide will help you configure Redmin for use with gmail when running on ubuntu 11.10. First follow the Redmine installation guide for ubuntu. For Ubuntu 11.10 use the first URL. For other installations check the second URL.

http://finiteline.homeip.net/index.php/programming/70-ruby/100-redmine-on-ubuntu-11-10
http://www.redmine.org/projects/redmine/wiki/HowTos .

Don't forget to use the optimalisation settings. If you do so you can also set the environment file you'll need later on. To edit the configuration of your Redmine installation on apache web server run:


sudo vi /etc/apache2/sites-available/default


I didn't get the Passenger optimalisation properties to work since I didn't follow the guide for ubuntu 11.10 installation.

Then we need to configure Redmine to use your gmail account. For this will have to install an .rb file in the lib directory. Install curl to get the file using:

sudo apt-get install curl

Next navigate to the lib directory of your Redmine installation, default location is /usr/share/redmine and there fetch the script. Copy the URL to the raw file from https://gist.github.com/44466 to use instead of URL_TO_RAW_FILE in the following command:

cd /usr/share/redmine/lib
sudo curl URL_TO_RAW_FILE
sudo mv 44466 smtp_tls.rb


Update production.rb file (or whatever environment you're on) for use with gmail. This file is located at /usr/share/redmine/config/environments/production.rb . This is where we point to this new file in the lib directory.


...

# No email in production log
config.action_mailer.logger = nil

# TLS for Gmail SMTP
require 'smtp_tls'



Finally update the email.yml file to match your gmail settings. For me this file was located at /etc/redmine/default/email.yml and this was the required content:


production:
  delivery_method: :smtp
  smtp_settings:
    address: smtp.gmail.com
    port: 587
    domain: gmail.com
    authentication: :login
    user_name: XXXX@gmail.com
    password: XXXXXXXX


Now you're ready to restart Redmine for the changes to take effect

sudo /etc/init.d/apache2 restart

If you're done with that you can go to your Redmine installation using your browser. Login with an admin account and go to Administration > Settings selecting the tab Email notifications. This is where you can configure what you want to use the notifications for. At the bottom there is also a link to send a test e-mail.

So you' re done. The resources I used:

http://www.redmine.org/boards/2/topics/3399
http://blog.expandrive.com/2008/12/04/redminerails-email-through-gmail-smtp/comment-page-1/
https://gist.github.com/44466


woensdag 22 februari 2012

Setup subversion in 4 simple steps

Great tutorial on how to setup subversion on your server I just found: http://www.tonyspencer.com/2007/03/02/setup-a-subversion-server-in-4-minutes/

Needed this after hacking into my mybookworld, a network interfaced hard disc. Subversion is now happily running on it (next to transmission :-)).

These are the steps just in case the source gets lost in the universe of The Internet:

1. Create a Repository

svnadmin create /svnrepos

2. Create a SVN User

vi /svnrepos/conf/svnserve.conf

In that file add these three lines:

anon-access = none
auth-access = write
password-db = passwd

Create a password file:

vi /svnrepos/conf/passwd

In that file add a line for your user:

# add users in the format : user = password
tony = mypassword

3. Import Your Project

(assuming you’ve put your project files in /projects/myrailsproject)

svn import /projects/myrailsproject file:///svnrepos/myrailsproject

4. Start the SVN Server as Daemon

svnserve -d

Done! You should now have a svn server running with one project named myrailsproject.

Try checking it out of the repository:

svn co svn://192.168.0.2/svnrepos/myyrailsproject

Since we set anon-access to none you should be prompted for username and password which you created in the file /svnrepos/conf/passwd.

maandag 20 februari 2012

All you need to know about servo's

Another great article I just discovered on the Model Airplane News rss feed. It's a very thorough posting on do's and dont's for servo's. Really all you should now.

TOTAL CONTROL: The Right Way to Set Up Servos

20 things every pilot needs to know

Just discovered this article on the Model Airplane News RSS feed. A very fun overview of things all modelers should know. In fact most of them reminded me of a crash I had in the beginning learning me in fact that I should check next time :).

20 Things Every Pilot Needs to know

donderdag 2 februari 2012

Hobbyking not returning shipping costs

For some maybe not surprising at all. I never had any real issues with hobbyking... Until recently.

A small package, the accu-cel 6 for those familiar with te hobbyking products, hadn't arrived after a month. I checked orderstatus online and noticed the product descriptions used a strikethrough font and in the comments for order status was written: "PARCEL RETURN REASON: Incorrect Address****".



Strange since my shipping address hadn't changed and I received just over 60 orders without issues. Also I always pick the same shipping method so that I know for sure my local postmen gets the package to my door. At least he knows my name.

Anyway I contacted the online chat support service to get my money back. The order messages section also displayed "Requires Bonus Point Adjustment". They probably wait for you to actually contact them before returning any bonus points... sneaky.

First contact went smooth. They returned my product cost but didn't want to return the shipping costs. So I explained it must have been an error at their site since the shipping address hadn't changed. She checked my address and I confirmed it was correct. She promised to verify this and get back to me.

Never got back to me (what a surprise) so I got back to them. Second chat was much shorter. They couldn't return the shipping costs to me. So I guess I must be lucky this was only a small package then? I'll think twice now ordering larger packages where shipping costs can be equal or even higher than actual product price.

dinsdag 3 januari 2012

Turnigy 9x Frsky telemetry Android diy

This post will have all the information needed to get the Frsky telemetry data tx module mounted on your Turnigy 9x transmitter (backorder it or you may never receive one!!) and data displayed on your Android device. I'm still waiting for some parts so I can't post all information yet. Get back this post if you need all the info.

Prepare Turnigy 9x for module removal (without soldering)

First step is to get this module on your Turnigy 9x and confirm the normal radio functions are still live once done. I got all the needed information from this topic on rcgroups. The biggest issue is that you need to cut the original antenna since Turnigy didn't respect the modular system. Luckily only this is the only issue.

Some pictures from that thread. What this person did was unsolder the wire on the module so you can take wire through existing holes out of the transmitter and remove antenna. If you want to reuse the turnigy module or want to keep it as a backup you'll then have to solder the antenna again to the module. This soldering isn't easy!!



I checked the size of the soldering to be done and decided I wouldn't take that risk (not with my skills). So I created a bigger opening next to each opening for the wire. For the antenna to pass through you need a 9mm hole. Be very careful not to damage the antenna!! I protected the antenna with some duct tape first. Better safe than sorry.

You need to create this opening in the back board and in the back plate of the module. For mounting I also created a hole in the front (sticker) of the module to put the new antenna on. Once you have a 9mm opening next to the smaller holes you can connect these and so the antenna and wire are free to go through.

Some pictures of the process:


This is how the antenna looks once you have the screw on the antenna bracket and inside the casing undone. The 2 black plastic parts need to be removed and then you can get the antenna through without touching the wire.


The 2 black pieces on the bottom of the antenna that had to be cut to let wire through.


Now the antenna is free to go through the antenna foot of the casing. You can see I also had to cut a bit of the plate on the casing where the antenna foot screw was attached to. It can still be used, it's just a bit shorter now. 


This is how the antenna wire comes through the back pcb. On the back this pcb is painted darker (black) and you can see some tracks on the borders. Stay away from these tracks.


By simply cutting a 9mm hole next to the smaller antenna hole and then matching these you can get the antenna in one piece through this pcb also. When cutting the pcb you have to be very careful not to touch the antenna wire! I had the antenna wire wrapped in some tape and used a dremel tool to get the 9mm hole cut out.

The same 9mm hole was made in the module casing in the back. The transmitter casing already had a hole that lets the antenna pass. Here you can see the protective tape. 


The final assembly. I hot glued the antenna in place.

Swap Turnigy 9x module for the Frsky DJT module

Now you're ready to plug in the frsky DJT module. In fact all you need to do is swap the module on the back. Make sure you ordered the DJT and not the DFT module. The DJT module is for JR type connections (like the turnigy 9x) while the DFT is for Futaba & Hitec type connections. Hobbyking has some errors in the names of their products. Check these links to make sure you have the right one.

On top the original turnigy 9x module (modified to get it apart)
At the bottom the new frsky module with the standard antenna mounted
on the side the longer frsky antenna for extended range

It should be just a matter of swapping the modules around. Test your connections though since I had some issues with mine. On my Turnigy 9x the PPM pin (the top pin) is a bit shorter and was not connecting well on the frsky module. Bad thing is that you don't get any real feedback from this issue. The longer power pins are still in place and connections with receiver is OK. The only thing missing is the PPM value... so no servo's or throttle will react!? I could easily have the pins disconnect by just shaking my transmitter!!

The top PPM signal pin is shorter than the other pins!

I read about other people having issues with their original module because of the pins on the tx casing side being pushed back. Mine were strongly in place on the tx though. So next I opened up the frsky module and tested again with the module cover taken away and I noticed the pcb in the module was pushed back! Fixing this with some hot glue to keep the pcb in place was my solution. In the end this turned out to be a QC issue. The pin was just pushed back on the soldering so I could easily fix this by heating op solderjoint and pushing from the other side back out.

The white piece accepts the pins. I dropped some hot glue above and underneath that connector on the pcb agains the wall of the housing. This way it can't come up anymore.

Now let's hope I never loose control up in the air. Or even worse on takeoff or landing. Once up I could probably still realize that the module got out and just push it back in. But on critical moments I'll definitely crash my plane!

Add bluetooth to Frsky DJT module

Next we want a wireless communication set up between our android device and the Frsky DJT telemetry system. For this we will use bluetooth since it's so cheap and easy to use. Some people were concerned that the 2.4Ghz of the bluetooth would interfere with the frsky signal. I didn't notice any issues for normal flying. Can 't say what it does in longer range situations like FPV. No need to worry until you get an early bad signal feedback from your module. At that point you can always start testing with a wired connection between your android device (usb serial) and the module.

All the information you need to connect these elements is available here. You basically want to connect the power and ground on that bluetooth board and have tx connected to rx and vice versa. Make sure to check voltage on pin and what voltage your bluetooth connector accepts.

This is a picture from the module used in the project linked on top. It should work without any modifications directly to the pins on the frsky module. At least that is what I understand from the documentation.

I used a cheaper bluetooth module from goodluckbuy. More information on the bluetooth module I used (from goodluckbuy.com). Besides the normal settings update I also had to add a serial inverter in line. Otherwise I got a bad signal that the android dash couldn't parse any data. To fix this easiest solution is to add the inverter from frsky. Known as the fdl-lite or the upgrade cable lite.

A picture of the inverter from the product page

The connection between the two

The extra inverter board wrapped in black shrink and glued to the BT module.

Check android bluetooth post on this blog how to update the baud rate using AT commands. Mine came with 9600 set by default which is just fine for the frsky project. These are the settings you're after (from frsky documentation):

Serial COM RS232 level, setting: 9600bps, 8bit, No parity, 1 stopping bit.

If you check the output by connecting your android using BlueTerm app and you see strange characters you probably have the baud rate set wrong.


Connect your Android Device 

This step is easier than you could ever imagine. An apk is already written and available. Project information is available from this frsky android dashboard project website.

Some screenshots:


For now the application is only listing the analog voltages and signal strength. You can also set the alarms using this app. But I didn't see any support for the sensor hub yet. Project looks very active still so I expect it to be available some day. I already contacted them to see if I can contribute my code I'm going to write for this.

I've been working together with the creator of this app to get the sensor hub information on the screen as well. We have all sensors translated properly and a basic visualisation. Next step is to create some better visuals for this data and implement all the nice extra's. Keep an eye on the project website if you're interested!

The Android application has many features you can implement. Think of gps position of both plane and Android device on transmitter on map and calculation of distance between them. Graphical and audible information about altitude. Logging of data to sd card in any format. And so on. You could even use twitter to fool around (no real use for that yet but you never know). Keep subscribed to see what can be done!

zondag 1 januari 2012

Turnigy 9x Telemetry options

I've been looking around for a good and yet affordable telemetry solution. I have some trouble estimating the actual speed of my plane to prevent a stall. With a good telemetry system I could just read that from a display. So for me most important module besides voltage is gps providing speed & altitude.

I started looking at the existing systems available as for today. I really like my Turnigy 9x and have modified it already to match my needs. So I would like to keep that. These are some options available as is.

Frsky Telemetry with display

The Frsky DHT-U telemetry system looks very promising. It has many sensors available already and is in fact a complete 2 way system. So you could just swap your current tx/rx system for this one. If you want speed and altitude just like me you'll need at least this set up:





* If you already have a Frsky DJT 2 way module (or DF module for futaba) you could always get the FLD-02 display instead.

** GPS isn't the cheapest sensor anyway. Many other sensors are available for less, think of barometer (altitude) for 10 USD, temp for 4 USD, etc. For some reason the gps didn't provide altitude information!! Well after checking the official frsky protocol information it seems to be sending this information back to transmitter but it doesn't show on the display. So for altitude you'll need the barometer anyway or you'll have to wait for a firmware fix.

Quanum Telemetry

For those who only want the voltage information with optional temp and amp draw there is a cheaper telemetry system available from quanum (hobbyking). It doesn't include a 2 way transmission so it only works as a surplus on your current transmitter system. If you look around for a buddy code you can get this one for around 45 USD. Please note that by default this system only provides voltage display. To get temp and amp draw you need to extra module. The V2 receiver is ready for the 2 extra signals (the kit just doesn't come with the sensors).



Its limited to these 3 readings (voltage/amp/temp) but if you only buy the rx/tx kit you still have 2 spare channels. With some knowledge of electronics you might be able to update this system by using your own sensors on these spare channels.

Custom Frsky Telemetry Project

If you do intend to have your own sensor data transmitted or you already have another method in mind to display the transmitted data and you're not afraid of some work the Frsky system has many more valid options.

You could always buy the original DJT module (for JR modules like the Turnigy 9x, for futaba choose the DF module instead) and a 2 way receiver  or get the combo pack right away. You're then free to transmit any data you want and use any display available.

I personally would prefer a DJT module (backordered one already) and a gps via sensor hub in the plane. Than I'll add a proper bluetooth connection to my receiver to display everything on my android. This way I can display the data however I prefer. Once I received my DJT module and get something working I'll prepare some information on this blog.

External Links

For those wondering how to replace the existing Turnigy module with a valid JR module.
Some (French, translate if needed with google) information on the Quanum system.
Great (Dutch) project info for custom sensors on the quanum system.
Frsky telemetry hub & sensors topic on rcgroups.
BMP085 barometer sensor information

IR tag RC combat project

Update: All information available at http://redmine.hcpl.be/projects/tag-combat/wiki

One of these projects I always wanted to get started on and it looks like I finally did. Imagine those laser games where you can shoot each other, much like paintball but without the paint and balls (ouch!). Well these systems use lasers or infrared signals. That's what I'm going to make for my RC combat planes to have some fun with friends.

IR is all around us. Best example is the remote control of your tv. In the television an IR receiver is watching for signals at a specific frequency. Using modulation we can send encoded information. The remote control has an IR led that sends the desired command. Remote controls want a wide range so you don't have to really point the remote towards your television.

For our IR tagging combat system we do want a more bundled beam so we can use it like a gun and need to point our airplanes towards each other to register a hit. The signal can have information like who is performing the hit and much more commands. For now we'll keep things simple (KISS).

The idea is to have an arduino with up front an IR led with a lens to bundle the beam. Much like a flashlight works. Those cheap small keychain led flashlights might be a good source for the IR led housing and lens. In the back an IR receiver is watching for incoming hits.



A buzzer can be added to make some noise on impact and on shooting. More important is to have some bright leds we can see from the ground indicating the hits we took so far. For instance 6 red leds that indicate the number of hits taken.

So far nothing too hard to get this working. A good lens and range will probably be the hardest to find out. I already found a tutorial on ibm developerworks for an arduino laser tag game having some nice ideas and working code. You might need to register for a free account in order to view the article. It's 3 parts long, working code example can be downloaded from part 3 resources.

It's inspired by some classic computer game and has some basic rules. Each player has 6 safe shots. If you fire more than 6 times the chance to self destruction increases by each shot. What I don't really need so far is the referee option. In a first iteration of this project I'll bundling all this into an easy to handle brick to add to your plane. I'll probably be using the arduino pro mini to keep things small. I'll be adding a series of leds to indicate the amount of shots taken.

Another iteration of this project could have the throttle channel as input and on impact make throttle stutter or stop for a few seconds. Since we are up in the air we don't want to stop throttle for too long. On heli's and multirotors throttle cut is no option, maybe you could make the craft circle around a few times.

As far as I can see the only commercially available product like this comes from HobbyZone: The sonic combat module HBZ4020. If I don't get any good results with the IR beams I'll be using I might still get one of these and intercept the signal with an arduino. Only the IR part will then be replaced by this system (not sure if it's even IR). The nice thing about making it yourself is off course the fun but also being able to make your own rules. As longs as every player uses the same code and parameters this is a fair game.