Skip to main content
Visitor II
May 23, 2022
Question

Hi ST community; is there anyone who can explain to me how to connect STM32F0 with the microphone USB?

  • May 23, 2022
  • 5 replies
  • 3313 views

Actually, my aim is to get data from a digiducer sensor with STM32F0 via USB port and can't understand how.

    This topic has been closed for replies.

    5 replies

    Graduate II
    May 23, 2022

    The sensor connects via USB?

    Does you STM32F0 provide for a USB HOST?

    It it does assume you'll need to write a suitable CLASS DRIVER

    amlok.1Author
    Visitor II
    May 24, 2022

    yes the sensor connects only with USB.

    and when i was searching for the right STM32 MCU to get data from this connector, i found the STM32F0 that has inside a USB device as shown in the figure below.

    is there any piece of help about this CLASS driver to base on or a helpful document to assume this USB communication?

    0693W00000NqYU1QAN.png

    Graduate II
    May 24, 2022

    You know what you're doing?

    In the headline you write about "microphone USB", in the description you mention a USB sensor.

    USB device means that you can connect it to a USB host (for example a computer), not that you can connect other USB devices, such as your sensor.

    amlok.1Author
    Visitor II
    May 24, 2022

    Thank you LCE for the explanation.

    actually, according to my understanding, I thought that Microphone USB and My sensor ( in my case, a digiducer for vibration that has a USB connector) give the same data, that's why i mentioned both of them.

    I'm a student and I'm working on an academic project in which i have to read data from this sensor with STM32F0. via USB and don't know how.

    if you can guide me, I will be so thankful.

    Super User
    May 24, 2022

    @amlok.1​ "I'm a student"

    Then you should be going to your teacher/supervisor for assistance: they know you, and the task you've been assigned, and the resources available to you - we know none of that.

    "i have to read data from this sensor with STM32F0. via USB"

    As the others have said, you cannot.

    A USB connection always consists of a Host, and a Device (ignoring Hubs for now).

    Your sensor is a USB Device - therefore you will need a USB Host to connect to it.

    As it says in the diagram you posted, the STM32F0 is also a USB Device - it cannot connect to another USB Device.

    0693W00000NqZUbQAN.png 

    This is fundamental to the way USB works - it is not anything specific to the STM32

    https://en.wikipedia.org/wiki/USB#System_design

    amlok.1Author
    Visitor II
    May 24, 2022

    Thank you @Andrew Neil​ for the clarification.

    Do you know an MCU that can get this data for my sensor via USB because this is the only way it can connect?

    Graduate II
    May 24, 2022

    > i have to read data from this sensor with STM32F0. via USB

    You cannot.

    As I said: STM32F0 is a USB device only, as far as I understand the STM32F0 website.

    You need an STM32 with USB host / on the go capabilities, which the STM32F0 does not have.

    Maybe the assignment is a little bit different, like:

    connect a sensor (not via USB) to an STM32F0, then send sensor data from STM32F0 via USB to PC.

    ?

    amlok.1Author
    Visitor II
    May 24, 2022

    ok, now I understand what you said.

    in my case, the sensor( digiducer) can only be connected by USB. I need to get data from it and stock it in an MCU ( if you can suggest me a host that can work among the STM MCUs ).

    Super User
    May 24, 2022

    Why have you selected this particular sensor?

    Why does it have to be connected to an MCU? Presumably it's intended for connecting to a computer...

    "suggest me a host that can work among the STM MCUs"

    There are parametric search facilities on the ST website - see above.