Getting Serial Data Out Of An Old Spectrophotometer

[Jure Spiler] came into possession of an old spectrophotometer, which measures the absorbance and transmittance of light in a sample. Getting data out of the device was difficult, particularly as the model in question was an educational version missing some functionality. However, perseverance got the old machine talking happily to a PC.

After an earlier experiment with sniffing the signals being sent to the LCD, [Jure] did some more research. It turned out that a special expensive cable could hook up to the device’s parallel port and deliver serial data, for the low price of € 356 Euros. Now knowing a serial output was present, [Jure] was able to find the data stream desired.

Hooking up a logic analyzer to the “parallel port” on the machine revealed that the device would actually send serial data out over certain pins on the port. The trick that made it harder was that it was in Inverted RS232 form. Thus, all it took was a simple TTL inverter hooked up to a USB-TTL adapter to get the device talking to a modern PC.

With that achieved, [Jure] was able to whip up a simple VB6 program to collect data from the spectrometer and put it in a CSV file for further analysis. There’s even a program to graph the data right off the bat, making the scientific instrument easier and quicker to use than ever!

Oftentimes, old scientific hardware like this isn’t especially difficult to hack. It’s usually just hard enough to make busy scientists stump up the cash for the fancy adapters and cable, while being no match for the dedicated hacker!

Photo of the spectrophotometer in question, with a screenshot of the decoding software on the right

Exporting Data From Old Gear Through LCD Sniffing

[Jure Spiler] was at a flea market and got himself a spectrophotometer — a device that measures absorbance and transmittance of light at different wavelengths. This particular model seems to be about 25 years old, and it’s controlled by a built-in keyboard and uses a graphical LCD to display collected data. That might have been acceptable when it was made, but it wasn’t enough for [Jure]. Since he wanted to plot the spectrophotometry data and be able to save it into a CSV file, hacking ensued.

He decided to tap into the the display communication lines. This 128×64 graphical display, PC-1206B, uses a 8-bit interface, so with a 16-channel logic analyzer, he could see the data being sent to the display. He even wrote decoder software – taking CSV files from the logic analyzer and using primitive optical recognition on the decoded pixels to determine the digits being shown, and drawing a nice wavelength to absorbance graph. From there, he set out to make a standalone device sniffing the data bus and creating a stream of data he could send to a computer for storage and processing.

[Jure] stumbled into a roadblock, however, when he tried to use an Arduino for this task. Even using a sped-up GPIO library (as opposed to notoriously inefficient digitalRead), he couldn’t get a readout frequency higher than 80 KHz – with the required IO readout rate deemed as 1 MHz, something else would be called for. We do wonder if something like RP2040 with its PIO machinery would be better for making such captures.

At that point, however, he found out that there’s undocumented serial output on one of the pins of the spectrophotometer’s expansion port, and is currently investigating that, having shelved the LCD sniffing direction. Nevertheless, this serves as yet another example for us, for those times when an LCD connection is all that we can make use of.

We’ve seen hackers sniff LCD interfaces to get data from reflow ovens, take screenshots from Game Boys and even equip them with HDMI and VGA ports afterwards. With a skill like this, you can even give a new life to a vintage calculator with a decayed display! Got an LCD-equipped device but unsure about which specific controller it uses? We’ve talked about that!

Continue reading “Exporting Data From Old Gear Through LCD Sniffing”

Arduino Rig Does Spectrophotometry

Spectrophotometry is an important scientific tool, most commonly used in biology and chemistry. It’s a method to measure the amount of light absorbed by a chemical solution at various different wavelengths. While it’s typically the preserve of expensive lab equipment, [Daniel Hingston] built a rig to do the job at home.

The heart of the rig is a normal filament-based flashlight bulb, which produces good-quality white light containing all colors. A prism is then used to split the light into its component wavelengths, so that the sample can be tested across the whole light spectrum. The prism is rotated by a servo motor, which exposes the sample to the full rainbow, while an Arduino uses a light-dependent resistor to measure how much light makes it through the sample. Thus, the amount of light absorbed by the sample can be calculated, relative to calibrations made with no sample present.

It’s a simple build that can be achieved with fairly common materials, barring the prism which may need to be specially ordered. It would be a great way to teach highschool students about advanced scientific concepts, as well as showing them behind the curtain of how lab equipment works.

We see all kinds of DIY science gear around here; this lantern-based bioreactor is a great example. Video after the break.

Continue reading “Arduino Rig Does Spectrophotometry”

Fitness Tracker Hacked Into Optical Density Meter

What do fitness trackers have to do with bacterial cultures in the lab? Absolutely nothing, unless and until someone turns a fitness band into a general-purpose optical densitometer for the lab.

This is one of those stories that shows that you never know from where inspiration is going to come. [Chinna Devarapu] learned that as a result of playing around with cheap fitness bands, specifically an ID107HR. A community has built up around hacking these bands; we featured a similar band that was turned into an EEG. With some help, [Chinna] was able to reflash the microcontroller and program it in the Arduino IDE, and began looking for a mission for the sensor-laden platform.

He settled on building a continuous optical densitometer for his biology colleagues. Bacterial cultures become increasingly turbid as the grow, and measuring the optical density (OD) of a culture is a common way to monitor its growth phase. This is usually done by sucking up a bit of the culture to measure, but [Chinna] and his team were able to use the hacked fitness band’s heartrate sensor to measure the OD on the fly. The tracker fits in a 3D-printed holder where an LED can shine through the growing culture; the sensor’s photodiode measures the amount of light getting through and the raw data is available via the tracker’s Bluetooth. The whole thing can be built for less than $20, and the plans have been completely open-sourced.

We really like the idea of turning these fitness bands into something completely different. With the capabilities these things pack into such a cheap and compact package, they should start turning up in more and more projects.

Spot Adulterated Olive Oil With This Spectrophotometer

Olive oil at its finest quality is a product that brings alive the Mediterranean cuisine of which it is a staple. Unfortunately for many of us not fortunate enough to possess our own olive grove, commercial olive oils are frequently adulterated, diluted with cheaper oils such as canola. As consumers we have no way of knowing this, other than the taste being a bit less pronounced. Food standards agencies use spectrophotometers to check the purity of oils, and [Daniel James Evans] has created such a device using a Raspberry Pi.

A spectrophotometer shines white light through a sample to be tested, splits the light up into a spectrum with a prism or diffraction grating, and measures the light level at each point in the spectrum to gain a spectral profile of the sample. Different samples can then be compared by overlaying their profiles and looking at any differences. This build shines the light from an LED through a sample of oil, splits the result with a diffraction grating, and captures the spectrum with a Raspberry Pi camera. Commercial instruments are usually calibrated by co-incidentally sampling a pure sample of the same solvent the test subject is dissolved in, in this case the calibration is done against a sample of pure olive oil. The software requires the user to identify the spectrum in the resulting photograph, before generating a curve.

From a basis of having worked with and maintained spectrophotometers in the distant past we would have expected to see an incandescent bulb rather than an LED for a flatter response, but since this is an oil identifier rather than a finely calibrated laboratory instrument this is probably less of an issue.

Over the years we’ve had quite a few spectrophotometer projects here, this Hackaday Prize entry from 2016 is just one of many.

Scrap Bin Mods Move Science Forward

A first-time visitor to any bio or chem lab will have many wonders to behold, but few as captivating as the magnetic stirrer. A motor turns a magnet which in turn spins a Teflon-coated stir bar inside the beaker that sits on top. It’s brilliantly simple and so incredibly useful that it leaves one wondering why they’re not included as standard equipment in every kitchen range.

But as ubiquitous as magnetic stirrers are in the lab, they generally come in largish packages. [BantamBasher135] needed a much smaller stir plate to fit inside a spectrophotometer. With zero budget, he retrofitted the instrument with an e-waste, Arduino-controlled magnetic stirrer.

The footprint available for the modification was exceedingly small — a 1 cm square cuvette with a flea-sized micro stir bar. His first stab at the micro-stirrer used a tiny 5-volt laptop fan with the blades cut off and a magnet glued to the hub, but that proved problematic. Later improvements included beefing up the voltage feeding the fan and coming up with a non-standard PWM scheme to turn the motor slow enough to prevent decoupling the stir bar from the magnets.

[BantamBasher135] admits that it’s an ugly solution, but one does what one can to get the science done. While this is a bit specialized, we’ve featured plenty of DIY lab instruments here before. You can make your own peristaltic pump or even a spectrophotometer — with or without the stirrer.

Continue reading “Scrap Bin Mods Move Science Forward”

Hackaday Prize Entry: A Simple Spectrophotometer

Building on the work of other Citizen Science efforts, [doctek]’s entry for the Hackaday Prize promises to detect pollution, identify chemicals, and perform other analyses with a simple handheld device. It’s a spectrophotometer, and [doctek] is putting some real engineering into this build.

A spectrophotometer is one of the simplest devices able to perform spectroscopy, requiring only a light source, a photoresistor, and some means of producing monochromatic light. By putting a sample in front of the photoresistor, the absorption spectrum of the sample can be measured. With this data, it’s a simple matter to identify the sample.

A light and a photoresistor are simple enough, but as with every precision measurement device, the devil is in the details. [doctec] is using new, low-noise, low-offset opamps, and precision references to get his data. Some of the parts in the schematic were actually designed in this century – a far cry from the ‘plug the photoresistor into the analog input’ projects we see so often.

[doctec] is using a Teensy 3.0 to drive the electronics and collect the data, and he already has the mechanics of this build pretty much figured out. It’s a great project that shows off some engineering skill, making it a great entry for The Hackaday Prize.