Which microcontroller? (small, USB host, python)

Thread Starter

PetrN

Joined Jan 23, 2023
4
I have a measurement equipment (precise voltmeter) which allows USB connection to computer. The manufacturer only supplies Windows application with limited data logging capability. There is FT232 and FTDI protocol used. So, I have decoded entire command set and data reading. Now I am able to fully control the device and read measured data by Python script.
I need this equipment light and portable supporting data logging. I do not want to carry laptop. I am looking for a microcontroller which I can connect to the voltmeter over USB. I am only experienced with Arduino. Any suggestions for suitable microcontroller platform/model?
Requirements:
- USB host port for the equipment connection
- Python support (FTDI library)
- ability to connect SD card module
- ability to connect small display (perhaps Nokia 5110)
- preferably small, cheap, simple to use
 

MrSalts

Joined Apr 2, 2020
2,767
I have a measurement equipment (precise voltmeter) which allows USB connection to computer. The manufacturer only supplies Windows application with limited data logging capability. There is FT232 and FTDI protocol used. So, I have decoded entire command set and data reading. Now I am able to fully control the device and read measured data by Python script.
I need this equipment light and portable supporting data logging. I do not want to carry laptop. I am looking for a microcontroller which I can connect to the voltmeter over USB. I am only experienced with Arduino. Any suggestions for suitable microcontroller platform/model?
Requirements:
- USB host port for the equipment connection
- Python support (FTDI library)
- ability to connect SD card module
- ability to connect small display (perhaps Nokia 5110)
- preferably small, cheap, simple to use
Look at an ESP32 huzzah from Adafruit. This comes with a lithium battery and USB charging for the battery - all for $20 plus a small battery. You'll need microPython - see Adafruit's website for their libraries and download. you can even get a scrip to port the data to your laptop via wifi.
Buy the lithium battery from adafruit to insure the right connector is connected to the battery in the right polarity.
 

KeithWalker

Joined Jul 10, 2017
3,091
What's wrong with using the Arduino. It would be relatively simple to save the data on an SD card and read it on a small display or later to a computer via USB.
 

Thread Starter

PetrN

Joined Jan 23, 2023
4
How to act Arduino as USB host to connect to voltmeter?
The goal is light, portable, both supplied from 12V battery:

Voltmeter <=====USB======>Microcontroller (display, SD card)

No laptop.
 

djsfantasi

Joined Apr 11, 2010
9,163
How to act Arduino as USB host to connect to voltmeter?
The goal is light, portable, both supplied from 12V battery:

Voltmeter <=====USB======>Microcontroller (display, SD card)

No laptop.
In general, this should be fairly simple, if you have two shields for the Arduino.

First, the USB connection on the Arduino can be read from/written to by opening the first serial port.

Secondly with an SD card shield, you can open/create a file to which you can write the data. There is an associated library with the necessary functions.

Lastly, search for an “Arduino LCD Display” on which you can display data contemporaneously. Again, there will be sn associated library.

Then you can write a sketch to do what you want.
 

MrSalts

Joined Apr 2, 2020
2,767
In general, this should be fairly simple, if you have two shields for the Arduino.

First, the USB connection on the Arduino can be read from/written to by opening the first serial port.

Secondly with an SD card shield, you can open/create a file to which you can write the data. There is an associated library with the necessary functions.

Lastly, search for an “Arduino LCD Display” on which you can display data contemporaneously. Again, there will be sn associated library.

Then you can write a sketch to do what you want.
There are libraries for the requested Nokia 5110 display. There are many better displays but not many easier to use.
 

Thread Starter

PetrN

Joined Jan 23, 2023
4
Display and SD card is fine. I have completed many Arduino projects including those.
The key is the USB host hardware controlled by Python FTDI library (script available - working on Linux). Laptop - USB - voltmeter works. Now it is time to miniaturize with small microcontroller - USB - voltmeter. This is the first time I am going to design/use USB host and have no idea how. Which hardware to choose, how to wire if needed, any library needed?
 

MrSalts

Joined Apr 2, 2020
2,767
Display and SD card is fine. I have completed many Arduino projects including those.
The key is the USB host hardware controlled by Python FTDI library (script available - working on Linux). Laptop - USB - voltmeter works. Now it is time to miniaturize with small microcontroller - USB - voltmeter. This is the first time I am going to design/use USB host and have no idea how. Which hardware to choose, how to wire if needed, any library needed?
why would you want to use python to work through the USB to reconvert to FTDI to your meter instead of directly controlling FTDI with IO pins of the micro ro interface with the meter? Seems like you found a usb library and you are reluctant to change but I sure it won't be too much work to re-work to eliminate the USB step.
 

Thread Starter

PetrN

Joined Jan 23, 2023
4
This is pretty expensive, precise voltmeter under warranty. I cannot disassemble and rework it. (I wish I could but it is not mine.) USB it the only available interface. I still beliave there is a simple way to deploy some microcontroller with USB host, upload python script, plug USB cable - and measure, diplay, log.
 

Jon Chandler

Joined Jun 12, 2008
1,051
An ESP32S2 can act as a USB host if you connect a USB connector to the correct pins – the normal USB connector used for programming is serial only via a UART-USB chip.

You'll need an appropriate USB driver for the voltmeter.
 

djsfantasi

Joined Apr 11, 2010
9,163
Display and SD card is fine. I have completed many Arduino projects including those.
The key is the USB host hardware controlled by Python FTDI library (script available - working on Linux). Laptop - USB - voltmeter works. Now it is time to miniaturize with small microcontroller - USB - voltmeter. This is the first time I am going to design/use USB host and have no idea how. Which hardware to choose, how to wire if needed, any library needed?
FTDI is for a serial connection via USB. The USB port on several Arduino models is FTDI compatible. Older models actually used an FTDI chipset; now they use a different manufacturer.

It MAY be as simple as connecting your device to the Arduino and communicate with serial reads or writes. All the FTDI programming may have been done for you.
 
Top