By changing a few options on the command line, it’s possible to get ServoBlaster to output PWM signals from 0-100%. By using three channels and connecting these to an RGB LED it’s possible to produce a wide spectrum of colours. Each channel can be given a value, so for instance Red=100%, Green=0% and Blue=100% gives a rather pleasing purple/magenta colour. The circuit is rather simple, although my RGB LED was common-anode, which meant that using a ULN2803 darlington driver seemed a better option compared to a bunch of transistors.
This RGB might become a useful status LED, a sunset simulator or perhaps an interesting weather display, where colours represent the coming weather. There’s plenty of spare capacity for more LEDs in that darlington driver!
This looks like another rather interesting programming challenge. A PiFace could drive a couple of stepper motors quite easily. It would then be (hopefully) a straightforward job to convert X-Y Cartesian Coordinates into stepper motor positions.
This little plotter, built from 6 3d-printed parts, looks like an interesting challenge. I built a stepper-motor controlled plotter years ago and even wrote a simple CAD package in BBC-Basic, but this is a great approach. I’m imagining this combined with ServoBlaster and some simple Python programming. The main website is at: Miniature Servo-controlled plotter
I’ve finally got around to connecting a Passive Infra-Red Sensor (PIR) through the GPIO port of the Raspberry Pi. It’s been a long time coming and I wasn’t sure if the output of my PIR would be limited to 3.3 volts, or alternatively would run from 3.3 volts. In the end, I got out the multimeter and then I decided to try it.
This kind of thing is pretty easy with the PICAXE, which is where I spend a lot of my time. I’m a little more concerned about connecting up to GPIO as it’s a more expensive device all together. The PICAXE has quite robust inputs and outputs (sorry to say – I have tested this, and so have my students).
Ultimately, the PIR connects between the 5v terminal, Gnd and any available GPIO input. I’ve used pin 7. I’ve also connected an LED (through 330 ohms) so that I’ve got something to flash. I’d recommend this to anyone – testing GPIO outputs is much easier with an LED connected somewhere – we all need reassurance, right?
Raspberry Pi connected to a PIR and an LED – circuit diagram
From here, the Python program required was simple. Turn off the LED, check if the PIR has been triggered and flash an LED if it has. Then go back to the beginning…
The next step was to link to espeak using os.system. It works well as an intruder alert system!
What’s really amazing is the sensitivity that these little PIRs can manage. They can detect movement from a great distance and all for a few quid from “a well known auction site”. The current consumption is tiny so it doesn’t load your power supply down. Another advantage of this particular PIR is that the sensitivity and “on-time” are adjustable with two on-board preset resistors. I reckon they’re an absolute bargain.
Here’s the Foamex version of the head posted earlier. It uses the same four servos and links to a servo buffer board. Servoblaster takes care of the timing signals and a Python program makes it look interesting.
The next stage will be to make it link with Twitter and also RSS feeds such as the BBC local weather forecast.
This little video demonstrates the arm repeatedly picking up and moving a small object. The arm uses three servos, a simple buffer board and a few bits of plastic.
The next development will be to modify the program so that it can shuffle the pieces of plastic.