Hi All,
I am just looking for some basic advice.
I have developed a RS485 system based on one master controller and 32 slaves. Each slave uses a PIC18F1220 and the master uses a PIC18F4520.
The slaves are all conected serially using CAT5 cable which connects the RS485 lines and also uses the spare CAT5 wires to supply 12V power to the slaves.
What I want to do is search the RS485 bus and assign each slave with an ID. Eg 1 to 32.
My thoughts on this are:
Switch on a 12V output from the master which will supply the first slave.
The first slave can then talk to the master and assign its first ID. Eg. 01
Once complete the 1st slave will switch a 12V output which will supply the second slave. The 2nd slave will then talk to the master and assign its ID as 02. Then switch its 12 output to the 3rd slave.....
And so on.
When their are no more slaves present the last slave will switch in its 485 bus terminatior. ie a 120 Ohn resistor.
By doing this I can search the bus for 0 to 32 slaves and assign IDs to each one. The peak power up current will be less because each slave will be powered up in a controlled way and then put into sleep.
My question is what is the best way to switch the power to each slave.
I was thinking about using a digital FET driven directly from the PICs output but I need a robust solution that will prove to be reliable.
Each slave will draw no more than about 40mA so I need to FET which can switch about 1.5A and of course very low Rds because they will efectivly be in series.
Does this method sound ok or perhaps their is a better way of doing this.
Any thoughts, suggestions or advice about which method or FETS to use would be be helpfull.
Thanks
Paul
I am just looking for some basic advice.
I have developed a RS485 system based on one master controller and 32 slaves. Each slave uses a PIC18F1220 and the master uses a PIC18F4520.
The slaves are all conected serially using CAT5 cable which connects the RS485 lines and also uses the spare CAT5 wires to supply 12V power to the slaves.
What I want to do is search the RS485 bus and assign each slave with an ID. Eg 1 to 32.
My thoughts on this are:
Switch on a 12V output from the master which will supply the first slave.
The first slave can then talk to the master and assign its first ID. Eg. 01
Once complete the 1st slave will switch a 12V output which will supply the second slave. The 2nd slave will then talk to the master and assign its ID as 02. Then switch its 12 output to the 3rd slave.....
And so on.
When their are no more slaves present the last slave will switch in its 485 bus terminatior. ie a 120 Ohn resistor.
By doing this I can search the bus for 0 to 32 slaves and assign IDs to each one. The peak power up current will be less because each slave will be powered up in a controlled way and then put into sleep.
My question is what is the best way to switch the power to each slave.
I was thinking about using a digital FET driven directly from the PICs output but I need a robust solution that will prove to be reliable.
Each slave will draw no more than about 40mA so I need to FET which can switch about 1.5A and of course very low Rds because they will efectivly be in series.
Does this method sound ok or perhaps their is a better way of doing this.
Any thoughts, suggestions or advice about which method or FETS to use would be be helpfull.
Thanks
Paul