PicAxe LEGO Tank

[TomTheGeek] built a LEGO tank with a PicAxe controller. Locomotion is supplied by a Lego Power Function motor controller. He cut an LPF extension wire in half so that he could patch into the PWM signals without altering the motors themselves. You can make out the control circuitry and a small breadboard in the tank’s turret. [Tom] added a laser pointer to the tip of the barrel but we’d like to see an IR LED. The tank is controlled by a infrared remote control and adding TV-b-gone functionality to the toy would create something of a Rube Goldberg feature for turning off the tube. But alas, there’s no programming space left for that as the PicAxe 08M is limited to 256 bytes.

There’s a video after the break of this little demon tracking its way around the room. This is a nice addition to the other LEGO tank we saw a while back.


14 thoughts on “PicAxe LEGO Tank

  1. The 8-pin 08M Picaxe only has 256 bytes of memory, the 18, 20, 28 & especially the 40 pin ones have a lot lot more.

    You have to remember that the Picaxe chips are Pic chips with a bootloader programmed into them so you can then put your (very easily written) code into whatever memory is left, the built-in bootloader has a ton of built-in functions including serial in/out on any pin, PWM, servo control, ps/2 keyboard input, infra-red in/out and the higher end chips have i2c & spi.

    The 08M is a great little Picaxe for small projects and keeping your code to 256 bytes max can at times really keep your programming skills in check.

  2. 256? wow that’s sparse. No wonder so many people use arduinos these days. In fact, even the smallest avr devices in general seem to have way more flash than that. I might be totally wrong though, I don’t know every single device out there

    1. Working with limited memory is much like trying to eliminate jumpers on a single sided PCB – fun.

      The answer is to strip out the verbiage, no comments needed for the controller.

  3. I’ve never used a PICAXE before, but I very often use small 8 pins Microchip PIC (like the 12F615) to do simple stuff. They are very cheap (less than a dollar each, when ordering 10+). They work from 2 to 5.5V so you can work directly from 2 or 3 AA batteries. I program them in C with B Knudsen CC5X compiler (a free version is available).

  4. There’s more to it than just 256 bytes (like Haku said). From the PICAXE manual: “On standard PICAXE chips (X, X1) you can download around 600/1000 lines of
    BASIC code. On A or M revision parts you can download around 80 lines and on
    educational parts around 40 lines. X2 parts support up to 4 programs of 1000
    lines. Note these values are approximate as different commands require different
    amounts of memory space.”

    For $2.95 you get 80 lines on a chip just waiting to do some work. That’s not bad IMO.

  5. Even though the space sounds small, you’re dealing with tightly-packed tokenised BASIC programs with an large number of built-in functions, so 256 bytes stretches quite far. Given the low price and ease of use they’re decent pieces of kit.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.