dinsdag 22 november 2011

Arduino Android bluetooth connection

Where to buy a serial Bluetooth module

Back in the pre Android 1.6 days we had to mod our android phones to get them communicating with the great Arduino platform. You had to root it and if you were lucky someone already compiled a serial output enabled rom for your device. Otherwise you even had to get into ROM building, find the right drivers and so on. And it didn't stop there since you still had to get the serial connection out of that micro USB port. Sparkfun used to sell (maybe they still do?) great breakout boards for that.

Today we have android 1.6 with bluetooth support and many bluetooth adapters available for the Arduino platform. You can buy yourself a nice bluetooth shield that you can just pop on or a much cheaper bluetooth serial adapter so you could connect the TX and RX channels yourself. That last option is what I'm going to explain now.

You'll need to get yourself a bluetooth to serial adapter that is reported to work with the Arduino platform. They run very cheap from china (check ebay or goodluckbuy.com).



Setting up your serial bluetooth module

You probably want to update the settings of the module. By default it comes with a pin 1234, named Linvor and on baud rate 9600. Follow these steps to update these settings.
  1. Before connecting this BT adapter you'll have to set the desired baud rate using a FTDI programmer or this CP2102 based USB to serial connector. It's the same thing you would use to program a Arduino mini pro for instance. You can also use an Arduino board with USB for this like the Uno or Duemilanove. Connect the USB VCC and GND wires with the corresponding BT VCC and GND. For TX and RX you need to switch the channels between BT and USB.
  2. Now use your favorite serial port terminal to connect to (FTDI) USB. The AT commands must be copy and pasted to send to the device because it constantly polls and if you can't type fast enough to complete a command before it reads it in.
  3. Send the "AT" command. BT responds with "OK"
  4. Send "AT+NAMENameYouWant" to change the default from Linvor.
  5. Send "AT+BAUD8" to change the Baud rate to 115200. Default baud rate is 9600. For android applications like the amarino project and multiwii tool baud rate has to be set to 115200 instead. The AT+BAUDx command accepts x from 1 to 8 representing baud rates from 1200 to 115200.
Serial Bluetooth module project ideas

Once we have that connection you can either communicate from a computer with bluetooth or from your Android device. For the last option a project is available making it all very easy, almost plug and play (with plug since it's wireless :-)). Check all the details of the Amarino project here.

Another great option is to use it together with the Android MultiWiiCopter Controller App so you can fetch live data from your flying multiwiicopter!

Tips

Some things to remember when working with your Arduino:
  • You'll have to undo the RX and TX connection of the BT adapter when programming your arduino over USB. Otherwise you get errors and programming will eventually fail.
  • Not all BT adapters work with Arduino, the cheapest one I could find is listed above. Google before buying something else.
  • You can program other Arduino's or the BT adapter using your Arduino UNO. Check previous posts on this blog on how to do this.
  • You can also update the pin using the AT commands: execute AT+PINabcd with abcd being the new pincode you want.
  • In OS X you can use the screen command to get a serial connection. Check this tutorial on how to get a serial emulator set up on OS X.
External resources

More information (use google translate) about this cheap bluetooth to serial adapter: http://item.taobao.com/item.htm?id=9812432239
Another page with all the info you need for this module: http://www.dwengo.org/bluetooth.

Hobbyking 1/18 4WD stadium truck review

After running the HobbyKing 1/18 4WD brushless stadium truck for several weeks I can finally write you a review.

I'll start with my conclusion: It's a fun and fast little car with some weaknesses. As long as you know the weaknesses and aren't afraid to fix them with some DIY work it's great value for money!


This is a picture of how it arrived within a week from the European warehouse:


I never liked that truck canopy so one of the first mods I had to do was getting a new buggy shell on it. This is how it looks now:


Note that it's on its favorite environment. I'm running it pretty much standard with a zippy flightmax 2200mah 2s lipo. This lipo is about the maximum you can get into this little car. It just clears the main gearbox. I'm no longer using the standard lipo retainer so I can't tell if that fits or not. I just happen to have a lot of these standard batteries for several other applications.

Some are reporting that it works very well on 3s also without updating any other parts. I wouldn't run it that hot. Simply because it's already plenty fast on the standard 2s system. Even on 2s at full throttle it gets hard to control this little car. And going to 3s will increase lipo size so you'll have to trade some run time.

It came in a box all built and ready to run. It wasn't really ready though since the steering servo was badly centered needing a full trim to run (almost) straight. Changing that servo requires a lot of rebuilding. But this could be solved.

The little car is very cheap. The cheapest Tamiya TT-01 will cost you at least twice, maybe tripple the price of this little wonder (with brushed electronics that is). But you can't compare the build quality either. All the Tamiya parts are very rough and can take a beating. This stadium truck has weak plastic parts that bend (= slop) and break easily. I bought replacement parts once but when these broke again I started making my parts from wood myself instead. Works well until now.

The dogbones get lost easily. The cups aren't strong enough so if you get a bit rough on the ride it can happen that a dogbone just pops out. I don't have to say it's quite difficult to find these... Buy a set of spares right away! Once mounted make sure to use some shrink wrap to secure them in place. I shrink protected mine after I lost them for the first time and never lost any dogbone from that point. Great mod tip! A picture that shows the difference:


If you hit anything that will probably be with the front. I don't expect you to run very hard backwards into things (it could if you wanted to). So the front pieces are the most vulnerable. I had the steering bracket break, the front shocks bent and even the front shock towers cracked over. As you can see all these parts are very cheap. Get some right away!

Somethings strange I discovered is the esc lacking a break function? It does have a reverse function but in between it just spins out, no real breaking like the Tamiya TT-01 standard ESC will do for instance.

I like that it has plenty of power (brushless) and even ball bearings from the factory. For being such a small car it has enough ground clearance also. The weakness obviously is in the poor plastic quality. Once you get over that it's a great, little, fun & fast car. If you're on a budget and serious about this hobby I would still go for a decent TT-01 chassis instead. Except for the bathtub design this little car has nothing in common with the great TT-01 chassis.

zondag 20 november 2011

Devoxx 2011

HTML5 was already very present at Devoxx this year. As was the Android duo Chet Haase and Romain Guy. Also a lot sessions about the cloud. Maybe even too much to my liking. First time I noticed people were talking that clearly weren't used to these kind of conventions. Think of smaller projects and beta's (jhome) and even just bloggers (diabolical dev, recode.nl). Something different than all the big names.

The home automation sessions were really crowded!!



donderdag 3 november 2011

Tamiya tt-01 Rally Conversion

Who doesn't love the basic, cheap and heavy duty Tamiya TT-01 chassis? Or any of the newer alternatives like the E, R, S and D versions. Not only is it very cheap and robust it also has an amazing list of hop-ups and bodies available.



My own TT-01 Rally Mod


This is a Tamiya TT-01 (E) rally mod using only stock parts. I tried to limit cutting into pieces as much as possible. Only the reinforcements on the cups were compromised.

The basic idea is to extend ride height. You'll notice that you can lower the arms as long as you have the bumpers connected. You can either cut the bodem plates so that the arms have more room or you can simply remove the bumpers. Best option is to make some new bumpers when you create a protective (plexi?) bodem plate.


To lower the wheels you need to change the mounting point of the shocks. You can create some adapter to be mounted on the shock towers, you can get yourself longer shocks or you can find a mounting point on the existing towers. I ended up tie wrapping mine in place just below the shock towers. Not ideal but working so far and very cheap.



And finally you'll notice that now the cups on the back are striking against the arms while driving. The cups have some reinforcment knobs on top. You can sand them off using a dremel tool. That's the only cutting I couldn't avoid so far.


Don't forget the rally block tires! These do provide better traction but you'll also have more dirt flying around (and in your car). The internals of you car are already pretty well protected. If you want to keep all dirt out of it you can always create an inner shell.

Other Resources for tt-01 Rally conversion


A great idea I found on the web is people modding their TT-01 for rally use. This is basically what you'll need to do to get the desired ground clearance. I'll list them with a clear picture.

1) Mod low bumper holders (front and read) by removing some material so the A-arms get more travel.



2) replace the stock shocks with slightly larger, adjustable and oil filled shocks. These are available on ebay for around 25 EUR.


3) Make an inner polycarbonate shell (like the HPI RS4) to protect the electronics. The TT-01E chassis is already better protected but you're best option is to close the wheel sections as good as possible.






4) Install a brushless motor system upgrade. Not really needed but it gives you more power which is always nice.


5) Add dirt tires. That is really necessary yes



6) Check that you have around 1 cm ground clearance.

And this is a link to a topic that's all about RC Rally racing with tt-01 chassis. And check this website for nice RC Rally car pictures.

HobbyKing Decathlon EP 48.9 ARF Review

Now that I mastered my precious Graupner Bellanca I got into the unknown again by ordering (and receiving by know) a new Decathlon kit. This time I got me the cheap HobbyKing Decathlon EP 48.9 ARF.


It looks very nice on the website and now that I received my kit I can say that it isn't too bad. It has issues and compared with the Graupner version isn't that good at all. You get what you pay for and for this airplane you won't have to pay much. That says it all.

This one does come with a manual, even with pictures in it. The manual is quite decent. It's not perfect and for me the hardest point was to get what screws go where. It reminded me of the HK 450 heli kit I one bought, that one didn't have a manual.


The specifications are very similar to these of the Graupner version. Below an image from what was on the box. It lists a 450 class motor. I would go for something bigger :). Check the NTM motors for a good and affordable match. 


If you are  looking for scale both kits have pro's and cons. The Graupner version for instance has the right color scheme of an actual existing full scale model. It does come with stickers though so that's less decent as the stars and details created with cover on the HK model. Also the HK model has a top window in between the wings. That is more scale like than the Graupner version that has the 2 wings joining on top, hence no top window.  

Like with most kits you still need to cut the windows. Most kits include the windows though. This kit didn't come with any plastic for the windows! I guess that is one of the reasons it can be sold cheaper.

On this picture I replaced the stock wheels with some larger wheels since I will be flying from grass and dirt instead of pavement.


The kit has a nice tailwheel included. This is all stock. The spring is bent already. You only need to make the 90 degree turn and I added some spacer so everything would just fit like that. I didn't find any clear instructions on tail assembly in the manual. So it has a manual but still isn't complete.


The main landing gear wheels included were much smaller. Also the wheel caps aren't cut yet. I never applied them.


The cowl doesn't have any openings for cooling. I would advice opening up at least the scoop on the bottom. I prefer the Graupner cowl anyway. It already has openings and it overlaps the balsa fuselage better.  That way you can adjust the length according to the motor shaft/length.

This one fits well but it only comes over the fuselage just a tiny bit and you can't push it over any further because of the shape of both the cowl and the fuse. Because of that you can't adjust it properly according to you motor combination. Not a big deal since the motor mount is crap and needs rebuilding anyway so you can fix that right away.


The tail pieces like they were packed in the box. No damage after a long trip from the international warehouse to Europe. At least they know how to ship these things.


I already mentioned the wings are differently mounted on this model. I prefer the Graupner model where I can join the 2 wings and then secure them on top of the bellance with only 2 plastic screws. This HK version is different. Instead it has a plastic clear window (included :-)) on top that is secured with 4 bolts. That is in the way to (un)mount the wings. So far for easy transport. If you remove that top window you can undo 2 larger screws that hold the wings. The problem with these is that they aren't very accessible. Even if you removed the top window they are hard to reach. 



I don't mount any struts (and it doesn't need them). If you do you'll have to remove these too. This is more one of these models you keep in one piece. All the electronics are easy to reach by removing the front window. That window is attached with magnets and once removed you can access everything you need.

And this is an image of the internals. Very light and still very rigid. I crashed it nose down into the ground once already and except for that same nose nothing was damaged.


And here you can see the motor mount. It looks very weak and it is very weak. From the factory it's even not glued well. Check the second picture where I can push the parts apart. This was the first part (and until now the only part) that I broke so far. I needed to rebuild it because of the motor fit anyway.



A detail of some part that wasn't properly cut and just glued in like that. These little things and the work that is required before you can get it airborne make the biggest difference for me with the more expensive Graupner version. The Graupner really is ARF. These chinese models are nothing close to ARF. They need a lot of rebuilding and work. Even the covering wasn't properly on so I had to finish that also.


So if you really want to pay less and do have time to fix all that is broken out of the box you can go for one of these. I believe I will get it to fly properly one day. For now it's on the building table since I crashed it on the maiden. It went up very well but once I started to throttle up more it got out of control. I believe it was due to some electronic failure. Like the BEC that wasn't able to provide enough power to all servo's for instance. 

It spiraled down from up high right into a corn field. Once I found it (yes for once I didn't have the lost plane finder mounted :p) it was standing up on it's nose or at least what was left of the nose. Luckily for me only the nose broke. Fuselage and wings are just fine. I also notice an elevator being loose so that might be the cause of the crash as well. It would explain the spiral down movement since only one of the 2 elevator halves was off.

Anyway it will stay on the building table to get a new nose now. I don't have much time at the moment so it might stay there for a long time. And the spare moments I do have I get my Graupner up in the air and enjoy how everything just works. 






how to flash hobbyking quadcontroller board


The HobbyKing QuadController board v1 and HK QuadController board v2 retails for about $30 USD. You can save a few bucks by checking for a buddy code on the swarm page. The board forms the base of building a cheap multirotor.

Other options for affordable boards is the free shipping blackboard v5.5 version from goodluckbuy.com for around 25 USD. 


WARNING: don't bother buying the one that comes with firmware preloaded or the one with the programmer. The programmer you get is not the one on the product image. It's another incompatible programmer (no real usbasp). The firmware loaded by default is v2.2 so you'll want to upgrade to the latest (more stable) version anyway.

If you really want to get things cheap you can go for an all in one quadcopter package deal from goodluckbuy. It retails for around 140 USD. Thats about what you'll pay in the end anyway even if you get all parts as cheap as possible.
By default the board comes with some version of firmware pre-configured for +Copter. The problem is, I don't know anything about the origin or version of the pre-loaded firmware. The HK manual goes into lengthy detail on how to update the firmware before it even shows how to mount and use the board so I guess it's assumed, if not recommended to update the board before use? A lot of people won't like the default + configuration and to fly in the X config, or even Tricopter config for that matter, a firmware flash is required. 
As usual, the hardware and software I have doesn't match that used in the manual so of course I can't simply follow the instructions step by step. Life wasn't meant to be easy. For a start, my Atmel USB programmer wasn't the same and wasn't recognised by the software mentioned in the manual "AVR Studio 4". The programmer I bought on eBay is called a "USBASP USBISP AVR Programmer USB ATMEGA8 ATMEGA128". More info (drivers etc http://www.fischl.de/usbasp/Now this is a 10 PIN device and of course the HK board has a six pin interface so you'll need one of these "10PIN to 6PIN ISP Adapter board for ATMEL AVRISP USBASP" to be able to plug it into the board.
The next problem to overcome is the AVR Studio 4 software not recognising my USB programming interface. This is where the "KK Multicopter Flash tool" comes in handy. Not only does it recognise my programmer, it puts a nice GUI frontend on the AVRDUDE software and automatically shows a list of compatible firmwares for the HK board. Just select the one you want and it will download it. The software author makes mention on his page that the HK board comes in a state that protects the firmware can't be overwritten and he also gives the specific command required to unlock it. 
Once that's done open the Flash tool (java required), select Programmer: usbasp (USBasp, http://www.fischl.de/usbasp/), Controller: Hobbyking Quadcopter Control Board (4kB flash) and select the firmware flavour you want to use.
I had to copy the contents of the folder "...kkmulticopterflashtool_0.21\lib\avrdude\windows" to a new folder I created "C:\WinAVR\bin" because the KK Flash Tool assumes WinAVR is installed in that path. 




Hit the little green running man button and away it goes. All going well it should end with a message something like "...flash verified. avrdude.exe done. Thank you."
Next step, mount it and fly.

Body Shell upgrade 1/18 4WD stadium truck

Anyone who doesn't like this ugly truck body shell the otherwise fine 1:18 4WD Stadium truck comes with?


The alternative shell looks like the following picture. You can find it cheap on e-bay if you search for 1:18 body shell. For matching bodies check the wheel base. For on-road bodies remember that this car needs a lot of suspension travel for off-road use. You could adapt it to on-road with shorter suspension but it would be perfect.


The new 1:16 4WD racing buggy from Hobby King looks even better. But then you'll also have to pay more. It's basically the same chassis of the other 1:16 off-road cars.



The platform, the wheelbase, suspension, electronics, etc is more than fine for that price. It's a small but oh so quick car. Arms have more than enough travel. I really like to beat this car so I found some weak spot. For now only a single part broke/got lost. The point where the rear gearbox connects to the wishbone was flexed too much causing the wishbone to get lost. I already received a new wishbone but the rear gearbox I will try to fix first. 

Anyway it's a good idea to order some spare parts as long as they are in stock. Get the exploded view for a list of all the available parts. You can also find the manual for this 4WD stadium truck on the HK website.