The students today selected their projects and teams. We ended up with three different projects:
- Ultrasonic rangefinder. This involves building a rangefinder from transducers, not just hooking up an already designed rangefinder (though rangefinder modules from China are cheaper than the pair of transducers that they include). There are 3 students on this team. I ordered TCT40-16R/T 40kHz transceiver pairs from two different sources on e-bay, hoping that one of the packages will arrive within two weeks, and that they don’t both get caught in the Chinese New Year holiday. If both come, I’ll have huge numbers of transceivers (16 pairs).
- Pulse monitor. This is almost identical to the pulse monitor project in the applied electronics class, though I’m hoping that the students will have time to try to extract the pulse rate from the signal—doing some programming as well as the electronics. There are 2 students on this team.
- LED cube and capacitive touch keyboard. This is a “fun” project, with little direct applicability to bioengineering. The hard parts are figuring out how to do the 3D soldering and getting individual control over all the LEDs with the limited pinout of the Teensy board. There are either two teams of three or three teams of two—I wasn’t entirely clear how the six students divided up.
Now I have to figure out what needs to be taught for each of these projects. I’m pretty clear on the pulse monitor, as I’ve done that one before, but rangefinder and the LED cube are new.
The Teensy boards have capacitive touch inputs built-in, so the capacitive-touch keyboard will be fairly trivial using the touchRead() function of Teensyduino, which reports approximate capacitance in units of about 50pF. I’ll try making a 5-key keyboard this weekend and seeing how well it works. I’ll try both a large-plate sensor, like I’ve used for the applied electronics lab and a design alternating sense wires and ground wires. I suspect that the alternating wire design will be less sensitive to 60Hz pickup, but also a bit less sensitive to touch.
I’ll have to look at some of the RGB LED cube designs, to see how they are multiplexing the signals. I suspect that they use either Charlieplexing or a 1-of-n decoder. A 4×4×4 cube has 64 LEDs (192 if RGB), which needs 9 pins (or 15 for RGB) if Charlieplexing, and 8 (or 16 for RGB) with a 1-of-16 decoder. The decoder makes for much simpler mapping and coding, which is important for programming color patterns. There aren’t enough PWM channels to do a good job of getting arbitrary colors at each LED, but PWM could be used for brightness (and some patterned color changes).
I think that the ultrasonic rangefinder will mainly be software, if we do all the pulse generation and detection digitally. The speed of sound is about 340 m/s (more precisely 331.5 m/s+0.6 T m/s/°C), so a resolution of 1mm requires 2.9µs resolution for time (typical cheap range finders have a 1cm or even 1″ resolution). If we sample the incoming sound every 2.5µs and store the waveform for processing, the 8k bytes of RAM on the Teensy LC can store enough data for the round trip for an object up to 3.48m away (if storing only one byte per sample). The Teensy 3.2, with 64k bytes of RAM could store enough data for an 13.9 m range with 16-bit samples, but the echo would probably be much too quiet at that distance (I haven’t checked whether the analog-to-digital converter can do a 16-bit conversion every 2.5µs).
The common approach for many of ultrasonic range finders is to rely entirely on the resonant receiver to filter out the desired signal, and just amplify and threshold it to detect the first returning echo, which makes for fairly simple programming. If we record and do digital processing of the returned waveform, we should be able to detect multiple echoes, and it may even be advantageous to use a non-resonant microphone as a detector to get less ringing.
I checked to see if a non-resonant microphone would work, using a cheap electret microphone (probably CMA-4544PF-W), my microphone preamp for the applied electronics class, and the BitScope oscilloscope. I seem to be getting about a 1µA peak-to-peak signal from the microphone when listening to the Maxbotix LV-MaxSonar-EZ rangefinder for the direct signal close by, and about 0.1µA peak-to-peak for a bounce from about 25cm away. The pulse from the Maxbotix lasts far longer than one might expect (almost 1ms), which indicates substantial ringing in the transmit transducer, and explains why the Maxbotix can’t detect distances less than about 6″.
It looks like a non-resonant microphone will be able to pick up the signal, though substantial amplification and some filtering will be required before digitizing, and I’m not sure how difficult it will be for the students to do the programming for high-speed analog-to-digital conversion, as the Teensyduino software probably doesn’t support 400kHz sampling rates.
It looks like all three projects are doable, but I’m not sure whether to steer the rangefinder group towards electronics or digital filtering solutions (and they will need steering, as they know neither electronics nor programming currently).