Posts with «robotics» label

Nerf gun prototype 1

The Santa Cruz Robotics Club met again today, for the first time in over a month.  The current project is not the underwater ROV (we’re all getting very tired of waterproofing problems), but an automated Nerf gun.

The club members came up with some very ambitious plans for the Nerf gun (which included getting a Raspberry Pi and doing image processing to have a self-aiming gun), but I’m making them build quick-and-easy prototypes to try out their ideas one step at a time.  I don’t think I can get an Raspberry Pi this summer—the companies doing the distribution aren’t taking more orders (just expressions of interest) and they don’t expect to clear the current backlog until September at the soonest.  They are doing batches of 100,000 units, and that doesn’t seem to be enough to shrink the lead time—if anything, the lead time is growing.

So, giving up on image processing for this summer, there are still a lot of things to build.  For today’s four-hour meeting (which included a 1-hour trip to the hardware store and a fifteen-minute snack break), the goal was simply to test out the basic launcher concept: an air reservoir pressurized by a bike pump, a solenoid valve, and a barrel.

The first prototype. The air reservoir is about 18″ of 1-½” PVC pipe on the left, and the barrel is about 24″ of ½” PVC pipe on the right.

The biggest problem was that the valve has ¾” male pipe threads, but we wanted 1-½” PVC pipe for the reservoir (because we had a piece handy—we may build a bigger reservoir later) and ½” PVC pipe for the barrel (because Nerf darts just fit inside—probably Nerf guns were prototyped with PVC barrels).  Our hardware store run was to get threaded adapters to make things fit.We wanted everything to be joined with screw threads, so that we could disassemble the components and replace them or add elbows as needed.

Note that the ½” PVC pipe is also a good size for compressed-air paper “rockets”.  The term “rocket” is a misnomer here, as all the acceleration occurs while the rocket is on the launcher—it is modeled more like a gun than like a rocket. (But my soda-bottle rocket simulator can model these paper bullets also.)  It would probably best to have a shorter barrel for doing rocket launching—just the length of the rocket and no more, since the longer barrel results in more pressure loss with no gain in launch speed.

The bicycle valve glued into a ½” female-threaded end cap was one I’ve had for a long time, as part of a soda-bottle rocket launcher. I had two of them, and both failed in testing today (the Barge cement holding the valve stem in failed—we’ve now reglued them with a different cement), though we managed some testing before the failure.

The solenoid valve we used was the same model (sold by Sparkfun) as the one used for the vacuum bottle on the ROV.  It has ¾” male pipe threads on each side.  To make it air-tight we had to disassemble it and grease the rubber membrane thoroughly with vaseline or faucet grease, but we had done that months ago, so it did not need to be done today.  The valve only works in one direction, but the high-pressure side is clearly marked by a metal intake screen, so assembling it the right way around is easy.

I was not sure that the solenoid valve would work in this application. It is not the model of valve that the compressed-air “rocket” people have used—those valves cost about twice as much and have female threaded ends rather than male threaded ends. I think that the mechanism they use may open up a bigger channel for air or water than the cheap solenoid valve sold by Sparkfun.

My first concern was that I did not know whether the valve would open up wide enough and fast enough to let a blast of air through to get a clean launch.  Second, I did not know whether we could open and close the valve fast enough to retain pressure in the reservoir for doing multiple shots.

We controlled the solenoid valve with an Arduino and the Hexmotor motor-control board (which is really overkill for one solenoid—a single power transistor would be enough to interface the Arduino to a solenoid, but I did not have one handy).  My son wrote an Arduino program to allow us to experiment with the duration of the solenoid pulse.  If it were too short, the Nerf dart would not leave the barrel.  If it were too long, air pressure would be wasted.  He allowed for 100 µsec increments in pulse duration, under control from commands on the USB serial line.

Because the glue they used takes 24 hours to set properly, we only tested at low pressure today (20–30 psi).  At those pressures, a 16 msec pulse was not long enough for the dart to clear the barrel, but a 19.2 msec pulse was easily long enough. We were also able to launch a 14g paper “rocket” left over from Maker Faire, though it did not go as high as the approximately 1.6g “Nerf” darts (I think several of the foam darts we have a different brand). We would not have expected it to go as high, since it was only accelerated for its 11″ length, not the 24″ length of the barrel for the darts, and it weighed a lot more.

One thing I thought about was monitoring the air pressure in the reservoir electronically. I doubt that we’ll put a pressure sensor in the reservoir, though, as the sensors I have only go up to 250 kPa absolute (about 21 psi above atmospheric pressure—about as low as we could fire with).  Freescale makes a 145psi (1000 kPa) sensor, the MPX5999D, but it is a differential sensor without port tubes (so would be difficult to mount) and it costs $13.

Perhaps the other thing worth doing today is to analyze how fast the Nerf dart should be going as it leaves the barrel, and how high it should fly if we shoot it straight up.  The physics here is fairly simple, if we assume that opening the solenoid valves connects us to a constant-pressure source. (In practice, we saw about a 10psi or 70kPa drop in pressure after one shot. If the pressure is P, then the force on the dart is P*area.  The cross-sectional area of the foam dart is a little hard to measure, because of the squishiness of the foam, but the inside diameter of the barrel is 1.45cm, for a cross-sectional area of 1.65 cm^2. At 140 kPa (about 20 psi), the force on the dart would be 23 Newtons.  That force is applied for about 60 cm (the length of the barrel), for a total energy of about 14 Joules.

We can use the kinetic energy of the dart to get its speed (E = ½ m v2), so for 140 kPa, the dart should leave the barrel at about 130 m/s or 290 mph. I suspect that we are not getting anywhere near that speed, for several reasons, including leakage of air around the dart, limited speed of air moving through the valve, and friction of the dart in the barrel (mainly from the pressure wave in front of it, but also from rubbing on the sides of the barrel).

We can also use the kinetic energy of the dart to estimate how high it would fly (ignoring air resistance, which is obviously hugely important for a low density object like a foam dart). The potential energy of a mass at height h is , so the height it would go without air resistance is . For 14 Joules and 1.6 grams, that would be almost 900m. I think that 20m is a more reasonable estimate for the height the dart went, though I never could see it near the top of its trajectory.

I tried adding the specs for the Nerf dart and a 60cm barrel to my rocket simulator (to get a crude estimate of the effect of air drag), and for 140 kPa I got an estimated max speed of 132m/s and an estimated max height of 52.6m. I don’t know if that height is reasonable—certainly it is better than the no-air-resistance estimate. The 6.78 second estimated time of flight seems to be fairly reasonable, though we never timed it.

Doubling the pressure increases the maximum velocity by a factor of 1.414, but only increases the maximum height to 60.8 m, a 16% increase. Doubling the barrel length has about the same effect. Air drag is what determines the speed of the dart, and that is the least well-modeled part of my simulation.

On Thursday, when they club meets again, they’ll try experimenting with higher pressures, and see whether 17 or 18 msec pulses are long enough—the shorter the pulse the less air will be wasted, and the more shots they can make from the reservoir.  It may be necessary to design a bigger reservoir or add a compressor to the design, since they eventually want a fully automatic Nerf gun, not the one-shot muzzle-loader that they made as the prototype today.  They’ll also start designing a pan-tilt mechanism for the Nerf gun, probably prototyping it out of Lego Technic components.


Filed under: Robotics Tagged: Arduino, Nerf gun, nerf guns, physics, rocket, simulation, SparkFun Electronics

New in the Maker Shed: Arduino Robot Shield Kit

My first hands-on experience with robotics and microcontrollers came from using a Parallax Boe-Bot kit with a Basic Stamp. I had no programming experience but using the included documentation and my PC, I was able to figure out how to build a robot that would react to obstacles and navigate its environment. Since then I’ve switched over to the Arduino but I still miss the experience I received from the Boe-Bot. Parallax must have read my mind because they released the Robotics Shield Kit for Arduino which is now available in the Maker Shed. They’ve taken their excellent Board of Education and transformed it into a shield (also available separately) which fits on top of an Arduino. The rest of the kit remains largely unchanged from the original Boe-Bot, which I consider a good thing.  Full documentation with over 40 activities is available online so you’ll be learning in no time. Simply add your own Arduino and a USB cable and enter into the fascinating world of robotics and Arduino!

Features

  • Board of Education Shield PCB
  • High-quality aluminum robot chassis, continuous rotation servos, and wheels
  • Boe-Boost Module
  • All the assembly hardware needed (nuts, screws standoffs)
  • Parallax screwdriver
  • Detailed online documentation and tutorials
  • All the electronic components and sensors needed for the tutorials
  • Note: Requires Arduino and USB cable

DIY cyborg appendage is less exciting than it sounds (video)

When we envision our transhumanist future, it's a little more profound than simply adding a sixth finger... but we suppose you've gotta start somewhere. Instructables user and employee Frenzy gave himself a rather primitive extra digit as part of a project for an Electronics and Robotics class at San Francisco State University. Sadly he doesn't provide step-by-step instructions for building your own cyborg appendage, but it doesn't seem too difficult. Frenzy borrowed heavily from other projects, using EMG sensors to trigger a servo controlled by an Arduino, which he strapped to the back of a glove. Like we said, doesn't seem particularly hard, once you figure out how to get the microcontroller to play nice with the sensors. Obviously this is just one small step step for DIY cyborgs. Next, we need to graph on a few extra arms to make one-man liveblogging a much simpler endeavor. To see Primitive Transhumanism #2: Sixth Finger in action, head on past the break.

Continue reading DIY cyborg appendage is less exciting than it sounds (video)

DIY cyborg appendage is less exciting than it sounds (video) originally appeared on Engadget on Fri, 08 Jun 2012 02:32:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

SparkFun launches ProtoSnap MiniBot for the budding roboticist

SparkFun struck a chord with many when it released the ProtoSnap series last year. The perforated perfboard housed not only a tiny Arduino compatible chip, but a small host of sensors and components that made assembling simple projects a snap (pun not only intended, but relished). Tomorrow, the company will begin selling the next member of its ProtSnap family -- the MiniBot. Just like its predecessors, the ProtoSnap MiniBot is based around an Arduino compatible microcontroller (specifically ATmega328) and features a number of components that can easily be detached when you're ready to move from prototype to a more permanent arrangement. The onboard selection components is fairly limited. The base is a relatively bare perfboard with a 9v battery holder on one side and two wheels connected to a motor on the other. Up front is two IR sensors that can be used for basic controls.

Of course, it's simple enough to expand on the basic platform with any host of sensors and components, like servos or RF receivers. Ultimately it's up to your imagination and skill level, which is why SparkFun is primarily targeting the kits at the educational market. The company's new educational outreach program is making a big push to put the ProtoSnap MiniBot in classrooms across the country, starting with high schools and trade schools, as a bridge from more simplistic robotics kits to the more advanced projects tackled at the university level. The completely open source robotics platform will be available tomorrow for $74.95. As soon as we can get our mitts on one our own we'll return with a thorough hands on... one that reveals just how much smarter the average high school kid is than us.

SparkFun launches ProtoSnap MiniBot for the budding roboticist originally appeared on Engadget on Thu, 31 May 2012 16:46:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Arc-O-Matic, an Arduino-Controlled Art Bot

Pete Prodoehl, inspired by this robot, created an art bot — the Arco-O-Matic — with servos hot glued to dowels, and a clothespin holding the Sharpie.

So to make it all work we start by putting an 18″x24″ sheet of paper down with a few pieces of tape, and then insert a Ultra Fine Point Sharpie Marker into the C47 (clothespin) and power it up. It then sweeps to the right, and starts drawing arcs. It’ll do this while gradually moving to the left side of the paper. When it’s done, you can switch the marker and run in again, or shift the paper a bit, or flip it upside down. At this point it’s all up to you.

Part of what I like about these art robots is the way the interaction between the machine and the human takes place. The person sort of acts as a “helper” for much of the process, but none of it could happen without the person. The person loads the paper, loads the pen, and starts it all. The machine does the actual drawing, but couldn’t do any of it without human interaction. It’s a symbiotic relationship, which sounds weird, but that’s how I see it.


MAKE » Arduino 23 Apr 15:30
arduino  artbot  arts  robotics  

Fitting a sphere

Today I had to write a program to fit a sphere to a bunch of points that were supposedly near the surface of a sphere, but were noisy and sampled in a very biased way.  Since this is obviously not a new problem, I started out doing web research.  but I didn’t look for fitting a sphere, but for fitting a circle, since that is a simpler related problem.

I found a lot of papers, including several review papers, on how to fit a circle to a bunch of points.  The “obvious” method is to  do a least-squares fit to minimize the distance between the points and the circle, minimizing , where is the radius and is the center of the circle.  Unfortunately, that is a difficult problem to solve, and even numerical methods require a lot of iterations to get decent solutions.  What most people do is to change to a slightly different problem that optimizes a different fitness function.  For example, Kåsa’s method minimizes .

There is a very nice, but very formal, presentation of the methods in a paper by Vaughn Pratt from 1987: Direct Least-Squares Fitting of Algebraic Surfaces.  This paper introduced Pratt’s method, which was later slightly improved to make Taubin’s method. I did not read these original papers (other than skimming Pratt’s paper).  Kåsa’s paper (A curve fitting procedure and its error analysis. IEEE Trans. Inst. Meas. 25: 8–14) does not seem to be available on-line.  The IEEE digital library is missing the whole 1976 year.

I did find a recent paper that does careful error analysis of both the geometric approach and several of the algebraic approaches (including the most popular ones: Kåsa, Pratt, and Taubin):

Ali Al-Sharadqah and Nikolai Chernov
Error analysis for circle fitting algorithms
Electronic Journal of Statistics
Vol. 3 (2009) 886–911 ISSN: 1935-7524 DOI: 10.1214/09-EJS419

This paper shows that Taubin’s method is theoretically superior to Pratt’s which is theoretically superior to Kåsa’s (having less essential bias), and gives a very weak example showing it is also tru empirically.  More interestingly, it also gives a “hyperaccurate” algorithm that has less bias even than Taubin’s method.  I did not read the error analysis, but I did read the description of their Hyper algorithm and the implementations of it that Chernov has on his website.

Since I needed Python code, not Matlab code, and I needed spheres rather than circles, I spent a few hours today reimplementing Chernov’s Hyperfit algorithm.  I noticed that the basis suggested by Pratt for spheres, , was a simple modification of the one used in both Pratt’s paper and Chernov’s paper for circles, .  I decided to generalize to dimensions, and use the Numpy package in Python for all the matrix stuff.  I hope I got the generalization right!

From starting to look for papers until getting the code working was about 6 hours, but I had lunch in there as well, so this felt like pretty speedy development.  I’ve released the code with a Creative Commons Attribution-ShareAlike 3.0 Unported License, and would welcome corrections and improvments to it.

Of course, after all this buildup, you are probably wondering why I needed to fit a sphere to points—that is not a common problem for a bioinformatician to have.  Well, it is for the robotics club, of course.  They’ve been having a lot of trouble with the magnetometer calibration and heading code, so we decided to try doing an external calibration of the magnetometer, which has an enormous arbitrary 3D offset.  By waving the magnetometer around in different orientations (which means tumbling the ROV once the magnetometer is installed), we can sample the magnetic field in many orientations, though far from uniformly.  The center of  the sphere fitted to the readings gives us the 3D offset for the magnetometer.

My son and I tested it out with Python code and Arduino code that he had written to get the data from the magnetometer to the laptop, and the magnetometer readings do seem to be nicely centered around (0,0,0) after we do the correction.  We’re still having trouble using the accelerometer to get a tilt correction to give us clean compass headings, but that is a problem for tomorrow morning, I think.


Tagged: Arduino, circle fitting, magnetometer, NumPy, Python, sphere fitting

Micro Robot Packs an Arduino, Rolls Autonomously

This mini bot features an Arduino Pro Mini, a L293D dual H-bridge motor driver chip, and a IR proximity sensor. The bot rolls with the help of two servo-controlled wheels with a ball bearing roller on one side to keep it balanced.

Micro Robot, via GRobot.gr (Google translated!)


MAKE » Arduino 03 Apr 15:00
arduino  robotics  

Drummerbot Makes Beats with Arduino

Using a web-based phone controller, Steffest controls an array of fourteen percussive instruments that are packed into a setup so tightly I can’t help but use the word “cute.” Despite the amount of instruments, the bot uses only eight servos, six of which play different instruments depending on which direction they swing towards.

The bot provides a convincing Bo-Diddley beat as the maker plays guitar and sings.

The phone’s interface is set up like a standard digital sequencer, and the string is sent to Arduino through a WiFi module and HTTP server.

[via Hacked Gadgets]

More:


MAKE » Arduino 29 Mar 18:00
arduino  mobile  music  robotics  servo  wifi  

Sphero goes modular, spins out for a drive (video)


Sphero's hooked up with a new whip, albeit a retro-fitted one. Skylar, a Junior Developer at Orbotix, modded an old RC car with an Arduino board, H-bridge and a few trackball parts, enabling the remote control ball to serve as its brain. Just in time too -- there's only so much fun you can have getting the little orb stuck behind the filing cabinets. Still, it's certainly a leap beyond purposing it to pull an iPhone-toting chariot.

Sean Buckley contributed to this post.

Sphero goes modular, spins out for a drive (video) originally appeared on Engadget on Mon, 19 Mar 2012 02:36:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Sensor board for underwater ROV

Since I had bought the robotics club an I2C accelerometer and magnetometer, I decided to make a new PC board for them to mount the accelerometer, the magnetometer, and the pressure gauge on the same board.  I don’t have the SMD soldering skills to solder all the chips onto one board, and I already had breakout boards for the accelerometer and magnetometer from Sparkfun, so I decided just to put connectors for those breakout boards onto the back of the pressure sensor board.  (The back, because the pressure sensor on the front has to be stuck through a hole in the dry box and glued in place.

The new boards are tiny (1.05″ × 1.425″), so I decided to try BatchPCB (which has pricing by the square inch) rather than 4pcb.com (which has fixed pricing per board, up to a fairly large size).  The price from BatchPCB was $10 per order plus $2.50/square inch plus $0.90 for shipping, so ordering 3 copies of the board (though I only needed one), cost me $22.12, substantially less than a single board from 4pcb.com, which is $33 plus $17.30 shipping and handling per board (plus an extra $50 if your board has multiple boards on it).  The 4pcb price is lower if your board is bigger than about 15.76 square inches, so even my HexMotor boards (at 12.44 square inches) would be cheaper from BatchPCB.  If you get multiple boards from 4pcb.com on a single panel and cut them apart yourself, the breakeven point is about 35.76 square inches for a single design (so three HexMotor boards from a single 4pcb.com panel is cheaper than from BatchPCB). For multiple designs on a single panel, the 4pcb.com deal is better: for 3 different designs, a total of 27.04 square inches would make 4pcb.com the cheaper way to go.

If you want a copy of the board, you can order it from BatchPCB, or pick up the Eagle files from my web site and order copies from elsewhere.  I’ve put the HexMotor Eagle files on line also, but not put them on the BatchPCB site.  I should probably upload them there sometime.

Bottom line: BatchPCB is better for small numbers of tiny boards, but 4pcb.com is better for larger boards and multiple designs.

The BatchPCB orders came back quite quickly (12 days from order to delivery by mail), though I had been worried because their design-rule check, which they say takes minutes had taken about 8 hours.  The problem was that each check takes a few minutes, but they had hundreds in the queue over the weekend, and it took a full day to clear the queue.

I had less trouble soldering the pressure gauge this time (this was my second attempt at soldering surface mount devices).  You can see in the pictures above that the results are much cleaner than in my first attempt.

The robotics club has tested the pressure sensor on the new board (using their own code on the Arduino) and it seems to work ok,  have drilled the hole in the dry box for the port, and glued the sensor board in place using superglue.  It seems to be waterproof (at least down to 1 foot—we’ve not tested in deep water yet).

Related articles

Tagged: accelerometer, Arduino, BatchPCB, magnetometer, pressure sensor, Printed circuit board, ROV, SparkFun Electronics