Tiled control panel ideas - Page 1
Forum section: electronics / projects

author: danners430
author_rank: Regular Contributor
timestamp: February 14, 2019, 03:23:43 pm
content: Afternoon folks,I'm building a control panel at the moment which consists of standard tiles (40x40mm) arranged in a grid pattern behind a wood facia. The tiles are simply custom PCBs with the various LEDs, buttons and/or displays mounted on them.My question is this: What would be the best way to connect them all to a "main" control microcontroller? Ideally, I'd be able to remove these tiles if I ever needed to, so I don't want to permanently attach anything... In addition, how would I be able to communicate with all the various LEDs, displays and buttons? ideally, obviously, I'd have a microcontroller connected to a data bus on each tile, but that would get very expensive very quickly... Perhaps only use the microcontroller idea for the input devices, and use addressable LEDs elsewhere...?So far I've had two ideas, but I'm not sure if they're the best ideas - either using short ribbon cables between the boards, or board edge headers...Sorry for the rambling post, but I'm a little stuck here :-(

author: rstofer
author_rank: Super Contributor
timestamp: February 14, 2019, 05:46:03 pm
content: I suppose I would look at the SPI or I2C protocol and various IO Expandershttp://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdfThen I would look around for SPI 7-segment drivershttps://prom-electric.ru/media/datasheet-MAX7219-MAX7221.pdfOr maybe 7 segment boards with SPI interfacehttps://www.sparkfun.com/products/11441There are variations, of course.I might not like SPI because it takes a dedicated CS' (chip select) for each device and this adds pins in a hurry. OTOH, I really don't like I2C - it is a very difficult protocol to get working. Maybe I would use an IO expander to control the CS' lines.

author: Marco
author_rank: Super Contributor
timestamp: February 15, 2019, 08:03:01 pm
content: Quote from: danners430 on February 14, 2019, 03:23:43 pmA small microcontrollers costs bugger all, so yeah, add one per tile. They are cheaper than i2c i/o expanders.

author: danners430
author_rank: Regular Contributor
timestamp: February 15, 2019, 08:06:17 pm
content: Quote from: Marco on February 15, 2019, 08:03:01 pmWhat sort of communication bus would I use though? Bearing in mind the panel is 2m longSent from my ONEPLUS A3003 using Tapatalk

author: Gribo
author_rank: Frequent Contributor
timestamp: February 15, 2019, 08:12:04 pm
content: That really depends on your physical topology. If all modules reside on a single chain, you can manage with a differential multidrop bus (RS485, CAN). If you want to be able to remove a module in the middle, you will have to either implement a star topology or find a way around the missing links. You didn't specify data rate, so we can't really help you more than that.

author: Marco
author_rank: Super Contributor
timestamp: February 16, 2019, 12:31:55 pm
content: Probably CAN if it's fast enough to handle whatever you want to do with the displays, since it's build into a lot of cheap microcontrollers.

author: danners430
author_rank: Regular Contributor
timestamp: February 16, 2019, 01:08:59 pm
content: I'm not really too concerned with data rates... The most that's likely to happen is perhaps a set of LEDs need changing perhaps up to 8 times per second, so data rate doesn't need to be too high.And which cheap microcontrollers have CAN support? I've only seen expensive ones with that built in...Sent from my ONEPLUS A3003 using Tapatalk

author: Marco
author_rank: Super Contributor
timestamp: February 16, 2019, 02:20:18 pm
content: What do you call expensive? I doubt 2 Euro for a NXP/ST Cortex M0 is going to make much difference to your costs in the big scheme of things. There's always grey market imports from China of course to get them cheaper.

author: danners430
author_rank: Regular Contributor
timestamp: February 16, 2019, 02:34:01 pm
content: Quote from: Marco on February 16, 2019, 02:20:18 pmWell, I'm looking at approximately 120 tiles, so as cheap as possible ideally.... 2 euros per tile would end up as €240...Sent from my ONEPLUS A3003 using Tapatalk

author: Doctorandus_P
author_rank: Super Contributor
timestamp: February 16, 2019, 04:21:51 pm
content: What is al this tapatalk advertisement nonsence crap?(Don't tell me, I don't want to know).STM8 and other small uC's start at around 25ct in regular western shops, and EEV Dave did a video on much cheaper uC's. One uC per tile is easily doable.You could daisy chain your devices like in:https://hackaday.com/2018/04/15/rotary-encoders-become-i2c-devices/Another simpe idea is to buffer the data in each device of the daisy chain, something similar as used in the WS2812 led's.With a uC with uart you can put the TxD of one uC to the RxD of the next in the daisy chain.Do you need uni or bi-directional communication?With Uarts you can also easily use a diode on each device and connect RxD and TxD together to make a wired-or (wired-and, nand, whatever) bus. Bus capacitance may become a problem, you can consider using a strong pullup (100 Ohm or less) and a NPN transistor on the TxD line of each uC.

author: Ian.M
author_rank: Super Contributor
timestamp: February 16, 2019, 04:27:29 pm
content: Use RS-485. The hardware is cheaper than CAN, and resource requirements on the MCUs are low, though I would get ones with a hardware UART. Snaking a ribbon cable to and fro behind all the tiles with an IDC socket on a header for each board would be the easy way to hook them all up. Each would need a unique address but that would be easy enough to do when the MCUs are programmed or one board at a time in a test jig with a normally grounded pin on the header pulled high to put the board into address learning mode.If you want inspiration for a protocol to run over RS-485, consider MODBUS RTU.USB<=>RS-485 interfaces are readily available so you can do most of your testing and commissioning from a terminal program running on your PC, without suffering from having to get both the master and slave device firmware working properly without knowing which end the problem is.

author: Marco
author_rank: Super Contributor
timestamp: February 16, 2019, 05:12:23 pm
content: Quote from: Doctorandus_P on February 16, 2019, 04:21:51 pmIn this case1-wireis an option. Might have to tweak the protocol to allow a new slave to indicate its presence to start a new enumeration cycle.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 16, 2019, 06:04:10 pm
content: Keep in mind EMC -- if you want this thing to behave while in any sort of noisy environment. Don't underestimate how noisy a mere finger is -- especially in dry weather!Consider not using logic level and open collector buses. This rules out I2C, stock SPI, async serial (logic level), and so on. There are I2C-RS422 converters, but really you'll have an easier time with SPI or shift register chain (74HC164s and 595s) plus RS422 transceivers. CAN is a combo RS485-like interface plus protocol, very reliable for these sorts of things.Or shove everything behind a shield as well as you can, or provide frequent grounds so each tile can be individually grounded and protected and filtered.It doesn't seem like you'd get very much value out of a single tile that size (unless it's covered in LEDs..?); you may consider a hierarchical approach, where the smallest tile elements are dumb, and several can be wired into a common interface which has probably an MCU and comms.Tim

author: Doctorandus_P
author_rank: Super Contributor
timestamp: February 17, 2019, 05:12:03 pm
content: How far are you with your tile project?Have you considered using 32mmx32mm tiles?This is the size of very common 8x8 dot matrix displays with MAX7219.Smaller PCB's wil also make the individual PCB's cheaper.Or allow you to put more (diffeent) tiles in the same area.

author: danners430
author_rank: Regular Contributor
timestamp: March 12, 2019, 12:25:21 pm
content: Hey guys, sorry for the radio silence - I never got notifications unfortunately when I got replies...(For clarity - Tapatalk is just the app I use on my phone to access the forum... And I'm using the free version, hence the adverts)Bit of an update:I've purchased a whole bunch of HT1632C LED matrix drivers, which were cheap as chips, so I'm just gonna connect all the LEDs in a matrix with a wiring harness - basically keeping it simple, albeit with a little more wiring to do.The 40x40 PCBs are dictated by the tiles on the control panel itself, which is already manufactured... I've been given the thankless job of kitting it out. Should be simple though using the matrix controllers, the PCBs are essentially now just a mounting solution for the LEDs...Many thanks for all your suggestions, and my apologies for the silenceSent from my ONEPLUS A3003 using Tapatalk

author: amy
author_rank: Newbie
timestamp: March 14, 2019, 02:47:33 am
content: I suggest you buy a ready-made product according to your own needs.