EmbeddedRelated.com
Forums
The 2026 Embedded Online Conference

seeking USB interface/breakout board with 2x serial, GPIO...

Started by jkn December 19, 2014
Hi all

I'm trying to source a prototyping/interfacing board to control via a desktop PC with USB port. Ideally it should have the following ports on it:

- 1 RS-232 port
- 1 RS-485 port
- 'a few' (say 4 or more) 5V digital I/O lines

I'm sure I can do all this via a USB hub and an appropriate selection of
'hackaday'-type breakout boards. But ideally I'd like to source one board which
can do the lot.

Likely to be programmed in Python FWIW. I don't really want an rPi or something which has to have an OS on board and boot up etc; ideally this should all be powered from the host USB port.

I've got a lot of links to possible combinations of modules via Sparkfun,
Phidget.com, etc. etc., but nothing that exactly fits my needs. Can anyone think
anywhere else I should be looking?

    Thanks a lot
    Jon N
jkn wrote:

> Hi all > > I'm trying to source a prototyping/interfacing board to control via a > desktop PC with USB port. Ideally it should have the following ports on > it: > > - 1 RS-232 port > - 1 RS-485 port > - 'a few' (say 4 or more) 5V digital I/O lines > > I'm sure I can do all this via a USB hub and an appropriate selection of > 'hackaday'-type breakout boards. But ideally I'd like to source one board > which can do the lot. > > Likely to be programmed in Python FWIW. I don't really want an rPi or > something which has to have an OS on board and boot up etc; ideally this > should all be powered from the host USB port. > > I've got a lot of links to possible combinations of modules via Sparkfun, > Phidget.com, etc. etc., but nothing that exactly fits my needs. Can anyone > think anywhere else I should be looking? > > Thanks a lot > Jon N
Try somewhere like Hobbytronics <http://www.hobbytronics.co.uk/> or Sparkfun <http://www.sparkfun.com/>. There are some bits within the Arduino bits that may either collectively or singly fulfil your needs. You might not find all your required I/O oin one board, but if you are prototyping the small modules available from those companies might be suitable for some playing around with. Alternatively, look at ST Micro <http://www.st.com/> who do development boards with ARM Core M0 on board which will have all theI/O you want on one board and could end up autonomous from your PC with the appropriate programming. -- ******************************************************************** Paul E. Bennett IEng MIET.....<email://Paul_E.Bennett@topmail.co.uk> Forth based HIDECS Consultancy.............<http://www.hidecs.co.uk> Mob: +44 (0)7811-639972 Tel: +44 (0)1235-510979 Going Forth Safely ..... EBA. www.electric-boat-association.org.uk.. ********************************************************************
Hi Paul

On Friday, December 19, 2014 10:25:38 AM UTC, Paul E Bennett wrote:
> jkn wrote: > > > Hi all > > > > I'm trying to source a prototyping/interfacing board to control via a > > desktop PC with USB port. Ideally it should have the following ports on > > it: > > > > - 1 RS-232 port > > - 1 RS-485 port > > - 'a few' (say 4 or more) 5V digital I/O lines > > > > I'm sure I can do all this via a USB hub and an appropriate selection of > > 'hackaday'-type breakout boards. But ideally I'd like to source one board > > which can do the lot. > > > > Likely to be programmed in Python FWIW. I don't really want an rPi or > > something which has to have an OS on board and boot up etc; ideally this > > should all be powered from the host USB port. > > > > I've got a lot of links to possible combinations of modules via Sparkfun, > > Phidget.com, etc. etc., but nothing that exactly fits my needs. Can anyone > > think anywhere else I should be looking? > > > > Thanks a lot > > Jon N > > Try somewhere like Hobbytronics <http://www.hobbytronics.co.uk/> or Sparkfun > <http://www.sparkfun.com/>. There are some bits within the Arduino bits that > may either collectively or singly fulfil your needs. You might not find all > your required I/O oin one board, but if you are prototyping the small > modules available from those companies might be suitable for some playing > around with. > > Alternatively, look at ST Micro <http://www.st.com/> who do development > boards with ARM Core M0 on board which will have all theI/O you want on one > board and could end up autonomous from your PC with the appropriate > programming. > > > -- > ******************************************************************** > Paul E. Bennett IEng MIET.....<email://Paul_E.Bennett@topmail.co.uk> > Forth based HIDECS Consultancy.............<http://www.hidecs.co.uk> > Mob: +44 (0)7811-639972 > Tel: +44 (0)1235-510979 > Going Forth Safely ..... EBA. www.electric-boat-association.org.uk.. > ********************************************************************
Thanks for the suggestions. I'd already looked at Sparkfun etc., and hobbytronics seem to have very similar parts (UK-based, of coursde, which helps.) But following your prompting I took a closer look, and I think maybe I can use their servo controller as a digital output. This capability is buried a bit in the documentation but I'm sure I could use one of the ST micro boards but that opens up a different can of development work which I was hoping to avoid; this is for a testing lashup to be done in a hurry. Famous last words... Thanks Jon N
On 19/12/14 11:02, jkn wrote:
> Hi all > > I'm trying to source a prototyping/interfacing board to control via a > desktop PC with USB port. Ideally it should have the following ports > on it: > > - 1 RS-232 port - 1 RS-485 port - 'a few' (say 4 or more) 5V digital > I/O lines > > I'm sure I can do all this via a USB hub and an appropriate selection > of 'hackaday'-type breakout boards. But ideally I'd like to source > one board which can do the lot. > > Likely to be programmed in Python FWIW. I don't really want an rPi or > something which has to have an OS on board and boot up etc; ideally > this should all be powered from the host USB port. > > I've got a lot of links to possible combinations of modules via > Sparkfun, Phidget.com, etc. etc., but nothing that exactly fits my > needs. Can anyone think anywhere else I should be looking? > > Thanks a lot Jon N >
Look for a module with an FTDI chip on it - chips like the FT4232H make it easy to get 232 or 485 ports from USB, along with SPI, I2C, and digital I/O. For 485 interfacing, there are control lines to enable the driver any time you are sending, which is very convenient. They work fine from Linux or Windows, and there are Python modules available on the web. I don't think FTDI themselves make a since board that covers your requirements, but it might be just as convenient to get separate 232, 485 and I/O modules.
Hi David

On Friday, 19 December 2014 11:34:29 UTC, David Brown  wrote:
> On 19/12/14 11:02, jkn wrote: > > Hi all > > > > I'm trying to source a prototyping/interfacing board to control via a > > desktop PC with USB port. Ideally it should have the following ports > > on it: > > > > - 1 RS-232 port - 1 RS-485 port - 'a few' (say 4 or more) 5V digital > > I/O lines > > > > I'm sure I can do all this via a USB hub and an appropriate selection > > of 'hackaday'-type breakout boards. But ideally I'd like to source > > one board which can do the lot. > > > > Likely to be programmed in Python FWIW. I don't really want an rPi or > > something which has to have an OS on board and boot up etc; ideally > > this should all be powered from the host USB port. > > > > I've got a lot of links to possible combinations of modules via > > Sparkfun, Phidget.com, etc. etc., but nothing that exactly fits my > > needs. Can anyone think anywhere else I should be looking? > > > > Thanks a lot Jon N > > > > Look for a module with an FTDI chip on it - chips like the FT4232H make > it easy to get 232 or 485 ports from USB, along with SPI, I2C, and > digital I/O. For 485 interfacing, there are control lines to enable the > driver any time you are sending, which is very convenient. They work > fine from Linux or Windows, and there are Python modules available on > the web. I don't think FTDI themselves make a since board that covers > your requirements, but it might be just as convenient to get separate > 232, 485 and I/O modules.
Thanks for your reply. I know about the FTDI chips, and the ability to use the in 'bit-bang' mode to use the pins as output lines (dunno about inputs, but don't care at the moment). In fact, this was the first thing I tried, using a USB-to-serial debug cable and flashing an LED via libftdi and Python ;-) Sadly I think the USB overhead makes this a bit of a non-starter. One of the output lines needs to act like an odometer input (pulses up to a few tens of hertz) and this would take up all the time available. It may be that I could use some of the programmable capabilities of the servo boards to get something like what I need. (I didn't spell all of this out in my origial posting; didn't want to go into too much detail...) Thanks J^n
On 12/19/2014 5:02 AM, jkn wrote:
> Hi all > > I'm trying to source a prototyping/interfacing board to control via a desktop PC with USB port. Ideally it should have the following ports on it: > > - 1 RS-232 port > - 1 RS-485 port > - 'a few' (say 4 or more) 5V digital I/O lines > > I'm sure I can do all this via a USB hub and an appropriate selection of > 'hackaday'-type breakout boards. But ideally I'd like to source one board which > can do the lot. > > Likely to be programmed in Python FWIW. I don't really want an rPi or something which has to have an OS on board and boot up etc; ideally this should all be powered from the host USB port. > > I've got a lot of links to possible combinations of modules via Sparkfun, > Phidget.com, etc. etc., but nothing that exactly fits my needs. Can anyone think > anywhere else I should be looking?
I can't help you with finding a vendor, but I can make your task a bit easier. Your 5 volt I/O can probably be done with RS-485 I/Os. So you can find a board with just 232 and 485 ports. The RS-485 drivers/receivers are 5 volt I/Os (or 5 volt tolerant at least). Outputs can be used as-is and you get an output of each polarity. The inputs are differential which means the unused input needs to be biased to a mid level voltage using resistors to power and ground which can be made part of your cable. -- Rick
On 12/19/2014 8:21 AM, jkn wrote:
> Hi David > > On Friday, 19 December 2014 11:34:29 UTC, David Brown wrote: >> >> Look for a module with an FTDI chip on it - chips like the FT4232H make >> it easy to get 232 or 485 ports from USB, along with SPI, I2C, and >> digital I/O. For 485 interfacing, there are control lines to enable the >> driver any time you are sending, which is very convenient. They work >> fine from Linux or Windows, and there are Python modules available on >> the web. I don't think FTDI themselves make a since board that covers >> your requirements, but it might be just as convenient to get separate >> 232, 485 and I/O modules. > > Thanks for your reply. I know about the FTDI chips, and the ability to use the in 'bit-bang' mode to use the pins as output lines (dunno about inputs, but don't care at the moment). In fact, this was the first thing I tried, using a USB-to-serial debug cable and flashing an LED via libftdi and Python ;-) > > Sadly I think the USB overhead makes this a bit of a non-starter. One of the output lines needs to act like an odometer input (pulses up to a few tens of hertz) and this would take up all the time available. It may be that I could use some of the programmable capabilities of the servo boards to get something like what I need.
I can't imagine USB "overhead" would get in the way of toggling an I/O at 100 Hz. They use USB for real time audio signals which are *very* time sensitive, much more so than 10 ms. -- Rick
On 19/12/14 14:27, rickman wrote:
> On 12/19/2014 8:21 AM, jkn wrote: >> Hi David >> >> On Friday, 19 December 2014 11:34:29 UTC, David Brown wrote: >>> >>> Look for a module with an FTDI chip on it - chips like the FT4232H make >>> it easy to get 232 or 485 ports from USB, along with SPI, I2C, and >>> digital I/O. For 485 interfacing, there are control lines to enable the >>> driver any time you are sending, which is very convenient. They work >>> fine from Linux or Windows, and there are Python modules available on >>> the web. I don't think FTDI themselves make a since board that covers >>> your requirements, but it might be just as convenient to get separate >>> 232, 485 and I/O modules. >> >> Thanks for your reply. I know about the FTDI chips, and the ability to >> use the in 'bit-bang' mode to use the pins as output lines (dunno >> about inputs, but don't care at the moment). In fact, this was the >> first thing I tried, using a USB-to-serial debug cable and flashing an >> LED via libftdi and Python ;-) >> >> Sadly I think the USB overhead makes this a bit of a non-starter. One >> of the output lines needs to act like an odometer input (pulses up to >> a few tens of hertz) and this would take up all the time available. It >> may be that I could use some of the programmable capabilities of the >> servo boards to get something like what I need. > > I can't imagine USB "overhead" would get in the way of toggling an I/O > at 100 Hz. They use USB for real time audio signals which are *very* > time sensitive, much more so than 10 ms. >
It should be okay at rates of a few tens of Hz - 100 Hz should not be a problem. But sampling by polling digital inputs using Python brings quite a number of variable delays which will limit the speed, especially if you are using a 12 Mbit USB device. USB audio uses different USB modes, kernel drivers, big buffers, and other tricks in order to get low-latency transfers. So I would expect this to work fine with a USB2.0 FTDI device and reasonable host PC (with more than one cpu core) - but I would be more sceptical if the FTDI device was an older USB1.1 type. Of course, it is also possible to be a little smarter here - rather than doing simple polling, you could connect the high-speed ("high-speed" in the PC world...) input to the SPI data in pin, and do continuous SPI reads (ignoring clock, chip select and data outputs) - that should get you sampling at a reasonable rate. There may be other tricks or modes available in the FTDI device, especially if it is one of the more recent ones.
On 12/19/2014 8:48 AM, David Brown wrote:
> On 19/12/14 14:27, rickman wrote: >> On 12/19/2014 8:21 AM, jkn wrote: >>> Hi David >>> >>> On Friday, 19 December 2014 11:34:29 UTC, David Brown wrote: >>>> >>>> Look for a module with an FTDI chip on it - chips like the FT4232H make >>>> it easy to get 232 or 485 ports from USB, along with SPI, I2C, and >>>> digital I/O. For 485 interfacing, there are control lines to enable the >>>> driver any time you are sending, which is very convenient. They work >>>> fine from Linux or Windows, and there are Python modules available on >>>> the web. I don't think FTDI themselves make a since board that covers >>>> your requirements, but it might be just as convenient to get separate >>>> 232, 485 and I/O modules. >>> >>> Thanks for your reply. I know about the FTDI chips, and the ability to >>> use the in 'bit-bang' mode to use the pins as output lines (dunno >>> about inputs, but don't care at the moment). In fact, this was the >>> first thing I tried, using a USB-to-serial debug cable and flashing an >>> LED via libftdi and Python ;-) >>> >>> Sadly I think the USB overhead makes this a bit of a non-starter. One >>> of the output lines needs to act like an odometer input (pulses up to >>> a few tens of hertz) and this would take up all the time available. It >>> may be that I could use some of the programmable capabilities of the >>> servo boards to get something like what I need. >> >> I can't imagine USB "overhead" would get in the way of toggling an I/O >> at 100 Hz. They use USB for real time audio signals which are *very* >> time sensitive, much more so than 10 ms. >> > > It should be okay at rates of a few tens of Hz - 100 Hz should not be a > problem. But sampling by polling digital inputs using Python brings > quite a number of variable delays which will limit the speed, especially > if you are using a 12 Mbit USB device. USB audio uses different USB > modes, kernel drivers, big buffers, and other tricks in order to get > low-latency transfers. > > So I would expect this to work fine with a USB2.0 FTDI device and > reasonable host PC (with more than one cpu core) - but I would be more > sceptical if the FTDI device was an older USB1.1 type. > > Of course, it is also possible to be a little smarter here - rather than > doing simple polling, you could connect the high-speed ("high-speed" in > the PC world...) input to the SPI data in pin, and do continuous SPI > reads (ignoring clock, chip select and data outputs) - that should get > you sampling at a reasonable rate. There may be other tricks or modes > available in the FTDI device, especially if it is one of the more recent > ones.
12 Mbit/s is still more than 1 byte per us which is 10,000 times faster than what the OP is talking about. I would suggest you not refer to this as USB1.1 and 480 Mbps as USB2.0. They are full speed and high speed respectively. USB1.1 does not support high speed, but USB2.0 supports both speeds and so does not distinguish the two. How fast can you poll a USB connection from Python on the rPi? If this uses most of the processor's performance at 100 MHz polling rate, I think I'd just give up on the rPi and find something else... permanently. -- Rick
>> Look for a module with an FTDI chip on it - chips like the FT4232H make >> it easy to get 232 or 485 ports from USB, along with SPI, I2C, and >> digital I/O. For 485 interfacing, there are control lines to enable the >> driver any time you are sending, which is very convenient. They work >> fine from Linux or Windows, and there are Python modules available on >> the web. I don't think FTDI themselves make a since board that covers >> your requirements, but it might be just as convenient to get separate >> 232, 485 and I/O modules. > > Thanks for your reply. I know about the FTDI chips, and the ability to use the in 'bit-bang' mode to use the pins as output lines (dunno about inputs, but don't care at the moment). In fact, this was the first thing I tried, using a USB-to-serial debug cable and flashing an LED via libftdi and Python ;-) > > Sadly I think the USB overhead makes this a bit of a non-starter. One of the output lines needs to act like an odometer input (pulses up to a few tens of hertz) and this would take up all the time available. It may be that I could use some of the programmable capabilities of the servo boards to get something like what I need. > > (I didn't spell all of this out in my origial posting; didn't want to go into too much detail...) > > Thanks > J^n >
Yes, it's bit-bang. But FTDI chips have reasonably big buffers that you fill at USB speed. The data is clocked out of the buffer at the speed you have selected via the 'clock divisor' setting. If you are clocking bits out at 100Hz or thereabouts the 'USB overhead' should be invisibly small. -- Tim
The 2026 Embedded Online Conference