Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : Multi-drop TTL

   Page 1 of 4    
Posted: 10:56am
12 Mar 2022
Copy link to clipboard
Tinine
Guru

The RS485 thread just reminded to ask if anyone has tried this (short-range) method:






Craig
 
Posted: 11:03am
12 Mar 2022
Copy link to clipboard
Mixtel90
Guru


Hmmm... I2C with more complication.  ;)

No, not tried it. It's something I've considered many times in the past though. I seem to remember someone trying something like this many moons ago, using Nascom computers at the user group, but whether they got it to work I don't know. Can't see any obvious reason why it shouldn't.
 
Posted: 11:12am
12 Mar 2022
Copy link to clipboard
Kabron
Regular Member


This solution works perfect in my many projects.
 
Posted: 11:27am
12 Mar 2022
Copy link to clipboard
CaptainBoing
Guru


electrically it looks good to me, if it wasn't so cold, I'd nip out to the shed and set up a few MM170s to play.

Depending on the expected baudrate, the pull up might need to be something more aggressive like 4K7 or even 3K0 to get reasonable rise times from the slaves.

You would need to establish some protocol as to who can talk, and how to encapsulate the data etc. a very similar requirement I did for a wireless HC-12 based star network. The master initiates all communication, everything has an address - master is 000, slaves are 001 - 998 and 999 is the broadcast address. Slaves only speak when spoken-to but once started they can send as many packets as they like. Here's a tiddly vid of the above protocol in action with various MMs talking with a PC master.

The above said, I think Grogs has a similar case where anything can talk and collisions are just arbitrated by the software.

interesting topic

h
Edited 2022-03-12 21:30 by CaptainBoing
 
Posted: 11:51am
12 Mar 2022
Copy link to clipboard
Kabron
Regular Member


For high speed communications it also could be done with AND-gates.
 
Posted: 12:37pm
12 Mar 2022
Copy link to clipboard
Tinine
Guru

  Kabron said  For high speed communications it also could be done with AND-gates.


 

What would be considered high speed?

How would the AND gate solution be configured?

@Mixtel90

I confess to not having studied the I2C approach. Is it possible to broadcast to multiple slaves or do they need to be individually addressed?


Craig
 
Posted: 12:56pm
12 Mar 2022
Copy link to clipboard
Tinine
Guru

@CaptainBoing

Did you try pushing the HC-12s at a higher Baud? I realise that your application doesn't require it, just curious about the reliability.



Regards,

Craig
 
Posted: 01:56pm
12 Mar 2022
Copy link to clipboard
Kabron
Regular Member


  Tinine said  
  Kabron said  For high speed communications it also could be done with AND-gates.


 

What would be considered high speed?

How would the AND gate solution be configured?

@Mixtel90

I confess to not having studied the I2C approach. Is it possible to broadcast to multiple slaves or do they need to be individually addressed?


Craig


1. Does not matter from logic, depends only from transmitter-receiver capabilities.
2. See attach.
 
Posted: 01:59pm
12 Mar 2022
Copy link to clipboard
CaptainBoing
Guru


No, I played with 9600 a top limit with success so long as you didn't hammer them.

In my applications, the packets are usually small - 100 bytes is 50 bytes of payload (because of encryption) and that is a reasonable amount of data when it is tokenised because traffic is always this message, or that message (e.g. UXR = unexpected restart etc... that particular item catches barmaids giving free snooker table time to their friends LOL) so 20 or so bytes total packet size @2400 is over in a twinkle and maximizes the range through walls & floors etc.
 
Posted: 02:18pm
12 Mar 2022
Copy link to clipboard
CaptainBoing
Guru


The design above for AND gating; I have taken to using this range of chips recently, single gate SOT devices. would be perfcet for each module and not wasteful of gates.

https://www.ti.com/lit/ds/symlink/sn74lvc1g08.pdf
 
Posted: 03:09pm
12 Mar 2022
Copy link to clipboard
Mixtel90
Guru


@Tinine
I'm afraid I don't know much about I2c (yet). :) I know you can have multiple devices on individual addresses. I suppose you could have multiple devices *listening* on the same address, but not transmitting on it as that can mean taking bus control.

If you want distance, though, RS485/RS422 is definitely the way to go. If you want local (i.e. on a single pcb) comms at high speed then serial SPI is probably the best.

That AND gate approach would soon run into trouble with 20 devices. U1C would need 20 inputs. That's a horrendous amount of gating. :)  In theory the wired OR gate that Tinine posted originally can have any number of devices. It might be better to use an active current source instead of a pull-up resistor though.
Edited 2022-03-13 01:14 by Mixtel90
 
Posted: 03:39pm
12 Mar 2022
Copy link to clipboard
Tinine
Guru

I'm liking the AND-gate approach  



Craig
 
Posted: 04:31pm
12 Mar 2022
Copy link to clipboard
Tinine
Guru

@Mixtel90

Yeah I actually run a 4-wire, full duplex (485/422) network for my distributed stuff but what I am looking at right now is 4-Picos as smart I/O expanders but these slaves will be in very close proximity to the master. Seems a bit ridiculous to use differential transceivers. I already have the protocol developed so no need to futz with I2C.

Although my protocol is strictly command response, I like the full duplex approach because the master always has control of the TX and the RX is a shared response line. Should a slave get its knickers in a twist, the master is still able to talk to the other slaves, maybe to shut them down in an orderly fashion or whatever.

 
Posted: 07:17pm
12 Mar 2022
Copy link to clipboard
Turbo46
Guru


It would be nice if the Tx pin could be set to OC and the Rx pins set to Pullup. The scheme would then work without any additional components. The manual doesn't mention those options for serial communications though.

Bill
 
Posted: 08:26pm
12 Mar 2022
Copy link to clipboard
Mixtel90
Guru


... and you'd be back to wired OR. :)

I can't understand why the AND gates would be considered better than the wired OR system. That only needs a single resistor (although I'd prefer a CC source) for the network and a diode per node. It's cheaper and simpler than any AND gate you can get. Cable capacitance is non-existent on short runs so the OR system won't be that slow. All the AND gates are doing is interlocking the TX/RX (unsuccessfully because it's on a bit by bit basis, not byte by byte) - and that's better done in software, controlled by the master.

For a network of n nodes every AND gate needs n inputs. It very quickly gets out of hand. Fine for just a couple of nodes, but the wiring alone (a bus of n+1 wires) makes it unsuitable for any distance.
 
Posted: 08:31pm
12 Mar 2022
Copy link to clipboard
CircuitGizmos
Guru


I've used an open collector setup. The nearest commercial version is called LIN. LIN has a signaling method that I feel to be unnecessary involving a break condition that cant be made by a UART. My version, then, is basically LIN hardware with regular UART signaling.

https://en.wikipedia.org/wiki/Local_Interconnect_Network
 
Posted: 08:37pm
12 Mar 2022
Copy link to clipboard
circuit
Senior Member

  Mixtel90 said  @Tinine

If you want distance, though, RS485/RS422 is definitely the way to go. If you want local (i.e. on a single pcb) comms at high speed then serial SPI is probably the best.



This obviously depends upon how distant is distant... I2C bus extenders such as the Texas Instruments P82B715 I2C Bus Extender are specified to 50 metres on the I2C bus with simple twisted pair cable.
 
Posted: 09:00pm
12 Mar 2022
Copy link to clipboard
Tinine
Guru

Does the TX pin of the UART ever go high or does it just go low and then to high impedance? I believe that's what happens with the soft UARTS of the Propeller.

Of course, I only think of this when I'm away from the shop and unable to test

It might be a non-issue from an electrical standpoint (?)

@Mixtel90
I got the impression from an earlier comment that a diode might limit the bandwidth. Dunno.


Craig

Edit: Disregard....I've had a pint  
Edited 2022-03-13 07:07 by Tinine
 
Posted: 09:29pm
12 Mar 2022
Copy link to clipboard
Turbo46
Guru


  Quote  I got the impression from an earlier comment that a diode might limit the bandwidth. Dunno.

The diode/resistor is not an active pullup so rise time may be longer. That's why CaptainBoing suggested maybe using a lower value pullup resistor I believe.

Mick's constant current source would sort of be an active pullup.

Bill
 
Posted: 09:30pm
12 Mar 2022
Copy link to clipboard
TassyJim
Guru


I did a multidrop serial for a while but only while I was waiting for some RS422 modules to arrive.
It worked well with 3 slaves but I forget what baudrate I used. Probably 38400.
Cables were cat5 with the maximum distance about 8 metres.

Schottky Diodes are preferred for speed.

Jim
 
   Page 1 of 4    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025