Gas station without pumps

2017 November 7

Starting blog for mechatronics project

Filed under: Robotics — gasstationwithoutpumps @ 08:57
Tags: , ,

Although I’ve posted a few times already about the mechatronics course, this is the first official post for the project.  The task this year is to put ping-pong balls through circular targets.  There are 3 targets with large holes that the robot can’t get too close to at random locations on the edge of the field, marked with vertical track wires, and one with a small hole 3″ above the top of the robot, marked with an IR beacon, but in a fixed location where the robot can touch it.  It does not become available as a target until all three of the other targets are hit.

The project has a Star Wars theme this year, so I probably need to come up with a Star-Wars-inspired name for my robot.  I’ve not seen all the Star Wars movies, just the original trilogy, so my cultural knowledge is a bit limited here. Before we got the project description, I’d started collecting possible names for the robot, but hadn’t come up with anything useful, just “not that kind of a doctor” and “slightly maladaptive”.

This morning, after turning in the exam, I decided to test the Adafruit solenoids that I’ve had for about 8 years, to see whether they would be useful for kicking ping-pong balls.  The answer, shortly, is “no!”  At 10~V (more than the LiFe batteries will supply), the solenoids can hold, but they can’t pull the plunger in.  The solenoids were designed for 24~V, so it is not too surprising that they won’t work at 10~V.

I’ll probably end up not using a solenoid.  I’ll look into using a servo either to bat the ball or to release it to roll down a ramp—I have a few servos.

The hardest part for me is going to be the mechanical design.  I can do the wheeled part and the framework of the robot, but I’m still very uncertain how to store and move the ping-pong balls, how to launch them for the big targets, and how to get the ball up to the height of the small target.  We are allowed to extend parts of the robot outside the 11″ cube that it starts in, but I’m not sure the best way to do that.

We do have a limited budget of $150, which does not include the central microcontroller, the battery, a dual H-bridge, 4 channels of low-side switches, and an optional stepper controller, but does include all the motors, wheels, screws, MDF, perf board, electronics, … that we add to the basic stack.

I’m planning to port the events-and-services framework that we are required to use from the Uno32 boards everyone else is using to the Teensy LC (or Teensy 3.1), so that I can work at home more easily. (The downloader they use in the course for the Uno32 boards only runs on Windows, and I’m not willing to install a virtual machine just to run it.  I also don’t care much for some of the peripheral boards that they built, so I’d rather build my own or buy commercially available ones.)

Using the Teensy board reduces the number of pins I have available to only 24 (well, 27 if I use female headers to take off pins that aren’t on the two sides): 10 of which can be used for analog inputs.  The I/O board that they put together for the course has 30 digital I/O and 12 analog inputs (which can also be used as digital I/O). So I have about 18 fewer pins to work with.

I should probably make a table of all the pins I need (analog and digital), so I can decide whether I need external muxes for any of the I/O.

peripheral pins/device devices total pins
 beacon detector  4 (SPI)  1  4 (SPI)
 motor  2 (1 of which is PWM)  2  4 (2 PWM)
 bumpers  1 digital  4?  4
 tape detectors  1 analog  6?  6 analog
 tape illuminator  1 digital  1  1
 track wire detector  1 analog  2?  2 analog
 launcher 1  1 digital (servo?)  1  1
 launcher 2  1 digital (servo?)  1  1
 height extender 2 digital  1  2
 whisker sensors?  1 digital  2?  2

This table makes it look like I could run short of pins, but I can use a 50¢ 8:1 analog mux to reduce the tape detectors from 6 analog pins to 3 digital and one analog—for that matter the track wire detector signals could go through the same mux, so that only one analog channel is needed and 23 digital—still a bit tight.  The bumpers and whisker sensors are probably going to be polled, not driving interrupts, so I could put the 6 of them on an 8:1 mux also, and use the same mux-select pins as for the analog reads, dropping me to one analog and 18 digital pins, which is comfortably within my pin limitations.

I’ve ordered LiFe 3S (9.9V) batteries to match what is used in the class, a charger for them, and Deans connectors to hook them up.  The batteries come with Futaba connectors, which are plenty for the low currents we can take from the batteries, but the class has been using Deans connectors for years, so I’ll have to follow suit (or do everything with Futaba connectors, and just provide a Deans-to-Futaba adapter to use in the tournament).  I’ll probably also put a barrel jack on the robot, so that I can do dry-dock testing without a battery.

I had considered buying LiPo batteries, which are much more available than LiFe ones, but they are strictly prohibited in the lab, because of the fire hazard—it is really easy to  charge or discharge a LiPo battery too fast and cause it to ignite.  The sites that sell LiPo batteries for flying toys also sell “bomb bags” for storing and charging the LiPo batteries in, to reduce the chance of setting things other than the batteries on fire.

2016 December 25

Coin cell batteries are pressure sensitive

Filed under: Data acquisition — gasstationwithoutpumps @ 18:03
Tags: , , ,

I found out from Zohar that one could squeeze more power out of almost dead coin cells, literally—squeezing CR1225 lithium/manganese-dioxide (Li/MnO2) batteries when they are nearly dead appears to revive the batteries. So I decided to test this with my oscilloscope.  First, I made a test jig for holding batteries that I could apply pressure to:

The contacts are made with 22-gauge copper wire. I can squeeze the battery by pressing down on it with an aluminum rod.

The contacts are made with 22-gauge copper wire. I can squeeze the battery by pressing down on it with an aluminum rod.

I still have to work out a way to provide a measurable force to the battery (probably attaching a tray to a short length of aluminum rod, so that I can put known weights on the tray), but I’ve been doing some testing with “low force” (just enough to make contact) and “high force” (about 70N).

I provided a 100Hz triangle wave from 0.4 V to 3.4 V to the gate of the nFET, to produce a variable load on the battery, hoping to trace out a nice load line.

I provided a 100Hz triangle wave from 0.4 V to 3.4 V to the gate of the nFET, to produce a variable load on the battery, hoping to trace out a nice load line.

I tested three CR1225 batteries, each of which had been used a fair amount. The most dramatic effect was from the deadest of the batteries:

I-vs-V plot for battery 2 with low force

I-vs-V plot for battery 2 with low force

Battery 2 I-vs-V with high force

Battery 2 I-vs-V with high force

The plots above are directly from the Analog Discovery 2 oscilloscope, using the XY plot and a “math” channel that scales Channel 2 by the 200Ω sense resistor to get current. I also exported the data and plotted it with gnuplot, so that I could hand-fit the internal resistance:

The battery has an internal resistance of 500Ω, but squeezing it hard brings the resistance down to about 140Ω.

The battery has an internal resistance of 500Ω, but squeezing it hard brings the resistance down to about 140Ω.

A new Energizer CR1225 battery should have an internal resistance of 30Ω, increasing to about 50Ω when the battery is “dead” (from the datasheet). This battery is clearly well beyond the point that Energizer would consider it dead, though it is still capable of delivering almost 3.5mW (2.5mA@1.4V). Squeezing the battery hard lets it deliver 12.3mW (7.5mA@1.64V). Actually, those are only instantaneous power levels. The voltage drops quickly to a lower level, where it holds steady for a while, so the sustained power is more like 11.1mW (7.4mA@1.5V). The 200Ω load is a pretty good match to the internal resistance of the battery here, so this is about as much power as we can squeeze out of the dead battery.

I tried two other batteries that were not quite as dead. Battery 3 had 190Ω internal resistance dropping to 84Ω when squeezed, and Battery 5 had 220Ω dropping to 65Ω—all of these would have been considered dead batteries by Energizer (they weren’t Energizer batteries, but a no-name brand from China):

Battery 3 was a bit better than battery 2, getting up to 7mA without squeezing.

Battery 3 was a bit better than battery 2, getting up to 7mA without squeezing.

Battery 5 was the best battery tested, at least at high force, delivering 24mW (10.8mA@2.2V) to a 200Ω resistor.

Battery 5 was the best battery tested, at least at high force, delivering 24mW (10.8mA@2.2V) to a 200Ω resistor.

I’m pretty sure that the resistance differences I’m seeing are due to squeezing the battery, and not changes in the battery-wire contact resistance, but it would be good to devise a way to squeeze the battery without squeezing the contacts.

Things still to do:

  • Modify the test jig to provide measured forces squeezing the battery.
  • Modify the test jig so that the contact force and area is independent of the amount of squeezing.
  • Test some new coin cells, to see if squeezing to reduce internal resistance is just a phenomenon of nearly dead batteries or applies to all lithium/manganese-dioxide cells.  A new battery should be able to deliver 11mA@2.6V (34mW) to a 200Ω load.

It would also be good to have a theory about why increasing the pressure reversibly decreases the internal resistance.  TO come up with such a theory, though, I’d need to have a better understanding of the mechanical and chemical properties of the coin cells: what is the chemical reaction that increases the internal resistance? What moves when pressure is applied to the coin cell?  So far, the only guess I have is a change to the bulk resistivity of the electrolyte, with squeezing reducing the distance between the electrodes.  But the coin cell is not getting skinnier by a factor of 3, so I don’t think that the electrodes are getting that much closer together.

Last, it would be good to have a better understanding of the hysteresis in the I-vs-V plot.  Why does the voltage drop then hold steady at constant current, and why does the voltage recover when the current is no longer drawn?

Update 31 Dec 2016:  I tried testing a couple of brand new coin cells. They had an internal resistance of about 15Ω and did not seem particularly pressure sensitive. I’d need a more careful setup to measure the small changes in internal resistance and be sure I wasn’t just seeing a change in the contact resistance.

2014 July 6

Battery connectors

Filed under: Uncategorized — gasstationwithoutpumps @ 02:32
Tags: , , , , , , , ,

I spent a little time today working on my book, but I got side tracked into a different project for the day: designing a super-cheap coin-cell battery connector. I’ve used coin-cell battery holders before, like on the blinky EKG board, where I used a BH800S for 2 20mm CR2032 lithium cells. That battery holder is fairly large and costs over $1—even in 1000s it costs 70¢ a piece. So I was trying to come up with a way to make a dirt cheap coin-cell holder.

The inspiration came from the little LED lights that “glovers” use inside their gloves. They are powered by two CR1620 batteries (that means a 16mm diameter and 2.0mm thickness for the battery). Because the lights have to be made very cheaply, they don’t use an expensive holder, but put the negative side of the batteries directly against a large copper pad on the PC board. The batteries are held in place by the positive contact, which is a piece of springy metal pressing the battery against the board—and each manufacturer seems to have a slightly different variant on how the clip is made.

Unfortunately, I was unable to find any suppliers who sold the little clips—though I found several companies that make battery contacts, it seems that most are custom orders.

My first thought was to bend a little clip out of some stainless steel wire I have sitting around (not the 1/8″ welding rod, but 18-gauge 1.02362mm wire). That’s about the same thickness as a paperclip (which is made out of either 18-gauge or 19-gauge wire), but the stainless steel is stiffer and less fatigue-prone than paperclips. I was a little worried about whether stainless steel was solderable, so I looked it up on Wikipedia, which has an article of solderability. Sure enough, stainless steel is very hard to solder (the chromium oxides have to be removed, and that takes some really nasty fluxes that you don’t want near your electronics). So scratch that idea.

I spent some time looking around the web at what materials do get used for battery contacts—it seems there are three main ones: music wire, phosphor bronze, and beryllium copper, roughly in order of price. Music wire is steel wire, which gets nickel plated for making electrical connections. It is cheap, stiff, and easily formed, but its conductivity is not so great, though the nickel plating helps with that. The nickel oxides that form require a sliding contact to scrape off to make good electrical connection. Phosphor bronze is a better conductor, but may need plating to avoid galvanic corrosion with the nickel-plated battery surfaces. Most of the contacts I saw on the glover lights seemed to have been stamped out of phosphor bronze. Beryllium copper is a premium material (used in military and medical devices), as it has a really good ratio of yield strength to Young’s modulus, so it can be cycled many times without failing, but also has good conductivity.

Since I don’t have metal stamping machinery in my house, but I do have pliers and vise-grips, I decided to see if I could design a clip out of wire. It is possible to order small quantities of nickel-plated music wire on the web. For example, pianoparts.com sells several different sizes, from 0.1524mm diameter to 0.6604mm diameter. I may even be able to get some locally at a music store.

My first design was entirely seat-of-the-pants guessing:

First clip design, using 19-guage wire, with two 1mm holes in PC board to accept the wire.

First clip design, using 19-gauge wire, with two 1mm holes in PC board to accept the wire. This design is intended for two CR1620 batteries.

The idea was to have a large sliding contact that made it fairly easy to slide the batteries in, but then held them snugly. Having a rounded contact on the clip avoids scratching the batteries but can (I hope) provide a fair amount of normal force to hold the batteries in place. But how much force is needed?

I had a very hard time finding specifications on how hard batteries should be held by their contacts. Eventually I found a data sheet for a coin battery holder that specified “Spring pressure: 50g min. initial contact force at positive and negative terminals”. Aside from referring to force as pressure and then using units of mass, this data sheet gave me a clear indication that I wanted at least 0.5N of force on my contacts.

I found another battery holder manufacturer that gave a tiny graph in one of their advertising blurbs that showed a range of 100g–250g (again using units of mass). This suggests 1N-2.5N of contact force.

Another way of getting at the force needed is to look at how much friction is needed to hold the batteries in place and what the coefficient of friction is for nickel-on-nickel sliding. The most violently I would shake something is how fast I can shake my fingertips with a loose wrist—about 4Hz with an peak-to-peak amplitude of 22cm, which would be a peak acceleration of about 70 m/s^2. Two CR1620 cells weigh about 2.5±0.1g (based on different estimates from the web), so the force they need to resist is only about 0.2N. Nickel-on-nickel friction can have a coefficient as low as 0.53 (from the Engineering Toolbox), so I’d want a normal force of at least 0.4N. That’s in the same ballpark as the information I got from the battery holder specs.

So how stiff does the wire have to be? I specified a 0.2mm deflection, so I’d need at least 2N/mm as the spring constant for the contact, and I might want as high as 10N/mm for a really firm hold on the batteries.

So how should I compute the stiffness of the contact? I’ve never done mechanical engineering, and never had a statics class, but I can Google formulas like any one else—I found a formula for the bending of a cantilever loaded at the end:
\frac{F}{d} = \frac{3 E I}{L^{3}}, where F is force, d is deflection, E is Young’s modulus, I is “area moment of inertia”, and L is the length of the beam. More Googling got me the area moment of inertia of a circular beam of radius r as \frac{\pi}{4} r^{4}. So if I use the 0.912mm wire with an 8mm beam I have
F/d = 200E-6 mm E.

More Googling got me some typical values of Young’s modulus:

material E [MPa = N/(mm)^2]
phosphor bronze 120E3
beryllium copper 135E3
music wire 207E3

If I used 19-gauge phosphor bronze, I’d have about 24N/mm, which is way more than my highest desired value of 10N/mm. Working backwards from 2–10N/mm what wire gauge would I need? I get a diameter of 0.403mm to 0.603mm, which would be #6 (0.4064mm), #7 (0.4572mm), #8 (0.5080mm), #9 (0.5588mm), or #10 (0.6096mm), on the pianoparts.com site. I noticed that battery contact maker in Georgia claims to stock 0.5mm and 0.6mm music wire for making battery contacts, though they first give the sizes as 0.020″ and 0.024″, so I think that these are actually 0.5080mm and 0.6096mm (#8 and #10) music wire.

It seems that using #8 (0.020″, 0.5080mm) nickel-plated music wire would be an appropriate material for making the contacts. Note that the loop design actually results in two cantilevers, each with a stiffness of about 4N/mm, resulting in a retention force of about 1.6N. The design could be tweaked to get different contact forces, by changing how much deflection is needed to accommodate the batteries.

How much tweaking might be needed?  I found the official specs for battery sizes (with tolerances) in IEC standard 60086 part 2: The thickness for a 1620 is 1.8mm–2mm, the diameter is 15.7mm–16mm, and the negative contact must be at least 5mm in diameter.  The standard also calls for them to take an average of 675 hours to discharge down to 2v through a 30kΩ resistor (that’s about 56mAH, if the voltage drops linearly, 67mAH if the voltage drops suddenly at the end of the discharge time).  If the batteries can legally be as thin as 1.8mm, then to get a displacement of 0.2mm, I’d need the zero-point for the contacts to be only 3.4mm from the PC board, not 3.8mm, and full thickness batteries would provide a displacement of 0.6mm, and a retention force of about 4.8N.

If I were to do a clip for a single CR2032 battery, I’d need to have a zero-point 2.8mm from the board, to provide 0.2mm of displacement for the minimum 3.0mm battery thickness.

So now all I need to do is get some music wire and see if I can bend it by hand precisely enough to make prototype clips.  I’d probably change the spacing between the holes to be 0.3″ (7.62mm), so that I could test the clip on one of my existing PC boards.

Update 2014 July 6: I need to put an insulator on the verticals (heat shrink tubing?), or the top battery will be shorted out, since the side of the lower battery is exposed.

 

2013 February 12

Battery internal resistance lab and Chapter 21 homework

Filed under: home school — gasstationwithoutpumps @ 17:49
Tags: , , ,

In our home-school physics class today, my son and I did two things: comparing answers on homework questions and a lab measuring the internal resistance of a battery.  I only had time to read Chapter 20 of  Matter and Interactions this morning, and only finished about half the problems.  I’ll have to finish them and compare answers with my son later. He’s already finished—he found these problems as easy as the ones in Chapter 19, but much more fun.  I suspect that Chapter 19 is one of those things that only a physicist can love—those of us who have more of an engineering mindset just find it tedious make-work.

The internal resistance of the battery was a simple experiment: we put known resistors across the battery pack and measured the resulting voltage.

The top circuit shows the setup we used—the bottom shows the equivalent circuit we were modeling.

The top circuit shows the setup we used—the bottom shows the equivalent circuit we were modeling.

I also measured the short-circuit current (briefly) with an ammeter.

The data was much noisier than I had expected, probably because the “switch” just pushed one battery away from contact, and the contact resistance between the battery holder and the batteries varied. We tried cleaning the contacts on the battery holder and on the batteries, but the noisy data were after that cleaning.  The noise is probably not due to self-heating of the resistors, as it was highest for the larger resistors.

The load line using the open-circuit voltage and short-circuit current look reasonable, but many of the measured voltages corresponded to a lower current, and fitting just the data points that exclude the short-circuit current does not produce a reasonable load line, though the estimated internal resistance is not too far off.

The load line using the open-circuit voltage and short-circuit current look reasonable, but many of the measured voltages corresponded to a lower current, and fitting just the data points that exclude the short-circuit current does not produce a reasonable load line, though the estimated internal resistance is not too far off.

The battery-measurement lab took longer than I expected, because the data wasn’t as clean as I expected.  It might be worth trying again with a different battery holder, and a better switch, to see if the problems were just with the crummy contacts on the battery holder.  Variations of 0.5Ω in the resistance of the contacts would throw the measurements off by this much.

Chapter 21 of Matter and Interactions appears to be about magnetic force (though we don’t get to inductors until Chapter 23).  I find magnetism much more confusing than electricity, so I suspect we won’t be as quick with Chapters 21–23 as we were with Chapter 20. Problems for Chapter 21:  21P38, 21P39, 21P40, 21P44, 21P50, 21P60, 21P61, 21P66, 21P69, 21P71, 21P72, 21P79, 21P80, 21P90, 21P103, 21P105 (computational).

%d bloggers like this: