Wednesday, 18 October 2017

USB to GPIO module


I'm working on a project which involves having users press buttons on a webpage which the server needs to send onto a microcontroller in the form of a GPIO signal. The only ports available on the server are USB.


I have had a couple of thoughts:




  1. Just use an Arduino board as the USB to GPIO interface.

  2. Use a purpose-built module such as the http://numato.com/8-channel-usb-gpio-module (this is pretty much the only one turned up in a quick Google search.

  3. Use something like what is described in this question. Drive LEDs from USB


Can anyone with experience in this area make a recommendation?



Answer



Perhaps the simplest solution to the stated requirement is the FTDI FT245R IC.


The key points of note in the context of the question are:




  • Royalty-free USB drivers from FTDI for Windows, MacOS and Linux (MacOS support only for USB VCP mode)

  • Complete USB device mode protocol handled on-chip without custom programming

  • Complete USB hardware on-chip, including USB resistors

  • 8 GPIOs available - will allow future expansion for inputs from the microcontroller too

  • USB suspend / resume support, to switch device to low-power mode when not in use

  • Integrated level converter and 5 V, 3.3 V, 2.8 V and 1.8 V totem-pole output, so it can talk to most standard microcontrollers

  • No additional crystal or oscillator required, it's all integrated.

  • Free sample implementation code for both computer and FT245R ends


In terms of time saved in implementation, and future requirement bloat, this is perhaps the fastest, simplest and cheapest 1-chip answer to the requirement. Price for individual units is around $4-5, and in the $2 range in volumes.



No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...