Author Topic: Tiled control panel ideas  (Read 2206 times)

0 Members and 1 Guest are viewing this topic.

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Tiled control panel ideas
« on: February 14, 2019, 03:23:43 pm »
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 :-(
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9963
  • Country: us
Re: Tiled control panel ideas
« Reply #1 on: February 14, 2019, 05:46:03 pm »
I suppose I would look at the SPI or I2C protocol and various IO Expanders
http://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf

Then I would look around for SPI 7-segment drivers
https://prom-electric.ru/media/datasheet-MAX7219-MAX7221.pdf

Or maybe 7 segment boards with SPI interface
https://www.sparkfun.com/products/11441

There 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.
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 7043
  • Country: nl
Re: Tiled control panel ideas
« Reply #2 on: February 15, 2019, 08:03:01 pm »
ideally, obviously, I'd have a microcontroller connected to a data bus on each tile, but that would get very expensive very quickly
A small microcontrollers costs bugger all, so yeah, add one per tile. They are cheaper than i2c i/o expanders.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Tiled control panel ideas
« Reply #3 on: February 15, 2019, 08:06:17 pm »
ideally, obviously, I'd have a microcontroller connected to a data bus on each tile, but that would get very expensive very quickly
A small microcontrollers costs bugger all, so yeah, add one per tile. They are cheaper than i2c i/o expanders.
What sort of communication bus would I use though? Bearing in mind the panel is 2m long

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline Gribo

  • Frequent Contributor
  • **
  • Posts: 649
  • Country: ca
Re: Tiled control panel ideas
« Reply #4 on: February 15, 2019, 08:12:04 pm »
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.
I am available for freelance work.
 
The following users thanked this post: Ian.M

Online Marco

  • Super Contributor
  • ***
  • Posts: 7043
  • Country: nl
Re: Tiled control panel ideas
« Reply #5 on: February 16, 2019, 12:31:55 pm »
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.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Tiled control panel ideas
« Reply #6 on: February 16, 2019, 01:08:59 pm »
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

 

Online Marco

  • Super Contributor
  • ***
  • Posts: 7043
  • Country: nl
Re: Tiled control panel ideas
« Reply #7 on: February 16, 2019, 02:20:18 pm »
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.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Tiled control panel ideas
« Reply #8 on: February 16, 2019, 02:34:01 pm »
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.
Well, 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

 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 4004
  • Country: nl
Re: Tiled control panel ideas
« Reply #9 on: February 16, 2019, 04:21:51 pm »
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.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13216
Re: Tiled control panel ideas
« Reply #10 on: February 16, 2019, 04:27:29 pm »
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.
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 7043
  • Country: nl
Re: Tiled control panel ideas
« Reply #11 on: February 16, 2019, 05:12:23 pm »
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.

In this case 1-wire is an option. Might have to tweak the protocol to allow a new slave to indicate its presence to start a new enumeration cycle.
« Last Edit: February 17, 2019, 05:25:13 pm by Marco »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Tiled control panel ideas
« Reply #12 on: February 16, 2019, 06:04:10 pm »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 4004
  • Country: nl
Re: Tiled control panel ideas
« Reply #13 on: February 17, 2019, 05:12:03 pm »
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.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Tiled control panel ideas
« Reply #14 on: March 12, 2019, 12:25:21 pm »
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 silence

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline amy

  • Newbie
  • !
  • Posts: 4
  • Country: cn
Re: Tiled control panel ideas
« Reply #15 on: March 14, 2019, 02:47:33 am »
I suggest you buy a ready-made product according to your own needs. :horse: :horse: :horse: :horse: :horse: :horse: :horse:
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf