Posts

Showing posts from 2013

More power

I've moved on to a multi-ratio gearbox which consists of 2 plastic L-Shape brackets with some appropriately spaced holes in them. It comes with a motor, but I've replaced it with an MM28, which has several times the torque and power. This means using a configuration not really anything like the manufacturer intended. I'm not sure the plastic is quite up to the job, and the geometry leaves me with a few problems. I'm already considering building my own brackets out of aluminium. That would be a good use of my drill press, finally. Anyway, I think I should figure out a prototype using the off the shelf parts for now, so plastic will do. I've wired all this together, and adjusted the software, because the board is oriented differently. The result is erratic, to say the least. So I've updated my software, so that it aggregates statistics from the balancer loop, and writes them to a serial port. I've connected a serial bluetooth adapter to that, so I can have

No pre built gcc-arm-none-eabi for saucy

I've bought a laptop to replace my desktop, and installed Ubuntu 13.10, Saucy Salamander. A down side of upgrading from 13.04 is that this PPA  doesn't support saucy yet. No matter: I can build from source. Start by adding the PPA, which will create /etc/apt/sources.list.d/terry_guo-gcc-arm-embedded-saucy.list Edit this file: uncomment the deb-src entry, and replace saucy with raring. It'll look like this: deb http://ppa.launchpad.net/terry.guo/gcc-arm-embedded/ubuntu raring main deb-src http://ppa.launchpad.net/terry.guo/gcc-arm-embedded/ubuntu raring main Now: $ sudo apt-get install apt-src $ sudo apt-src install gcc-arm-none-eabi unfortunately, this won't quite work. You will need to downgrade texinfo before it will build. $ sudo apt-get remove texinfo $ wget http://launchpadlibrarian.net/125194117/texinfo_4.13a.dfsg.1-10ubuntu4_amd64.deb $ dpgk -i texinfo_4.13a.dfsg.1-10ubuntu4_amd64.deb Now build: $ cd gcc-arm-none-eabi-4-8-2013q4 $ fakeroot .

Electric gerbil on hold

I forgot to actually say that the electric gerbil fell by the wayside. Basically I couldn't find a strong enough gerbil ball, and re-enforcing one was going to be quite complicated. I also found that creating a convenient way of opening and closing the ball was a lot of trouble. All of this should be soluble, but I'd rather build something that doesn't require a whole lot of mechanical engineering. I want to get better at that, but I don't want it too prove too great an obstacle in my first project. I've now cobbled together a balancing robot prototype using the same motors, and the STM32F3 discovery I mentioned before. I've also written some balancing software, which seems to work roughly as described. Not that the robot balances... The guides I have read suggest just use the proportional part of PID, and get that working, and then work on the oscillation, but pretty much however high I set the constant, my robot falls flat on it's face. It's hard t

Rust is back in the game

Forget about Haskell, Rust is now the front runner, basically, because I found armboot . It seems like Rust's ability to boot with no (or a minimal) runtime is  fairly new . Since this implementation has no GC, I might indulge in writing one. I've been thinking about it quite a bit lately. For Rust this might require some more thought, however, because it's designed to give garbage collectors a lot more leeway than most languages. I need to get my head around rust's memory model. In the meantime, I think I'll try to write the code for my balancing robot in Rust, without memory management, to see what I learn.

Accelerometer notes

Just some links relating to accelerometers, gyroscopes and balancing robots: I have an STM32F3 discovery board equipped with both L3GD20, and LSM303DLHC. Here's a Chibios based demo which logs their values via the USB port. I've just built and installed it on the board,and it works. Ignore the 'when chibios supports i2c' note: it already talks to the LSM303DLHC. There's also this in the Chibios forums for the L3GD20, which looks a little more structured. I also like this article , which describes building a balance bot based on a Raspberry Pi. The general explanation of balance bots looks good.

Haskell for micro controllers

I wrote a little rant on my employers blog the other day, lamenting the need to develop embedded applications in C or C++. I've written C and C++ professionally, and I'm not planning to do it again, unless it's directly towards the goal of not writing C in some new problem domain in the future. I've done some Arduino programming recently, and it amazes me how painful it is. I looked at loads of options for embedded development, specifically targeting some cheap ARM based boards: the STM32 Discovery line. eLua looked OK, and there's Espurino , but neither are up to the task of handling interrupts, and hence writing drivers. If the drivers don't exist for your platform, or you need to extend them, your back to C. Also, a lot of interpreted systems use precious RAM to store programs, when they should be in ROM, which tends to be more plentiful. I should say that eLua does have an interrupt handling mechanism, but it's not all that fast, and throws interrup

More drilling holes in aluminium

I figured it must be possible to drill accurate enough holes for my purposes using a drill stand, so I bought one that includes a vice, for £30. Here it is at Amazon , although I bought at Machine Mart, where it was cheaper. I have a cordless drill and an SDS drill. Only the SDS one has a collar, and it's hardly going to be very accurate, so I need a new drill as well. According to my reading, high drill speed is good for aluminium, so I wanted a fast drill. Claims of accuracy and speed control for greater versatility were highly regarded, so I ended up going with a Bosch GBM 6 RE . It ticks all the boxes, and is one of the few drills on the market that doesn't have hammer or impact actions to complicate things. I'll try and rig something up to measure the accuracy of this arrangement and post about it later. I don't expect to be able to try it out until next weekend. Update: see  this post .

Drilling holes in aluminium

So I had a go at drilling holes in my aluminium section. They needed to be 5mm for the pillow blocks I bought. I've got a dremel drill press. It handles bits up to 2mm and vibrates so spectacularly anyway that I gave up on it immediately. That left me with my trusty cordless drill. I used an automatic punch to get started, but couldn't get the bit to stay put, even with a 2mm pilot. This is going to be a bit of a problem: positioning the bearings in-line is rather important. I'd love to buy a mini drill press or milling machine, but it's a little hard to justify, because I have limited storage space, let a lone a bench to attach it to, which would make it unlikely I'd get it out and use it much. London Hackspace have a small milling machine . Perhaps I should join. They look a lot better organised in their new premises. Anyway, on my travels I found IXI-Devices . They might solve my problem in several ways: They have pre drilled aluminium angles and stips. T

Electric Gerbil gearboxes and axles

Image
The Electric Gerbil is powered by two Tamiya 70103 Universal Gearbox kits. Here's a picture with dimensions, which is more for my reference than anything else: They were cheap, but I now realise, are hard to get hold of in the UK. The motors are 3V. That's probably about right: I'm using 3AA batteries as power, and there's some voltage loss in the controller. I haven't bothered to find out how much. You can also get alternative 6V motors to fit in this gearbox, which I have bought for the princely sum of £1.20 each. I can try that if the current arrangement doesn't work out. I've also bought 4 of these: Pillow Blocks , and a 30mm aluminium L-Profile to mount them on, the idea being that the profile will make it easy to line up the bearings, and keep everything very rigid. I'm about to go and cut a couple of pieces, and drill them if I have time. The gearboxes have a few different axle configurations, which you can't really see here: That

It's been a long time, but check out the Electric Gerbil

Image
I'm building a robot - one of these ball robots that seem popular at the moment. I've actually experimented quite a bit already. I found this project , which I like, because it allows the robot to spin on the spot. I have in mind that this might be an entertaining toy for a child. I also like the idea you can kick it! It's called Kickbot. Anyway, I've got something that works mechanically, up to a point: it rolls along a bit jerkily, and spins around very nicely indeed! There are a few problems to solve: The jerky movement, and the overall strength. I need some way to link the two axles into a single, non bending axle. I also suspect I need something like Kickbot's hubs. I don't have a way to machine parts however. I had thought I might buy an aluminium tube with an internal diameter matching the a set of bearings, then push the bearings in. I need one at each end, and two in the middle. This has the advantage that the bearings will be well aligned, and th