Maker Pro
Maker Pro

Creating a HID USB device

Hi,

I had a few questions about usb devices.

I am kind of new to the world of electronics, and built this small conception:

I did this by writing a small arduino program that sends the distance between the ultrasonic sensor and my hand, to my pc by using serial.write. And I wrote a small program in c# that listens to my com port. volume of the pc is set to the distance in centimeters.

The ultrasonic sensor outputs a pulse, the duration of the pulse is the is the time that the sound took to travel to my hand and back to the sensor

So, as a challenge/project I want to make this without an arduino. just a microcontroller and my ultrasonic sensor. At this moment I have a program at my pc which sets the volume, but is it possible to let an usb device do this? without having to develop/install additional drivers? So just a plug&play situation.

and how to make a microcontroller communicate with a pc via usb?

Thanks!
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
An Arduino isn't as different from a microcontroller as you may think.

Many microcontrollers these days have a native USB interface.
 
Hi,

So, as a challenge/project I want to make this without an arduino. just a microcontroller and my ultrasonic sensor. At this moment I have a program at my pc which sets the volume, but is it possible to let an usb device do this? without having to develop/install additional drivers? So just a plug&play situation.

and how to make a microcontroller communicate with a pc via usb?

Thanks!

I'm not sure if a pure plug-n-play solution is easily achievable or not. If you're ok with using your own software on the PC, I'd just stick with what you have now. That is, use a USB to serial converter to communicate with the microcontroller from your PC. The Arduino development board took care of that for you originally. You'll need to get a USB to Serial converter IC for your final project alongside the microcontroller itself.

As Steve mentioned, there are also microcontrollers with native USB support, but I wouldn't worry about that for this particular project. Unless, again, you ABSOLUTELY need something completely plug-n-play (which still might not be possible).
 
Okay Thanks! I'll try to improve my software first of all.

I tought this was a cool idea and I eventually could make a kickstarter project out of this. that's why I don't want an arduino inside. It's too big and pricey if I would want sell them. But I just got started with this project, not even sure how far I will get. I am learning a lot about at this moment. Which is nice :)
 
Top