Posts with «laser» label

Random thoughts on circuits labs

DNA melting

I spent some time yesterday thinking about whether we could do optical detection of DNA (particularly some variant of the DNA melting lab from MIT—see also the Fall 2008 class handouts).  I noted in the 2008 handouts that they were using a blue LED array driven by a 0.29A current source (made from an LM317T voltage regulator, a rather inefficient method). The wiki page uses a regulated 5V supply and a 25Ω series resistor, which would be around 60–70mA for a typical forward drop of 3.2–3.5V in a blue LED.  That’s still a pretty powerful light source for an LED. They say they are using LZ1-00B200, which has a 3.6V forward voltage, but can handle a full amp of current, so is more LED than is needed.

We can get a blue LED for under $2 that can handle 50mA continuously (LTL911CBKS5), though it has a forward voltage of typically 4.3V.  In surface mount for $1.14, we could get MLEBLU-A1-0000-000T01, which has a dominant wavelength of 465–485nm (depending on bin code) and a luminous flux of 10.7 lm at 150mA (forward voltage 3.2V).  I estimate the LED MIT mentions produces about 6lm at that current.  The expensive part of the illumination is not the LED, but the focusing lenses to concentrate the light and the optical filtering needed to keep the excitation wavelength from being detected by the photodiode.

I was thinking that it would be cool to use a laser as an excitation source, rather than an LED, since then no lenses or filter would be needed on the source—just a blocking filter on the photoreceptor. Unfortunately, blue lasers are very expensive.  What are cheap are the blue-violet lasers at 405nm, since the laser diodes are made in quantity for BluRay players. (Amazon has 405nm laser pointers for under $10 with shipping.) Unfortunately the usual fluorescent dyes used for DNA melting measurements (SYBR Green, LC Green Plus, EvaGreen) are not excited at 405nm, and need excitation wavelengths in the range 440nm–470nm).  I’ve been wondering whether one of the 405nm-sensitive dyes used in flow cytometry (like Sytox Blue dead cell stain) could be used.  But I’ve not found a double-stranded DNA dye for sale that is easily excited at 405nm (even Sytox Blue is way down in sensitivity from its peak), so laser excitation seems to be out—the excitation wavelengths needed for standard dyes require fairly expensive lasers.  The benchtop lasers usually used in labs and flow cytometry equipment are priced in the “if-you-have-to-ask” price range.  Buying enough copies for a student lab is more than this lab is worth.

I still don’t see a way to make the DNA melting curve project work within our course.  Even MIT gives up half a semester to this lab, and we don’t have that much time (nor that caliber of students, on average).

Soldering project

I want the students to learn to solder (at least through-hole parts, not necessarily surface-mount). I don’t want to do the traditional blinky-light soldering practice, so I’ve been looking for a place in the course where it makes sense to require soldering, rather than wiring up a breadboard.

Breadboards have problems with loose wires, so the more complex the circuit, the more problems a breadboard causes.  Breadboards also have problems connecting to wires that have to leave the breadboard—particularly wires to moving objects.  This suggests that the EKG/EMG circuit would be the most appropriate as a soldering project, as it is fairly complicated and the long wires to the Ag/AgCl gel electrodes can cause a lot of problems with loose connections (my first check on debugging is to wiggle the header pins for those wires).

But I want the students to be doing some designing for the EKG circuit, not just soldering up a predetermined circuit, so I’m thinking of designing an instrumentation-amp protoboard, which has an ina126 instrumentation amp and an MCP6002 dual op amp chip, with power pins wired up and a place for the Rgain resistor and bypass capacitors, but everything else in a breadboard-like configuration, so that resistors, capacitors, and jumper wires could be added.   Off-board connections could be done with screw terminals to make sturdy connections.

My son and I came up with the further idea of adding an optional LED output, to make a blinky-light-EKG device.  I think that the approximately 1.5V, 30msec pulse that I was seeing for the R segment of the EKG would be enough to make a visible flash—I’ll have to try it out on my breadboard.  I tried it today, but I was only seeing 0.5V pulses today (poorer contact with the electrodes?), and I had to raise the 3.9kΩ feedback resistor to 10kΩ to increase the gain of the final stage., which was enough to get weak flashes from an LED with a 100Ω series resistor.  Because the op amp has limited output current (±23mA short circuit), I felt it fairly safe to put the LED directly between the op amp output and the Vref signal, which gives a good flash even with a green LED.

The lower voltage that I got this time (until I raised the gain) makes it clear that if I do make an EKG protoboard, it should have room for some trim pots for adjusting the final gain.


Filed under: Circuits course Tagged: Arduino, bioengineering, blinking light, circuits, course design, DNA melting, ECG, EKG, electrocardiogram, instrumentation amplifier, laser, op amp, pulse, violet lasers

New Workshop!

We moved recently, and one of the features that drew us to our new home was a sun room in the back, maybe 8'x15', full of light and perfect for a workshop!

One corner is ideal for the laser, with a dryer vent for routing its (filtered) fumes outside. With two rolling racks for storage and two desks, I hope we'll have room for a small heavy bench and drill press. Good thing the Printrbot is (er, will be) small, we have big plans for this little room.

I got a kick out of reading my "Workshop!" post from two years ago, most of those projects haven't moved too much forward, but the grinder timer has gone through a few versions and the flight suit ended up being by far my most complicated project so far.

DIY Dazzling Laser Light Party Ball

Here’s a challenge for you: stuff over a dozen red lasers and a rechargeable lithium ion battery inside a tennis ball.  Oh, and also a microcontroller and infrared port to control patterns from afar.  To make your own, the author has constructed a high quality tutorial so you can build your own party ball.  You’ll need a soldering iron, a Dremel/rotary tool, wire cutters, and a few other craft items.

Top Laser Projects:

Optical Magnet, Arduino project next in a series Laser Tracking 3D

This blog considered to be next stage in the series published earlier, concentrated around the idea tracking object in the space. There are an enormous quantity of similar projects could be developed on this platform. I’ll name a few:

- star / rocket / vehicle tracking;
- follow me / robot / hands / cap etc;
- navigation to charging station / landing pad / around area;
- contact-less measurements rotational speed / angle to surface / shifting.

All of this on a few dollars micro-controller and cheap CMOS camera! Real-time, up to 60 Hz update rate!
Please, check on the first and second version, as I’d skip explanation basic design concept here.

  Most important features in this series of projects:

* 1. LOCALIZATION XY.
* 2. RANGE FINDER Z.
* 3. TRACKING 3-D.
* 4. TRACE TOOL.
* 5. TRACKING 6-D.
* 6. OPTICAL MAGNET.

Feature considered to be independent, so you can star  from  project 1:
http://fftarduino.blogspot.com/2011/12/arduino-laser-3d-tracking-range-finder.html
than move on next stage, and so on depends on a budget, parts availability or your interest!

This version of hardware/software system design capable to track object in

6 – D ++ space:

*   -  Linear motion along X, Y, Z coordinates (3D);
*   -  Rotation around fixed axis (6D);

I put two ++ plus signs, in order to underline capability of the hardware design to track Rotation of the object based not only on distance measurements, but also Reflectivity. As Power Control Loop strictly hold lasers radiation under control, simple calculation in periodicity of the emitted power would provide information about angular speed round / cylindrical object. Phase difference in 4 signals gives rotational center for Z. It’s also apply for linear motion, tracking of the object could be based on reflectivity or distance or BOTH simultaneously ,  which opens enormously great amount of possibilities.

Optical Magnet:
*  – Attract closest surface;
*  – Repel;
*  – Attract or repel surface with specific reflectivity (BLACK, WHITE, OR COLOR)!!!
*    * work in progress, Reflectivity math are not implemented yet       *
*    * algorithm to track rotation is not included, this is version for demonstration purposes  mainly.*

Link to download Arduino Uno sketch:  Optical_Magnet_6D

8 January, 2012.
Release notes of the version 3.2 software:

-  Video is De-interlaced, full image size 512 (active 492) lines;
-  digitalWrite, analogWrite functions of the arduino IDE were replaced by direct port manipulation, in order  to improve time performance of critical section of the code – interrupt subroutine and to avoid blocking interruption call (functions have locking mechanism in theirs body);
- minor changes in Power Control Loop algorithm, to prevent oscillation;

Link to download Arduino Uno sketch:  Optical_Magnet_6D_V3

 finished…


Matt Richardson turns Arduino, Twitter and lasers into art (video)

Matt Richardson's genius has never really been in question. The Make Live host and compulsive hacker has built an impressive library of creations, ranging from a Google Reader pedal to an email-triggered Christmas tree. The man's works are definitely art, in their own way, but his new project, Fade Away 1, is the first that we could easily see taking up residence in a SoHo gallery. At the heart of the installation is an Arduino (of course) that pulls in posts from Twitter with the phrase "fade away" in them. The same AVR chip then "prints" those tweets on phosphorescent paper with a UV laser mounted on a servo -- as the energy dissipates, the messages slowly disappear. And, if you're wondering what the "1" at the end of the title means, Richardson plans to continuously improve the project. For some more details about the next iteration and to see the current one in action, check out the videos after the break.

Continue reading Matt Richardson turns Arduino, Twitter and lasers into art (video)

Matt Richardson turns Arduino, Twitter and lasers into art (video) originally appeared on Engadget on Mon, 26 Dec 2011 11:18:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

ARDUINO Laser 3D Tracking / Range Finder

 The idea of using triangulation for distance measurements is well known since Pythagorean time, when his brilliant formula become available for mathematicians.
What is new in this design, is lasers power control via “blooming” effect of CMOS camera. Here this “negative” effect was put to work instead of ADC. No need high price “no-blooming” camera! (More information on this link: http://dpanswers.com/content/tech_defects.php ) There are few others design approach, that I was trying to make in hardware/software, and some of them not fully implemented yet ( project just started ).
Power Control Loop (PCL) allows to get stable  readings of the reflected back light beams, doesn’t matter what is reflectivity of the object’s surface, how well illuminated background and what distance range !!! edited: / (Regarding stability measurements in varying illumination conditions, right now there is a resistor for manual adjustment comparator trigger level, depends on average  “black-fixed” video. Gonna get rid off it shortly)./
Probably, someone could “hack” a camera, and redesign build-in AGC to provide stable, “fixed-white” level of video signal. But it would be extremely difficult to do with this SMD components, lack of documentation and too complicated for average hobbyist. Plus after that camera is not “in use” anymore for it’s main purpose.

Arduino has low size of RAM memory and 8-bit low power microprocessor, so full image processing could not be done. Instead, “build-in” 1-bit comparator forms visual map, where each cell stores time stamp, when events was captured. As video frame created from top to bottom line by line, line number corresponds to Y coordinate, and time of events on this line – X consequently. At this stage project is more like test bench, than final solution -);.
Right now I’m looking for optical zooming devices, to cover long / short distances automatically. Green lasers, I’m sure ‘d bring better resolution, just have to find couple of them for affordable price.
Approximate range with low cost CMOS camera and w/o optical zoom: 0.2 – 10 meters. Accuracy would greatly depends on lasers base/spacing. Lasers base also defines minimum size of the tracking object in Z coordinate.  NTSC camera:
Velleman CAMCOLMBLAHU MINI COLOR CMOS CAMERA WITH AUDIO + POWER ADAPTER
has viewing angle 52 degrees. Forget about pixels resolution for a moment, we are in analog television world -);   Math to calculate the distance (I call it Z coordinate) is pretty simple:   D =  B / tan ( phi ),  where D is distance, B is lasers base, and phi is an angle what camera reports.  Phi = 52 degree / 832 = 0.0625 degree per coordinate difference.(See below where 832 comes from).  D = B / tan (( X1 – X2 ) * 0.0625).  For example, B = 6 cm, X1 = 500, X2 = 512, than: D = 0.06 / tan ( ( 512 – 500) * 0.0625) = 4.58 meters.
( http://en.wikipedia.org/wiki/Tangent_(trigonometric_function)

Basically, one laser would be sufficient to measure distance. I installed two of them, because it looks cool! If seriously, there are a few advantages:
- redundancy;
- better accuracy;
- no interruption in distance measurements, even when object is in “vision field” area. I defined this area, for PCL operation. Width of vision field area is adaptive, it’s  narrowing to a few lines! after start-up system.

This version of software capable to follow 1 object in X axes. edited: see below Version 2 release notes. Object has to be visible by itself (rocket, vehicle, any source of light in general) OR highlighted by external light source – not focused to cover bigger space area. Reflectivity of object would define necessary power of the light source in this case, for specific distance range. Optical zoom would significantly improve systems performance.
Tracking in Vertical (Y axes) is not implemented yet, but coordinate reported on serial monitor. Math calculus of Z dimension is not included, simple trigonometry formula could be used. Calibration of mechanical setup would be necessary in order to get meaningful measurements results.

Some technical specification: edge detection resolution -  52 microsecond / per line x 16 MHz  = 832 pixel; 235 lines / per frame;    235 x 832 overall. Speed 60 frame / second. There is no issue to get 486 vertical lines with lower speed 30 fps.

52 microsecond is essential characteristic of the NTSC standard, which represents active line duration.  I used NTSC cam, and for PAL/SECAM it’s the same. 16 MHz oscillators frequency Arduino Uno board. I’m saying edge detection instead of spacial resolution as in current setup left edge is only detected with highest possible time accuracy 16 MHz. Technically it easy to modify settings to detect right side edge as well, and measure size of object, shape, and track few of them the same time. It wouldn’t be 832 pixels, as interrupt routine timing overhead will slow down time response, and there is not much memory in Arduino to do  a complex analysis of the picture anyway. This is why decision was made not to bother with right side. In current design, capture timing of event completely done by hardware. There is a link with details on video format: http://en.wikipedia.org/wiki/Analog_television#Synchronization

If you can imagine a balloon brightly highlighted from left side, with right edge invisible in shadow, it’d be close approximation.  For time sync extraction: LM1881. Two sync signal vertical/horizontal are attached on pins 2 and 3. Hardware interrupt feature of AtMega 328 continuously updates synchronization information – current line number. Time capture done by analog comparator and timer 1. DC voltage has to be adjusted in order to trigger comparator reliable at specific level of the video signal.
And one more things to mention, servo motor driving. In order to avoid interrupt routines racing , between lines/frame syncs and servo motor software library, which generate a jitter in position of the servo, plus timing noise on video raster, I didn’t use a standard Arduino Servo library, and generate servo-sync synchronously with frame sync. Frequency is up to 60 Hz instead of regular 50 Hz, but there is no complain from my Parallax servo, and I think it would the same with any other motors as well.

Link to download sketch:  Arduino_Laser_TRF

12 December 2011   *****  VERSION 2  *****


*     There are 4 main features in the project:
*
* 1. LOCALIZATION XY. CMOS Camera, LM1881.
* 2. RANGE FINDER Z.  Two Lasers plus Camera.
* 3. TRACKING 3D.        2 Servo Motors, plus all of the above.
* 4. TRACE TOOL.      Doesn’t require hardware, software only.
*
Feature considered to be independent, so you can star to build from first one, than move on next stage, and so on depends on a budget, parts availability or your interest! This version of software capable to track object in 3D space, X, Y and Z coordinates. Tracking feature requires
object to be visible in normal “visible” spectrum or near IR. Spectral range could be extended to thermal vision with different Image sensors. Emitting light by itself Object (rocket, star, any source of light in general) OR highlighted by external light source – not focused to cover bigger space area. For distance measurements Reflectivity of object and distance would define necessary power of the external light source in this case.
Z coordinate / distance is calculated in real time, based on simple trigonometry formula D = B * tan (phi).
Calibration of mechanical setup would be necessary in order to get accurate measurements results, especially
on long distances, when angle phi becomes really small. 

Link to download sketch:  Arduino_Laser_TRF_V2
* I’m not removing first version from download section, as it’s smaller and easier to understand logic
behind some software sub-module. Please, be advised that  V1 has bugs in servo motor position calculation. V1 is preferable to hobbyist, who want only localization and distance measurements features.

NEXT LEVEL DEGREES OF FREEDOM :   6 D++ 
http://optical-magnet-laser-6d-tracking.blogspot.com/


Add lasers to a tennis ball, drive your dog crazy (video)

It's a "programmable disco ball," a "cat toy for humans," and a "personal laser light show," all rolled into one. That's how one Matt Leone describes his latest creation, aptly known as the Laser Ball. To realize his dream, Leone drilled a set of holes into a garden variety tennis ball, and inserted about 14 laser diodes, each with an attached strip of diffraction grating. Said diodes were then synced up with an Arduino-equipped Teensy microcontroller nestled within the ball, alongside a rechargeable battery. As a cherry on top of this DIY sundae, Leone then incorporated an infrared remote package from Adafruit, allowing him to remotely jump start his next house party. The result is a cyborg-like ball that makes any LED cube look... square. Check it out for yourself, in the video after the break.

Continue reading Add lasers to a tennis ball, drive your dog crazy (video)

Add lasers to a tennis ball, drive your dog crazy (video) originally appeared on Engadget on Mon, 14 Nov 2011 14:34:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments