Interface USB Device to Prop to Create a Datalogger App
Little-endian
Posts: 91
I have peripheral device that has a USB port on it that I'd like to interface to a Prop to essentially create a datalogger. Currently, this peripheral device is intended to be connected to the USB port on a PC and it has a Windows application that takes the incoming data stream and logs it to a file.
Rather than always having this peripheral connected to a Windows PC with the software running I was wondering if it would be possible to interface a Prop to this peripheral's USB port to create a stand-alone datalogger? I was thinking of using the Prop to receive the incoming data stream and write it to an SD card or perhaps transmit the data stream over a wireless connection to a monitoring PC. The data stream isn't huge, I believe it's approximately 60 bytes per string to be received in one second intervals. This peripheral has the USB port directly on it so it doesn't use a serial to USB converter between the two devices as some peripherals do.
Would it be possible to interface a Prop to this peripheral? I've been doing some searching on Prop/USB interfaces and I'm not sure if this would require a Host USB chip in order to make this work. Or, I was wondering if I was totally looking the obvious and if a USB to serial converter could be used to convert the USB output of this peripheral to be serial to be read by the Prop?
Any advice on where to start would be greatly appreciated. I'm a Prop newbie.
Rather than always having this peripheral connected to a Windows PC with the software running I was wondering if it would be possible to interface a Prop to this peripheral's USB port to create a stand-alone datalogger? I was thinking of using the Prop to receive the incoming data stream and write it to an SD card or perhaps transmit the data stream over a wireless connection to a monitoring PC. The data stream isn't huge, I believe it's approximately 60 bytes per string to be received in one second intervals. This peripheral has the USB port directly on it so it doesn't use a serial to USB converter between the two devices as some peripherals do.
Would it be possible to interface a Prop to this peripheral? I've been doing some searching on Prop/USB interfaces and I'm not sure if this would require a Host USB chip in order to make this work. Or, I was wondering if I was totally looking the obvious and if a USB to serial converter could be used to convert the USB output of this peripheral to be serial to be read by the Prop?
Any advice on where to start would be greatly appreciated. I'm a Prop newbie.
Comments
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
It's theoretically possible for a Prop to act as a USB host for something like what you want, but you'd have to use some kind of USB host interface like the MAX3420E and, as far as I know, there's no existing host stack for the Prop + MAX3420E.
@Leon - Thanks, I may consider another chip, but my main focus is improving my Prop skills and this is a one off learning experience and I have no plans to make it a commercial product. However, maybe I should use one of these as a front end it the Prop? If so, which chip of the ones you have listed do you think would be the easiest to integrate with?
@Mike Green - Thanks, this device uses the Silicon Labs CP210x chipset. Do you think it would still be possible to use the Vinculum chip? I'll take a look at the Vinculum and MAX3420E.
The Vinculum VNC1L has it's own processor, and has 28 I/O pins, so the Propeller isn't actually necessary for your application.
What is the CP210x interfaced to? You could simply interface it directly to the Propeller, dispensing with the CP210x and the Vinculum chip. It seems pointless to have two USB conversions in the same system.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Post Edited (Leon) : 10/24/2009 10:10:32 PM GMT
@Leon - Thanks for your recommendation on a PIC chip. There are always so many PICs available I always have a hard time deciding which would be the best one to use for a particular application and I really have very little experience using PICs.
I'll take a look at what can be done with the VNC1L itself.
I actually thought about opening up the device and seeing what's on the other side of the CP210x. My biggest concern would be voiding the warranty if I modify the device and also if someone else ever wanted one of these loggers I couldn't expect them to open up the device and modify it them self.
Thanks again to everyone for their help.
The CP210x datasheet should give the information you would need to use it with the Vinculum acting as host.
My original plan was to see if I could use a Prop to log these data strings coming from the charger to a memory device. Something removable such as an SD Card or a flash drive would be my top choice.
I apologize for not mentioning this earlier, but I was also considering adding a real-time clock so I could time stamp each string since the charger doesn't have an on-board real-time clock.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
The string contains the version of the firmware of the charger, individual cell voltages of the battery pack under charge/dis-charge, charge rate, power supply voltage to the charger, etc. The data is used to graph charge/dis-charge curves of the battery.