Showing posts with label electronics. Show all posts
Showing posts with label electronics. Show all posts

Tuesday, August 03, 2010

Photos from robot camp

Chloe with friend Sarah (left); they got to be in the same small group


Our friend Sean, Sarah's brother, working on a bot with a vertical conveyor that he used to pick up balls from the floor by pressing them against a wall in a game where you tried to get balls to the other team's side of the wall under a time limit

I envy the kids the chance to do robot camp...not least because they played capture the flag when they had breaks

Notice the manly choir shirt on my boy Ethan here. You can't actually read anything into it since his attire is mostly random but we're happy he does enjoy choir so much.

What, me, mad scientist? I'm going into zoology. This robo stuff is just a sideline.
Ethan and Chloe went to robot camp last week. Chloe's group focused on Lego NXT robots, while Ethan tried a new-to-us system called Vex, which has erector-set-style parts, and a brain that can control 8 to 10 motors. On Friday they had a showcase with some battlebot-style games; it was a lot of fun.

These photos are all by our friend Twila.

Chloe was ready to kill something because her robot didn't work the way she wanted when she displayed it in autonomous mode. I had to trot out a story about my own time at camp, when a program I wrote screwed up on a big screen in a big auditorium. I may have embellished a little.

Chloe came home from day one of camp and started building things with our Lego NXT set, and it was a lot of fun to see her play with programming it.

Friday, June 04, 2010

The North Skirt

Electronic clothing that does something useful: the North Skirt is decorated with rows of LEDs. The row that points north lights up. Video.

Tuesday, April 06, 2010

Fixed some headphones

My son had pulled the wire out of one side of a pair of cheap headphones. These things break all the time, but they're so cheap I rarely think to fix them. This pair had an ear-wrap feature that he seemed to like, though, so I cracked open the casing on the speaker and discovered that the wires had simply come off their solder pads. A little wire-stripping and solder later and we were back in action. I was even able to snap the casing back together without glue.

It's not always easy to fix modern products, but when you can, it's a great feeling to avoid throwing something into the trash stream.

Thursday, February 25, 2010

Arduino electric bricks

These components make it possible to hook up stuff to an Arduino board without doing any soldering. It's an interesting option, especially for, say, a hacker who can handle a little code but isn't interested in soldering.

Saturday, December 19, 2009

Make a complex walking robot with just two motors


I'm kind of in love with this project. I had noticed the Jansen walker devices a while back. But I didn't realize anyone made smaller versions. I like walker-type robots, but usually they involve lots of motors for all the different joints. This method does all the complex movement via linkages between the parts. So you get this complicated-looking bot, but the electronics can just be an Arduino controlling 2 motors, or perhaps a Lego NXT doing the same.

Monday, November 02, 2009

Pluggable sensors for Arduino


MakerShed is now offering a product that allows you to plug various sensors and a display into an Arduino, without soldering. This is a great idea, making the Arduino more like a cheap open-source Lego NXT.

The $50 price for the set isn't bad, either.

I've still got a nice Arduino-based game kit lying around. Haven't spent time on the hacking lately.

Monday, May 11, 2009

Arduino LED control with potentiometer

Some friends were nice enough to give me a Fry's gift card for my birthday. I hate how Fry's is always tempting you in the door with prices that turn out to be based on mail-back rebates that don't always go your way. But this card was a godsend when I needed more components to use to play with my Arduino board. So I got a couple of potentiometers and some LEDs and resistors and I'm in business.

That same evening, I wired up 4 resistors and a potentiometer on the breadboard. I had each led connected to a different digital IO pin -- pins 9-12 -- and the pot is on analog pin 2.

Then I wrote some code that works like this:

- It turns off all the LEDS
- It reads the pot value (range of 0 to 1023)
- If the pot value is more than 0, it lights LED1.
- If the value is more than 1/4 the total, it lights LED2. More than half, light LED3; more than 3/4, light LED4.

The result is a gadget that shows between one and four LEDs lit, depending on how far you dial the potentiometer. That's no big deal, the important part is that I was, that same evening, able to demonstrate using the pot to control something.

Here's the code I used. I'm also sending the pot value back to the computer through the serial link, but I'm doing something wrong there, it's getting random characters....I haven't figured out how to properly convert the int value from the pot into a string. I'm realizing now that the Arduino/Processing language is basically C, and C has lousy built-in string support, and I'm used to scripting languages that are good at strings. Of course, an Arduino doesn't even do floating point arithmetic; it makes sense to keep the code simple and low-level for its purposes.

/* Several LEDS
light, and control, several leds

1. Make 4 leds blink in alternation
2. Read ANY value via serial, from ARD
3. Hook up a pot, read its value


made from Blink without Delay
*
* Turns on and off a light emitting diode(LED) connected to a digital
* pin, without using the delay() function. This means that other code
* can run at the same time without being interrupted by the LED code.
*
* http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay
*/

int ledPin1 = 10;
int ledPin2 = 11;
int ledPin3 = 12;
int ledPin4 = 9;
int value = LOW; // previous value of the LED
int oppvalue = HIGH; // opposite value
long previousMillis = 0; // will store last time LED was updated
long interval = 1000; // interval at which to blink (milliseconds)
int potPin = 2; // analog pin the pot is on
int potVal = 0; // initial analog value
char potStr[5];

void setup()
{
pinMode(ledPin1, OUTPUT); // sets the digital pin as output
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
pinMode(ledPin4, OUTPUT);
Serial.begin(9600);
}

void loop()
{
// here is where you'd put code that needs to be running all the time.

// Start by turning off all the LEDs

digitalWrite(ledPin1, LOW);
digitalWrite(ledPin2, LOW);
digitalWrite(ledPin3, LOW);
digitalWrite(ledPin4, LOW);

potVal = analogRead(potPin); // read the value from the sensor
// this should be btw 0 and 1023

itoa(potVal,potStr,10);
// standard function, takes int, string, and then BASE = base 10 math

Serial.print(potStr);
// Not quite working....returns chars but they aren't numbers like I expected.



if (potVal > 0) {
digitalWrite(ledPin1, HIGH);
}
if (potVal > 255) {
digitalWrite(ledPin2, HIGH);
}
if (potVal > 512) {
digitalWrite(ledPin3, HIGH);
}
if (potVal > 767) {
digitalWrite(ledPin4, HIGH);
}
}

Wednesday, May 06, 2009

My first arduino: a DC Boarduino kit

I built my first through-hole soldering kit this weekend, and also my first arduino. I'm darn happy about it:

  • I built this thing the same weekend that it came in the mail. My usual practice would be to let a kit like this sit and ferment for weeks.
  • My first kit worked almost the first time! When I was building it, I got done, applied power, and it wouldn't work. And then I saw that I had one resistor left over. And I had to drill a hole through some solder that I'd accidentally allowed to fill a hole for that resistor, while maneuvering around all the other components. On the other hand, NONE of my neophyte solder connections were bad, so after I installed the missing piece, it worked great. This is like the principle of letting a kid win the first time they play a game. If I'd broken this first kit, I worry that I wouldn't stick with the hobby.
  • It loads code pretty fast.
  • My kids seem interested in learning to solder and work with electronics. This is going to be fun.
In general, it's exciting to have something to work with that involves hardware, but also has a strong software component. With an arduino, most of your circuit is changeable and development is therefore fast.

I've already had some fun playing with parts from my junk box. I think this'll make it possible to make lots of things out of junk.

On the other hand, I had intended to build most of the projects from Making Things Talk. However, the components used for some of the coolest projects in that books are pretty expensive -- bluetooth modules that cost $60, GPS modules, wireless networking modules. Unfortunately, it looks like the sort of modules that are easy to interface to a board are expensive, even as the consumer versions of such things become super cheap. But since an arduino can speak USB, maybe I can interface to some castoff parts that way.

(When I sat down to write this post, I decided there were probably lots of posts out there about people's first arduino boards. And there are.)

Tuesday, April 28, 2009

An excuse to finally buy an Arduino, from 100 days of writing

I didn't set out, exactly, to write for 100 days straight. Instead, I tried to write every day for a month, one month at a time. Then when I hit around 80, I realized I was getting close to 100 and that was a motivator. 

But my very next thought was that I ought to come up with some way to reward myself. At first I didn't have any ideas for this, and I thought I wouldn't do much of anything. But that didn't last. After all, once I had this idea, I was basically scooting through the world with a built-in justification for anything I wanted. The purse strings were definitely loosened. 

So  when Make Magazine's Maker Shed announced a sale ending April 30 and I realized their inventory included a bunch of Arduino items, it was a perfect match. I bought a copy of Making Things Talk last year, and have been intending to get an Arduino board or seven and get started making electronic things. 

So right now, a DC Boarduino and a Meggy JR RGB are headed my way. Now, I would have certainly bought some flavor of Arduino before too long, but although I've been wanting a Meggy, it seemed too much money for my unproven electronics hobbying.

Arduino boards are programmable controller boards with open-source hardware and software. You can write the code in a free development environment on your PC and then download it to the board via USB. 

The DC Boarduino is a version of the Arduino designed to be dropped onto a breadboard for easy prototyping. I figure this is a good thing for me to start with. My past history is of hacking small things together, playing with them, and then taking them apart to try something else. 

A Meggy is a very simple game platform. It marries an Arduino programmable board with an array of three-color LEDs, a sound system, and some buttons. It allows you to do fun stuff without too much work, which is great, but it can't do high-quality graphics. Of course, I'm not going to devote the time to write code for high-quality graphics, either. It's a different approach to Arduino, because it has actual useful things attached to it, where a regular Arduino doesn't DO anything by itself.  But simple arcade game things are something I get a kick out of messing with, so this too seems like a good way to start with electronics. 

Thursday, February 16, 2006

LED Throwies: They stole my idea!

The future will be just as we imagine it in science fiction, only with a strong patina of cheap slapped on top of it. Case in point: LED throwies.

These are an interesting idea...homemade battery-powered LED-lights combined with a powerful magnet gives you a little disposable light that you can throw onto a metal surface and leave there. They're cheap enough that you can make a lot of them, and batteries have gotten good enough that you can get up to two weeks of light out of them.

But I saw this and I said, HEY -- I predicted that. Because back in 2000 I painted a picture for some friends of something kind of similar...though my thought was of something smaller and with built-in radio control. But you can have LED throwies right now...if you're willing to make them. I don't really suggest that you throw them just anywhere though....why leave batteries lying around like that?

This is much more gritty and real than anything I've seen in fiction, right down to including environmental hazards. I love it. Still want ones with Bluetooth remote control built in, though.
--------------time warp to Aaron's journal 12/20/2002 -------

Okay, so here's a wacky idea i thought of in a lunchtime conversation here at Dell: spray-on christmas lights. This is sort of nanotech. Basically, you have a spray can full of tiny lights. Each light is an integrated unit with a timer or chip brain and a battery. No, better yet, they just receive a signal from a small base station. The signal turns them on or off and the base station has a built-in timer.

This wouldn't really have to be nanotech, and maybe that wouldn't even be good: how about STICKERS. Peel-and-stick, with all the electronics built in.

Best feature of all would be to have them biodegrade when their batteries run down or on command or something.

But odds are it would be difficult to build this with current tech without including environmentally toxic materials. Still, I wonder if you could invent a cheap battery operated sticker. Also organic LEDs are being worked on, based on ideas from fireflies. They're brighter, less toxic, and may be amenable to flexible displays.
---------------------------