Reading analog sensors with the Raspberry Pi

Adafruit just posted an awesome tutorial on reading analog sensors with the Raspberry Pi. It’s a great walkthrough that can be applied to your next Raspi project as well as any project where you just need one more analog input.

Earlier, the folks over at Adafruit posted a tutorial on using a MCP3008 ADC with the Raspi to directly read analog values using a Raspi. Sometimes, though, you don’t need eight analog inputs and a 12-bit ADC to get a project off the ground. Adafruit’s tutorial for reading analog values without an ADC relies on a single 1μF ceramic capacitor attached between a digital input and ground. By pulling the sensor line high for a millisecond or two, the capacitor charges at different rates depending on the value of the analog sensor.

Yes, it’s just an RC timing circuit but seeing as how the Raspi doesn’t have an analog input, we figure this tutorial could help out a few people.

Lighting controller counts how many people are in a room

[Deekshith Allamaneni] built this controller which will automatically turn the lights in a room on and off. No big deal, right? You can already get a replacement light switch at the home store that will do this for you. But there is one big difference. The commercial solutions we’ve seen simply rely in a motion sensor and a timer. But [Deekshith] found a way to count the number of people that enter a room, turning the lights on when the first person enters and off when the last person leaves.

The video after the break shows a demo of his test rig. At first we just thought that this was only counting how many times an object passes between the sensors. But it can also detect in which direction that object was traveling. Now the system just needs to be scaled up for use in a doorway.

It would be a great addition to the house that doesn’t have any light switches.

[Read more...]

Building an autonomous robot from an Xbox 360 controller

Wow, it’s amazing what [Carl] was able to build using an Xbox 360 control PCB as the base for his robot. His forum posts just touches the surface of the build, but he linked to a PDF file which has the full details.

This build basically attaches sensors and replacement motors to the controller board… and that is it! Some distance sensors are connected to the analog inputs for the left and right trigger. The whiskers use a couple of leaf switches soldered to controller button pads. The motors are geared replacements that use the same connectors as the rumble motors did.

The idea is that the controller is connected to a PC via the wireless radio it has on the PCB. Once the connection is made the PC software can read from all of the sensors and drive the motors accordingly. It would also be really easy to use a single-board solution like the RPi to do away with the need for a remote PC. But this is a fantastic start, and an approach which we had never before considered. See some video of the little guy getting around the room after the break.

[Read more...]

Sensordrone really does make your phone a tricoder

Sensordrone is a sensor-filled wireless dongle for use with a smart phone or other computer-like device. But perhaps this is better explained as the thing that makes your smart phone work exactly as the original Star Trek tricorders did. In one had you have the main unit that displays data, in the other you hold the sensor array which you can wave in front of things to take a reading.

This is really just a Bluetooth module, battery, a handful of sensors, and a breakout header all packaged in a nice case. But seeing it used in the video after the break does make us a little giddy. That breakout header gives you the option of connecting the Sensordrone to RS-232 or I2C devices. The first demonstration is a thermal printer being sent a print job from an Android phone. But the dongle isn’t just a pass-through. It comes with a range of sensors (those three windows in the case) for gas sensing, temperature, humidity, pressure, color sensing, and perhaps a few others.

[Read more...]

Robot dares you to snatch the pebble from this flower

This pleasant-looking plant may try to take your hand off if you’re not careful. The robot flower (translated) includes sensors that cause the petals to move in reaction to external stimuli.

You can just make out the distance sensors as black rectangles on two of the petals. These let the flower track an object by rotating the flower stem. But if they determine the object is getting a bit too close for comfort, the servo motor on the back of each petal will cause the flower to suddenly clamp shut.

The video after the break starts off with an in-depth look at the hardware that went into the project. An Arduino clone called the GRoboduino makes this project a lot easier since it has a bunch of extras on the board aimed at things like sensors and servo motors. The mounting technique for the petal-powering-servos is quite attractive, and we enjoy the Snapple lid (probably not the actual brand but you get the picture) which has been coated with yellow felt for the center of the bloom. The final look is normal enough to fit in with home decor, but it still has enough geek in it to melt our hacker hearts.

[Read more...]

DIY EMG uses an audio recorder

[Ericdsc] is looking to capture the electrical impulses of his muscles by using an EMG. He went through several prototypes to find the right recipe for sensors to pick up the electrical signal through his skin. Above you can see the version that worked best. Each sensor is made starting with a piece of duct tape and laying out a patch of stripped wire on it. A 5cmx1xm piece of aluminum foil then covers this, and second smaller piece of foil covers the cable’s shielding (not pictured here). This will stick to your skin to hold the sensor in place after applying a dab of sugar syrup to help make a good electrical connection.

In this case, an audio recorder is taking the measurements. [Ericdsc] had been having trouble sleeping and wanted to find out if he’s restless in bed. The audio recorder can log hours of data from the sensors which he can later analyze on the computer. Of course, it wouldn’t be hard to build your own amplifier circuit and process the signals in real-time. Maybe you want to convert that mind-controlled Pong game over to use abdominal control. You’ll have a six-pack in no time.

Making capacitive touch sensors with pencil and paper

capacitive-touch-sensor

There are few things more frustrating than being in the middle of working on a project and realizing that you are missing some crucial component that ties the whole thing together. According to Murphy’s Law, this sort of thing will only happen when parts are completely impossible to procure.

If you’re ever hunting for a touch sensor but can’t get your hands on one, [Alan Chatham’s] tutorial on simple DIY capacitive touch sensors might be just what you need to keep things moving along.

[Alan’s] sensors rely on the conductive properties of graphite, which is easily found in just about any pencil on the market. The sensors are created by simply drawing on a piece of paper with a pencil, then wiring the images or text up to your favorite microcontroller via some paperclips and a couple of resistors.

Paper and pencil might not make for the most durable means of input, but we’re pretty sure that [Alan’s] capacitive touch sensors would be very helpful in a pinch. He doesn’t have video of the sensors in action just yet, though he says he’ll put something together here shortly.

Follow

Get every new post delivered to your Inbox.

Join 93,886 other followers