Notifications
Clear all

Arduino I2C Bus and 6 x MCP23017 devices

5 Posts
3 Users
3 Likes
1,184 Views
(@john40131)
Member
Joined: 5 years ago
Posts: 95
Topic starter  

I am still working on my Model Railway layout and I eventually got one section to control Points and Aspect signals when a train is detected and allowed to past on a route I select ... but now the original section is going to get a make over with another Mimic panel which has 40 Bi-Colour Leds on it and is using a Nano's I2C bus connected to 6 x MCP23017 devices and I am using all 96 IO ports for Inputs and outputs, the devies are all mounted on a PCB I designed using Eagle Cad and is the size of A4, it also has 20 push buttons for point and route selection, I have yet to write the sketch and is going to be a challenge but once I have the first Switch Case it will just be a copy and paste and modify content ...

I did make provision for a Nano, an ESP32 and a standalone Atmega328P ... not sure which yet but the Atmega328P is a contender ..

4 way Crossing Mimic Panel Control
This topic was modified 2 years ago 2 times by John40131

   
Inq and Inst-Tech reacted
Quote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

I'm a big fan of the ESP8266.  The CPU power of nearly 10x Atmega 328 with WiFi ability and cheaper too.  You could host a web server on it and all your fantastic track switching could be duplicated virtually on a web app to control and see details of what's going on on a cell phone or a big screen TV and everything in-between.  

Do you have the train set up already or drawings you can share?

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Inst-Tech reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

@inq Yes, but the ESP32 has all that plus a LOT more GPIO. 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 
Posted by: @zander

@inq Yes, but the ESP32 has all that plus a LOT more GPIO. 

All true and wouldn't cost that much more than the esp8266.  It was just MY preference as I have code that works on the esp8266.  But @john40131's custom board... Sounds like it has far more pin capability than any of them and is fully controlled by i2c... Thus only needing 2 pins of the mpu.  

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

@inq Yes, his expander boards make that difference pretty much irrelevant. BTW, how is the INQ port to ESP32 coming? 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote