westwol
Posts: 9
Joined: Sat Mar 02, 2019 8:48 pm

I2C I/O PORT EXPANDER QUESTION

Sat Mar 02, 2019 9:01 pm

I'm working on a project where a Raspberry PI must have up to 260 outputs. So I was looking for a GPIO expander and found this chip: https://www.adafruit.com/product/732 but it only supports upto 128 I/O pins using 8 unique addresses (8 chips). Any suggestions to achieve such thing?

Thanks in advance.

User avatar
DougieLawson
Posts: 36106
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: I2C I/O PORT EXPANDER QUESTION

Sun Mar 03, 2019 1:20 am

If you connect eight MCP23017 chips on the I²C bus that gives you 128 GPIO.
Connect eight MCP23S17 chips on SPI for another 128 and you still have 22 regular GPIOs on your RPI for the rest.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

LTolledo
Posts: 1943
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: I2C I/O PORT EXPANDER QUESTION

Sun Mar 03, 2019 12:05 pm

though not I2C, there is also an option to use cascades of 2N74HC595N Shift Registers to provide additional outputs....
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

westwol
Posts: 9
Joined: Sat Mar 02, 2019 8:48 pm

Re: I2C I/O PORT EXPANDER QUESTION

Sun Mar 03, 2019 10:21 pm

DougieLawson wrote:
Sun Mar 03, 2019 1:20 am
If you connect eight MCP23017 chips on the I²C bus that gives you 128 GPIO.
Connect eight MCP23S17 chips on SPI for another 128 and you still have 22 regular GPIOs on your RPI for the rest.
I've read that a Raspberry board has 2 SPI individual ports. Is there anyway to use 8x MCP23S17 on each of them?

Thanks for the feedback.

User avatar
mikronauts
Posts: 2722
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: I2C I/O PORT EXPANDER QUESTION

Sun Mar 03, 2019 10:59 pm

Yes, use the same idea I used for adc's:

https://www.mikronauts.com/raspberry-pi ... and-howto/

westwol wrote:
Sun Mar 03, 2019 10:21 pm
DougieLawson wrote:
Sun Mar 03, 2019 1:20 am
If you connect eight MCP23017 chips on the I²C bus that gives you 128 GPIO.
Connect eight MCP23S17 chips on SPI for another 128 and you still have 22 regular GPIOs on your RPI for the rest.
I've read that a Raspberry board has 2 SPI individual ports. Is there anyway to use 8x MCP23S17 on each of them?

Thanks for the feedback.
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

westwol
Posts: 9
Joined: Sat Mar 02, 2019 8:48 pm

Re: I2C I/O PORT EXPANDER QUESTION

Sun Mar 03, 2019 11:53 pm

mikronauts wrote:
Sun Mar 03, 2019 10:59 pm
Yes, use the same idea I used for adc's:

https://www.mikronauts.com/raspberry-pi ... and-howto/

westwol wrote:
Sun Mar 03, 2019 10:21 pm
DougieLawson wrote:
Sun Mar 03, 2019 1:20 am
If you connect eight MCP23017 chips on the I²C bus that gives you 128 GPIO.
Connect eight MCP23S17 chips on SPI for another 128 and you still have 22 regular GPIOs on your RPI for the rest.
I've read that a Raspberry board has 2 SPI individual ports. Is there anyway to use 8x MCP23S17 on each of them?

Thanks for the feedback.
I must be able to output 5 V on each of the 230 GPIO ports (just one port at a time will be outputting the voltage), but honestly I lack of experience using this chip. Is this the chip I should be looking for?

I read the tutorial but it seems that the porpuse is different than mine. I will try to get something usesful out of it. Thank you.

User avatar
DougieLawson
Posts: 36106
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: I2C I/O PORT EXPANDER QUESTION

Sun Mar 03, 2019 11:54 pm

westwol wrote:
Sun Mar 03, 2019 10:21 pm

I've read that a Raspberry board has 2 SPI individual ports. Is there anyway to use 8x MCP23S17 on each of them?

Thanks for the feedback.
There's five easy to reach SPI devices on two busses that's MISO0/MOSI0/CLK0/CS0/CS1 that you're using already & MISO1/MOSI1/CLK1/CS0/CS1/CS2 which is the second bus.

Those map to /dev/spidev0.0 /dev/spidev0.1 & /dev/spidev1.0 /dev/spidev1.1 /dev/spidev1.2 in software.

See https://pinout.xyz/pinout/spi

You could have eight MCP23S17 GPIO expanders on each for 640 GPIOs without going near the I²C interface.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
mikronauts
Posts: 2722
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: I2C I/O PORT EXPANDER QUESTION

Mon Mar 04, 2019 2:42 am

Use mcp23s17 parallel io chips instead of the mcp3208 adcs I used.

My circuit ran the chips at 5v I simply used a voltage divider on miso.

Fyi, 260 outputs is unusual, I suspect your application might be done differently, wiring 26 long wire will be painful and expensive.

westwol wrote:
Sun Mar 03, 2019 11:53 pm
mikronauts wrote:
Sun Mar 03, 2019 10:59 pm
Yes, use the same idea I used for adc's:

https://www.mikronauts.com/raspberry-pi ... and-howto/

westwol wrote:
Sun Mar 03, 2019 10:21 pm


I've read that a Raspberry board has 2 SPI individual ports. Is there anyway to use 8x MCP23S17 on each of them?

Thanks for the feedback.
I must be able to output 5 V on each of the 230 GPIO ports (just one port at a time will be outputting the voltage), but honestly I lack of experience using this chip. Is this the chip I should be looking for?

I read the tutorial but it seems that the porpuse is different than mine. I will try to get something usesful out of it. Thank you.
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

westwol
Posts: 9
Joined: Sat Mar 02, 2019 8:48 pm

Re: I2C I/O PORT EXPANDER QUESTION

Mon Mar 04, 2019 4:22 pm

mikronauts wrote:
Mon Mar 04, 2019 2:42 am
Use mcp23s17 parallel io chips instead of the mcp3208 adcs I used.

My circuit ran the chips at 5v I simply used a voltage divider on miso.

Fyi, 260 outputs is unusual, I suspect your application might be done differently, wiring 26 long wire will be painful and expensive.

westwol wrote:
Sun Mar 03, 2019 11:53 pm
mikronauts wrote:
Sun Mar 03, 2019 10:59 pm
Yes, use the same idea I used for adc's:

https://www.mikronauts.com/raspberry-pi ... and-howto/


I must be able to output 5 V on each of the 230 GPIO ports (just one port at a time will be outputting the voltage), but honestly I lack of experience using this chip. Is this the chip I should be looking for?

I read the tutorial but it seems that the porpuse is different than mine. I will try to get something usesful out of it. Thank you.
Thanks for the feedback, at this point this is the only thing I have in mind. Do you have any suggestions?

User avatar
mikronauts
Posts: 2722
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: I2C I/O PORT EXPANDER QUESTION

Mon Mar 04, 2019 8:34 pm

You are welcome.

Without knowing what you are trying to do, it is basically impossible to offer further help.

At a minimum you need to specify

- what you are trying to control, as much info as possible
- how frequently the devices are to be switched on or off
- how far apart the devices are from each other and the pi

The above are needed to know how to solve the issue.
westwol wrote:
Mon Mar 04, 2019 4:22 pm
mikronauts wrote:
Mon Mar 04, 2019 2:42 am
Use mcp23s17 parallel io chips instead of the mcp3208 adcs I used.

My circuit ran the chips at 5v I simply used a voltage divider on miso.

Fyi, 260 outputs is unusual, I suspect your application might be done differently, wiring 26 long wire will be painful and expensive.

westwol wrote:
Sun Mar 03, 2019 11:53 pm


I must be able to output 5 V on each of the 230 GPIO ports (just one port at a time will be outputting the voltage), but honestly I lack of experience using this chip. Is this the chip I should be looking for?

I read the tutorial but it seems that the porpuse is different than mine. I will try to get something usesful out of it. Thank you.
Thanks for the feedback, at this point this is the only thing I have in mind. Do you have any suggestions?
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

westwol
Posts: 9
Joined: Sat Mar 02, 2019 8:48 pm

Re: I2C I/O PORT EXPANDER QUESTION

Mon Mar 04, 2019 11:59 pm

First of all, I appreciate the time you take to help me.

1. What I am trying to control:
I want to control a LED state (HIGH/LOW), but I should be able to change the state between 260 GPIO's where the leds will be plugged. (Only one output (led) will be enabled at a time).

Output must be: 5 V.

The project as it is now:
I have a keypad where I press a combination of numbers, each combination trigger ONLY 1 output out of 260.

For example:
I press 00001 and GPIO 1/260 changes its state to HIGH for a short period of time and then returns to LOW.
Next thing I press 00010 and GPIO 2/260 changes its state to HIGH for a short period of time and then returns to LOW.
And so on.

I used a LED as an example but could be a RELAY, or anything that with the logic to enable something such as an ACTUATOR.

Basically I should be able to control 260 signals.

2. How frequently the devices are to be switched ON or OFF:
Not many times, also only one output will be triggered at a time for a short periord of time (roughly 5 secs).

3. How far apart the devices are from each other and the PI:
The distance can't be too apart as it should fit in a case.
mikronauts wrote:
Mon Mar 04, 2019 8:34 pm
You are welcome.

Without knowing what you are trying to do, it is basically impossible to offer further help.

At a minimum you need to specify

- what you are trying to control, as much info as possible
- how frequently the devices are to be switched on or off
- how far apart the devices are from each other and the pi

The above are needed to know how to solve the issue.
westwol wrote:
Mon Mar 04, 2019 4:22 pm
mikronauts wrote:
Mon Mar 04, 2019 2:42 am
Use mcp23s17 parallel io chips instead of the mcp3208 adcs I used.

My circuit ran the chips at 5v I simply used a voltage divider on miso.

Fyi, 260 outputs is unusual, I suspect your application might be done differently, wiring 26 long wire will be painful and expensive.


Thanks for the feedback, at this point this is the only thing I have in mind. Do you have any suggestions?

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: I2C I/O PORT EXPANDER QUESTION

Tue Mar 05, 2019 1:29 am

westwol wrote:
Sun Mar 03, 2019 10:21 pm
I've read that a Raspberry board has 2 SPI individual ports. Is there anyway to use 8x MCP23S17 on each of them?

Using MCP23017 GPIO Pins to Select MCP23S17 Chips

I almost never make use of Rpi's built in CE0/CE1 signals to chip select the devices on the SPI channels. My trick is using MCP23017 GPIO signals to pretend to be CEn signals. In other words, only 1 MCP23017 can chip select 16 SPI devices. I tried it a couple of times and so far so good.

Update - 2019mar05hkt1502

Instead of RPi's built in CE0, CE1 signals. I can use, says, 6 GPIO pins as CE0, CE1, to CE5 pins to select 6 SPI devices.

Similarly, I almost NEVER use Rpi's GPIO pins. I only use the I2C, SPI, and UART pins. This way I can easily port my python/microPython software and I2C/SPI/UART hardware between Rpi, PyBoard, MicroBit, and CircuitPython etc.

You may like to read my old post on MCP23017 Demuxing.


RE: RPI ZERO W MULTIPLE SENSORS - tlfong01 2019-Feb-13
https://www.raspberrypi.org/forums/view ... 1#p1429189

You may also like to take a look of my current ECG test setup, showing 7 demux TSX0104 up level shifters, and 2 PWM (PCM9685) and 8 IOX (MCP23017) modules, with a total of 160 PWM/nonPWM GPIO pins, ...

https://penzu.com/p/478664cf
Last edited by tlfong01 on Tue Mar 05, 2019 7:26 am, edited 4 times in total.
I am an electronics and smart home hobbyist.

User avatar
mikronauts
Posts: 2722
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: I2C I/O PORT EXPANDER QUESTION

Tue Mar 05, 2019 1:39 am

You are welcome.

With a bit more software, your project can be immensely simplified.

Just use a string of ws2812 style led's (same as used on neopixels)

On aliexpress, ebay, or amazon find a 5 meter strip with 60 led's per meter, or get 2 meters of the 144 led per meter tape.

You will only need two pi gpio's to drive it.

Google "raspberry pi ws2812" for examples.
westwol wrote:
Mon Mar 04, 2019 11:59 pm
First of all, I appreciate the time you take to help me.

1. What I am trying to control:
I want to control a LED state (HIGH/LOW), but I should be able to change the state between 260 GPIO's where the leds will be plugged. (Only one output (led) will be enabled at a time).

Output must be: 5 V.

The project as it is now:
I have a keypad where I press a combination of numbers, each combination trigger ONLY 1 output out of 260.

For example:
I press 00001 and GPIO 1/260 changes its state to HIGH for a short period of time and then returns to LOW.
Next thing I press 00010 and GPIO 2/260 changes its state to HIGH for a short period of time and then returns to LOW.
And so on.

I used a LED as an example but could be a RELAY, or anything that with the logic to enable something such as an ACTUATOR.

Basically I should be able to control 260 signals.

2. How frequently the devices are to be switched ON or OFF:
Not many times, also only one output will be triggered at a time for a short periord of time (roughly 5 secs).

3. How far apart the devices are from each other and the PI:
The distance can't be too apart as it should fit in a case.
mikronauts wrote:
Mon Mar 04, 2019 8:34 pm
You are welcome.

Without knowing what you are trying to do, it is basically impossible to offer further help.

At a minimum you need to specify

- what you are trying to control, as much info as possible
- how frequently the devices are to be switched on or off
- how far apart the devices are from each other and the pi

The above are needed to know how to solve the issue.
westwol wrote:
Mon Mar 04, 2019 4:22 pm


Thanks for the feedback, at this point this is the only thing I have in mind. Do you have any suggestions?
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: I2C I/O PORT EXPANDER QUESTION

Tue Mar 05, 2019 3:23 am

westwol wrote:
Mon Mar 04, 2019 11:59 pm
I want to control a LED state (HIGH/LOW), but I should be able to change the state between 260 GPIO's[/i]

PCA9685 16 Channel PWM Driver Module

You may like to consider this module:

Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685 $15
https://www.adafruit.com/product/815

Tutorial
https://learn.adafruit.com/16-channel-pwm-servo-driver

The driver can do PWM to drive servo or LED. I once set PWM duty cycle to 100%, and drove 16 LEDs or DC motors on/off.

You can also chain up the I2C modules and drive 900+ LEDs! :mrgreen:

PS - My experience is that PCA9685 is 5 times easier than MCP23017.

Old LED control posts for reference
https://www.raspberrypi.org/forums/view ... 9#p1416955
I am an electronics and smart home hobbyist.

westwol
Posts: 9
Joined: Sat Mar 02, 2019 8:48 pm

Re: I2C I/O PORT EXPANDER QUESTION

Tue Mar 05, 2019 5:11 am

Thanks both of you for your answerings. Sorry, I couldn't explain myself well. Let's try again.

I should able to control 260 ports that must output 5V (HIGH) when active not necessarily a LED, it could be a wire to a relay that activates something. (Just one output will be enabled at a time, so I don't worry about overloading the chip)

Pseudocode (not actually code, just an example):

Code: Select all

for x in xrange(260):
  # calling port to go high
  GPIO.output(x, GPIO.HIGH)
  time.sleep(0.5)
  GPIO.output(x. GPIO.LOW)
The code will turn on (HIGH state) each output and will turn off in 0.5 secs and then move on the next port until the 260 ports are tested.

But also I should be able to do something like this:

Code: Select all

GPIO.output(200, GPIO.HIGH)
GPIO.output(200, GPIO.LOW)

GPIO.output(120, GPIO.HIGH)
GPIO.output(120, GPIO.LOW)
I hope I could be more clear. If you need any other details please let me know. Thanks in advance 😁.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: I2C I/O PORT EXPANDER QUESTION

Tue Mar 05, 2019 6:54 am

westwol wrote:
Tue Mar 05, 2019 5:11 am
1. Sorry, I couldn't explain myself well. Let's try again.
2. control 260 ports that must output 5V (HIGH) when active not necessarily a LED, it could be a wire to a relay that activates something. (Just one output will be enabled at a time, so I don't worry about overloading the chip)
3. Pseudocode ...
4. I hope I could be more clear. If you need any other details please let me know.

Functional Specification and User Requirements V0.1

No, problem. Let me make it very general.

1. I have a couple of little computers, including Rpi and ESP8266.

2. I want the computer's GPIO pins [1] or its extended chip's (eg, mcp23x08, mcp23x17) GPIO pins to output TTL signals, at least 4V for High and at most 1V for low.

3. I want individually select any of the 128 GPIO pins, (by selecting one of 8 chips by 3 address pins) to control TTL compatible devices (eg, relay, LED, solenoid, solenoid, other TTL/CMOS chips)


Notes:

1. To avoid confusion I will distinguish between GPIO "ports" and "pins". For example MCP23017 can be programmed as 2 GPIO "ports", each with 8 GPIO "pins". Rpi has many GPIO "pins", but not many GPIO "ports".

2. Your specification of selecting 8 (IOX) chips (usually by 3 hardware or software address decoding pins) is a bit too specific. Some devices can be selected by only two address pins, therefore at most 4 chips. And you can use external demux chips such as HC137/138 etc to use 5 Rpi GPIO pins to select 32 chips.

3. Your specification of 5V for High is a bit too "harsh". Usually High refers "vaguely" to 4V or above.

3. My suggestion of using PCA9685 is not for LED only. I mentioned in my old post that you can PWM duty cycle to 100% and it becomes High and Low only. I know you don't need PWM, but you can actually set speed at 1 Hz and do PWM LED blinking or relay toggle by themselves, without wasting execution time on Rpi python loops.

4. In short, I am suggesting a very flexible solution, to make it future proof. :mrgreen:

More comments on user requirements or constraints welcome.
I am an electronics and smart home hobbyist.

westwol
Posts: 9
Joined: Sat Mar 02, 2019 8:48 pm

Re: I2C I/O PORT EXPANDER QUESTION

Tue Mar 05, 2019 5:34 pm

Do you know many PCA9685 does raespberry support? The looks easier with this chip because of its libraries.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: I2C I/O PORT EXPANDER QUESTION

Wed Mar 06, 2019 1:21 am

westwol wrote:
Tue Mar 05, 2019 5:34 pm
Do you know many PCA9685 does raespberry support? The looks easier with this chip because of its libraries.

How many PCA9685s can Rpi talk to?

You might have seen my old post showing a Rpi with 4 working TSX0104 based demux I2C and 4 SPI channels. In other words, I can manually (by jumper) or by python, select any of the 3 I2C, and any of the 4 SPI channels.

Of course I can use more, say, 10 Rpi GPIO signals to demux 10 I2C/SPI channels. Actually I have a Tandem like non stop gang of 4 Rpi3B+ towers, each other's IOX (eg MCP23x08/17) enabling each other's IOX/PCA9685s.


So a short answer to your question is - more than 65,536 PCA9685s!
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: I2C I/O PORT EXPANDER QUESTION

Wed Mar 06, 2019 7:40 am

westwol wrote:
Tue Mar 05, 2019 5:34 pm
Do you know many PCA9685 does raespberry support? The looks easier with this chip because of its libraries.

PCA9865 Not Strong Enough to Drive Relay

I forgot to point out two things:

(1) PCA9865 is only TTL 25mA output only, not strong enough to control a 5V relay which needs 70mA. You may need stronger switches such as ULN2803.

(2) Rpi GPIO is only 3V logic. You might need to consider using logical level shifter to convert the signals to 5V.

MCP23017 + ULN2803 Relay Circuit
https://www.raspberrypi.org/forums/view ... 5#p1325530

PCA9865 16-channel, 12-bit PWM I2C-bus LED controller Datasheet (TTL output 25mA)
https://www.nxp.com/docs/en/data-sheet/PCA9685.pdf
...
Attachments
mcp23017_uln2803_relay_2019mar0601.jpg
mcp23017_uln2803_relay_2019mar0601.jpg (201 KiB) Viewed 1424 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: I2C I/O PORT EXPANDER QUESTION

Thu Mar 07, 2019 7:57 am

tlfong01 wrote:
Wed Mar 06, 2019 7:40 am
(1) PCA9865 is only TTL 25mA output only, not strong enough to control a 5V relay which needs 70mA. You may need stronger switches such as ULN2803.
(2) Rpi GPIO is only 3V logic. You might need to consider using logical level shifter to convert the signals to 5V.

MCP23017 + ULN2803 Relay Circuit
https://www.raspberrypi.org/forums/view ... 5#p1325530

Rpi + TSX0108 + MCP23017 + ULN2803 + Quad Songle 5V Relay Board Assembly Notes

I just started assembling another MCP23017 / ULN2803 controlled quad Songle 5V/12V relay board. You might like to take a look.

Vetron VTR-H M7 (Reverse 1000V Forward 1A IFSM 30A)
https://www.vtrons.com/images/DIODE%20M7.pdf

YTF 1KV471k 1kV Ceremic Cap
http://www.ytfcapacitor.com/ceramic-cap ... k-1kv.html
...
Attachments
uln2803_songle_relay_2019mar0701.jpg
uln2803_songle_relay_2019mar0701.jpg (161.25 KiB) Viewed 1370 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: I2C I/O PORT EXPANDER QUESTION

Thu Mar 07, 2019 2:55 pm

westwol wrote:
Mon Mar 04, 2019 11:59 pm
1. I have a keypad.
2. could be a RELAY, or ACTUATOR.
3. 260 signals
4. can't be too apart as it should fit in a case.

How deep is your case?

1. But nobody is using any keypad now. Everybody is smart phone touch pad.

4. Now I have fitted 4 relays on 10cm x 15cm prototyping board. I guess with the ULN2803 drivers etc, it should be 15 cm deep.

I guess my 144 water jet project case should eventually have a foot print of 1m x 1m and 0.5m deep. I guess your case could be as deep! :mrgreen:


Bee Gees - How Deep Is Your Love (1977) - 234,441,656 views, 42,300 Comments
https://www.youtube.com/watch?v=XpqqjU7u5Yc
...
Attachments
quad_songle_relay_board_2019mar0701.jpg
quad_songle_relay_board_2019mar0701.jpg (172.8 KiB) Viewed 1338 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: I2C I/O PORT EXPANDER QUESTION

Fri Mar 08, 2019 4:56 am

tlfong01 wrote:
Thu Mar 07, 2019 2:55 pm

How deep is your pocket?

Another usual user requirement is "As cheap as possible". I am a poor hobbyist, so I also have this requirement. I am using TK73-424 Quad Songle relay which is cheaper than Omron.
...
Attachments
tk73_424_quad_songle_relay_2019mar0801s.jpg
tk73_424_quad_songle_relay_2019mar0801s.jpg (147.47 KiB) Viewed 1288 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: I2C I/O PORT EXPANDER QUESTION

Fri Mar 08, 2019 6:35 am

tlfong01 wrote:
Fri Mar 08, 2019 4:56 am
I am using TK73-424 Quad Songle relay which is cheaper than Omron.


TK73-424 Songle Relay Inductance Measurement Resutls

I measured the inductance of the 4 Songle relays, and found them almost identical, about 40mH.
...
Attachments
songle_inductance_2019mar0801.jpg
songle_inductance_2019mar0801.jpg (180.31 KiB) Viewed 1277 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: I2C I/O PORT EXPANDER QUESTION

Fri Mar 08, 2019 8:02 am

tlfong01 wrote:
Fri Mar 08, 2019 6:35 am

ULN2803A Datasheet Summary

Now I am reading the datasheet and making a summary.
...
Attachments
uln2803_spec_2018mar0803.jpg
uln2803_spec_2018mar0803.jpg (172.83 KiB) Viewed 1263 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: I2C I/O PORT EXPANDER QUESTION

Fri Mar 08, 2019 8:59 am

tlfong01 wrote:
Fri Mar 08, 2019 8:02 am

NE555 drives ULN2803, which drives Songle 5V Relay - Tested OK

https://youtu.be/KpE9n6SSraU (youtube)
...
Attachments
uln2803a_test_2019mar0801.jpg
uln2803a_test_2019mar0801.jpg (165.89 KiB) Viewed 1260 times
I am an electronics and smart home hobbyist.

Return to “HATs and other add-ons”