Thanks for the data sheets. Searched the internet for the 5089 and could not find it. Never thought of looking at Jameco.
I do think this will work, and there is no reason tones can't be used for communicating back and forth between the slaves and master if you want to add some smarts later. The data sheet says the row and column lines have pullup resistors so having the desired row/column connected together and using the estop to ground them should work. You may need to add an output transistor for the output. Absolute max voltage for the 5089 is 15V, and typical operating voltage is 10V.
Glad to hear about the 12 gauge wire and being able to up the voltage to 28V. I based my calculations on AWG12 wire, and having a little extra voltage to play with helps improve the signal levels.
You can set a pretty good simulation of the belt circuit by using a 10 ohm resistor as the common and power connection between the master and the stations. AWG12 has a resistance of 10.6 ohms per 1000 meters. Won't simulate the impedance but it is better than nothing.
@kwinn - It is 1,000 *Feet*. Big difference. There are EStop switches located every 1,000 feet down the belt line. So we have the head unit at the front of the belt *with a remote station*, then 1K ft. and a remote station then 1k ft. and a remote station etc. for 8 remote stations. So in theory it is 8,000 Feet that we need to worry about. For whatever reason the industry typically puts another "main unit box" then goes another 8K feet. If I could have 32 units there would only be one main unit then 32K Feet of wire ran. (If that is even possible to still conduct at that distance)
On a slightly different note I found out last night that at the very end (8K ft mark) there is another special "tail unit" that goes in place. I figured out what this does. It is the "always on" tone. This way when the line gets broke the main unit does not hear the tone and stops the belt because the EStop switches will not work. Make sense to you? So 8 remote stations and a tail unit.
If I did not put any of that clear enough let me know and I will draw it all out. In fact let me do this any way and I will post it back in a few minutes.
EDIT: The picture in my first post is exactly what I was going to draw. No need to do it again.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Alex Burke
"Beware of computer programmers that carry screwdrivers." -Leonard Brandwein
@Alex, having 1000 feet instead of meters makes life easier. The resistance between stations is now about 6.5 ohms which cuts down on the drop in voltage as you get further away from the master.
Having a "tail end" unit that always emits a tone also makes sense. It would tell you that the power/common wire has not been broken. If you go to "smart slaves" that report their status regularly to the master a "tail end" unit will not be necessary.
I can understand the need for a "main unit" at the end if the belt is more than 8000 feet long. It would be needed to power and control the next 8000 foot segment and possibly act as a repeater for the master "main unit".
I am a bit stumped on the limitation of using the existing two wire set up for CANbus or just about any digital setup.
You would likely need to have two additional wires to provide power to any new configuration.
Your existing setup seems to modulate an existing high frequency tone (radio frequency) that requires very little power over great distances. Each station appears to cause some shift in frequency or power attenuation if turned on. In other words, the wires are acting like a coax cable does in RF transmission lines and being measured against a standing wave.
Having said that, there are complete PIC microchips with CANbus included. There is even Basic software for PIC. And Microchip does provide some software and examples. I suspect that this would be an easier option than using the MCP 2515 and MCP 2551 with another microcontroller via SPI interface (at least for the slave stations, the master could still have a Propeller with the MCP2515 and MCP 2551).
There are some people that are actively exploring CANbus with the Propeller (I've only done so with BasicStamps and SX28). Try looking around in the Propeller Forum.
The real issue seems to be that any system that is going to be high reliability is going to require some significant effort or substantial cash outlay. And since the original was installed, there has been a shift away from analog to digital electronics for such networks. If the bosses really don't want to recognize such realities, anything you do might best be geared toward having them just buy a ready-made system.
There are Dallas Semiconductor 1-wire networks that could work on two wires for shorter distances, but 8000 feet likely requires RS-485 drivers (which CANbus includes) and specialized repeaters(RS-485 is generally limited to 4000 feet).
I'd look to the suppliers of similar mining equipment for advice on who sells units similar to what was originally installed. Engineering from scratch may not be cost effective as radio frequency devices require being tuned for proper service. Also, the government mining safety offices may provide you a list of suppliers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
Post Edited (Loopy Byteloose) : 12/5/2009 5:22:19 PM GMT
LB, if you can keep the standby current draw of each slave low enough so the last station receives around 10-12V then you can communicate over the two wires by modulating the current draw. The modulation could be an analog or digital signal. The end result would be a fluctuation in the voltage received by each station so it is possible for any station to talk to any other if desired.
There are lots of micro's and serial data protocols that can be used over this 2 wire power and data connection, but no line driver/receivers such as RS232/422/485 etc. that would work without additional circuitry. All that is required is a transistor for transmitting and a comparator or op amp for receiving. See the attached block diagrams.
kwinn said...
LB, if you can keep the standby current draw of each slave low enough so the last station receives around 10-12V then you can communicate over the two wires by modulating the current draw. The modulation could be an analog or digital signal. The end result would be a fluctuation in the voltage received by each station so it is possible for any station to talk to any other if desired.
There are lots of micro's and serial data protocols that can be used over this 2 wire power and data connection, but no line driver/receivers such as RS232/422/485 etc. that would work without additional circuitry. All that is required is a transistor for transmitting and a comparator or op amp for receiving. See the attached block diagrams.
The problem with this solution is that it is dependent on a static configuration -- change the configuration and the voltages change.
Replace the OpAmp with an ADC and a long term average (where "long term" can be "last 100 seconds" or some other value) and you have a self-training means of detecting 0 and 1. if the ADC says the voltage is below the long term moving average, that's a "1". If above, that's a "0". And it's a moving average, so slow changes get factored in to the process. Abrupt decreases in voltage show up as a stream of 1's and that can be treated as a framing error or signal to retrain the system. Keep track of the average high and low voltage signals, and you can instantly retrain on abupt increases in voltage.
Well thanks for that info Julie. That is kind of like adding an auto-tune feature to the remote stations. This would now require putting a prop in that circuitry too, but over all it is adding a little more brains to a relatively outdated circuit. I have got the go ahead to create two different units. One has to be a direct replacement for the old style unit. (this will be our 8 seven segment displays and DTMF generation/detection that I am working on now) and the new one I have not decided on yet. I would like it to be more robust and offer more remote units at a longer distance. I can then tweak my output voltage and the number of wires, etc. because it will be a totally different unit. Many possibility's open if I am able to add multiple wires.
All the talk on CANBus really got me quite curious, so I might play around with that here in the near future. I think my learning curve with it is going to be a little steeper than I would like but I am all for learning something new. On a completely different note I don't want to make the new unit complicated just because I can. I know with expanded features comes expanded complexity - yet I am going to try to obtain my short set of goals without having to put more parts in it than I have to. I usually tend to have the swiss army knife attitude with projects. -I just needed to design a pocket knife and ended up with 5lbs of tools from the kitchen in it. - So I really got to watch myself.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Alex Burke
"Beware of computer programmers that carry screwdrivers." -Leonard Brandwein
@ Julie in Texas
The slave station is designed to take the voltage fluctuations into account. The receiver is a comparator with both inputs connected to a voltage divider that biases them at 1/2 the 3.3 or 5V supply. What appears to be a feedback resistor is there to provide hysteresis to the comparator. If the voltage between the 2 supply lines goes up the capacitor connected between the - input and + 24V will cause the output of the comparator to go negative and the hysteresis will keep it negative until the voltage drops. Only when the voltage changes rapidly in the direction opposite from the last change will the state of the comparator change.
As I said yesterday, I am going to make a quick go at the simple tone generation/detection method. Most of my parts should be in tomorrow and I will put this together and start doing some testing. I attached two schematics. If some one would look over them and let me know if there are any issues that you see (and I am sure there will be plenty), I would greatly appreciate it.
Here is a quick rundown of how this sample test is going to work. On the tone generation side, the remote units will be triggered when a switch is closed. This will produce a dual tone that is sent back to the decoder (the main unit) via ground wire. It is there that the decoder will trigger the corresponding set of pins that my Prop will read. The Prop with thin trigger a pre-arranged 7segment display that will show the number of the remote unit that was triggered. I know this can probably be used without the prop, but in the very near future I think I am going to ditch the 7 segment's for an LCD. Not to mention I plan on adding to this circuit in many ways as we have discussed.
So let me know if you think this idea will float... or at least gracefully sink...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Alex Burke
"Beware of computer programmers that carry screwdrivers." -Leonard Brandwein
You do not need the 74LS48. Connect the Q1-Q4 outputs from the 8870 through series resistors (2K2 - 2K7) to P0-P3 on the prop. The 4 bit number the 8870 outputs will tell you what transistor to drive. Pin 15 (StD) should also be connected through a resistor to P4.
It actually does not matter what order pins 11-15 of the 8870 are connected to P0-P4 on the prop as long as you keep them sequential and have the resistors in between. Make note of the order (probably 11-15 to P4-P0 respectively) and the program can do the rest.
You will need a resistor (2k2 - 2K7) between the base of each transistor and the propeller pin that drives it.
You need a current limiting resistor (120 - 220 ohms) for each segment that is connected to the emitter of a transistor.
I did not see any mention in the data sheet of what happens if more than one pair of tones is generated at the same time so some testing may be required. You should build at least two of the slaves so we can see what happens if two pull stations are active at once.
You could also dispense with all the transistors and use only one display to show the number of the station that was pulled by connecting P13 to P19 through 180 ohm resistors directly to the display segments.
For the slave add a 10K pot between the base of the transistor and pin 18, a 220 ohm resistor between the emitter and common (ground), and connect the collector to the 24V supply.
Alex, You should probably order and mount 16 3.3 ohm and one 22 or 27 ohm 1/2 watt resistors on something for testing along the lines of the block diagram I posted on 12/5. Does not have to be fancy. Even a piece of wood with 2 rows of nails to hold the resistors and allow connection of the power, master and slave boards will be a big help.
kwinn, Thanks for the advice. I would have completely forgot about adding the resistors when testing to simulate line resistance. Good call.
I made the changes you suggested to the schematics and replaced the ones in my last post. See if that looks any better.
The "(2k2 - 2k7)" comment threw me off a little, I may just be being stupid or did you mean a 2.2k ohm to a 2.7k ohm resistor (just never seen it like that)? I went ahead and put in 2k's... That seems very high considering the 8870 is only putting out 2.5v. That should not hurt the Prop...Right? So just out of curiosity and learning, why suggest them in between the two chips?
One last thing. Looking at the 5089 on tone generation circuit, the "TONE_OUT" is going to the base of the transistor. How exactly is this adding tone to the line? Looks kind of like it will make the transistor short between 24v and ground. Can you give a little insight?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Alex Burke
"Beware of computer programmers that carry screwdrivers." -Leonard Brandwein
Alex, I have added a few things to your schematics (in red) and modified the block diagram of the entire system slightly, and posted it all here. The diode from the 24V is to protect against accidental reversed connection and in conjunction with the added resistor and capacitor will prevent the tones from affecting the power supply circuit. The resistor Rs in the system block diagram is there to increase the signal level. The value will depend on how much current the tone senders require. Start with around 47 ohms.
BTW I used a 4 foot by 1 foot piece of 3/4' plywood to debug a door monitoring system. Sawed shallow slots acrross the plywood to hold the boards, drilled holes and mounted 6/32 screws along each edge to mount the resistors and connect power to the boards. Made testing much easier.
Comments
I do think this will work, and there is no reason tones can't be used for communicating back and forth between the slaves and master if you want to add some smarts later. The data sheet says the row and column lines have pullup resistors so having the desired row/column connected together and using the estop to ground them should work. You may need to add an output transistor for the output. Absolute max voltage for the 5089 is 15V, and typical operating voltage is 10V.
Glad to hear about the 12 gauge wire and being able to up the voltage to 28V. I based my calculations on AWG12 wire, and having a little extra voltage to play with helps improve the signal levels.
You can set a pretty good simulation of the belt circuit by using a 10 ohm resistor as the common and power connection between the master and the stations. AWG12 has a resistance of 10.6 ohms per 1000 meters. Won't simulate the impedance but it is better than nothing.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder.
Thanks for the info. I will keep that in mind. This is the first time I have been unable to find a data sheet using google.
@Alex.
Is the first slave/station 1000 meters from the master console? Not a big deal if it is not but I have based my calculations on that.
On a slightly different note I found out last night that at the very end (8K ft mark) there is another special "tail unit" that goes in place. I figured out what this does. It is the "always on" tone. This way when the line gets broke the main unit does not hear the tone and stops the belt because the EStop switches will not work. Make sense to you? So 8 remote stations and a tail unit.
If I did not put any of that clear enough let me know and I will draw it all out. In fact let me do this any way and I will post it back in a few minutes.
EDIT: The picture in my first post is exactly what I was going to draw. No need to do it again.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Alex Burke
"Beware of computer programmers that carry screwdrivers." -Leonard Brandwein
Post Edited (IRobot2) : 12/4/2009 3:00:12 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Alex Burke
"Beware of computer programmers that carry screwdrivers." -Leonard Brandwein
Having a "tail end" unit that always emits a tone also makes sense. It would tell you that the power/common wire has not been broken. If you go to "smart slaves" that report their status regularly to the master a "tail end" unit will not be necessary.
I can understand the need for a "main unit" at the end if the belt is more than 8000 feet long. It would be needed to power and control the next 8000 foot segment and possibly act as a repeater for the master "main unit".
All good news.
You would likely need to have two additional wires to provide power to any new configuration.
Your existing setup seems to modulate an existing high frequency tone (radio frequency) that requires very little power over great distances. Each station appears to cause some shift in frequency or power attenuation if turned on. In other words, the wires are acting like a coax cable does in RF transmission lines and being measured against a standing wave.
Having said that, there are complete PIC microchips with CANbus included. There is even Basic software for PIC. And Microchip does provide some software and examples. I suspect that this would be an easier option than using the MCP 2515 and MCP 2551 with another microcontroller via SPI interface (at least for the slave stations, the master could still have a Propeller with the MCP2515 and MCP 2551).
There are some people that are actively exploring CANbus with the Propeller (I've only done so with BasicStamps and SX28). Try looking around in the Propeller Forum.
The real issue seems to be that any system that is going to be high reliability is going to require some significant effort or substantial cash outlay. And since the original was installed, there has been a shift away from analog to digital electronics for such networks. If the bosses really don't want to recognize such realities, anything you do might best be geared toward having them just buy a ready-made system.
There are Dallas Semiconductor 1-wire networks that could work on two wires for shorter distances, but 8000 feet likely requires RS-485 drivers (which CANbus includes) and specialized repeaters(RS-485 is generally limited to 4000 feet).
I'd look to the suppliers of similar mining equipment for advice on who sells units similar to what was originally installed. Engineering from scratch may not be cost effective as radio frequency devices require being tuned for proper service. Also, the government mining safety offices may provide you a list of suppliers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
Post Edited (Loopy Byteloose) : 12/5/2009 5:22:19 PM GMT
There are lots of micro's and serial data protocols that can be used over this 2 wire power and data connection, but no line driver/receivers such as RS232/422/485 etc. that would work without additional circuitry. All that is required is a transistor for transmitting and a comparator or op amp for receiving. See the attached block diagrams.
The problem with this solution is that it is dependent on a static configuration -- change the configuration and the voltages change.
Replace the OpAmp with an ADC and a long term average (where "long term" can be "last 100 seconds" or some other value) and you have a self-training means of detecting 0 and 1. if the ADC says the voltage is below the long term moving average, that's a "1". If above, that's a "0". And it's a moving average, so slow changes get factored in to the process. Abrupt decreases in voltage show up as a stream of 1's and that can be treated as a framing error or signal to retrain the system. Keep track of the average high and low voltage signals, and you can instantly retrain on abupt increases in voltage.
All the talk on CANBus really got me quite curious, so I might play around with that here in the near future. I think my learning curve with it is going to be a little steeper than I would like but I am all for learning something new. On a completely different note I don't want to make the new unit complicated just because I can. I know with expanded features comes expanded complexity - yet I am going to try to obtain my short set of goals without having to put more parts in it than I have to. I usually tend to have the swiss army knife attitude with projects. -I just needed to design a pocket knife and ended up with 5lbs of tools from the kitchen in it. - So I really got to watch myself.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Alex Burke
"Beware of computer programmers that carry screwdrivers." -Leonard Brandwein
Post Edited (IRobot2) : 12/7/2009 8:21:29 PM GMT
The slave station is designed to take the voltage fluctuations into account. The receiver is a comparator with both inputs connected to a voltage divider that biases them at 1/2 the 3.3 or 5V supply. What appears to be a feedback resistor is there to provide hysteresis to the comparator. If the voltage between the 2 supply lines goes up the capacitor connected between the - input and + 24V will cause the output of the comparator to go negative and the hysteresis will keep it negative until the voltage drops. Only when the voltage changes rapidly in the direction opposite from the last change will the state of the comparator change.
Here is a quick rundown of how this sample test is going to work. On the tone generation side, the remote units will be triggered when a switch is closed. This will produce a dual tone that is sent back to the decoder (the main unit) via ground wire. It is there that the decoder will trigger the corresponding set of pins that my Prop will read. The Prop with thin trigger a pre-arranged 7segment display that will show the number of the remote unit that was triggered. I know this can probably be used without the prop, but in the very near future I think I am going to ditch the 7 segment's for an LCD. Not to mention I plan on adding to this circuit in many ways as we have discussed.
So let me know if you think this idea will float... or at least gracefully sink...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Alex Burke
"Beware of computer programmers that carry screwdrivers." -Leonard Brandwein
Post Edited (IRobot2) : 12/9/2009 4:48:47 PM GMT
It actually does not matter what order pins 11-15 of the 8870 are connected to P0-P4 on the prop as long as you keep them sequential and have the resistors in between. Make note of the order (probably 11-15 to P4-P0 respectively) and the program can do the rest.
You will need a resistor (2k2 - 2K7) between the base of each transistor and the propeller pin that drives it.
You need a current limiting resistor (120 - 220 ohms) for each segment that is connected to the emitter of a transistor.
I did not see any mention in the data sheet of what happens if more than one pair of tones is generated at the same time so some testing may be required. You should build at least two of the slaves so we can see what happens if two pull stations are active at once.
You could also dispense with all the transistors and use only one display to show the number of the station that was pulled by connecting P13 to P19 through 180 ohm resistors directly to the display segments.
For the slave add a 10K pot between the base of the transistor and pin 18, a 220 ohm resistor between the emitter and common (ground), and connect the collector to the 24V supply.
I made the changes you suggested to the schematics and replaced the ones in my last post. See if that looks any better.
The "(2k2 - 2k7)" comment threw me off a little, I may just be being stupid or did you mean a 2.2k ohm to a 2.7k ohm resistor (just never seen it like that)? I went ahead and put in 2k's... That seems very high considering the 8870 is only putting out 2.5v. That should not hurt the Prop...Right? So just out of curiosity and learning, why suggest them in between the two chips?
One last thing. Looking at the 5089 on tone generation circuit, the "TONE_OUT" is going to the base of the transistor. How exactly is this adding tone to the line? Looks kind of like it will make the transistor short between 24v and ground. Can you give a little insight?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Alex Burke
"Beware of computer programmers that carry screwdrivers." -Leonard Brandwein
BTW I used a 4 foot by 1 foot piece of 3/4' plywood to debug a door monitoring system. Sawed shallow slots acrross the plywood to hold the boards, drilled holes and mounted 6/32 screws along each edge to mount the resistors and connect power to the boards. Made testing much easier.