Author Topic: Critique: Arduino(-ish) I2C GPIO multiplexer  (Read 3476 times)

0 Members and 1 Guest are viewing this topic.

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Critique: Arduino(-ish) I2C GPIO multiplexer
« on: October 30, 2014, 07:29:16 am »
Hi! Beware, software guy doing hardware here :)

Attached 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 it :)
Looking to learn here.

If you want to point me to any reading materials, I'll take that as well.

Thanks for your help!

 :-DMM
 

Tac Eht Xilef

  • Guest
Re: Critique: Arduino(-ish) I2C GPIO multiplexer
« Reply #1 on: October 30, 2014, 09:19:07 am »
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.)

 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Critique: Arduino(-ish) I2C GPIO multiplexer
« Reply #2 on: October 30, 2014, 11:06:40 am »
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.
 

Online Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3338
  • Country: ca
  • Place text here.
Re: Critique: Arduino(-ish) I2C GPIO multiplexer
« Reply #3 on: October 30, 2014, 11:20:57 am »
Ouch, where's the ESD/current limiting/OVP for the IOs? One bad zap on a dry winter day and it's toast.
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Re: Critique: Arduino(-ish) I2C GPIO multiplexer
« Reply #4 on: October 30, 2014, 04:37:55 pm »
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!!!
 

Tac Eht Xilef

  • Guest
Re: Critique: Arduino(-ish) I2C GPIO multiplexer
« Reply #5 on: October 31, 2014, 02:17:04 am »
Keep the tips coming guys.
Much appreciated!!!

Since you asked ;)

Your connector SV1 is not polarised/keyed, and you have Vcc and GND on symmetrical pins. Consider what happens when (not if! :palm:) 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 that ;)

Similarly, 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...
 

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Re: Critique: Arduino(-ish) I2C GPIO multiplexer
« Reply #6 on: October 31, 2014, 03:15:46 am »
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 :D. Here to learn....
 

Offline int2strTopic starter

  • Regular Contributor
  • *
  • Posts: 96
Re: Critique: Arduino(-ish) I2C GPIO multiplexer
« Reply #7 on: November 05, 2014, 08:38:44 am »
Boards came in and everything is working exactly as I had hoped  :-+

See attachments on how the board is being used and why my hands were tied with the connector pinouts.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf