Multi-turret water cannon

I’ve been holding off on posting about this until I got some time to finish it up, but now seems like a good time since it was mentioned in a community blog post.

Multiturret water cannon

I didn’t capture a proper video of it in action, but there are a couple snippets in this awesome picnic compilation video put together by Aaron:

The cannon uses a pre-pressurized water bladder, typically used to smooth out variations in water pressure for houses or RVs. The pressure of the output water will be roughly the same as the water supply used to charge the tank (and it can also be run in ‘continuous’ mode by leaving the hose connected). At the picnic site, the park water supply pressure was crazy high, which resulted in very nice performance. However, I saw about 90 psi on the pressure gauge at one point, which is uncomfortably close to the tank safety rating.

The drive electronics are just an Arduino that sequences four relays in turn controlling the sprinkler valve solenoids.

Speeding up LPD8806 show() without hardware SPI

If you’re using LPD8806 LED strips and you can’t use the hardware SPI port (e.g., when using an Ethernet board), there are two other options in the Adafruit library: the default mode and ‘slowmo’ mode. The default mode is decent, but the flexibility of being able to choose the pins at runtime comes with a cost.

However, you can still get a decent speedup by defining your pin usage at compile time in a replacement show() function. I measured the time required to update an 86 LED strip using each method on an EtherTen board (Atmega328 @ 16 MHz, same as the Uno):

30.23 ms - Adafruit 'slowmo' method (digitalWrite)
7.76 ms - Adafruit default method (port pointers)
1.54 ms - Compile-time method
1.43 ms - Adafruit hardware SPI method

Continue reading “Speeding up LPD8806 show() without hardware SPI”

Reducing code size on Arduino Ethernet boards

The Ethernet library grew in size several KB from 0022 to 1.0, which is a big deal when you only have 32 KB to play with. You can save about 2 KB by compiling out DNS support:

Wrap the following pieces of code in #if WITH_DNS

  • Dns.cpp and Dns.h:
    The entire file
  • EthernetClient.h and EthernetClient.cpp:
    int connect(const char* host, uint16_t port)
  • EthernetUDP.h and EthernetUDP.cpp:
    int beginPacket(const char *host, uint16_t port)
  • Client.h:
    virtual int connect(const char *host, uint16_t port)
  • Udp.h:
    virtual int beginPacket(const char *host, uint16_t port)

Add #include "EthernetUDP.h" to EthernetUDP.cpp, since it’s currently relying on the indirect include from Dns.h.

Infected Omen Light Box

I pulled an all-nighter and designed/fabricated a LED edge lighting box plus etched plate in advance of the Gears 3 launch. The original plan was to slide an unused junk android tablet in and show some numbers from the stats dashboard in that central window, but I wasn’t able to get the tablet on the secure network at work, so now it’s just a pretty light box sitting on my desk. I almost slid my iPad in, but the slot I machined for the tablet is about 0.5 in too short for an iPad, though it had 0.75 in of slack for the target tablet.

The light gently pulsates / undulates around the border (driven by an Arduino), aiming to look a bit like the corrupted omen on the title screen.

The LED strip I used are LPD8806 driven strips from Adafruit, and they are a dream to use compared to the older Christmas light strand style strips I’ve used in the past. Each LED is individually addressable via a SPI-like interface to set a 21 bpp RGB color, and they have their own internal PWM clock, so you can fire and forget, no need to keep clocking them.

Also, Gears of War 3 is out, you should play it!