Best Bus for led control over distance

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi to control some light equipment I need a bus system to control it. On Sender and Receiver side will be an attiny. The distance will be minimum 5m max 10m. So I was reading i2c should be fine for up to 10m. But maybe you have better solutions. I want to realize it with what I have already. And don't want to buy extra bus systems. As electronic components I have resistors diodes connectors and maybe useful 50 Bss138 MOSFET and simple Ethernet cables.

As both attiny don't have a crystal I would prefer synchronous bus systems

 

Does the voltage level changes the distance I could transmit. So for example when I transmit with 20v instead of 5v

 

UPDATE

I realized I wasn't precise enough with my question. The project is more about some DIY Mc Gyver solutions rather then buying new things. As I just wanted to reuse some electronic components I collected during my last projects. For example three ATTiny 1626 and 861 already soldered on a headerboard. So it will be one ATTiny or a Raspberry on one side as a master controller and one ATTiny for each light on the other side. For switching the lights I already figured everything out. for example by using some solid state relay. Now I am just stucked with the communication. That's why i am asking. For example the Bss138 are also used in logic level converters. So maybe they could be used as amplifiers for longer distances. Or maybe building my own DMX or CAN bus.

 

This topic has a solution.

German electrical engineer living in the Philippines.

Last Edited: Tue. Mar 29, 2022 - 12:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If LEDs---How many LEDs?  5 or 500?

How do you  propose to supply power to everything?  Or maybe each has its own battery or local supply?

Do such LEDs need to update every second, minute, or every ms?  How often is communication required?

Is the communications bidirectional?

control some light equipment

Such as?  This description is about as useful as no description.  What interface does this equipment use? 

And don't want to buy extra bus systems.

That is a recipe to shoot yourself in the foot...what if there is a chip to do exactly what you need? 

 

Please be specific on what you hope to control & what it already requires-- could be an analog control voltage for all we know.

As both attiny don't have a crystal I would prefer synchronous bus systems

That's a start!   You can even get I2c extender chips, if need be.  Generally lower bus speed---> longer usable distance

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You probably want something with differential signalling - like RS485 which is designed to work over larger distances. Things like I2C/SPI are only really for "local connections" across the same PCB or down a few inches of cable to a front  panel display or something like that.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We used one of these extenders (over my similar objections!), and it does work ok for the several meters we needed, but it was a bit of a road to get everything ship-shape.  

When things don't work, you get to launch a "wonderful" investigation why (and everyone else decides they need to eat dinner).

 

https://www.ti.com/lit/ds/symlin...

 

• Drives 10× Lower-Impedance Bus Wiring for Improved Noise Immunity

• Multi-Drop Distribution of I 2C Signals Using LowCost Twisted-Pair Cables

• I 2C Bus Operation Over 50 Meters of Twisted-Pair Wire

• Latch-up Performance Exceeds 100 mA Per JESD 78, Class II

 

Give me RS485 or 422 any day of the month!

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There's already an industry standard named DMX for this application with literally tons of equipment available.

https://www.stage-electrics.co.uk/what-is-dmx

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes DMX! But the question is could I realize it with attiny. This project is more about diy mc gyver solutions to reuse things from my electronic box to control some lights for my room. So one attiny at each light as a Receiver will control the light. And then there will be one attiny or a raspberry as a master. I will change my question accordingly as I realize that I was not precisely about that

German electrical engineer living in the Philippines.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Alright I think I will take your sugestion. Found some pretty cheap RS485 modules

German electrical engineer living in the Philippines.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

flexbex1 wrote:
This project is more about diy mc gyver solutions to reuse things from my electronic box to control some lights for my room.

Although RS485 has been mentioned and widely used, another method of signalling that does not need any exotic drivers, comes from way back in the day, of using a 20ma loop with your USART, and using a simple multi-drop serial loop.   Best part is it can be made using existing parts you may already have....

 

Jim

 

 

FF = PI > S.E.T

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

could you describe more what you mean?

 

German electrical engineer living in the Philippines.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

flexbex1 wrote:
As both attiny don't have a crystal I would prefer synchronous bus systems

...

For example three ATTiny 1626 ...

...

For example the Bss138 are also used in logic level converters.

fyi, AVRxt UART have auto-baud and one-wire.

Can level convert one-wire to increase noise immunity though Jim's 20 mA current loop idea is inherently noise tolerant; recommend slew limiting to decrease EMI.

 

Auto-Baud | tinyAVR® 2 Family

One-Wire Mode | tinyAVR® 2 Family

SRL | tinyAVR® 2 Family

Multiprocessor Communication | tinyAVR® 2 Family

 

Note : there's an open-drain USART errata that's abated by a bit of source code.

SYST-05KGNS389 | Product Change Notification | Microchip

...

Title

ERRATA - ATtiny1624/1626/1627 Silicon Errata and Data Sheet Clarification

...

ATtiny1624/1626/1627 Silicon Errata and Data Sheet Clarification

[bottom of page 4]

2.7.1 Open-Drain Mode Does not Work When TXD Is Configured as Output

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nobody likes a simple RS-232 configuration these days!

 

I know the OP wants to use junk box parts, but a simple RS-232 driver chip is very cheap, or one can make a similar driver with some discrete parts.

 

JC

 

Question:

Are the remote devices in a star pattern, or a string pattern?

 

JC

Last Edited: Tue. Mar 29, 2022 - 03:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually I found some RS485 to usart modules for a dollar after it was recommended to me. that destroyed my Mc Gyver aproach

German electrical engineer living in the Philippines.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
... or one can make a similar driver with some discrete parts.

AVR BUTTERFLY | Microchip Technology

https://ww1.microchip.com/downloads/en/DeviceDoc/doc4271.pdf

[page 36]

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

flexbex1 wrote:

could you describe more what you mean?

 

Old teletypes used 20ma current loops for there comms, basically, 20ma = 1, 0ma = 0.  Current loops do not depend on the voltage levels on the line or on a common ground, as long as there is enough voltage to push 20ma around the loop.

Usually an optocoupler is used to turn the current on/off with the optocoupler driven by the USART TXD pin, but it's not required.  

Likewise the receiving optocoupler connects to the RXD pin.   do some searching for 20ma digital data loops for circuit examples.

 

Jim

edit: http://www.kavina-systems.com/ar...

 

 

FF = PI > S.E.T

 

Last Edited: Tue. Mar 29, 2022 - 05:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MIDI might count as another optically isolated current loop. In the MIDI case it's a 5mA loop.