Hello, this is Jon, hoping I'm in the right place!
Indeed you are, welcome Jon!
Thanks Dan, and thanks for putting this together.
hi Jon! long time, how's things?
@Aleksandar Bradic for the poster which is seriously DOPE
And thanks toha :) thanks!
OK folks, let's get started. Welcome to the Hack Chat, I'm Dan and I'll be moderating along with @Dusan Petrovic . We want to welcome Jonathan Foote to the channel today to talk about signal conditioning. TBH it was hard for us to settle on a topic because Jon has such a wide range of interests, but we figured this could be a fun topic that we haven't talked about much on the Chat before.
Welcome Jon -- can you kick us off with a little about yourself?
Hello and welcome all!
Sure! People ask me what I do and I say I'm a "recovering scientist"
I played the academic game for a while after grad school -- I did a postdoc in Cambridge England
Then I did a fellowship in Singapore
The academic thing wasn't working out so well so I settled for a cushy job in industry
define "cushy" ?
Sure -- as opposed to an academic gig which is like three jobs: teaching, service, publish or perish, a 9-5 counts as "cushy" lol
Huge respect to those in the professor biz it's a lot of work and scary because tenure is not a given
My little brother is trying to decide whether he wants to stay in academia after his doctorate or venture into the world. It's different, for sure.
Jon, What are you excited about to work on>?
So I did a lot of fun things at the researh lab (called FXPAL, FX=Fuji Xerox, kind of a PARC wannabe)
Like using some the things I had worked on in grad school for speech recognition and analyzing music and video
Some of the patents on those have run out so it may be time to look at those again :)
On fun invention I called the "beat spectrum" which was a way of analyzing the tempo and rhythmic structure of music
Hang on I will drop a link
http://rotormind.com/projects/portfolio/Beat_Spectrum/
Jonathan Foote Portfolio
For a number of years I worked on an approach to analyze audio and video based on self-similarity. Comparing every part of a media file exhaustively with every other part results in a "similarity matrix" that both visualizes the time structure of the media and facilitates further analysis like segmentation or verse/chorus detection in popular music.
Hey Jon - is this related to the viz work you did that I helped review?
Hello, I see some names I recognize -- yes Leigh, it was
I was hoping so. I really enjoyed that and am here to see where you've taken it and your other signals work. Thanks for doing this!
Hey Jon. I know you did a VCV hackchat before and mentioning the Beat Spectrum project there- is music and synthesis your main focus? So after my time at the research lab I took a year off to do some less-formal work (among other things working with artists like
ANd I did some consulting to pay the rent, and 15 years later I'm still doing the same thing, so I've failed to both specialize and get back on the hamster wheel
lol, nothing wrong with that anyway. Just means you get to see a broader spectrum of cool projects
So I've worked for a lot of startups doing some interesting things like a surgical robotic system that needed a lot of instrumentation for pressure, position, water flow (it uses a supersonic jet of h20 to remove tissue)
The Beat Spectrum visual looks amazing btw.
How has the pandemic affected you and your output>?
so I have been collecting types of sensors and how to use them and massage the data so it's useful
what's your favorite/oddest sensor in your collection?
I remember working on mathematical morphology and convolutions for image processing. Now with all the interest in applying neural networks to morphology and convolutions (CNN), do you have any thoughts on using your beat spectrum as an input to an DNN?
The pandemic has been a little tough mentally though I can't complain as I have food and shelter
A lot of my clients kind of ghosted but they are coming back.
Yeah with the neural network things, I've been trying to keep up with that. The latest hotness seems to be putting PURE TIME DOMAIN data into them and they still work if anything even better
I will bet there is some layer that still looks like higher-order processing (spectral representation) or something but it's super interesting
So instead of a 2D input you give a 1D input and something learns the long and short time correlations.
Exactly! This is cool because it made most of my Ph.D. completely obsolete lol
that's AI for you :) Any recommendations on papers you're reading re timeseries data
Yes, I'm trying to keep on top of it because it's clearly very powerful but it changes quickly and requires a huge amount of data + cpu
Oh boy I'd have to research that. Maybe after that chat I don't have a link at hand
But I think there's still a lot of room for old school DSP especially on micros
There's this thing called "LPC" -- linear predictive coding -- that they used for speech analysis back in the day. Very lightweight, fast way to get an all-pole model of a signal, which gives you the resonant peaks
Yeah. Espicially since Micros are largely getting to the point where an FPU is cheap enough to be standard on most everything.
Yes exactly. This might be fun for looking at music, particularly a single instrument.
For sure. I'm huge into eurorack and I've found it mildly entertaining watch as more modules are just a micro behind the panel than analog circuits
I love the Eurorack community but have not actually dipped my toes
because it looks hugely addictive!
I want to shout out to VCV rack which is an Eurorack software synthesizer, FOSS
great place to get your feet wet if you are interested in analog synthesis. Also it's free
https://mutable-instruments.net/modules/plaits/open_source/)
for eurorack I've found it very interesting to study Mutable Instruments hardware and firmware resources (egI'm a computer science guy who recently started tinkering with sensors and I've been amazed at how noisy the signals are. for example for a class for high schoolers I was trying to show them how you can just put your thumb over a webcam and see your pulse, but there's crazy variability based on the pressure of your thumb.. Is there a good cookbook of processing techniques for this kind of thing?
It is. VCV has gotten hugely better though and the DIY scene a lot stronger, so while I wouldn't call it affordable, I don't know that's it's tons more expensive than any other hobby (photography, cars, etc.)
erm, I was unclear there- the DIY eurorack hardware scene
that's a great question, I don't know of any books, does anyone? A lot of tricks are pretty standard
but a lot depends on the particular signal and sensor. Did you get the pulse to work?
https://ccrma.stanford.edu/~jos/sasp/ are a good start
I wouldn't say 'cookbook' but Signals & System from Oppenheim andYou can visualize it easily and then just give up on having an algorithm report the pulse rate. By the way the same issue exists in fingertip pulse oximetry where they solved it by just incorporating a spring loaded clamp and the sensor to keep the pressure relatively constant.
Excellent, great resources. S&S was my textbook
I worked on a pulse oxmeter for a client and the changes are very small compared to the noise. Used a TI chip specially designed to do that
S&S is still *the* textbook. I only took the class two semesters ago and it's what my prof used, and it seems what everyone is still using at every uni
Practical Signal Processing is an amazing book
Good I hope things would have advanced a little
Can confirm, regarding S&S at uni. Do folks still use "The Art of Electronics"?
I keep finding these amazing tutorials -- like one for the Kalman filter (Hi Kal!)
that I would have LOVED ti have while learning it
Can you link the kalman filter tutorial? Sounds interesting
Art of Electronics has a new edition out and it's superb
Yep. Unfortunately both S&S and AoE are pretty dense. I feel like they expect the math to just come naturally, as easy as reading a normal novel. So while I can't reccomend anything better I still don't love them
haha, hi jon!
S&S is fine for academics, but little for the experimenter, IMHO.
I love AoE
hi Jon!
I spent the holidays reading The Scientist and Engineers Guide to DSP. It was a great at explaining the theory and math, but lacked practical examples
Yes I thnk theres a lot of room for more gentle texts
And I think I lot of people are like me that if they don't have a good application it's hard to learn something
Think DSP is a nice compact read with a lot of python demos
like the Kalman filter I was taught pure theory -- they didn't even mention it's how the Apollo navigated to the moon!
Kevin Karplus at UCSC has a new intro book that is applications focused
https://github.com/w1hkj/fldigi/
If you're interested in DSP for communications, fldigi has a wide base of modems, all in C and C++.I found AoE to be most useful as a lookup, but found it hard to learn about electronics through it. Eg. there are lots of amplifiers, but how do I find out which one if the best type for what I'm doing?
https://www.vult-dsp.com/vult-language and Purr-Data (a fork of Pure-Data) both of which can be loaded though the VCV Rack 'Prototype' module. Of course, that's focused on sound/music compared to DSP for like radio/images/etc. but I still think it's a good place to start.
While not a text book by any means, I've been having sucesses teaching myself signals-y stuff using a mix ofGreat suggestions all, I will try to collate these!
Regarding DSP and speech analysis, do you think there's a future for non-AI or non-learning-based approaches to speech recognition?
I still have some friends in the speech recognition business and their general opinion is no -- neural networks are the way to go
We did a Hack Chat with Marc Lichtman last year, he authored a great guide to DSP using an SDR and Python:
https://hackaday.io/event/175347-learning-dsp-and-sdr-hack-chat
Learning DSP and SDR Hack Chat
Marc Lichtman will host the Hack Chat on Wednesday, November 11, 2020 at noon Pacific Time. Time zones got you down? Here's a handy time converter! "Revolution" is a term thrown about with a lot less care than it probably should be, especially in fields like electronics.
Great -- SDR is something *I* want to learn!
And BTW, I will post a transcript at the end of the chat, if anyone needs to copy a link or something
@smatterchoo this one? https://leanpub.com/applied_analog_electronics
@Daniel Lynch do you have a speech recognition paradigm that's not learning based?
Transcript would be great.
(I don't want to clutter the chat by thanking everyone individually but thanks all, these are great references!)
Ha, no. I wish! I'm just interested in stuff that's lightweight and fast.
SDR is a great way to experiment with signal processing... get a Pluto
@Sophi Kravitz who waved a little before!
HiAlso the Teensy does amazing DSP for audio
Are we still planning to discuss signal conditioning?
there was a discussion on the Teensy board about implementing the Moog filter -- amazing
@Kevin Andersen yep that's the one
Signal conditioning -- depends on the signal, and the conditions (lol). Anything in particular?
Low level signal over a 1 to 5 foot distance to a 3.3V AtoD.
General good practice is to keep noise sources awa: use filter caps, twisted pair, shielding
I'd like to know more about limiters, compression, mulit-band compresison, and noise removal. The last in that list espically strikes me as black magic.
Define good shielding, please.
A2Ds can be tough because they are high-impedance and will pick up a lot
I'd also like to understand balanced audio better. I'm about ready to rip out my entire ... everything. So that I can replace my noisy ATX PSU powered subwoffers with something that doesn't hum.
@Jon Foote - are current loops used much anymore? 4-20 mA stuff? If so, mostly industrial sensors, I'd imagine?
So for A2ds I usually use a mix of analog (filter caps, ferrites, maybe an active lowpass someplace) plus oversampling and DSP
True. Should a preamp be used? Where should filtering go?
Yes current loops are still around and still great.
I think more people should use them because they are really robust to noise
Any good reference with details?
Boy this all depends on the particular signal -- impedance, bandwidth, so hard to give a general solution
I don't know whether it is prim and proper but I'll usually include a passive RC or opamp active filter tuned to 2.5-3x the expected sampling speed.
for ADC
oh neat, i've never encounter current loops before
Probably want to keep frequencies below the Nyquist limit: 1/2 sample rate
What is power consumption like for a current loop?
Current loop 4-20mA output sensor modules are often used for industrial applications where the sensors are a "long" distance from the receiver. They are less susceptible to noise and the minimum 4mA level lets you know if they become disconnected.
You can make a little tester that's just an LED
Someone asked about noise removal and I have to say I'm impressed with the one in Audacity
I've been remastering some cassettes and boy does it help with the hiss
But I don't know how it works! I'm guessing spectral subtraction
Yeah, it gets a sample of the noise first though, I imagine to see the spectrum it occupies?
But the hiss gives is "character"...
*pop*
Yes guessing spectral subtraction
I'm working on a sensor that uses a piezoelectric sensor to pick up audio up from a surface and want to do real-time DSP on it inside a micro. It seems I should put in an amplifier, limiter to prevent blowing out the ADC and maybe some filters. But what kind of amplifier/limiter/filter? any good learning resources so that I could find out myself? I mean, to some extent noise in music *can* be desireable
20ma current loops - teletype!
Piezo sensor: probably a preamp like from Adafruit would work. They are high impedance
I was actually only slightly kidding -- still love to listen to my old tapes once in a while. Brings you back
and I would put a zener across it
to clamp high voltages. For big signals like tapping you can put a piezo right into a GPIO
And hope the protection diodes work. :)
Don't get me started on how terrible cassettes are because I will rant like an old fart :)
http://www.doepfer.de/DIY/a100_diy.htm they have a dead simple voltage clamping/limiting circuit with a good explanation
if you scroll down a bit onthanks Jon and Johnathan!
re: putting a zener across it, that sounds like the clipping circuits in those old guitar distortion pedals, like the ProCo RAT. Have you seen uses for that outside music?
"All these young wipersnappers using Vinyl, don't they know wax cylinders are the only true way to listen"
Zener clipping? Pretty standard protection circuit
also TVS which is two back-to-back? Use them a lot on motor driver outputs to
I used a piezo and uC with a zener to detect motion of a bike and enable a ham radio / APRS / GPS transmitter. It worked, though the zener did rectify some RF and I had to bypass it, but not too much because the motion was also impulsey and had high frequency components.
Yeah, good quick n' dirty way to make sure you don't fry a micro
TVS wil snub some of the noise from PWMing motor coils
"Wax cylinders? Back in my day if we wanted to listen to music, we paid chamber musicians to play. And we liked it that way!"
heh
i've used a lot more dual schottky than zener clamp. You end up with (0 - Vf) and (VCC + Vf) for your clamping voltages. I was under the impression that this setup had less capacitance than a zener clamp
Sounds right! Also I've seen more than one zener fail shorted. Ouch.
that's a diode in general thing... fail shorted.
For signal processing, you can clamp -- "limiter" with a diode and an opamp
It's definitely a use what you need sorta thing. it's not like it'll add to your BOM, so it's more a matter of if you need bipolar and what kinda signal are you trying to shove down the wire: if it's high rate data you might need to care, if it's audio, the clipping adds character ;)
there's a few circuits in AoE if memory serves.
One of the more challenging signals I've been a party to dealing with lately is ion sensing. Using a ~400V bias signal applied to the primary of a car's ignition coil when the spark is not active and sensing current
with the goal of sampling current on a MCU
Hah! I did a stupid hack triggering a selfie stick with a cattle prod and that was actually really tricky
Yeah, just checked my 110% legal AoE 3rd ed. PDF, it's in there.
How did you approach it?
yeah there are quite a few circuits in AoE, but that's actually my problem. Which one to choose? It doesn't seem obvious to me which one to choose over another and why? that's where the book falls short for me
Hmm, yes I see that could be an issue
In the analog world, a combination of breadboarding and SPICE can really help..
Not sure I have a good answer, usually it's how little can I get away with and what parts do I have on hand ?
I don't know how relevent it is, but the cattle prod reminds me: I do some lichtenberg figure burining with an oil ignition transformer- sometimes it takes a while to actually start up. Would there be any way to measure a signal from it to see if the transformer is working harder than it should be, if I should boost/lower the input voltage based on current, etc? Just curious if you have some ideas were some signal processing could lead t
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.