Re: a simple sample machine (as independent as possible) - any ideas ?
by adafruit_support_rick » 24 Jun 2013 16:07
@soerena - if you're going to add hardware, I'd go with an I2C expander instead of a 595.
I'm trying to set up an MCP23016, but it's giving me endless amounts of headache. I just can't get it working no matter what I do.
I'm on an Arduno Uno board R3
I've connected the hardware as follows:
from the MCP23016:
pin 15 (SDA) to analog pin 4
pin 14 (SCL) to analog pin 5
pin 9 (CLK):
* through a series of resistors with a total value of 3.87k (I didn't have a 3.9k resistor at hand) to 5V
* through 3 10pf caps in parallel to GND --- NOTE
: this should give a total value of 30pf, and the instruction tells me to use a 33pf cap, but since I didn't have one, I did this instead. Could a difference of 3pf really make a difference?
pin 16, 17, 18 (addresses) and 19 (vss) to GND
pin 20 (vdd) to 5V
pin 21, 22 and 23 to each their own IRF520 transistor (gate pin). each transistor has its drain pin connected to one side of a 12V lamp and the source pin connected to 12V (external, power supply with 4,2 Amps)
Can anyone confirm if the physical side of this setup ought to work?
I'm using this simple library and the example that follows, trying to turn my lamps on/off:https://sourceforge.net/projects/ioexpander/
I'm using an MCP23016 I/SP, but in the library it says to use an MCP23016 I/SP-ND. Is there any difference to this? I'm not sure what the "ND" means.