140 GPIO Microcontroller  - Page 1
Forum section: electronics / general

author: joniengr081
author_rank: Regular Contributor
timestamp: September 07, 2023, 10:40:12 am
content: Hi, I am looking for microcontroller PIC by Microchip or Arduino having 140 plus I/O for temperature/humidity monitor. There are solutions with external serial/parallel chips and external multiplexers but it's not so easy to find compact solution for which we don't need to make a big PCB. I appreciate if you have any suggestion in selecting Microcontroller with 130 plus I/O.

author: ppTRN
author_rank: Regular Contributor
timestamp: September 07, 2023, 11:00:41 am
content: Hi, if all of this GPIO's are needed to monitor temperature and humidity in a lot of points using lots of sensors maybe you should consider I2C or SPI sensors that allows to be easily controlled by one bus only, decreasing a lot the cost of the uC

author: DavidAlfa
author_rank: Super Contributor
timestamp: September 07, 2023, 11:02:33 am
content: What sensors are you interfacing to?

author: jpanhalt
author_rank: Super Contributor
timestamp: September 07, 2023, 11:49:33 am
content: Microchip has several chips with a pin count of 144 to 288. The high range are 32-bit units. 144 pins are also available in a 24F version.https://www.microchip.com/content/mchp/en-us/parametric-search.html/1023?filters=eyJzbGlkZXJGaWx0ZXJzIjp7IlBpbiBDb3VudCI6eyJtaW52YWwiOiIxNDIiLCJtYXh2YWwiOiIyODgifX19https://www.microchip.com/en-us/product/PIC24EP256GU814I didn't go through the datasheets, but in general every pin except the two (or more) power pins are I/O.Edit: You may get an "error in loading" message. Just wait. My PC takes several seconds, but then the page appears.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 07, 2023, 08:18:49 pm
content: The uC's with more I/O tend to be 32-bitters. but you can always intertwine a bunch of 8-bitters by with some I2C or SPI wires. This may even make your PCB more compact, because pins are on the circumference, and that only increases linearly while surface area is quadratic. (Or you have to go to BGA's, but that is not so common for 8-bitters either). With a few uC's you can also place them closer to connectors, so there is less overall routing on the PCB.

author: pqass
author_rank: Super Contributor
timestamp: September 07, 2023, 10:24:06 pm
content: You're going to want signal conditioning/integrity protection for any distance greater than a couple of meters to the sensors.It's just not practical to measure analog sources from 10 to 100's of meters away nor run I2C/SPI TTL at that distance over a building-local area. The overall cheapest, dumb-nodes solution for dozens of sensors is probably 4-20mA current-loop over twisted pair.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: September 08, 2023, 04:49:39 am
content: Quote from: joniengr081 on September 07, 2023, 10:40:12 amExactly how many connections are you making to these sensors ? What exact sensors ?It is all that IO that usually determines the board size, not the chip/s in the middle.How much processing power do youneed?On the general MCU pin curve, anything with 140io, has gone into the quite large resource and quite expensive basket. Digikey says ~$10/100, and 2MByte flash ballparks.Checking smaller MCUs at lcsc, finds 48 pin parts start at under 50c/100 with 43io, needing about 4 parts to give your target IO.64 pin parts with 60io are about 55c/100, and maybe 3 of those can do ?That's how the MCU price curve works.

author: NorthGuy
author_rank: Super Contributor
timestamp: September 10, 2023, 02:49:38 pm
content: How far apart the sensors are? I guess quite far, since it doesn't make sense to measure humidity just few feet apart. In this case, it's better to go with a distributed network, such as CAN. CAN is wired as a chain (not as a star), so you may save big on wires.

author: DavidAlfa
author_rank: Super Contributor
timestamp: September 10, 2023, 03:53:55 pm
content: However, you don'tforcefullyneed a 140+pin MCU.You can have, for example 3x 64-pin, or 2x 100pin mcus, one being the master and the rest slaves, telling the master through SPI.Definitely way more common packages, you'll have plenty to choose from and probably cheaper overall.1-pin sensor, measuring humidity and temperature... are you interfacing DHT11 sensors?Alternatively, you could distribute the signals through several CD4051 8:1 multiplexers.So in the end you would only need 140/8=18x 4051s (Starting from 8 cents @ lcsc).Reducing the GPIO requirement to just 18+3=21 GPIOs (18 for the sensors + 3 for switching the 4051s).I doubt you could process the 140 sensors concurrently anyways!

author: nctnico
author_rank: Super Contributor
timestamp: September 10, 2023, 06:24:37 pm
content: Quote from: DavidAlfa on September 10, 2023, 03:53:55 pmOnly if this is for a huge number of devices. Creating a system that is decentralised is harder then it looks. Think about process synchronisation and dealing with errors. What if one of the microcontrollers isn't responding? What to do in case of a communication isn't working (communication will fail)? It takes a very carefull division of tasks and a good plan for handling errors in order to make such a system work predictable & reliable.And ofcourse there is debugging and firmware versions. All of the sudden you have two pieces of firmware to write & maintain. In the end you end up spending a lot more money on development. So if this product isn't sold in huge numbers, the NRE costs will swamp any savings on parts.

author: westfw
author_rank: Super Contributor
timestamp: September 11, 2023, 06:34:21 am
content: QuoteCreating a system with 140 IOs is harder than it looks, too. Especially if that's 140 "sensors" rather than 140 GPIOs driving some smaller number of sensors.

author: nctnico
author_rank: Super Contributor
timestamp: September 11, 2023, 07:41:26 am
content: Quote from: westfw on September 11, 2023, 06:34:21 amThat is still unclear. If the OP wants to have off-board sensors, then using I/Os to generate some kind of board level communication protocol like I2C or SPI is the wrong choice anyway.

author: HarryDoPECC
author_rank: Regular Contributor
timestamp: September 12, 2023, 04:34:40 am
content: Yeah, this looks like an X-Y problem.You have thought that you want xxxGPIOsWhereas the group are suggesting that what you really want is to measure lots of sensors (and their location, environment, reading rate, etc, etc, etc may be very significant). And they are suggesting a lot of possible ways to approach that goal.It's a good group, isn't it?

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 12, 2023, 04:42:41 am
content: Who knows, the OP is probably long gone.

author: liaifat85
author_rank: Regular Contributor
timestamp: September 15, 2023, 12:55:22 pm
content: I think the Microchip forum will be better for this question.