Monday, January 26, 2015

Arduino and Raspberry Pi via command line

Since I'm about to hook up an ArbotixM robot controller to a Raspberry Pi to control it with ROS, I needed to set up the tools to do that.  I'm avoiding the the raspberry desktop (which is quite fine mind you) for by robot and want to do it all via command line since so I can do this remotely via SSH.

Installing the 1.0 arduino environment for debian is just a matter of installing the debian package.

$ sudo apt-get install arduino

For the command line I found a very interesting set of tools called inotool.  To install that I did:

$ cd ~
$ mkdir repositories
$ cd repositories
$ git clone https://github.com/amperka/ino
$ sudo apt-get install python-setuptools
$ sudo easy_install pip
$ sudo pip install glob2
$ cd ino
$ sudo make install


there is a pip package available but it gave me issues later on when I wanted to add a new hardware board. More on that later.

Ino now allows me to create sketches, build, upload and communicate via serial.  Every thing the IDE would does for me. So to try that out do the following.

$ mkdir blinky 
$ cd blinky
$ ino init -t blink
$ ino build
$ ino unload

Immediately got me a blink program uploaded using a USB port connected Arduino UNO.  Ino actually makes educated guesses about what serial port to use and defaults to UNO. So far so good.

Since it isn't the UNO we want to program ultimately but an ArbotixM controller we need to add some magic to get that working for us.  First we need the arbotix hardware files for the arduino environment.  To be able to define additional board definitions with out adding the directly to the arduino install (which is bad manners) I had to switch to the git version as I noticed it was different from the pip package and able to deal with multiple directories.  It only searches in two places and on of the is the install directory and the other in /usr/local/share/arduiono.  So to get that set up I did the following.

$ git clone https://github.com/vanadiumlabs/arbotix
$ cd /usr/local/share/
$ sudo mkdir arduino
$ sudo cp -r ~/repositories/arbotix/hardware arduino/

The /usr/local/share/arduino folder should now contain hardware folder with an arbotix folder inside.

no we can build using the the arbotix target

$ cd ~/arduino_sketches/blinky
$ ino build -m arbotix

and we should end up with a nice arbotix blink program

Next lets test a serial program connected via a FTDI cable to the arbotix,  upload it and configure the ino.ini to make life easier.

Monday, January 19, 2015

LEGO Digital Designer goodness

While prowling the internet I found this wonderful LEGO build site.  I was drawn in by the LEGO Tachikoma from Ghost in the Shell anime series seen here which is motorized and multi functional to boot.  It has a walk and a drive mode which I find quite a feat for model of this size. You should check out the video.  He has a few other bad ass builds i.e. the Batman Tumbler.

What really made me happy was that we graciously includes a build file for the LEGO Digital Designer.  I have seen it mentioned but never really checked it out.  But having the actual build plan for a motorized Tachikoma pushed me over the edge so I downloaded the LDD app to check out the build.  After downloading the installer I took a while to fetch a bunch of data for all the brick sets. But that is actually quite cool since it implies that the get updated and I have all the latest bits.  Which is good since I recently got my son the EV3 set.

Loading the model in LDD shows a very clever drive train and the two, no three
motors that power this thing. The power pack seems to be crammed into the pilot capsule on the back.

Anyway as is so happens I had sitting on my desk a EV3 powered Nerf C-18 remote senty turret. That had been sitting there the last 3-4 months. Due to the rather complex construction nobody had dared tear the thing down yet.  But now I see that I can simply encode this creation of mine electronically and save the build for future use or to share with the world in hope for some improvements. And here we can see the first round of building.  This time the color is not constrained by the available pieces. You are looking at the tilt mechanism provided by two big turntable pieces and the seat of the Nerf C18 which is mouted upside down so the handle bar actually sits in the seat.  The turntables are then powered by a worm drive on either side as the C18 is a pretty big an heavy toy.  This is not the complete unit so don't read to much into it.  

Making a build from an existing model is fairly quick process and work alot more smooth than I had expected.  All the pieces snap to each other (with a sound) and the software makes a fairly good work at figuring out what I'm trying to connect to.  It is not with out fault though.  The automatic hinge connector has not worked for me yet for doing the angular cross beams. Probably "doing it wrong".

My 8 year old son was pretty quick to get going and was building a space thing in no time. We was pretty happy about being able to color things like he wants and the his main problem was controlling the view, some quirky brick attaching and finding the right piece in the rather large collection.  Pretty much the same as I had :) In a few short minutes we got this.

Sunday, December 11, 2011

Extrusion success!!1! well, almost

I finally got some PLA to appear from the nozzle of my long awaited Sumpod.  It´s not much to look at but it proves that I can get plastic out of that thing.  But there are a few caveats still apart from the underwhelming amount extruded :)

I could not get the tip above 190°C with out shutting down the fan.  I did so for just a moment to get to 196°C.  I did not want to run it for much longer fearing that I will clog the whole this as other Sumpodders have experienced when running with the fan on.  It seem like I need a few degrees more with the PLA filament I have to get this working properly.  Another thing was that I fed the filament my hand through the teflon tube.

There are a few tricks I can try when I give it a go next time as it's to late right now for me to bother with any bravery.

1. Add more insulation
This will currently entail adding a bunch more kapton tape to the hot end.  I have 6mm roll I use for job. That should give me a bit more head room.
The long term plant is to use some fancy NASA tech in the form of an aerogel based insulation blanket called Pyrogel.  Which incidentally arrived on Friday.  That is a very dusty material with very fine particles aside from being quite expensive so I won't be doing that in a rush.  It will also be quite permanent after I seal as I'd rather not have dust spreading.

2. Regulate the fan
The extruder fan is running non stop on 12V and if I run it down a notch to decrease the amount of heat it's dissipating from the hot end.  I have a few options here and the simplest being to add a pot temporarily while I test the effect.  More fancy solution would be to add PWM to the firmware but I'd like to avoid that if possible.

That it for now


Sunday, November 27, 2011

PCB etching in 30 minutes

Here is a very interesting PCB etching guide that is perfect for rapid prototyping.  I like how sparse the material usage is by using a sponge to apply the ferric chloride etchant and home much control you gain.  If my planned PCB milling adventures go nowhere (doesn't start well with the post office loosing my package of PCB engraving bits) this is what I´ll try next.  Heck, I might do it anyway since it's so quick.  Wonder how easy it is to do double sided boards with this technique.

Friday, November 11, 2011

The arrival of the Sumpod

It's finally here. I'll be posting more about my unpacking and assembly experience soon. For now you'll just have to admire the smaller than expected box of wonders.

I have already secured some primer and paint.  The color scheme will be white internals and navy blue externals. The paints are local brands.

This should keep me busy during the weekend :D


Friday, October 28, 2011

Tracking numbers are here

Finally have a tracking number for my Sumpod unit.  It has taken a long time but the unit should hopefully be her after the weekend.  Will be hunting for some MDF primer and paint this weekend.  Interesting times ahead.

Monday, October 3, 2011

Charge of the SUMPOD

The first unboxing of a SUMPOD has been documented by fixer in his new blog.  He posts very detailed RAMPS 1.3 instructions and some useful hints if you intend to expand functionality.  Also plenty of photos of the MDF frame and finish. Good times ahead.  Richard Sum was expecting to deliver the next 30 units or so this week which means I should start clearing my workbench and buy some paint.  That and order me some stackable pin header samples :)