Author Topic: Rapberry Pi Zero  (Read 2532 times)

Rapberry Pi Zero
« on: 13 June, 2018, 10:57:36 am »
About a month ago I asked about a Pi application - https://yacf.co.uk/forum/index.php?topic=107953.0.  I have foune a son of a friend who is doing computer sciences at uni who is willing to look into it for me.

In the meantime I saw on Springwatch a Naturewatch camera (https://mynaturewatch.net/daylight-camera-instructions) based on a Pi Zero and it seemed to me that the Zero would be more suitable for my application but I cannot see an audio module accessory that will input audio.  So unless I can use an audio USB dongle with the Zero as mentioned in the Pi thread it doesn't look like a goer - the Zero only has a micro USB connector.

Unless of course you know better!

Morat

  • I tried to HTFU but something went ping :(
Re: Rapberry Pi Zero
« Reply #1 on: 13 June, 2018, 01:27:25 pm »
I'm  sure you could use a micro-USB ->  USB adaptor without any grief. Or am I misunderstanding the scenario?
Everyone's favourite windbreak

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Rapberry Pi Zero
« Reply #2 on: 13 June, 2018, 01:50:41 pm »
Microusb to usb works fine. I am using a pi zero night vision camera with a pi as a bat camera. You may find the zero to be underpowered for video =- much better to get a pi3 if you want anything approaching HD and a decent frame rate.

My batcam uses a Pi 2 (what I had to hand) with an external antenna for the wifi and acts as an access point as there is no local network. Given the choice I would use a Pi 3. I use the motioneyes distribution (a busybox variant) adapted to be an access point instead of a client on an existing network.

For audio you have a number of options. A standard USB audio input should be fine. Or a roll your own audio input card. or something like this https://thepihut.com/collections/raspberry-pi-hats/products/respeaker-2-mics-phat (not used but looks cheap enough for a punt.)

"By creating we think. By living we learn" - Patrick Geddes

Re: Rapberry Pi Zero
« Reply #3 on: 13 June, 2018, 05:18:57 pm »
So i could use one of these these connected via one of these to a Zero?

I'm not looking to record video, just to record mono audio and retrieve the audio file later.

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Rapberry Pi Zero
« Reply #4 on: 13 June, 2018, 11:04:11 pm »
Yes. Absolutely. or just use any USB microphone instead of the adapter. You can use an OTG shim like this with a microphone like this
"By creating we think. By living we learn" - Patrick Geddes

Re: Rapberry Pi Zero
« Reply #5 on: 14 June, 2018, 02:45:37 pm »
But, but, but, that microphone, and I assume any USB mic, has an upper frequency limit of circa 16kHz.  Bats are typically 50kHz hence the need for the Baton and other bat dectectors.

The shim however looks good.

Kim

  • Timelord
    • Fediverse
Re: Rapberry Pi Zero
« Reply #6 on: 14 June, 2018, 03:31:17 pm »
USB is just a data connection, with more than enough throughput for the sort of audio bandwidth you need.  It does indeed seem unlikely that you'll find an off the shelf microphone with a USB interface that can manage ultrasonic frequencies, but by the same measure, I'd be surprised if you could find an audio interface that could do more than a 48kHz sample rate (ie. 24kHz frequency response).  The chipset that Plugable one you linked to earlier uses has a maximum sample rate of 48kHz, for example.

For recording bats I'd have thought you'd have to divide down or heterodyne the signal beforehand (perhaps this is what you're plannign to do?), or use a USB oscilloscope for sampling rather than an audio ADC.

Re: Rapberry Pi Zero
« Reply #7 on: 14 June, 2018, 04:45:30 pm »
For recording bats I'd have thought you'd have to divide down or heterodyne the signal beforehand (perhaps this is what you're plannign to do?), or use a USB oscilloscope for sampling rather than an audio ADC.

The Baton I refer to is a divide by 10 device as I mentioned in the earlier thread linked to in the OP.

From Batbox website:
Quote
The Baton is a simple but versatile bat detector having a monitor speaker allowing reduction of frequencies between 20kHz to 120kHz. The division factor is 10, reducing the sounds of a 50kHz bat to 5kHz

fuaran

  • rothair gasta
Re: Rapberry Pi Zero
« Reply #8 on: 14 June, 2018, 05:04:04 pm »
Ultrasonic USB microphones are available, but not cheap. eg Ultramic (about £200). http://www.dodotronic.com/ultramics

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Rapberry Pi Zero
« Reply #9 on: 15 June, 2018, 08:43:48 pm »
But, but, but, that microphone, and I assume any USB mic, has an upper frequency limit of circa 16kHz.  Bats are typically 50kHz hence the need for the Baton and other bat dectectors.

The shim however looks good.
I have a USB mic which does 250kHz. Many USB sound interface boards have a low pass filter at about 20kHz to get rid of unwanted noise. Are you wanting to use it for bats? It then becomes a little more problematic as USB mics will have a set of speed ratings encoded in the electronics. An interface board like the Cirrus (now defunct) one would have been good for most UK bats though would miss the lesser horseshoe as the range is not enough.

Sadly you end up in roll your own territory. With a microphone such as a MEMS module and a suitable ADC you can capture recordings but sorting the timing frequency for sample capture has eluded me in the past. You would need to be using one of the fast serial connections (I2C or I2S). I have seen reports of > 1MHz sampling using a parallel connection and some very custom kernel mods.

And then there is the buffering and writing to card. There are easier things to build such as zero crossing or heterodyne detectors that can then work in a more human audible range.
"By creating we think. By living we learn" - Patrick Geddes

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Rapberry Pi Zero
« Reply #10 on: 15 June, 2018, 08:49:06 pm »
Ultrasonic USB microphones are available, but not cheap. eg Ultramic (about £200). http://www.dodotronic.com/ultramics
I have one. It is very nice. Does an excellent job. It works on a Raspberry Pi too.
 The Baton is a zero crossing frequency division device. Basic ones just do the zero crossing, more advanced ones modulate that with the sound intensity as well.

Heterodyne is easy to build. It depends what you want to do. A simple ZC/FD would give you an audio signal that is interpretable for species (just about). Heterodyne is great for detection but much harder for identification.

What are you actually wanting to do with it?
"By creating we think. By living we learn" - Patrick Geddes

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Rapberry Pi Zero
« Reply #11 on: 15 June, 2018, 09:08:25 pm »
Depending on your electronics and programming skills, this may be a good place to start http://www.instructables.com/id/PiScope-Raspberry-Pi-based-Oscilloscope/

I would replace the 6 bit ADC with a much better resolution and you may need to lift the input so that it is in the middle of the range (unless you have a differential ADC that will give you negative as well as positive.) Loads to chose from at places like RS.
"By creating we think. By living we learn" - Patrick Geddes

Re: Rapberry Pi Zero
« Reply #12 on: 17 June, 2018, 11:10:23 am »
What are you actually wanting to do with it?

If you are asking me this question I thought I had explained.  I have a Baton and wish to record its output to use with the supplied software to identify the bat calls it picks up.  I originally thought that a Pi would work well, but then changed that thought to asking if a Zero would work.  My freind's son now thinks he could write an Android app to do what I want.

Depending on your electronics and programming skills

Electronic skills pretty good, programming skills less than non existant.

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Rapberry Pi Zero
« Reply #13 on: 20 June, 2018, 10:31:03 pm »
Yes a Zero would work. Yes an android app on the phone would be better. Try downloading a standard sound recorder app that will record to WAV and then fettle a lead from the baton to the phone. It will need to pick up the correct ring for the mic.

Try something like this: https://www.techradar.com/news/phone-and-communications/mobile-phones/add-an-audio-input-to-android-1189160
"By creating we think. By living we learn" - Patrick Geddes

woollypigs

  • Mr Peli
    • woollypigs
Re: Rapberry Pi Zero
« Reply #14 on: 20 June, 2018, 10:41:28 pm »
A slight side note. I got a spare Raspberry pi zero, the one without WiFi, original style. Free as in for zero to a good home. PM me if interested.
Current mood: AARRRGGGGHHHHH !!! #bollockstobrexit

Re: Rapberry Pi Zero
« Reply #15 on: 27 June, 2018, 12:16:48 pm »
Thanks for the kind offer Woolly but as I said I would not know what to do with one!