2

I have some SN74HC165N, CD4021B chips. How many (minimally) such ICs would I need to get 70 inputs to an Arduino Uno? What is the exact circuit diagram and the code? Im not sure how the wring cascades into each of the chips to make it grow to over 70 inputs, or what the code is for the 70 input circuit. I do understand how to use one of those ICs though. My second easier question is -is there an development board with 70 or more inputs?

CD4021B,SN74HC165N are the chips, you know the ones, that has a parallel input pins that are listened to by latch pin, and the clock pins such outputs the parallel data into the serial data-so I am interested with solution with this pin because I know how it works.

It is for sure 70 pins that are required -not any less-I am sure of that. Because the inputs cannot be further simplified to less than 70. The reason the inputs are 70 is because the algorithm used has 70 free variables in it. Hence by definition it uses 70 or more variables. The input for each of the 70 inputs can be a digital high or a digital low but this is not known before hand. So it cant be simplified because it like saying you can simplfy the information from 70 or more sensors at runtime, and each sensor has an unpredictable value. Anyway this explanation is moving away from the point of my question. I just want to know the circuit that does 70 inputs or more using the mentioned IC-I can live with that answer even if its not the most efficient.

  • "is there an development board with 70 or more inputs?" Possibly. The ATmegaXX0 has enough GPIOs, but the Mega doesn't expose all of them. – Ignacio Vazquez-Abrams Nov 9 '16 at 18:18
  • 1
    Are your inputs digital-logic-level signals, or switch contacts, or what? It makes a difference, eg matrix techniques and multiplexers are relevant in some cases but not others. What response times are needed? Polling, or interrupts? Is this a one-off project, or will you make multiple copies? (Please edit question and add that info) – James Waldby - jwpat7 Nov 9 '16 at 18:56
  • Two of these could do the trick; anarduino.com/gpio-expander – Mikael Patel Nov 15 '16 at 20:47
3

The best way I know to do it is by using the MCP23017, which gives you 16 extra GPIOs via I²C communication. They can be configured for both input and/or output. I've done it myself and it worked like a charm. It has 3 pins for dynamic addressing (3 bits), which allows you to use up to 8 (0..7) MCP23017 for a total of 128 extra GPIOs. This is the chip datasheet: (http://ww1.microchip.com/downloads/en/DeviceDoc/21952b.pdf) There's a lot of examples about its use on the internet. Just google for "MCP23017 arduino" and you'll find them. For example: http://tronixstuff.com/2011/08/26/tutorial-maximising-your-arduinos-io-ports/

  • Personally I prefer the MCP23S17 - the SPI version. Faster communication, and as many groups of 128 GPIOs as you have spare IO pins for CS. – Majenko Nov 9 '16 at 18:31
  • That's another good option. At the time I chose the I²C version because I was working with the ESP8266 (ESP-12) and I didn't have the driver for SPI comm, only for I²C. For Arduino you can easily use the SPI version indeed. – Vinicius Nov 9 '16 at 18:42
  • Just with that number of chips you want to watch your pin capacitance - you may want to boost the signal strength with some IO drivers. – Majenko Nov 9 '16 at 18:43
  • @Vinicius I'm thinking about your answer which I never considered before. Can I get the MCP23S17 to work with Arduino Uno I2C bus? Using I2C bus do I use wire library to set up what input and out port? and to write values? to get it to work – Rosemary Jones Nov 9 '16 at 20:11
  • There are libraries available to do all the work for you. Google for them. – Majenko Nov 9 '16 at 21:51
1

I have some 74HC595 chips. How many (minimally) 74HC595 would I need to get 70 inputs to an Arduino Uno?

None. Those chips are for output, not input.

I do understand how to use one 74HC595 though.

Evidently not, since you don't even know what they do.

My second easier question is -is there an development board with 70 or more inputs?

Yes, there are. None made by Arduino though, but there are plenty of other options. Myself I work with microcontrollers with hundreds of IO pins.

However, I think you need to re-think what you are trying to achieve. There are many options for reducing the number of inputs you need to use depending on what it is you are doing. Maybe if you told us a little more about what you want to do, not how you think you want to do it, we can help you a little more.

  • It sounds like youve got "fire in your belly" about the 74HC595 typo – Rosemary Jones Nov 9 '16 at 19:33
  • 1
    @Rosemary he means no harm ;) It may be interpreted as so, but at the point of writing he didn't know it was a typo. He was pointing out it was unlikely that one knows how to use output IC's for input signals, nothing personal I believe. – Paul Nov 9 '16 at 22:43
  • Agreed, it's not personal. I'm snarky to all people equally ;) – Majenko Nov 9 '16 at 23:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.