Critique: Arduino(-ish) I2C GPIO multiplexer - Page 1
Forum section: electronics / projects

author: int2str
author_rank: Regular Contributor
timestamp: October 30, 2014, 07:29:16 am
content: Hi! Beware, software guy doing hardware hereAttached is a board I've designed as a simple GPIO multiplexer for an Arduino style board. It uses an RJ25 jack as I2C/power input and will multiplex to 8 GPIO pins using a MCP23008 multiplexer.I'm pretty new to doing board so I'd like some critique.General questions I have:1. I kind of need them for the DIP switches to work, but would I really need the pull-up resistors otherwise? The datasheet for the MCP23008 only says "Must be biased externally", doesn't mention pull-ups. I assume I still need 'em, no?2. Same for the reset line. In this case it will be toggled by the Arduino itself, but otherwise, would I need a pull-up? Or can I connect directly to VCC?3. Any tips tricks for the schematic?4. Anything I can do better on the board design?Please be honest, I can take itLooking to learn here.If you want to point me to any reading materials, I'll take that as well.Thanks for your help!

author: Unknown
author_rank: Unknown
timestamp: October 30, 2014, 09:19:07 am
content: Don't know about the rest (not familiar with that particular I/O expander, though I suspect your assumptions are correct), but a general tip: wire the INT output back to your host, especially since you've got a spare pin in your connector. You never know when that will come in handy - at the very least it gives you the option of using an interrupt handler rather than scanning in a loop.(It's probably an open-collector output, so will need a pull-up resistor.)

author: Jeroen3
author_rank: Super Contributor
timestamp: October 30, 2014, 11:06:40 am
content: If you're planning to use long RJ25 cables you might want to add some clamping diodes.A bit more capacitance won't harm either, you'll be switching sou you'll have fluctuating current usage.Faint pullups of 47k or more prevent the lines from floating, whilst not driving the lines with much power.Note that I2C is made for on-board communication between IC's, "Inter IC Communication". If you run this through a cable you cannot run at high speeds.

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: October 30, 2014, 11:20:57 am
content: Ouch, where's the ESD/current limiting/OVP for the IOs? One bad zap on a dry winter day and it's toast.

author: int2str
author_rank: Regular Contributor
timestamp: October 30, 2014, 04:37:55 pm
content: Thanks for your feedback guys!Definitely missed out on the INT pin, good point. If I rev the board again, I'll put it in.In the target application for this board the pins will be OUT only, but still, I made the board with future applications in mind and definitely missed out on wiring that pin.Also good points on ESD/clamping diodes. Need to read up more on either. Thanks for the pointers.Keep the tips coming guys.Much appreciated!!!

author: Unknown
author_rank: Unknown
timestamp: October 31, 2014, 02:17:04 am
content: Quote from: int2str on October 30, 2014, 04:37:55 pmSince you askedYour connector SV1 is not polarised/keyed, and you have Vcc and GND on symmetrical pins. Consider what happens when (not if!) someone plugs their connector in backwards. Especially since Fate is a trickster god and good friends with both Atë and Murphy, and all will go out of their way to make sure you're the first 'someone' to do thatSimilarly, you have Vcc & GND on pins 3 & 4 (pair 1 in telco terms) of your RJ25 / 6P6C connector. There's a pretty good chance of them getting reversed, particularly if you use typical flat non-twisted-pair telephone-style cables for the connection (think about how the numbering goes on back-to-back plugs...).Consider changing SV1 so it's not symmetrical e.g. go GND, VCC, 1, 2 ... 8. For X1, split Vcc & GND on different legs of different pairs (though google around for the common variations, and try not to hit any of those either!).And curse the first people to use I2C for inter-board comms for not coming up with a standard pinout / connector...

author: int2str
author_rank: Regular Contributor
timestamp: October 31, 2014, 03:15:46 am
content: Thanks Tac! Great feedback.Unfortunately on the pinouts, my hands are tied...The phone pinout is dictated by the controller board that's used and the SV1 pinout is dictated by a relay board that this board is going to "piggy-back" onto.Your feedback is not lost on me though. For my custom boards that don't have to mate up to existing components, I will keep your tips in mind.Thanks guys! Really appreciate you guys commenting.Keep it up. Don't be shy, I can take it. Here to learn....

author: int2str
author_rank: Regular Contributor
timestamp: November 05, 2014, 08:38:44 am
content: Boards came in and everything is working exactly as I had hopedSee attachments on how the board is being used and why my hands were tied with the connector pinouts.