0

Expanding the Arduino: cheap ways to add output pins and power

Posted by Erica on Jun 9, 2010 in Electronics, Making

For the LED stairs, I need to control 14 LED lamps and 2 sensors. From the beginning, I had in mind an Arduino as the microcontroller for this project. Although it is possible to do a primitive version of these stairs without a microcontroller, having a brain at the center gives many more options. And a basic Arduino is (relatively) inexpensive. The Arduino Pro Mini, which I am planning to use, is only $19.

Arduino Pro Mini

Arduino Pro Mini

The Pro Mini has 14 digital input/ouput pins. Each output pin can produce 5V and up to 40mA. This is more than enough for a single LED. But I will be using LED lamps that require 12V. We don’t have enough power.

Antoher issue: these pins need to control all the LED lamps plus the sensors. And if you want to do any debugging, 2 of them need to be reserved for serial communication. We don’t have enough pins.

I was able to come up with solutions to these problems. It occurred to me that the need for “more pins, more power” must be a pretty common one for micrcontroller projects in general and this might be useful for other people to know.

How to add output pins

The simplest way to increase the number of ouput pins is just to buy a bigger board. The Arduino Mega provides a whopping 54 output pins. But it will cost you: the Mega is $50. And unlike the basic Arduino, you are limited in your choices regarding form factor and input power. It’s big with lots of deluxe options and that’s what you get.

The way around this is to use the Arduino to talk to another chip, called a shift register. An example of this is the 74HC595. The Arduino takes a few pins to talk to the shift register, which has 8 output pins of its own. The Arduino tells it which ones to turn on and off. Even better, the shift registers can be daisy chained so that one Arduino can talk to multiple shift registers without using any more Arduino pins.

This does increase programming complexity because the Arduino must talk to the shift register in a specified protocol. Fortunately, there is code out there that other people have written (this is the nice thing about using a popular platform). There is an excellent tutorial on the Arduino site called ShiftOut. There is a lot of stuff on the the site but it can be very hard to find, and that was true here.

As for cost, a 74HC595 will cost $0.35 or less…much cheaper than upgrading to a Mega!

How to increase output power

I already knew the answer here: add a transistor. The output pin switches a transistor which can be used to carry much greater current and voltage. The question is, the best way to implement this. I already had a painful experience in building my Speed Vest. In order to drive the electrolumincescent wire, it was necessary to switch high voltage, AC power. For that project I blindly followed the authors’ design and soldered 13 triacs in point-to-point wiring on an Arduino shield. That was not an experience I wanted to repeat.

Integrated circuits are all about packaging transistors together, right? I should at least be able to find a chip where they shared a common input voltage and ground, which would reduce the number of connections required by a factor of 3. And if it includes the protective diodes, even better. There is a famous chip that does this, called the ULN2803A. It has eight Darlington array transistors and is designed to be controlled by the 5V logic the Arduino uses. Since there is one pin for each transistor, no programming is required.

For a nice overview of this topic, see this article on using microcontrollers with switching transistors.

Cost of the ULN2803A? I got it at Arrow for $0.51.

Doing both at once

So far so good. We could take care of everything by adding 2 shift registers and 2 Darlington arrays. Pretty good but more components than I’d like. Is it possible to find a chip to do both tasks at once? Yes.

More knowledgable readers may already be wondering about LED matrix drivers. Using an Arduino to talk to sets of LEDs is a very common task and there are no shortage of articles on this. There are some nice libraries that have been developed too. In general they were not suitable for this project because despite the word “LED” I am seeking to drive higher power devices — LED lamps. Also, the matrix paradigm imposes certain requirements as far as connections and addressing that weren’t relevant here and that I preferred to avoid.

Eventually though I found the right kind of LED driver: the M5451. It can handle 12V power and can control 35 devices with a unified brightness control. Although the brightness control isn’t required here, it is a nice feature; the right type of signal — pulse-width modulated – can extend the life of the LEDs.

Next step, find code that allows the Arduino to talk to the M5451. (I am not that interested in writing device drivers.) Fortunately this chip is used by the Lightuino, which is an open-source project that (with some modification) has the code I need.

Cost of the M5451 (also listed as MM5451 at some suppliers): $3.15.

Although the M5451 should do everything I need, I’ve ordered the other two chips as well just to see how each option works. I suspect they will be useful for future projects too. Can’t wait until everything shows up and I can start breadboarding!

Tags: , , ,

 
0

Automated LED stair lights

Posted by Erica on Jun 4, 2010 in Electronics, Making

I’ve been hunting for a new project to do ever since completing my contest entry for Robie. I’ve done a number of interesting small things, mainly with the kids, but nothing too big. Then recently Make: Online featured this:

When someone walks on the first step, the LEDs light up in sequence. Aside from looking cool, this is a great safety feature. I have had more than a few times where I have stumbled on stairs in the dark. Although we have convenient overhead lighting for most of them, I can be reluctant to use it, especially if the kids are asleep upstairs.

The only problem with this video is that there are no technical details. There is a website, which features the video, but no information.

There is a stairway LED lighting Instructable with more details. This is a simpler version, and less good from my perspective. The wires are all visible. Only the left side of the stairs is lit. And the artistic delay between lighting each stair is gone. It does provide a basic framework and that is helpful. I have learned that presentation is 80% of the oomph factor in these projects — so, we need to upgrade.

Looking very carefully at the video, we can figure out a few things. The LEDs and the sensor are all on one side of the stairs. Both sides of the stairs appear to be lit because the focused light from one side is bouncing off the white wall. The LEDs are set into metal plates that sit in the wall. There is a sensor that sits on the bottom stair, the same side as the lights; there is no receiver on the other side. The sensor appears to have two openings, which would be consistent with ultrasonic, but I can’t be sure of that. When the sensor is triggered, the stairs light up in sequence. After a fixed amount of time, they turn off in sequence, even if the sensor at the opposite end is not triggered.

I will need to cut into the wall to achieve the same look. I have done this before, but not often. I will also need to run wires in the walls. That, I have never done. In fact, I’ve never seen anyone else do it either. A little research on running wires revealed that the key tool is fish tape, a reel of flexible steel rod that can be guided through the wall with a wire attached. I always like to buy more tools so am now the proud owner of this:

Fish tape

25' fish tape reel

Since I am only dealing with one wall and do not have to go between floors, I think this is a manageable project. My husband was fairly calm about my wanting to put holes in the wall. He suggested that I start with the basement stairs first for practice. A reasonable idea.

The Instructable stairs use two timer chips to operate. I plan to use a microcontroller for nicer effects, probably one of the Arduino Pro Minis that I recently ordered.

Next issue, the sensor. I have a PIR sensor lying around that could be used. I am a little concerned that it will have too broad an angular detection range. I only want the sensor to trigger if someone steps on the bottom stair, not walks in front of it. I could also cannibalize Robie’s PING))) ultrasonic sensor, though running that continuously would probably increase power consumption. (A quick glance at the specs shows PING))) current requirements of 20mA, while PIR is >3mA.) The Instructable uses IR, but that requires elements on both sides of the stairs. I only want to run wires in one wall! The author mentions that IR sensors work well here because they don’t trigger in daylight. That’s a nice feature, and to get it with a different type of sensor I will need either a timer or a photocell. Probably a photocell, that is simpler and I have bags of them lying around from my line-following robot project.

The biggest unknown are the LEDs. I don’t know what model they are. I want them to be powerful enough to give off good illumination and reflection. I would very much like to stay within the world of battery power. If 120V are needed I don’t think I will comfortable running that type of wiring. As it is I will need to learn the applicable electrical code. And, it would be nice if they came in a suitable wall mount. Time to do some research.

Tags: ,

 
1

Made by Hand: Searching for Meaning in a Throwaway World

Posted by Erica on May 31, 2010 in Making

Made by HandMemorial Day weekend is a good time to catch up on reading, so I picked up this DIY manifesto by MAKE editor and Boing-Boing founder Mark Frauenfelder. It was an easy and pleasurable read.

The book starts off dramatically with the author’s decision to move his family to a South Pacific island. He quickly learns, along with anyone who has ever read The Sex Lives of Cannibals, that these islands are third-world countries with rusted buildings and sub-standard medical care. He moves back within four months. He decides to find another path to a meaningful life — one that will still allow him the comforts of U.S. suburbia.

His solution to this problem was to explore ways of making his own food and tools and educational experiences for his kids. The book repeats a pattern for most of this: he finds a really interesting person who is living at the extreme, documents their lifestyle, then takes a more moderate approach himself. As with the island excursion, he is willing to try some truly unusual projects, which mostly don’t last. This makes the book accessible for people for me who are never going to give up going to the supermarket, but still want to enjoy the satisfaction of making. And as such, he reaches some of the same compromises. No, we won’t homeschool our kids, yes we will supplement a standard school education with hand-on projects.

I have never tried to formalize my reasons for creating things. Intellectual stimulation, building new competencies, and feeling more control over the physical environment are certainly part of it. And if you are very lucky, you end up with something beautiful or entertaining. Whether one can fully claim that meaning is being added to the world, I don’t know. Unless one is fully dedicated to recycling, you will still end up buying parts and tools and driving to Home Depot. I am fully aware that I am still a consumer. No question though that it can be very satisfying.

Frauenfelder notes that the amateur science movement suffered a blow when personal computers were invented; many of the people who might have done science or DIY gravitated to this new platform. But as computers and the web have matured, many people are tiring of living a fully virtual world and want to make something tangible. I believe this is correct. I’ve certainly experienced this feeling myself, and have heard many IT colleagues and academicians say similar things. Part of me wonders, though, if this too will be a phase. Frauenfelder has shown himself to be a genius at finding trends and was a key part of the Internet bubble. According to the book he has moved into DIY for the last 18 months — not long. Will whittling spoons still be meaningful ten years later, or will it seem a poor use of time?

Ironically for a book that celebrates handcrafted objects, I experienced it in virtual form. I alternated between my Kindle and the Kindle App for the Blackberry. They both performed admirably. I had never really used the Kindle App for the Blackberry before. Since my Blackberry goes everywhere with me, and has a backlight for nighttime reading, this means I will never be away from a vast library. That is both an exciting and daunting prospect. It is yet another opportunity for the virtual world to overwhelm the real one.

 
0

Potato batteries

Posted by Erica on May 24, 2010 in Electronics, Making

 

Laurel at Arts and Technology Night

Laurel went through a rite of passage last week, her first science fair. This was a non-competitive event, an Arts and Technology Night organized by her school. She really wanted to exhibit something so we got her signed up.

After looking online for ideas, Laurel chose to do food batteries. Batteries are very simple — two electrodes and an electrolyte will make one. Lemons, tomatoes, potatoes, and a variety of other foods will work. We opted for potatoes as a stable material and minimally corrosive with respect to the electrodes (meaning that they last for a long time). We used galvanized nails — nails covered with zinc — for one electrode; and pennies for the other. Alligator clips were used to connect multiple potatoes in series.

I thought this would be a pretty trivial project, but as usual, there were some wrinkles. The coating on the nails was thick enough to impede conductivity with the alligator clips. Version one, I filed off part of the coating; version two, I broke out the Dremel and used the wire brush to get the coating off, a much prettier result. We initially tried copper wire from the craft store for the copper electrode, but that had some varnish on it that caused problems. The pennies worked well as a substitute.

Potato battery

Potato battery. I tried soldering wires on, but decided to stick with the alligator clips.

Each potato yields approximately 0.7V. I was impressed with this; a typical small battery gives 1.5V. But potatoes are extremely current limited. At best, they yield 0.2-0.4mA. I ordered some low-current LEDs, and did get them to light up. They are extremely small and dim so I didn’t think this would be an effective display. A little hunting on YouTube showed various potato battery videos. A few people were using calculators as the powered item. It turns out, those liquid crystal displays use very little current — and as I thought about it, I hadn’t changed my calculator batteries in years. I opened it up, removed the batteries, attached the alligator clips to the terminals, and voilà. A working calculator with an empty battery chamber.

I was very happy to have this working. The next day we looked at it again and it didn’t work. There was voltage but no current. I believe this is because the punctured skin of the potato caused it to dry out in that area. By moving the electrodes to new spots, the potato “revived” and became useful again. This meant that we would have to assemble the project on-site the evening of the show.

The alligator clips tended to fall off the calculator. Not too surprising, as the calculator was not designed to be powered this way. I made the mistake of trying to solder on a wire to the negative terminal, and was a little bit careless as to method, ultimately ruining the calculator. A sad moment, as this calculator had been with me for 15 years. A quick trip to the drugstore got us another one for $5. For the experiment, this new one was an improvement: a larger display, and very low current / power requirements. It can run off either a coin battery or solar power, with power consumption in the microwatt range. I think if you breathe on it, it will run. At any rate the potatoes certainly had no trouble with it. I taped over the solar cell and once again we were in business.

Some adventures getting the project to the school and set up, which I will skip over. Lesson there, as always, personal involvement is important. I was there early, definitely a good thing. After we were ready, I wandered around and saw a boy whose project involved the exact same solar robot that Holly and I had recently made. Like us, he had difficulty with the power connections, and was looking rather despondent. Having been through this I was in a perfect position to help, and I got it hooked up for him. His mother was very grateful!

Solar robot at the science fair

Solar robot at the science fair. This is the tethered plane configuration.

Laurel was one of four kindergarten displays, and she was the only one from her class. Supposedly the science exhibition was to start at 8pm, but since this was the most interesting part of the evening (in my humble opinion) people were wandering in from 6:30 on. Kids loved playing with the calculator, so we had to keep an eye on it, as the clips would periodically come off. The principal stopped by and had a nice conversation with Laurel about her project.

Our idea was not completely original. There were two other food battery projects. One was another potato battery one, but done from a kit, so they had nice zinc and copper strips, as well as a few small electronic devices to show it off. The other was a bit more original (though still starting from a kit I think) and used a variety of batteries, including potatoes, lemons, soil, and the human body. There were some excellent experiments at the show. One family had four kids with displays, one of them the potato battery kit. The father stopped by and was very complimentary, saying (correctly) that it is harder to do something homegrown than a packaged project.

But, packaged projects have some advantages, and we discovered this. Our power connection failed after excessive use, pulling one of the terminals out of the calculator and rendering it inoperable. Laurel was extremely upset. We had redundant supplies for everything except the calculator – the drugstore only had one — so that was the end of the demonstrations. Still, we had a great time and learned a lot. I’m sure there will be more science fairs in our future!

Tags: ,

 
1

Playing with a solar robot

Posted by Erica on May 18, 2010 in Electronics, Making

Holly has been begging to build her own robot ever since I made Robie. Fortunately there are some excellent options for kid-friendly robot kits. After browsing the MakerShed we decided to get the 6-in-1 Educational Solar Robotic Kit.

6-in-1 Educational Solar Robot Kit

6-in-1 Educational Solar Robot Kit

This was a good choice. As the box states you can make six different robots. We’ve done three so far and it is extremely easy to put each one together. I did run into one annoying problem with the kit. The power connections are made by forcing stranded wires through a tight coil spring. To switch configurations, you need to do it four times. It is not always easy to do. Out on the playground, the force involved shook up some components inside the gearbox, reducing the clearance so that the rotor wouldn’t turn. At first I though the solar cell had died. Eventually I realized that a (fairly quick) rebuild of the gearbox would fix it, but it was a frustrating experience.

Power connections often seem to be the most problematic part of a project…why is that I wonder?

I was impressed with the high RPM of the gearbox. This thing can really go! Take a look at the video of the solar car:

Of course, it does not have a lot of torque. The car does not do very well uphill.

We’ve had a lot of fun with this, and for $19.95, it was quite a deal.

Tags: , ,

 
0

More toys for the workshop

Posted by Erica on May 17, 2010 in Making

During my robot build, I was constantly wishing for a drill press. I put off purchasing one because I couldn’t decide if I really needed a full-sized press, where to put it, etc. I eventually stumbled on a drill press that is small enough to fit on (or be stored under) my worktable, but has enough features to do everything short of very large pieces or thick metal. I am now the proud owner of a Proxxon 38128 TBM Bench Drill Machine. It weights only 8.4 lbs and has a work table of 8 21/32″ x 4 23/32″. The press has three spindle speeds of 1800, 4700, and 8500 rpm.

The drill press ships with steel collets to hold the bits, but as many people do I want the convenience of a keyed chuck. Amazon recommends — and offers as a bundled deal — the keyed chuck made by Proxxon. But, Proxxon is a German company, and their chuck is metric. It will hold bit shafts up to 6 mm, or 15/64″. In the U.S. it is very useful to have 1/4″ (16/64″) shaft sizes available. So with some trepidation, I ordered the Milwaukee 48-66-0817 3/8-Inch Keyed Chuck instead. I am happy to say that it fits well.

Here is a pic of the drill press, ready to go. A vise is sitting on the worktable, useful for smaller pieces, and the keyed chuck is on. A greater work distance can be obtained by removing the vise and/or switching back to a collet.

Proxxon TBM 115 drill press

Proxxon TBM 115 drill press

In my optimism I thought I might be able to do some light milling with this as well, and ordered the KT 70 compound table to go with it. A little research has convinced me this would be a bad idea; drill presses are good at withstanding vertical pressure, but mills apply horizontal pressure as well, and milling can ruin a drill press. So, the compound table will be returned. Mills are considerably more expensive, so it will probably be a little while before I get one.

On the electronics side, I picked up a DSO Nano from SparkFun. This is an oscillosope, with lots of technical specs, but the picture will show the best part of it:

DSO Nano oscillosope

DSO Nano oscillosope

This scope looks cool! When I saw the pictures — and read the good reviews — I had to get it. I haven’t used an oscilloscope in decades and I don’t know the subtleties here, but the interface is fairly intuitive and I was able to do some basic operations immediately.

Now the question is, what to do with this stuff. The Speed Vest and Robie the Robot were both major projects. I don’t have anything that complex to do now. That is partly due to the fact that Bike Virginia is coming up at the end of June, and my training schedule has gotten more intense. I’ve been doing some smaller projects with the kids, and I do have some upgrades planned for Robie. For the upgrades and just to play around with some ideas, I recently ordered various components that caught my eye — including a couple of Arduino Pro Minis and a Miga Nanomuscle. The Nanomuscle is the size of a thumb tack and can lift a bowling ball. A rope-climbing robot might be neat…

Tags:

 
0

Automating Windows

Posted by Erica on May 13, 2010 in Web and Computer

I have a great job (read: limited hours, excellent pay) but one of things I like least about it are the repetitive IT tasks I have to do. Things are stable enough that a full sysadmin would be a waste of money, but still, certain things have to get done. For a long time I have used Remember the Milk, an excellent free service that reminds me as needed for repetitive tasks like cleaning out log files, checking disk space, changing passwords  — good for personal items, too — but I still have to do the tasks. My dream has been to find a way where I can automate them. UNIX of course would offer this capability, though not always in the most user-friendly way.

Today I was confronted with a situation where a task we have been doing weekly now needs to be done daily. I didn’t feel like the hassle of writing code, or doing it manually every day myself. Because the task is done on our production server, this is not something our customer service department can do. It involves running a database procedure and e-mailing the date-stamped file to a mailing house.

A friend of mine had mentioned a program that allowed you to write macros in Windows. I wanted to find something slightly more robust but with the same idea of scripting a sequence of events. And, without having to write any scripts. After hunting around I found a program called WinAutomation. This has a nice little GUI where you can drag and drop actions like “Send E-mail” and “Delete Files” into your job. It has flow control and limited but serviceable error handling.

WinAutomation Job Designer

WinAutomation Job Designer

I was able to learn the program and write my mailer job in a few hours. The hard part, as with many programs, was thinking through and handling each possible error. I was so thrilled by this that I decided to tackle another tedious job, deleting Tomcat log files. Some of these roll over each day, while others are date-stamped with the time the server started but can’t be deleted — so for those, the newest version needs to be left alone. Strangely enough this job was harder to write than the first one, but eventually I got that done too.

I’m very happy and looking forward to writing more jobs. The price is pretty reasonable too — $129 for the standard program, or $199 to include the compiler feature which allows you to turn a job into an executable that will run on computers without WinAutomation. As with most of these things, you can get a free Window scripting alternative. But it doesn’t have a GUI, and if I’m going to learn a new language, I might as well code it the old way.

WinAutomation apparently has been offering bloggers free licenses to review the product. Alas, I am not in that category :) . Just thought it was a neat product.

Tags: , ,

 
0

Robie the Robot lives!

Posted by Erica on May 9, 2010 in Making

A few days ago I put in the obstacle avoidance programming for the coasterbot. Almost immediately, he acquired a real personality. The algorithm works incredibly well. Even though the first version of my code had significant bugs — typos, forgetting that moving the sensor servo takes a finite amount of time, etc. — he was able to navigate quite competently. And after some corrections, he did even better.

There were some minor hardware issues I discovered. The Solarbotics voltage regulator had a high-resistance short which would cause the 9V battery to drain after a day or so, even if the robot was turned off. I was able to get rid of it but that drove me crazy for a while — I wondered why I had to keep recharging the battery!

Also, solderless breadboards have their limitations. The Ardweeny has a nasty habit of tilting in the board, disconnecting some pins and resulting in a robot that almost works; and manipulating the bot can make it tilt back, “fixing” the problem. Again, for a while I blamed the batteries until I figured out the true cause. Other breadboard connections would sometimes work loose, particularly for the PING sensor or servo. I soldered solid-gauge wire onto the stranded wires of the AAA case in order to make that connection more solid.

So, on to the fun stuff — a working robot! Here are some videos showing him in action.

Kids Playing with Coasterbot. The title says it all. The kids really had fun with this.

Official “Contest Entry” Video. Robie navigates his way around a room and out of some tight corners. I learned some features of Microsoft Movie Maker (free with Windows) in making this. Note the title sequence and credits. :)

I have written up a detailed summary of Robie’s construction and operation, including schematic, bill of materials, and more links to photos and videos. Please check that out if you want more information.

Tags: ,

 
0

Coasterbot gets a pair of eyes

Posted by Erica on May 2, 2010 in Electronics, Making

I was featured in MAKE Robot Dispatch #7 — thanks guys! Hard to believe that there is less than a week left in the contest.

One of the requirements of the contest is for the robot to do some obstacle avoidance. The Jameco bundle came with some switches to do bump sensing. While this might be the cheapest solution, it certainly isn’t the simplest. I decided to spend a little bit for a PING))) ultrasonic sensor. This fires a short ultrasonic pulse to determine the distance to the object directly in front of it. I also purchased a mounting bracket kit so that I could rotate the sensor in different directions. (This turned out to be a bit of overkill — I didn’t need the brackets, just the servo itself. But the servo extension cable was useful.)

This was a pretty easy install. No soldering required, I just used 22-gauge wire to plug into the female headers and the breadboard. I needed to run the servos off the 6V batteries in order to get sufficient power. Also, the Arduino servo library requires pin 9 or 10 to be used, which I did not immediately appreciate. For the Ping sensor, there is a user-contributed library which worked fine, again, after I figured out the right pin to use. Pins 0 and 1 are grabbed by Serial which I always use to debug; and pin 2 also seemed to be in use (because it’s an interrupt?), but pin 3 was fine. I am very glad the sensor has a green LED to show when it is firing, otherwise that could have been nasty to debug.

In the video below, the robot is moving, turning the sensor, and taking readings. This shows that the power supply is sufficient, at least with relatively fresh batteries.

There is no obstacle avoidance yet. But with all the hardware in place, this is purely a matter of programming. I am confident that I can get it working, though elegance may be another story. I have some ideas for artistic design which I am hoping to work on tomorrow, with the help of my four year-old daughter.

Tags: , , ,

 
0

Coasterbot moves!

Posted by Erica on Apr 26, 2010 in Electronics, Making

With the electronics done, it was time to go back and work on the chassis. As before, the DVDs are linked with screws. I wanted the servos to be firmly attached. Since we removed the controller units, this left a lot of empty space in the case, allowing for this type of attachment:

Servo motor attached to DVD

The servo motor is attached to the DVD with a pair of screws.

I still don’t have a real drill press (sigh) but I did get some extra pieces of wood so that I could make things a little bit more precise.

Drill press alternative

After attaching the servos, I decided to follow the steps in MAKE: The one hour coasterbot in order to move things along. This meant sticking things on with foam tape, a good method at this point as I may make position changes depending on the art that gets added. I wired up the solderless breadboard with the voltage regulator, Ardweeny, and H-bridge L293D chip exactly as described in the article. I also downloaded their Arduino sketch, which makes the robot perform a set of maneuvers. My body structure is a little different, keeping all the electronics on one CD rather than two.

Now, time to make the bot move! At first, this went pretty well. When I switched everything on, the robot started its pattern of movements, as defined by the sketch. But after a few minutes, the wheels started to move more slowly. Then they stopped moving backwards. Then, they completely stopped.

At first I thought this was a battery issue. After trying multiple sets of batteries and testing the output voltage, it became clear that wasn’t the case. Each time, the same thing happened. If I walked away from the bot for a long time, it would work again, then stop working.

A tip in the MAKE forums suggested that I look to see if anything was overheating. Something was — the L293D chip. This is an H-bridge, used to drive the motors. Typically DC motors need to have a voltage applied across them to make them move. To make them go in the opposite direction, the sign of the voltage must be reversed. H-bridges provide this capability in a convenient package. Since this one was overheating, I thought there might be an issue with current being overdrawn. Hooking up the motors directly to a power source, I could see they were drawing 150mA apiece, or 300mA total — even with no weight on them – while the L293D is rated for 500mA.

I decided to remove the wheels altogether. Suddenly the motors were turning a lot more rapidly, and the current draw was down to 70mA each. Turns out that the wheels were too far in on the very short coupler shaft. When the shaft turned, the wheels rubbed against the side of the case, causing extra work for the motor. Servo motors generally deal with precise placements and don’t worry too much about friction. For continuous motion, however, that quickly becomes an issue. I loosened the screws to move the wheels out a bit, and then the coasterbot was able to do a fast little dance, as shown in the video below.

The two “tail” DVDs can rotate with respect to the main body. Since this pattern goes clockwise, the tail is curved that way throughout. I haven’t figured out what their functional purpose will be yet, but if nothing else they provide extra surface space for instrumentation or loads.

Next up: add some sensors so that the robot can navigate the space on its own. I have a PING))) ultrasonic sensor (used to measure distance from objects) as well as a mounting bracket, and a servo motor to point it in different directions.

Tags: ,

Copyright © 2010 NovoKane All rights reserved.
Desk Mess Mirrored v1.4.5 theme from BuyNowShop.com.