GPIO query?

Were I to get a raspberry pi how can I extend the i/o capability to about 32 in 32 out and 8 analogue in and 8 analogue out?

Yup I could certainly google but I think there must be some out there who have already gone down this path and could advise me of the best and worst buys?

Reply to
Guy Tomsson
Loading thread data ...

You can extend the number of i/o pins with an i/o expander.

The best buy is the one that suits your needs and budget in that it provides the number of extra i/o pins you need and cost you find acceptable. The worst buy is one that doesn't meet your needs. Or doesn't work.

Hope this helps.

Reply to
mm0fmf

There are plenty of expander systems/chips. Most based on the mcp23017 (I2C) or mcp23s17 (SPI) 16-GPIO expander chips for digital.

For analog, there are a few choices too - not that many pre-made boards, but the Quick 2 Wire ones are easy to use,

Check your local Pi store - e.g. Adafruit if in the US, or even ebay, SKpang and Pimoroni in the UK, and may others.

Ive not seen a board with that many analog IO's though - I know the chips exist - you might need to be prepared to breadboard your own...

Gordon

Reply to
Gordon Henderson

Well first you go to decide what voltage levels (or other methods) your digital I/O is to be. Then how often it is to be read or written.

Then with analog I/O are you going to add extra circuitry to convert the analog I/O to/from correct levels for your external analog external devices. Analog I/O comes in all sorts of ranges on the chips used on interfaces, the real world has a nearly infinite number of different voltage ranges depending on type of measurements or control required for an application. In my years many common ranges I have seen many ranges audio Line drive, 1V video, 3 or 5V, +/-10V, 0-20mA are fairly common.

Then you have to know how fast your analog signal changes, and whether you want to reproduce the maximum frequency or the full shape of the analog signal. Measuring and controlling light sensors or controlling valves is different to measuring or producing audio, video and motor control.

The other big question that determines which add-ons to use is how fast they work

1/ How fast on their own each input or output section is on its own. 2/ How fast parts can be used together (some or all parts) 3/ Is you application a continuous monitoring/control like factory process control or home automation, or a short lived duration.

Then work out for WHOLE application how much data is moving about, in which direction, what output data rate is dependant on what input data rate and for how long. Not forgetting if some of that data rate is to storage or communication to other systems.

There are other issues especially with large numbers of I/O like that but without knowing the full application is difficult to advise.

Many years ago I worked for a company that made such boards to add onto PC, VAX, VME, Sun, Mac, and other systems.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk 
    PC Services 
  Raspberry Pi Add-ons 
 Timing Diagram Font 
 For those web sites you hate
Reply to
Paul

Thanks. Do you know of any I/O that is not indirect via serial busses, but controlled directly by the Pi?

Reply to
Guy Tomsson

...etc..

Thanks for a full reply which will no doubt assist others who are of less experience.

Reply to
Guy Tomsson

As you have 17+ GPIO directly acessible on PI and no more the only ways you can access more are

1/ serial I2C/SPI/USB/UART connected device

2/ Ethernet connected

3/ Special hardware that needs special software connected to GPIO

Even I2C and SPI are not directly controlled by Pi but your application software as will any other.

There are no other busses available to add peripherals to Pi see the circuit diagram on elinux site.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk 
    PC Services 
  Raspberry Pi Add-ons 
 Timing Diagram Font 
 For those web sites you hate
Reply to
Paul

Thank-you.

Then as per my previous enquiry about boot devices, the Pi is clearly not for me.

Sorry to have bothered you all.

Reply to
Guy Tomsson

yes.Lots of I/O is arduino really.

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
lead are elected by the least capable of producing, and where the  
members of society least likely to sustain themselves or succeed, are  
rewarded with goods and services paid for by the confiscated wealth of a  
diminishing number of producers.
Reply to
The Natural Philosopher

The Pi itself has 21 GPIO pins. Of these 21, two can be re-provisioned for serial (as in rs232 type at 3.3v), 5 can be re-provisioned for SPI,

2 for I2C (these also have on-board 1K8 pull-ups to 3.3v, one can be re-provisioned for hardware PWM, and 2 for digital audio.

But if you don't use the alternative functions, they're just digital IO pins - which run at 3.3v and can sink or source a max. of 15mA with the total chip limit quoted at 50mA. (more a limitation of the spare current available off the 3.3v regulator though)

Gordon

Reply to
Gordon Henderson

Yes they are but his requirement will be difficult to meet without building his own system as to get

" 32 in 32 out and 8 analogue in and 8 analogue out"

and

"I/O that is not indirect via serial busses" Generally means directly connected main system bus peripherals will mean building his own system as there is not even a microcontroller that I know of with that many direct I/O pins. So would need a micro or PC with bus interface to add bus peripherals.

Most likely he will have to get an ISA/PCI based system a lot bigger or get a microcontroller with external buss to add peripherals on.

As we have no idea what speeds or anything else he is looking for it is difficult to say what would be most effective in terms of cost and performance. A lot of systems even with that many I/O are not actually acquiring data rapidly, so serial bus acquisition even for A/D and D/A in the 100kHz and above speeds is possible.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk 
    PC Services 
  Raspberry Pi Add-ons 
 Timing Diagram Font 
 For those web sites you hate
Reply to
Paul

Something like a Cypress PSoC 5LP (eg CY8C5666AXI-LP001) is almost there:

62 GPIOs, 8 ADC channels, 4 DACs but the ADC and DAC pins will be included as part of the GPIO pin count.

If you must use an external bus, 8051 is where I'd start looking. But many of the ADC chips are on serial interfaces anyway these days. Those that don't seem to split into flash ADCs (very fast, low resolution) or 1980s ADCs that are still in production (painfully slow, not great resolution).

With SPI going at up to 20MHz there's quite a bit of leeway. The PSoC 5 device above ADC goes up to about 166KHz, so having an on-chip ADC doesn't always go faster. Indeed, with multiple serial chips you can run all the conversions in parallel (uCs often only have one ADC and multiplex the inputs).

Theo

Reply to
Theo Markettos

Thats the problem most people make find the micro first.

In this case anything said for the original poster is meaningless without specs on data rates and idea of what is happening to the data which could be high speed to storage (100MHz+ on each channel or maybe

1Hz on each channel). Without knowing date rates and sizes even how many bits for the ADC anything else is speculation.

Many ADCs have many interfaces from parallel, SPI or I2C, 1 bit serial (mainly sigma delta) to specialised quasi serial interfaces.

Have a look at

formatting link
|2000000000

Which is their range of ADCs for > 20MSPS, there are

24bit at 40MSPS (actual output rate 156kHz due to on chip filterng) 12 bit at 2GSPS

Many other variations all with different interfaces.

Most weeks AD email about 16 bit DAC or 16 bit ADC > 100 MSPS

Once you get above 10MHz you normally are using either parallel as it is Flash style for real time video or the like (8/10/12 bit) or other specialised interfaces as reliably using SPI on a lot of systems under direct software control becomes meaningless or impossible due to controller or other SYSTEM limitations. Quite often at high rates differential signalling is used like

"High speed 6- or 8-lane JESD-204B serial output"

Usually at these higher rates you have dedicated storage buffers or even dedicated hardware for processing data, just as in digital scopes

Yes I have used high speed ADCs and slow speed on various interfaces for many projects and can remember when early 8 bit Flash ADC came in 64 pin DIP packages (yes a chip 3.2 inches long and 1.5 inches wide).

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk 
    PC Services 
  Raspberry Pi Add-ons 
 Timing Diagram Font 
 For those web sites you hate
Reply to
Paul

48 I/O there's lots of chips with that. if PWM is accptabe for the analogue out perhaps a TI TMS470
--
umop apisdn
Reply to
Jasen Betts

In comp.sys.raspberry-pi message , Thu, 29 May 2014 15:36:26, Guy Tomsson posted:

That entirely depends on the digital data rates and on the analogue accuracy and resolution that you need - and on whether you can build your own electronics.

Controlling a domestic kitchen is much easier than emulating even a small chamber orchestra.

--
 (c) John Stockton, nr London, UK.  Mail via homepage.  Turnpike v6.05  MIME. 
  Web   - FAQqish topics, acronyms and links; 
  Astro stuff via astron-1.htm, gravity0.htm ; quotings.htm, pascal.htm, etc. 
  No Encoding. Quotes before replies. Snip well. Write clearly. Mail no News.
Reply to
Dr J R Stockton

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.