Monday 28 January 2013

Getting Started with Raspberry Pi

I have had a Raspberry Pi single board computer in a box in the attic for a few months - I had forgotten that I had pre-ordered it, and was busy with the Arduino solar panel power meter when it arrived, so didn't do anything with it.

Well, I know that the wheelchair project will need some brackets to mount motors, lights, GPS receiver etc., and have been reading about 3d printing, and thought it would be a handy excuse err... a necessary part of the project, to try out 3d printing for these parts.   And the 3d printer will need a little print server, so I don't tie up my laptop when it is printing.   So, I am dusting off the Raspberry Pi and having a go at setting it up to see if it will be able to do that.

These are my notes, so that I can do it again if I accidentally break it...

Basic Set-Up

  • Download the Debian root filesystem image from the Raspberry Pi web site.
  • Unzip the archive to give us 2012-12-16-wheezy-raspbian.img.
  • Copy it to a 4GB SD card using dd if=2012-12-16-wheezy-raspbian.img of=/dev/sdb.  (Note, write to whole SD card, not to a partition - sdb, not sdb1).
  • Put SD card into raspberry pi, connect HDMI to TV in living room and switch on.
  • Success - boot messages displayed on TV
  • Failure - it lands in an interactive set-up utility, and I don't have a keyboard for it - doh....maybe I should have gone for openWRT.
  • Try different approach - forget the TV now I know it boots, and just connect it up to the network.  It gets is IP address from my router, and I can now ssh into it, with username pi, password raspberry.
  • Now I can run sudo rasppi-config, which is the same config utility that came up on the TV monitor.  Used this to expand root filesystem to fill SD card, but didn't see much point in changing anything else (will sort out a user in a minute and do away with the pi user).

3d Printing Stuff

  • Followed instructions at https://github.com/w-A-L-L-e/printerface, with the following exceptions:
  • mv kliment-Printrun-71e5da0/ printrun
  • Node-js needed sudo apt-get install nodejs not node-js.
  • Had to do sudo ln -s /usr/bin/nodejs /usr/bin/node to get npm install.sh to work.
  • needed to  curl https://npmjs.org/install.sh | sudo sh. to avoid directory access errors.
  • The forever@0.9.2 failed to install with lots of errors, but npm install -g forever worked.
  • But starting printerface using forever failed with an error on line 404 (monitor.send).
  • node printerface.js works though - web interface appears on port 8080.
Will update when I get further....

Sunday 6 January 2013

Design Calcs for Power Assisted Wheelchair

Update to correct my deliberate mistake...Answer is still about the same, but I am now designing to a 1 in 3 (18 deg) gradient.

A very quick go at some preliminary design calculations for the power assisted cross country wheelchair.
The idea is that the motor should be capable of preventing it slipping backwards on a 18 deg incline (fairly arbitrary, but needed to make a design assumption).
  • Based on an assumed mass of 50kg, would give a weight of 490 N.
  • This resolves to a force down the 18deg slope of 152 N.
  • Which is equivalent of a torque on an 18" (0.46m) od wheel of 85x0.46 = 35 Nm.
Alas this is more than twice the torque delivered by the bicycle hub motor (15 Nm).  Now the motor is likely to have internal gears, but it could be tricky to make some new ones to reduce its speed and increase its torque... [Update - oh no it doesn't - it is shown as gearless].
So it looks like if I am going to use hub motors, I will have to use two of them.  This would probably  be sensible, as it will be better to drive the rear wheels, but also expensive...

I have ordered an electric wheelchair conversion kit off ebay - will see how that goes.  Torque and speed should be ok, but it looks heavy and clunky, so I expect to upgrade it...

Power Assisted Cross Country Wheelchair

Our son Benjamin does not walk too well, and will suddenly run out of energy, so when we are out in the countryside we take a three wheeler cross country wheelchair for him:
He has got too big for this one, so we are going to get him the biggest one we can find:
This new one has 16" spoked wheels, so this means it should be possible to add some form of power assistance to it, as you can get some nice lightweight motors that fit into bicycle wheel hubs.
So, I intend to get an electric bicycle conversion kit, and fit it to the wheelchair.  There are a few things to deal with to make it work:
  1. Will the new hub fit in the front forks of the wheelchair? (waiting for supplier to measure it for me on Monday).
  2. Although fitting the powered wheel in the front will be the easiest mechanically (assuming it fits), the front wheel has less weight on it, so it may just spin, and not be much use, so I may have to look at how to fit it to one of the rear wheels (which then raises the concern about whether it will spin round in circles!
  3. The bike set-up will be intending to go a lot faster than I want this wheelchair to go (I guess it will target around 12mph, but I think 4mph will feel quite fast enough for me).   Mounting the hub in a smaller wheel will reduce the speed, but I think it will still be too fast (will do the sum later...), so I think I will have to modify the motor driver.    The motor is a brushless motor, which from what I have read sounds pretty much the same as a stepper motor - you have to feed it with a wave form to get it to go around (and go in the right direction).   So even if I can not simply modify the controller, I can use its power transistors etc. and use an arduino to make the waveforms.
An alternative may be to go for two electric wheelchair motors, but they look awfully heavy compared to the bike motor, so I am tempted to go with that as a trial.   If it doesn't work, I'll put the electric kit on our Hase Pino tandem to help me up the hills, as Benjamin doesn't put too much effort into pedalling!
IMAG0035

I'd be interested to hear if anyone has tried this and has experiences to share.