3 ms·
bandpass filtering in the time domain seems like it may be more efficient for this use case to me. if i'm reading the code correctly, it seems it's computing a
by a-dub 3y ago
bandpass filtering in the time domain seems like it may be more efficient for this use case to me. if i'm reading the code correctly, it seems it's computing a 512 point window and fft on every non-overlapping window.
i guess it depends on what vector/matrix instructions are being used in the underlying implementations.
- KeplerBoy 3y agoI'm also curious about the power draw of continuously executing FFTs on a rpi. Seems like the kind of task where one could easily burn 10 watts, if the wrong FFT Implementation is chosen. You'd absolutely want to do this in DSP hardware.
- pdubouilh 3y agoyeah using a DSP for this definitely makes more sense - but I'm lacking experience in the field. Same goes for using a discrete band-pass filter. This project is more of an attempt at "how can I build something in 2 hours that works reliably" ! For reference, it eats ~25% of the available CPU resources on my rpi zero 2w - which draws a maximum of 350mA, so this implementation definitely draws less than 1 watt.
- KeplerBoy 3y agoNice to see that it consumes barely any power. Looks like a fun and useful project!
- a-dub 3y agoyes and it's very cool! if you're interested in learning, i'd look into the filtering approach. maybe could try pyfda and the filtering functions in scipy.signal to start playing around. or if you have access to matlab it has some really excellent filter design tools. regarding the hardware/dsp: many cpus include simd instructions these days, which basically are an interface to a hidden digital signal coprocessor. :)
- _Microft 3y ago1W of continuous power consumption is not great. To put it into perspective: that’s 1x24x365Wh, almost 9kWh per year. A kettle (1.8-2kW) can run for 4-5 hours for that amount of energy. If getting a kettle to boiling takes 5 minutes, that’s almost 50-60 kettles. That’s two month of boiling one kettle a day.
- jesse9766 3y agoOr, at the rate of $0.30/kWh in California for residential use, $2.70/year. Lowering power usage on embedded devices is important when you're producing thousands, but for a hobbyist it doesn't really matter.