I’ve been intending to try driving Switec X25.168 motors using the MCP23008 I²C I/O port expander chip from an Arduino, but it occurs to me that it might be more interesting to try this on a Rasberry Pi. If it works, it will demonstrate a simple and very inexpensive method for driving analog gauges from the Raspberry Pi without the need for high-current drivers.
The MCP23008 provides 8 I/O lines controlled via an I²C interface.
The datasheet is available here. The pins are rated to source and sink 20mA each. That’s around half what an Arduino offers, but should be (just) enough to drive our little Switec steppers. These chips are available from Adafruit, along with the doubly awesome 16-port MCP23017.
Featured Adafruit Product!
MCP23008 – i2c 8 input/output port expander: Add another 8 pins to your microcontroller using a MCP23008 port expander. The MCP23008 uses two i2c pins (these can be shared with other i2c devices), and in exchange gives you 8 general purpose pins. You can set each of 8 pins to be input, output, input with a pullup or open drain. There’s even the ability to get an interrupt via an external pin when any of the inputs change so you don’t have to keep polling the chip. (read more)
MCP23017 – i2c 16 input/output port expander: Add another 16 pins to your microcontroller using a MCP23017 port expander. The MCP23017 uses two i2c pins (these can be shared with other i2c devices), and in exchange gives you 16 general purpose pins. You can set each of 16 pins to be input, output, input with a pullup or open drain. There’s even the ability to get an interrupt via an external pin when any of the inputs change so you don’t have to keep polling the chip. (read more)
Each Friday is PiDay here at Adafruit, be sure to check out our posts, tutorials and new Raspberry Pi related products. Have you tried the new “Adafruit Raspberry Pi Educational Linux Distro” ? It’s our tweaked distribution for teaching electronics using the Raspberry Pi. But wait, there’s more! Try our new Raspberry Pi WebIDE! The easiest way to learn programming on a Raspberry Pi.
Want a FREE RASPBERRY PI? All orders over $350 get a FREE Raspberry Pi Model B with 512MB RAM!
Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.
Join us every Wednesday night at 8pm ET for Ask an Engineer!
Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground” – Adafruit’s Apps!
Maker Business — The 16 Top Tech Policy Developments of 2016
Wearables — Foot form
Electronics — Function Generator Marketing
Biohacking — SmartWatches Could Help Detect Lyme Disease and Diabetes
No comments yet.
Sorry, the comment form is closed at this time.