Notifications
Clear all

Arduino I2C Bus and 6 x MCP23017 devices


John40131
(@john40131)
Estimable Member
Joined: 3 years ago
Posts: 102
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 4 months ago 2 times by John40131

Inq and Inst-Tech liked
Quote
Inq
 Inq
(@inq)
Prominent Member
Joined: 6 months ago
Posts: 891
 

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, Access Point 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 liked
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3050
 

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

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
Inq
 Inq
(@inq)
Prominent Member
Joined: 6 months ago
Posts: 891
 
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, Access Point 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)
Famed Member
Joined: 2 years ago
Posts: 3050
 

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

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote