Gas station without pumps

2017 September 27

Jig for drilling Lego bricks

Filed under: Circuits course — gasstationwithoutpumps @ 15:07
Tags: , , ,

For the pulse-monitor lab, I have students drill ⅛” holes through 1×2 black Lego bricks (see Lego as LED holder and Lego as LED holder revisited), to make holders for 3mm phototransistors and 3mm LEDs. I hauled my drill press up to campus in my bike trailer last year to have students drill their own bricks, but I was not happy with the plywood jig that I had put together at the last minute—it worked, but there was a tendency for the bricks to jack-knife when the drill press vice was closed, because I had a sliding piece to clamp the brick.

I redesigned the jig yesterday and came up with a much simpler and (I think) more reliable design:

This side view shows the jig cut out of a piece of polypropylene cutting board that had been retired from kitchen use as too beat up. The bottom edge is straight, and the top edge has a rectangular cutout exactly the width of a Lego brick. (The top edge is not flat, because it was cut from a part of the cutting board that had a handle.)

Here is a top view of the jig in the drill press vice. In classroom use, I’ll probably use some painters’ tape to hold the jig to the non-moving jaw of the vice.

To use the jig, open up the vice a little bit, snap the brick into place, and tighten the vice gently to hold the brick securely. The cutting board is just a little thinner than the height of the brick, so the clamping force of the vice is entirely on the brick.

I may add these photos to my book.

2016 October 11

Lego as LED holder revisited

Filed under: Circuits course — gasstationwithoutpumps @ 18:01
Tags: , , ,

In Lego as LED holder, I wrote

I think that the Lego bricks work about as well as the old trans-illumination wooden blocks that I’ve been using for a few years, and they are certainly much easier to make, requiring only drilling two ⅛” holes.

I’ll want to play around with different illumination, also.  Lots of cis-illumination pulse monitor kits seem to use green LEDs, for example.  Do those work better?

Since then, I’ve played around with a couple of different approaches for using Lego.  The first, and most obvious, move was to use separate bricks for the LED and the phototransistor. If the phototransistor brick is clicked onto the top of the LED brick, then there is the ABS of the brick top between them, and very little light leakage.  I tried both 1×1 and 1×2 bricks, which cost about the same at about 3¢ each on the used market.

Because I was too lazy to wire leads onto all my different LEDs, I also tried just sticking the LED in the breadboard and resting my finger on the bricks—it isn’t very sturdy, but for quick testing it is not bad:

The LED can support the bricks, if you don't press too hard.

The LED can support the bricks, if you don’t press too hard.

I tried using several different LEDs. I got good results with 700nm and 607nm peak LEDs, but nothing but DC drift with green (565nm) LEDs. I would have tried a yellow LED, but I only had ones in 5mm packages, which is too big even for the axle holes, so the poor results there may have been due to mechanical, rather than optical difficulties (some signal was visible).

Here are the results with a 700nm red LED:

There is a lot of DC drift, but the underlying 3–4mV signal is clear.

There is a lot of DC drift, but the underlying 3–4mV signal is clear.

So, I have (at least) three choices for how to do cis illumination with Lego bricks, all of which I like better than using wooden blocks:

I can drill off-center holes in Lego Technic bricks, or centered holes in 1×1 or 1×2 bricks.

I can drill off-center holes in Lego Technic bricks, or centered holes in 1×1 or 1×2 bricks.

Drilling the bricks is very easy, and it would be even easier, if I made a jig that aligned the brick, rather than having to fiddle with the drill-press vice. I might even have the students drill their own bricks. I did not put Lego bricks on the parts list, but if I have to buy $5 worth of Lego bricks for this Winter’s class, it is no big deal.

2016 October 9

Lego as LED holder

Filed under: Circuits course,Uncategorized — gasstationwithoutpumps @ 15:00
Tags: , , ,

In Pulse monitor using log amplifier, I talked about the problems I was having with using wooden blocks for holding an LED and phototransistor side-by-side, because the wood was too transparent, and the rather clumsy test I made using electrical tape:

By cutting between the two 3mm holes I could put black electrical tape to block the short-circuiting light path.

By cutting between the two 3mm holes I could put black electrical tape to block the short-circuiting light path.

I suggested in that post that I would buy a chunk of black ABS plastic for $10 and try making the finger cradles out of that. I realized later that I already have some black ABS plastic, in the form of Lego bricks. If I could use them, that would save me a lot of trouble, and provide a more easily duplicated block for others to use.

I ended up trying a black 1×2 Technic brick (which would cost about 1¢–3¢ each on Bricklink), drilling two ⅛” (~3mm) holes in the faces on either side of the axle hole. The axle hole in the Technic brick provides a light barrier between the two optoelectronic components:

View of the Lego Technic brick from the bottom, showing the light barrier between the two optoelectronic parts. The bottom needs to be covered (with another brick or electrical tape), and the optoelectronic components need to be taped in place.

View of the Lego Technic brick from the bottom, showing the light barrier between the two optoelectronic parts.
The bottom needs to be covered (with another brick or electrical tape), and the optoelectronic components need to be taped in place.

View of the drilled Lego Technic brick, showing the optoelectronic components.

View of the drilled Lego Technic brick, showing the optoelectronic components.

I had hoped to be able to insert the 3mm LED and phototransistor from the bottom of the brick, but there was not enough clearance to do so easily, so I inserted them from the opposite face of the brick.

I tried recording the light levels with the front face taped over with black electrical tape, and with a finger covering it. The difference in voltage was large, indicating that the light through the finger was much more than the light leakage around the axle-hole light barrier. I was using an LTR-4206 phototransistor and a 1N914 diode followed by a unity-gain buffer.

I got around 394mV with the finger and 275–284mV with the holes taped. The variation on any given recording run with the holes taped was only about 0.3mV, but different runs, with different amounts of sunlight falling on the brick gave different levels. The minimum difference between the finger and the taped block is about 110mV, which translates to a 19.8dB difference in light (or a factor of 9.8).

But I was not able to get a pulse measurement with cis IR illumination.  I could get a signal of about 1mV peak-to-peak with ambient (shaded sunlight) illumination, which corresponds to about 0.18dB, or 2% fluctuation in finger opacity, but that depended critically on the pressure on my fingertip—if it wasn’t just right, I got no visible pulse signal, just noise.  I could get a bit more consistent results by putting the Lego block between my index and middle fingers and using a rubber band to clamp the fingers together.  If the squeeze was just tight enough to throb, then I got fairly clean results, and I could get them fairly consistently, but I’m not sure whether others will be able to get similarly consistent results.

I also tried taping up the block with no IR illumination, to measure the dark current.  I got 67mV, which should correspond to about 10nA, which is pretty good, since the spec for the LTR-4206 phototransistor give the max dark current as 100nA.

Bottom line: I think that the Lego bricks work about as well as the old trans-illumination wooden blocks that I’ve been using for a few years, and they are certainly much easier to make, requiring only drilling two ⅛” holes.

I’ll want to play around with different illumination, also.  Lots of cis-illumination pulse monitor kits seem to use green LEDs, for example.  Do those work better?

2012 May 18

Remixing LEGO Ads

Filed under: Uncategorized — gasstationwithoutpumps @ 17:56
Tags: , ,

I was recently pointed to a rather amusing site: The HTML5 Gendered LEGO Advertising Remixer.

This site uses HTML5 features to pair the video and the audio from different LEGO ads (3 from the LEGO friends series paired with 10 from the LEGO series aimed more at boys).

What makes the mashups amusing is not the extreme gendering of the commercials (though that is the point of whoever made the site), but of how well the wrong audio fits the action.  All the LEGO commercials seem to have the same structure.

I particularly liked the Alien Conquest sound track with the first Friends video.

2012 January 19

More on pendulums

In Newton’s measurement of g, I described a failed experiment to measure g with a motorized circular pendulum. Further experimentation on my own lead me to adopt for this week’s lab the standard approach using an unpowered circular pendulum.  The cone formed by the string can be described as having height h, base radius R, and hypotenuse L, the length of the string.  If the circular pendulum has period T, then g= 4\pi^2 h/T^2(derived in the Newton post).  If we make the string long and push the pendulum with the right speed to get a nearly circular (rather than elliptical) motion, then h=\sqrt{L^2-R^2} is nearly constant for many orbits, and we can estimate the period with just a stopwatch by counting 20 or 30 periods.  Using a large enough mass means that neglecting air resistance is now reasonable (which it was not for the tiny mass I started with).

Thanks to John Burk for suggesting that I forget about the motor—that seems to be the best approach, even though I then can’t use the photogate to time the period.  I’m hopeful that we can measure the height and the period accurately enough to get within about 2% of the right value for g.

This week in addition to doing the circular pendulum right, I wanted to do simple pendulums.  I’ve assigned problem 4.P.89 in Matter and Interactions, which seems to be the only place in the book that simple pendulums are done.  It is a computational problem, since there isn’t an analytic solution (though the small-angle approximation works pretty well up to about 45°).  I hope the students have done that by tomorrow!

I wanted to measure the period of the pendulum directly (not averaging over many periods), to demonstrate that the amplitude does not matter much.  Unfortunately, I’ve not yet built a sensor that works for this. I tried using the photogate, but I could not hit the 1 cm gap consistently, even with a shorter pendulum.

I also tried using a magnetic sensor (using the circuit I used for the speed-of-sound lab) with a magnet for the pendulum weight, but that triggered at random times as the magnet came close.  Even 20cm away the field was enough to trigger the detector, and I got almost random timings.  A magnetometer was no better than the coil and comparator, as the magnetic field varied chaotically (from movements of the magnet other than the simple pendulum swing, such as twirling on the string).  The magnetometer was usable as a compass, though, which is good, because I originally bought it for the robotics club to use as a compass.  There are some tricky points to using it as a compass, which I’ll talk about in a different post.

I then tried marking the top of the string with a bit of electrical tape and using the photogate there.  That was the most successful so far—if I hold the photogate steady enough, I can get readings repeatable to ±20msec, which is much better than I can do with any other approach I’ve tried.  For one pendulum hanging from the edge of my desk, I either got  two pulses at about 1.11 and 0.45 seconds or one pulse every 1.56 seconds, depending on whether the marker on the string passes all the way through the beam or blocks it continuously at the end of the swing. The random variation I get is probably because of holding the sensor by hand (to align with the string).

If I had a more rigid way to mount the sensor, I should be able get more consistent readings, so my main engineering task was to get a rigid pivot point on the ceiling beam (without making any holes) and mount the photogate in a rigid, but adjustable, way.  Of my two standard mechanical engineering techniques, duct tape and Lego, I chose Lego:

A view of the photogate mounted on the Lego beam next to the pendulum string.

Closeup of the photogate, showing the breakout board and sensor wedged between a plate and a beam, with a 2-plate spacer.

Having come up with a nice way to grip the photogate and still be able to swing a pendulum string into the gap, I connected the beam holding the photogate to the same right-angle platform that we had used last week for the motorized pendulum. This left a little gap that I could rest the Arduino board in, so that there was no tension on the wires to the photogate.

I was a bit worried that I might have to put my laptop on top of a ladder, since the USB cord is not very long, but I have a spare pair of USB-to-Cat5 converters (one set is for the robotics project), so I was able to make an extension cord out of a flexible Cat-5 Ethernet cable, giving me enough length to put my laptop safely on the desk.

The same Lego that holds the photogate can also support the Arduino, so I don't need to hold anything in my hands.

I had two other ideas I haven’t tried: using one of the ultrasonic range finders to track the pendulum motion and using a video camera to time the motion.  These require interpolation of position data to estimate the period, so I’d rather avoid them for now. The top-of-string photogate will work (I think) for the simple pendulum, and the circular pendulum can be timed with a stopwatch averaged over many periods.  (I could even use the photogate timer as a stopwatch, though the resolution of the stop watch on my Casio wristwatch is 0.01 seconds, and human reflexes make anything less than 0.1 second pretty much noise.)

Next Page »

%d bloggers like this: