donderdag 31 januari 2013

how to start nitro car engine

This is for everyone struggling to get his (first) nitro engine started.

Although it's mostly about car engines this technique can be applied to other nitro powered models also. For airplanes a common practice is to prime by closing the air inlet on the carburetor instead of the exhaust. That is a better method but on cars the air filter is in the way.

What you'll need

(note: you can support this blog by buying from the provided links)

A nitro rc car (or other nitro powered rc model). An affordable way to start this hobby is to get a first nitro car form Hobbyking. They have a very small 1:16 scale model and a 1:8 scale nitro model from the international warehouse. The local warehouses also have 1:5 scale models but you really shouldn't get started with these monsters.

Transmitter: You'll need a transmitter and receiver and a lot of batteries. Also for safety reasons don't forget to set your failsafe and get one of these electronic protectors in case your batteries run out.

Nitro fuel: This you'll have to buy at your local hobby shop. This is flammable stuff so won't be shipping from international sellers. 18% nitro or anything around that will do.

Glow plug lighter: These ones from hobbyking only need a single AA battery. You can also get a starter kit that comes with a rechargeable lighter in most cases. The kits often have a bottle to transfer fuel into the fuel tank. A quicker alternative is a fuel pomp like these.

Let's get started with a picture to mark some parts.


green is where the glow plug should go
blue is where you fill the fuel tank, to close properly after filling
red is the exhaust pipe, to cover while primiing
yellow is the carburetor covered with an airfilter and the high speed needle sticking up (the low speed is on the side and the idle screw is the small one around the air inlet of the carburetor, I'll get that covered in the tuning article)

Check Up


Before you do anything you should always check your electronics. Always use fully charged batteries for both receiver and transmitter! You don't want to see your model crash into something totally out of control just because you forgot to charge your batteries. And thats without any third party damage in the best case!

Always power up your transmitter first and then you receiver on the model. This way you'll have control when needed. Check that the servo's turn in the right direction and step away from the model to check range. 

Fuel Up


Next step is to fill the fuel tank. A brand new engine should run idle and rich for about 4 to 5 tanks. This is called breaking in an engine. This allows for the moving parts to get used to each other. So that is what well do for no, you can use factory settings in most cases. More information about tuning the engine will follow in another post.

Make sure to close the fuel tank tight when done so no air can escape. All the fuel lines and the engine itself should also be checked for any leakage. Otherwise you won't be able to prime the engine or it will run badly or not start at all. Air can escape through an open fuel tank, a glow plug not screwed in tight and leakage in the fuel lines. Other leakages are less common on a brand new engine.

Prime the Engine


To be able to start a cold engine you should get some fuel into the combustion chamber first. Otherwise the glow plug won't have anything to ignite. This is called priming. Older full scale engines used to have buttons for this also.

Now on our models some have a button but in most cases you'll have to give slight throttle, cover the exhaust pipe with your finger and pull the starter cord a few times. If done properly you should see the fuel travel to the engine.

If not check that you don't hear any sisssss  like sounds since that would indicate loss of compression. Also don't forget to open up the throttle. And the biggest screw on top of the carburetor can also be closed.

You'll have to pull the starter cord a few times for the fuel to reach the engine. Knowing how much fuel is required for the first start is something you'll learn by practice only. If too much fuel got in the engine will be flooded, more about that later.

Light the Glow Plug


OK you're ready to lit the glow plug now. Close the throttle completely (that is the idle stand) and put the glow plug lighter on top of the glow plug. Make sure it's properly charged. Easiest way to check is to put a glow plug in it and see if the plug glows properly.

Glow plugs won't work for a lifetime. When wear out is visible just replace it. It's a good idea to replace the glow plug if you tried everything else and still don't have a properly starting engine.

Pull


And this is when you should pull the starter cord to get the engine started. Don't pull the cord all the way out so you don't damage it. Instead pull short and hard to get a proper revolution.

If you primed the engine well and the glow plug is glowing the engine should start in 3 pulls at max. If not there are a few things you can check.


  • Sisss sounds are an indication of loss of compression, check for leaks
  • No smoke or puffs at all are a sign that the glow plug is not glowing, get it out and check by putting it in the lighter
  • Nitro flying around is an indication that you flooded the engine. Take the plug out and pull a few times more to get excessive nitro out (be careful for your eyes). Also waiting a few minutes can help
  • In some cases a little throttle is required to start properly

zondag 27 januari 2013

My Ultimaker Experience and Review

About this Ultimaker Review

If you just want to know why I picked the Ultimaker instead of any other 3D printer, just check the overview at the bottom of this blog post. 

If you want to know my experience in more detail, go ahead and read from top to bottom. It's going to be quite a story though...

Order and Delivery

Well I live in the small country next to the Netherlands so shipping wasn't a real issue for me. I remember they had a page up showing how long it normally takes for an order to get shipped. It was set at 17 days when I ordered and mine was shipped in 10 days. Very well done. 

I bought the kit version. Then you had the choice between a laser less and complete kit. The laser less is the version without the laser cut parts. Both kits have to be assembled. Today you can also order an assembled UltiMaker.

https://shop.ultimaker.com/en/ultimaker-kits.html

My first Impressions

Packaging is very nicely done. You get a big cube like brown box with the UltiMaker logo printed on the side (nice branding!). Opening the box made the surprise even better. The wooden plates were at the bottom all nicely covered and cut. The bigger parts in a seperate box on top of that and on the top side all the small parts were nicely fit in plastic bags in an organizer like top shelve. Check the picture below!



The process of putting it all together

And then it's time to put it all together. Make sure you have enough time for this since this will need your full attentation and will take around 6 hours to complete. 

There is no manual included. All the paperwork you'll find is an invoice and some information about who prepared shipping and a certificate like document telling you this is a genuine Ultimaker kit. So to get started go to the online documentation at http://wiki.ultimaker.com/Main_Page.

The first disappointments

The first step is getting everything out of the box and checking for completeness. This is where I met my first disapointment. 

Damaged multiplex parts

Turned out the multiplex parts that were already cut by laser were kept in place with tape. No issues there but the person that packed this box cut the tape on the wood. This leaves marks on the multiplex wood that the Ultimaker is made of. As long as you don't paint this thing it's not that clear after all. But as soon as I will put some color to my Ultimaker the color will make those marks clearly visible, too bad. A picture to show you what I'm talking about. 


Lack of documentation

Another disappointment was the documentation available online. The first steps were all very clear and extensively documented giving me much hope for a great finish. However near the end the documentation showed a lot of gaps.

Also several parts were upgraded to a second revision (the print head and the extruder clamp mechanism) adding the need for several manuals making it even worse. The previous elements seemed to be documented pretty well, except for the extruder. But the rev 2 elements had minor to no documentation at all. Making it hard and frustrating to put everything together. 

Eventually, with some trial and error (more later) and a lot of pictures I managed to get it all assembled.  

The struggle to get to my first print

And those initial issues were part of the reason I had some trouble to get the printer working. Don't expect this to be "a simple unpacking, assembling, software installing followed by printing the first great objects" process. The Ultimaker took me several days of tuning and issue solving to get a first decent print. 

If you can I strongly suggest working together with someone who has some experience already. Otherwise this might become a long and frustrating journey;

Anyway I'll do my best to explain my initial issues here. I'll be updating this post later on with more detail and link to the threads I started in this progress.

TODO
link to googlegroups thread
link to ultimaker forum thread

Extruder jamming and grinding

My first problem was the filament getting jammed in the extrusion mechanism followed by the big wheel starting to grind into the filament, deforming it and making the problem even worse. Final solution to this was in the tension put on the filament. It shouldn't be too tight but still tight enough so that you can't pull it back out in the reverse direction. 

Below is a picture of a bolt that has been grinding into the filament. Make sure to clean it up everytime before trying again. This kind of dirty bolt will slip right away. Also you can make the black clip on the other side of the wheel a little finer so that more of the good part of the bolt is exposed to the filament. In fact I used a piece of credit card instead of the black clip. 


Also note that this is probably only a symptom for the next problem. This can be cause by a jammed hot end and the extruder still trying to get filament in. So make sure to check that also. At a certain point I was confident enough that the tension on the v2 extruder clamping mechanism was OK so I could start focusing on the actual problem. 

I'm talking about v2 extruder mechanism here. Indeed there is a v1 also. I had both of the systems in my box. I only used the v2 since I imagined it would be better. And from what I read on the web it's a better system for variable tension. So in case your filament is deformed. 

And that might be something to check also. Measure your filament on several places to check that it's more ore less equal and just below 3mm. Filament that is unequal or bigger than 3mm can cause too much friction once inserted in the bowden tube (the white teflon tube on top. Just try it without a hot end and by hand to make sure the filament can go through. 

One last thing about this extruder. There wasn't much documentation available but one of the things I found online was that I had to test extrusion with speeds around 2000. That is just wrong. I could run it up to 500 without issues and that is more than enough. Going above 1000 made it jam no matter what the hot end did. 

Hot end plugs

So on to my actual problem. The (in)famous hot end plugs. The filament melts because of the heat applied when passing through the hot end. All this is about hot end v2. I don't have a v1 hot end so I can't say anything about that. 

The filament travels from the slippery bowden teflon tube on to another teflon white part that is inside the PEEK, insulator material (the brown part). From there it goes right into the brass nozzle. All these parts are clamped onto each other by the long screws in the head. The picture below shows all these parts on top of each other. 


The teflon parts (bowden tube and white part) are all very slippery so no issues there. The brown PEEK part however will bond extremely well with the melted filament. So it's very important that the filament should never touch that part (that is the function of the white part). 

In my case I had it all to loosely fit so that the pressure could push the parts apart and the molten filament started to go up and touched the PEEK through the gaps causing a plug. Hence the previous problem with the grinding extruder. 



In the end a new hot end fixed the problem. In the process of taking everything apart and cleaning it all up I made the mistake to fasten the brass parts into the aluminium block while they were hot and with too much force causing them to break. So I had to get a new head.

So be careful when tightening these v2 hot end parts onto each other. I inserted the bottom nozzle pieced into the aluminium heater block first and then tightened the top brass part against that. If this isn't tight right away the filament will get through. If you don't manage to get that properly closed you can always run some ABS filament through the nozzle since that requires more heat then the PLA filament and will close the gaps for you when printing PLA. This won't help you when you want to print with ABS though. 

There are some other tricks, besides tightening. One of them is the small spacing to keep when assembling but that is properly documented so I won't repeat that here. Just make sure to follow the documentation as precise as possible. 

And after all this troubleshooting I finally got it printing properly.


Vulnerability of the cooling fan

Something else I want to warn you for is that the fan on the bottom is exposed so be careful when putting the Ultimaker away. Mine got shortened after one of the wires got loose. You can buy a new one (also from other cheaper sources, just check the product number). It's a very noisy fan by the way.

Stepper drivers

You can put them in the wrong without noticing, there is no reverse polarisation protection on these drivers. They are plugged in when you buy the board but if you want to replace one pay extra attention not to turn them around. You can check pictures online to see how they should be seated. There is a difference depending on the side they're on. 

Software

I started my Ultimaker experience with the replicatorG software. Don't make that mistake. Then that was the official software. Today the much better Cura software is the official recommended companion and it works much better.

Pros and Cons of the Ultimaker

Ultimaker likes (over other 3D printers):

This is a quite a list. The most important reasons for me that I knew before actually buying the thing are: 

- speed (check youtube)
- quality results (if you have the time to actual let it print that fine)
- large working area out of the box
- 3mm filament (cheaper and widely available)

Ultimaker dislikes:

Note that 2 of the remarks I made here are already solved or in the process of being resolved. Also one is related to the design of the stepper motor drivers, printing circuit which is not specific to Ultimaker. That leaves 2 more points that are still open. 

- cutting on the wood for cutting the tape
- no reverse polarisation protection on stepper drivers (issue on several other printers that use the same or similar electronics)
- failing cooling fan, exposed at the bottom
- lack of documentation (especially near the end of the assembly instructions). => They are catching up however!
- replicator G not fool proof => cura now released, big improvement!!

woensdag 23 januari 2013

Jenkins Android Emulator Plugin Problems

Context

Here is a collection of issues I met when configuring the Android Emulator plugin for Jenkins ( ins-ci.org/display/JENKINS/Android+Emulator+Plugin ). Clearly the goal of this plugin is to start an emulator on your Jenkins build server for testing Android applications.

General Jenkins Debugging

In case you didn't find a solution on this page this is some good advice to get you started. And let the world know if you found a solution. In general it's always a good idea to try the commands Jenkins wants to execute yourself from the shell after changing to the Jenkins user.

sudo su Jenkins

You might need information on working with the emulator from the command line. Android has good documentation but it sometimes takes some time to get through it. Here are some quick references:

A quick 4 step overview on how to work with emulators from the command line: http://stackoverflow.com/questions/4974568/how-do-i-launch-the-android-emulator-from-the-command-line

Preparing Android projects for ant building (for Jenkins): TODO

/var/lib/jenkins/workspace/.../build.xml:90: Cannot find /.../tools/ant/build.xml imported from /var/lib/jenkins/.../build.xml

This was the first error I've met during configuration of Android Jenkins projects. Unless you have the android sdk path set for the Jenkins user you'll have to provide it with the ant build steps in Jenkins. For this you can use the properties field after clicking the "Advanced" option for the ant build step.

Solution: I've seen this error in 2 cases. Either the path is missing or plain wrong. Or the Jenkins user doesn't have the proper rights. You can easily check both.

Note: If you have multiple parameters make sure to expand the properties field and use a line per argument (each line would be translated to a -D in the final command).
sdk.dir=/path/to/android-sdk

More information:

http://stackoverflow.com/questions/11752594/how-to-debug-android-project-from-git-using-jenkins-frontend/14334099#14334099

http://stackoverflow.com/questions/10860777/building-android-project-from-jenkins-under-linux-build-fails-cannot-find-imp

Error: more than one device and emulator

Okay this one might be obvious. If you try to run/install an Android (test) app and you don't specify on which device while there are multiple devices available on the system you'll get this clear error (for a change).

install:
[echo] Installing /var/lib/jenkins/workspace/someProject/bin/someProject-debug.apk onto default emulator or device...
[exec] error: more than one device and emulator
[exec] - waiting for device -
[exec] error: more than one device and emulator
[exec] - waiting for device - 


Solution: make sure only one device is available, that can be checked with the android list targets command. Or you can use the adb.device.arg argument to specify a single device. Either the emulator, a real device or a specific device. See options below:

-d - directs command to the only connected USB device. Returns an error if more than one USB device is present.
-e - directs command to the only running emulator. Returns an error if more than one emulator is running.
-s - directs command to the device or emulator with the given serial number or qualifier. Overrides ANDROID_SERIAL environment variable. 


Note: remember the single line per argument on the jenkins ant build step configuration note mentioned earlier. 


http://www.alittlemadness.com/2010/06/15/android-ant-builds-targeting-a-specific-device/

Failure INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES

This was a fun one, fun because it was solved so quickly. The error looks like this from the console in Jenkins:

install:
[echo] Installing /var/lib/jenkins/workspace/someProject/bin/Test.apk onto default emulator or device...
[exec] 2022 KB/s (318784 bytes in 0.153s)
[exec] pkg: /data/local/tmp/Test.apk
[exec] Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]


This was a result of having similar apk's already installed on the device but built from another source. Just running an application while developing from Eclipse on a device would install the same apk signed differently on your device.

An apk is identified by it's package as it is specified in the Android manifest file (check the very first lines).

package="be.hcpl.android.phototools"

Solution: Just uninstall from the device/emulator before you build from Jenkins. You can perform this uninstall with adb from the command line.

adb uninstall be.hcpl.android.phototools
More information: http://stackoverflow.com/questions/3185444/how-to-deal-with-install-parse-failed-inconsistent-certificates-without-uninstal

Unable to find the mojo 'generate-sources' 

This one is a little exotic already. You'll only encounter this when setting up your Android projects to built with maven: http://code.google.com/p/maven-android-plugin/

The error in more detail:

[INFO] Internal error in the plugin manager executing goal 'com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.0:generate-sources': Unable to find the mojo 'generate-sources' (or one of its required components) in the plugin 'com.jayway.maven.plugins.android.generation2:android-maven-plugin'
Component descriptor cannot be found in the component repository: org.sonatype.aether.RepositorySystem.


Solution: Appearantly this plugin is requires Maven 3. Note that Maven 3 is not yet available from apt-get so you'll have to install it manually:

wget http://apache.belnet.be/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz
tar -xzvf apache-maven-3.0.4-bin.tar.gz



[android] Emulator did not appear to start; giving up

This one can have several reasons. One of them is listed in the error below. I didn't encounter this myself but I've read on stackoverflow while looking for a solution to my specific issue.

It seems to be related to the revision of the android sdk tools. On windows there was a fix like stated in this ticket: https://issues.jenkins-ci.org/browse/JENKINS-10815

However there seems to be a similar issue on linux that isn't fixed yet (at least the ticket is still open): https://issues.jenkins-ci.org/browse/JENKINS-14901

Solution: The proposed solution in that ticket is to create a link with the name emulator (back original) towards the appropiate emulator-X bin.

More information: This google groups discussion is related: https://groups.google.com/forum/#!msg/jenkinsci-users/wi5fSWVvwz0/ICiJSJD98qQJ

SDL init failure, reason is: No available video device

Now this is the issue I encountered. So I can give more details on this one.

Missing 64 bit libraries

For ubuntu 64 bit systems you probably need to install some missing 32 bit libraries. Most of the stackoverflow pages I've found give this as the main reason so you'll find solutions there.

More information:
http://stackoverflow.com/questions/4841908/sdl-init-failure-reason-is-no-available-video-device
http://stackoverflow.com/questions/12709719/sdl-init-failure-reason-is-no-available-video-device-in-ubuntu-12-04-lts
http://stackoverflow.com/questions/6129091/error-sdl-init-failure-reason-is-no-available-video-device-when-launching-a

But that's not the only solution people seem to find. Others are talking about permissions and/or display selection. That is what the next point is all about.

Jenkins user permissions

And we're back to the beginning of this post. Where I informed you that the best way to find a Jenkins build error is to try the commands from the shell yourself with this Jenkins user. Doing so showed me that I can perfectly run the emulator with a different user (the one logged) or the root and the error only occurs if I try to run the emulator with the Jenkins user.

Solution (kind of): Unless, and this is where it's getting interesting, the Jenkins user is the user currently logged in to the machine. So it seems to be related to the xsession. I'm not a Linux export but this should be enough information for someone who is.

For instance running xhost + before performing sudo su Jenkins results in a working emulator. This is a pointer only, no actual solution. This just opens up the xsession to any user.

~/path/to/sdk/tools$ xhost +
access control disabled, clients can connect from any host

More information: http://superuser.com/questions/321880/how-can-i-start-the-android-sdk-manager-with-non-root-shell

Also check the xvnc setup instructions for headless systems: https://wiki.jenkins-ci.org/display/JENKINS/Android+Emulator+Plugin. That eventually was the solution in my case. Note that you'll have to start the xvnc service once from outside Jenkins to get the password set up. On first run it will ask you to enter a password and create the required password files.

sudo su jenkins
vncserver :10

More information: http://blog.dahanne.net/2011/07/18/run-ui-tests-on-a-headless-jenkins-hudson-continuous-integration-server-running-ubuntu/

Update: Another one I just encountered.

Error= Permission Denial: starting intrumentation not allowed because package does not have a signature matching the target. 

The below error happened to me when reusing a device for running some tests that already had a test package (signed with another key) installed on the device. So make sure to not only remove the app with adb uninstall package but also the test apk.

test:
     [echo] Running tests ...
     [exec] INSTRUMENTATION_STATUS: id=ActivityManagerService
     [exec] INSTRUMENTATION_STATUS: Error=Permission Denial: starting instrumentation ComponentInfo{your.package.here.test/com.zutubi.android.junitreport.JUnitReportTestRunner} from pid=31732, uid=31732 not allowed because package your.package.here.test does not have a signature matching the target your.package.here
     [exec] INSTRUMENTATION_STATUS_CODE: -1
     [exec] java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{your.package.here.test/com.zutubi.android.junitreport.JUnitReportTestRunner} from pid=31732, uid=31732 not allowed because package your.package.here.test does not have a signature matching the target your.package.here
     [exec]  at android.os.Parcel.readException(Parcel.java:1431)
     [exec]  at android.os.Parcel.readException(Parcel.java:1385)
     [exec]  at android.app.ActivityManagerProxy.startInstrumentation(ActivityManagerNative.java:2938)
     [exec]  at com.android.commands.am.Am.runInstrument(Am.java:801)
     [exec]  at com.android.commands.am.Am.onRun(Am.java:242)
     [exec]  at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
     [exec]  at com.android.commands.am.Am.main(Am.java:75)
     [exec]  at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
     [exec]  at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
     [exec]  at dalvik.system.NativeStart.main(Native Method)