Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Creating a "Bus busy" signal.

Status
Not open for further replies.

henninggs

Member level 2
Joined
Nov 10, 2011
Messages
45
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Denmark
Activity points
1,688
Hi
Let's say I have 10 nodes/microcontrollers on the same data bus. The nodes are powered by the same power line (Was thinking 24v). I was wondering if I could use this shared power line to send a signal when a node wants to use the data bus.

I was thinking this:
1. When a node is turned on it continuously measures the voltage on the power line until the voltage has been stable for 500ms.
This voltage level is now referred to as the idle voltage.
2. When a node wants to use the data bus, it alters the voltage on the power line by lets say 5%
3. After waiting some random amount of milliseconds it measures the voltage again. If the node is the only one asking to use the data bus,
the voltage should now be off by 5% compared to the idle voltage. It then starts to use the data bus.
4. If the voltage measured is off by more than 5% some one else is asking for the data bus and the node will not use the data bus. It will try again later.
5. The voltage altering mechanism is turn off leaving the power line at the idle voltage.

Would this work - and how could it be implemented ?
 

Why reinvent the wheel?

There are several existing buses and protocols which might fulfill your requirements, including I2C, SPI, CAN, RS-485, etc.

BigDog
 

henninggs said:
2. When a node wants to use the data bus, it alters the voltage on the power line by lets say 5%
If you are going for long distances, then this could be tricky. I think it is going to be tricky in any case. I agree 100% with BigDog. There are so many standards, as well as many ICs certified for those standards. At least one of them should be suitable for your case.

Alexandros
 

What would be the maximum distances separating your nodes?

What type of environment will these nodes be located?

BigDog
 

It is a rs485 network. It is wired with cat5. Bus length max 100meters/300feet. 1 twisted pair for power, one for GND and one for rx/tx (The last pair is reserved)
Nodes will primarily be monitoring temperature, humidity, smoke detector, PIR etc. in a building.

I know I could implement collision detection etc. in software creating a multi master network that could work without a "Busy bus" signal, as you said it has been done before, but having a hardware solution that ensures only one node transmitting at any given time the software would be that much more simple. Of course this approach only make sense if it could be impolemented in a somewhat simple way.
 

henninggs said:
Nodes will primarily be monitoring temperature, humidity, smoke detector, PIR etc. in a building.
This doesn't sound like a multimaster network. Are you going to have multiple panels for that network?
For 100 meters distance this doesn't sound reasonable. There is a main panel and all other nodes are slaves.
Better focus on master polling, slave answering, address assignment etc.

I understand now that you have to follow a scenario in protocol level, but multimaster?
I can't imagine a smoke detector or a humidity sensor being a master. "Polling" is the magic word, I would focus on that.

Alexandros
 

Hi Alexandros.
I do agree polling would be the standard way to go.
The thing is I have to create a solution with very high focus on power efficiency. The network, when completed will have up to 200 nodes and it will be on 24/7. 90% of the nodes will just monitor some sensors and if the sensor value are outside a predefined range (which properly will never happen) they will trigger an alarm.

Thus, the polling method will waste a lot of power on unnecessary bus communication. That is why I am looking for a solution where each node can acquire the bus, when and only when it has something to say leaving the bus idle 99% of the time.

---------- Post added at 11:27 ---------- Previous post was at 10:47 ----------

Alright, I have done some googling on "power consumption rs485" but have not found a clear answer/formula, but it seams that running a rs485 bus is not that power hungry as I thought. How can I calculate an estimate based on:

- Cable length
- Cable size
- Number of nodes
 

Any solution that utilizes additional signal lines seems to me like a step in the wrong direction, giving up the ruggedness of the basic RS-485 physical layer. Just consider e.g. the possible behaviour of your solution in presence of a defective node and the chances to detect it in a widespread building.

I agree with alexx, that a strict master slave scheme seems the natural solution. Regarding power efficiency, I can imagine a scheme, where the master sends a periodical "time tick" message, spanning free time slots for a device answer according to their bus address. As an additional remark, in a bus with dominant/recessive signal levels like CAN and it's predictable collision behaviour, bus member are allowed to start a transmission at arbitrary times, stopping their activity at the first bit arbitration loss.
 

Thanks for all your replies.
I have been reading up on the CAN bus and it seams that it better meets my needs. I think I'll give the CAN bus a try. Thanks.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top