Hi all,
Longtime viewer of the show. Found the channel after googling for “Kindle teardown” and have been watching ever since. I have had some classes in electronics so I’m not entirely “Dave taught”, but definitely much of my knowledge of the details of actual circuit design has come from the show.
I’m actually a graduate student in biology hoping to make an field instrument. I thought that this would be a good place to get some insight into the design principles of the electronics! I’m the main driver on this project, so I wanted to design the instrument myself to ensure it got done and that I’d know how to modify it.
The plan is to sort oceanic plankton by analyzing their fluorescence and bioluminescence (de-novo production of biological light) characteristics as they flow (in seawater) one by one past a detector, and then actuate some valves downstream to either send them to waste or collect them. This is analogous to a FACS instrument if anyone is familiar with those, only at a macroscopic scale and hopefully much simpler (and cheaper).
Right now it’s just at the planning / chip selection stage, so no schematic yet.
There are few different aspects to the design which I’ve listed below:
(1) Primary analog light sensor
I plan to detect the light produced by fluorescence emission of the sample by using a LED of the appropriate wavelength (green LED for green fluorescence) in photodetector mode (aka, inverted). Same principle for the bioluminescence detection. Excitation of the fluorescence will be accomplished by a normal emitting LED/laser diode (cheap laser pointer kind) oriented at 90? to the detectors. I hope that the detector LEDs will be sensitive enough to detect the light. Alternatively I could use an actual photodiode with actual colored filters to get the wavelength response, but the combination of the wavelength specificity of LEDs in detector mode combined with their super low price made me want to try it.
(1a) Electrical stimulation of bioluminescence
Mechanical stimulation of the plankton as they flow through the instrument may stimulate detectable bioluminescence. If not, I plan on using electrical stimuation to stimulate bioluminescence artificially. So far all I’ve planned is wires exposed to the flowing seawater, with an alternating H-bridge to drive it as straight DC might cause strange electrochemical things to happen to the wires.
(2) Transimpedance amplifier
In order to detect the light current produced by the LEDs, I’ll need to amplify the current produced. I’m planning on using a op-amp based transimpedance amplifier (
http://en.wikipedia.org/wiki/Transimpedance_amplifier), specifically something like Figure 1 off Wikipedia. According to the internet, there are two ways to operate a photodiode (1) Photoconductive and (2) Photovoltaic. In the photoconductive topology, the photodiode is reverse biased with a voltage. This decreases the junction capacitance, thereby increasing performance at high frequency. There is increased noise however as the bias leads to a stochastic reverse current. Photovoltaic mode operates the LED at no bias, which decreases the noise and increases the sensitivity. Seeing as I was planning on sampling things in the millisecond to 100 microsecond timescale which seems “low frequency” to me, I was planning on using the photovoltaic topology.
I’m having trouble choosing an op-amp as I don’t know which parameters on the op-amps would benefit my instrument the most. Also, I have considered using a differential amplifier to try and reduce common mode noise, but again don’t know enough about it to gauge it properly. This site has been a great resource for considering the “advanced” versions of the transimpedance circuit on wikipedia (
http://www.linear.com/solutions/Transimpedance_Amplifiers). Alternatively, I may use a log-amplifier if the dynamic range of the light measured is really broad.
The op-amps would theoretically be running of 0-3.3V single supply, although if there is a benefit to using a double sided supply + op-amp I could try to design it into my circuit.
(3) ADC
Essentially my criteria so far in selecting an ADC was “Which ADC already has code I could use?”. Based on that criteria, I looked at the MCP3204, a 8-channel 12-bit SPI interface ADC. The IC can sample at 100 kilosamples/sec (every 10 microseconds), which might be overkill for what I need. I’ve also been looking at I2C Delta-Sigma based ADCs, which as far as I can tell perform better but can’t sample nearly as quickly. I also figure an I2C chip would be fairly simple to code for, as I2C is a bit simpler to understand than SPI. The ADC would also run at 3.3V to allow it to interface directly to the Raspberry Pi I plan to use.
(4) Digital interface
I plan to interface the ADC directly to a Raspberry Pi as (1) I have one already (2) ample ram / simple file saving (3) Assumed that the 800MHz Pi would be able to do more complex things than an 16Mhz atmega (4) Can use python, which is easier than C and allows for straightforward realtime data visualization.
That being said, tests online say that the Pi polling a MCP3204 from C using the kernel hardware SPI drivers maxed out around 18 kilosamples/sec (out of 100), which makes me slightly worried that attempting to run everything from Python could run into some real timing issues. However, the Pi does have I2C and SPI in hardware, so the low level timing stuff should be fine. I get that Linux isn’t realtime like a microcontroller, but thought that if I kept track of the high resolution system clock I would be able to correct the program when it has strange delays due to python / linux doing things in the background.
(5) Actuator drivers
The point of the instrument is really to actuate some downstream valves based on upstream measurements of the organisms. I have some candidates for valves, but they are all pretty straightforward 12V solenoid based valves. Given the desire to protect my Pi from the spurious high voltage things that motors/actuators can produce, I was planning on driving it by interfacing the Pi to an open collector driver chip. Also add some kickback diodes or snubber caps. Perhaps it would make sense to optocouple it to the Pi and put it on a different part of the board?
(6) Power supply
Primary power for the instrument will be the 12V DC source from a small boat. Actuators will be supplied directly by the 12V rail. For the Raspberry Pi I plan to first buck convert the 12V to 6-7 volts, and then linearly regulate it to 5 volts. I know that automotive/marine stuff is hardened to resist voltage spikes,so alternatively I could use a automotive inverter, then use a standard 5V power supply as this would handle all the high voltage robustness that I would otherwise have to design myself. For the analog electronics, I plan to further regulate the 5V rail to 3.3V (I’ve heard the 3.3V rail on the Pi can get quite noisy from the digital ICs), and then run the ADC and analog circuitry using the independent regulated 3.3V rail.
Beyond that, I’m planning on eventually making a PCB for it, putting decoupling capacitors everywhere, put some protective diodes places where I fear voltages, and maybe put some polyfuses / fuses on the power rails. Maybe for the PCB layout also try to isolate the motor/digital/analog ground planes? The actual physical fabrication of the housing/detectors is another aspect, but for that I’m planning on getting some help from people at my university. It might end up a bit "bodged" but I just want it to work.
Does anyone have comments on the design? Suggestions for ICs for each step are also greatly appreciated as its a bit tough to choose appropriate ICs from the catalogs when you don’t have the appropriate background knowledge/experience to evaluate it. That being said, I’m also open to just using the best performing / most expensive chips as this isn’t a project meant for large-scale production.
Hoping to get this instrument into the field by August at the latest.