Good day all,
I am a local firefighter and one of the things that affects many firefighters is the way they are woken up at night. Loud noises (bells, buzzers, etc.) jolt the body and studies have shown this to be an issue. Our fire stations do not have a commercial alerting system (they are not cheap!) and so I sought out putting a basic unit together. I initially did this with a PLC and it has worked fine, but I wanted it a bit more compact and Arduino based so I looked at the WT32-ETH01 as the brain. I designed a board (1st time) which contains the ETH01, a DFPlayer and an MCP23017 I/O expander. Everything is working properly but I have concerns over isolating the inputs. I was working in one of the stations and was continually having issues with the 32 locking up and requiring a reset. I tried using PC817 OptoCoupler and they appeared to work properly on the bench, but not when I installed them at the station. I was able to isolate the inputs by adding relays removing the field wiring from the equation (assuming it was basically turning into an antenna). I have attached an image of the board and look forward to your suggestions on how to improve it.
I thank you in advance,
Mark
Hi @kozyautomation,
Before looking into the details, there are a couple of very different issues to consider and discuss.
---------
First: Please remember and respect that this is an amateur hobby discussion forum, which means that all the responsibility for any consequences of anything discussed here is 100% down to you. It is not a consultancy. (I am not making any judgements or criticisms of this particular request. Just being cautious.)
For example, if your system failed in some way, maybe after someone on the forum had suggested something, resulting in the firefighters failing to respond to a call, this would still be totally your responsibility.
Second: In terms of identifying the issues you have encountered, it is true that every wire acts as an antenna, but it also acts as a transmission line. Most logic devices, including the MCP23017 are not designed to drive 'long wires'. The definition of 'long' in this case depends on many factors, including signalling rate, characteristics of the device being driven and so on. As a first stab in the dark, I will suggest wires more than 1 metre could be 'long'. If your bench tests used had different wire lengths from the station installation, this MIGHT be the cause.
Of course, wire length is only one of an almost infinite number of possible causes.
-----------
To even begin to understand your situation, we would need a much more detailed description of your total system, including differences between the bench and station installations, the signals that you are sending from and receiving to your board, and a description of the units your board is connecting to.
Best wishes and good luck, Dave
@kozyautomation fyi @davee Maybe it would be best to start fresh. Tell us about the project and do NOT make any assumptions re parts and pieces. Experienced folks here may have totally different ideas using a totally different board.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
OK so let me start by commenting on @davee message - I get it and I am very clear on the implications should this not work properly. I am in no way looking to place blame on anyone else nor hold anyone accountable should this not work. There are back-ups to the back-ups to ensure the staff are alerted. I DO appreciate your concern and, frankly, live it every day 😉
@zander this will be a minute to describe as there are a few different parts to it. I did not want to overwhelm anyone right out of the gate!!
Components of the system:
- Station radio : Receives the alert from the 911 center, triggers an output within itself which in turn triggers the input to the alerting system. Pressing the mic key momentarily will reset the alert status and release the relay to the alert system.
- Acknowledge Buttons : Momentary buttons positioned at the entrance to the bay for the firefighters to acknowledge the call and reset the alert
- Day/Night Buttons & LED (12vDC) : Momentary push buttons positioned on either side of the station to allow the firefighters to activate the station speakers allowing normal radio traffic to be broadcast. The LED signals the current state
- Volume Control Knobs : Speaker specific volume control knobs used to adjust the ambient volume in the area it resides.
- Volume Override Relay : Relay located at the volume control knob allowing the bypass of the volume control bringing the volume to 100% during the course of the alert
- Red LED Lights (12vDC) : Positioned in the bunk rooms allowing for easier waking of the firefighter. Turns off after a pre-determined amount of time
- White LED Lights (12vDC) : Positioned in the bunk room and turns on after the red LED has turned off. This allows the firefighter the ability to find their way
- Power Supply : Currently using a PC power supply as it allows for dual voltages (12vDC and 5vDC)
Order of Operations:
- Call is dispatched to the station
- Station radio triggers a relay which in turn signals the input on the above board
- Relays for red lights, speaker, speaker led and volume override are all triggered
- DFPlayer is triggered to sound a softer tone than simply pagers beeping or sirens / bells sounding
- After a short period, the red lights in the bunk rooms turn off and white lights turn on
- As the firefighter(s) are entering into the bay, they press the acknowledge button which resets everything
- IF the Day/Night button is not active, then all relays will turn off
- IF the Day/Night button IS active, then the speaker and speaker LED will remain on - This allows the firefighters to listen to radio traffic over the speakers without having to carry a radio all day
- IF the Day/Night button is not active, then all relays will turn off
Breakdown of the inputs and outputs:
Inputs:
- 5vDC power input : This is from an external power supply as I chose not to add that to the board as of yet.
- Spare Input : For future use
- Radio Trigger : Noted above - It receives the signal from the station radio and sets everything in motion
- Radio-Ack : Noted above - This allows the firefighters to reset the system and send a message to the 911 center that they have received the call
- Day/Night Toggle : On each side of the station (day room side and bunk room side) is a momentary push button with an LED attached. Pressing this either turns the stations speakers on to allow open radio traffic to be heard throughout or turns it off so they can sleep, study, have class, etc.
- Doorbell : Most fire stations have a simple residential doorbell which is a single button at a door and a single bell generally on the wrong side of the station from where the firefighter is! By placing a momentary button at the door, this input triggers the speakers and speakers LED relays to turn on (if not already) and the DFPlayer to play a doorbell sound. This way the firefighter can be alerted that someone is requiring assistance no matter where they are in the station.
Outputs (connected to external 8 position relay module):
- Red LED : This will turn on when the call is initially dispatched. Red LEDs are positioned in the bunk rooms to assist in waking the firefighter. This LED will turn off after a designated amount of time
- White LED : As above, this is positioned in the bunk room to assist in waking the firefighter. After the red LED turns off, the white turns on and remains on until the acknowledge button is pressed
- AlertAcknowledge : This is a momentary button at the entrance to the bay for the firefighter to press and reset the system. This will; turn off the white LED, turn off the speakers and speakers LED relay (if it is triggered), turn off the volume override relay, and will trigger a relay to close for 1 second to key the microphone on the station radio resetting the alert tone on it as well as signaling the 911 center that the call has been acknowledged.
- Radio ACK : This output triggers the mic button on the station radio for 1 second, mimicking that of a firefighter pressing the mic button, which resets the alert on the radio, turns off the alert relay and signals the 911 center the call has been acknowledged.
- Speakers : This relay output closes and completes the connection for the station speakers allowing the radio traffic to be heard throughout
- Day/Night LED : This, coupled with the day/night toggle momentary button, signals the firefighter whether the speakers are active or not. Many times there is little traffic on the radio and the firefighter may go to bed thinking the speakers are turned off when in fact they are not - Ugh!
- Speaker Volume Override : This relay triggers another relay at the volume controls which are placed next to the day/night buttons allowing the firefighter to adjust the volume depending on the activities being handled at the time. As a call is dispatched, the volume override relay will bypass the volume control knob bringing the station speakers to full volume.
In the first station I deployed this in, I have a mix of 22 gauge stranded wire as well as CAT6 for the inputs. These are home run to the panel. The building is brand new and have had no issues (knock on wood!). The second install is a 30 year old building utilizing existing wiring. Most locations are CAT3 or CAT5 with the new runs I installed being CAT6. The runs in this building are far greater than the other spanning the width of the building as well as spanning 66-blocks and 50-pair trunk. The runs are likely 100'+ to one side of the building. I currently have the field buttons connected to relays at the panel which then trigger the designated input on the board above. This is the first time I have encountered an install such as this and was doing all I could to isolate the problem areas.
Hope this helps some and thanks for your interest!
Mark
@kozyautomation Excellent description. That is a great start. Cat 6 is good up to 100 METRES, that's 328 feet.
My gut feel is you know your system and the differences so I would start by trying to determine if there is a noise issue. Then research a way to deal with it (run the non CAT 6 wires inside standard electrical conduit and ground the conduit. OR maybe even copper or aluminium conduit, again well grounded.
Just my initial thoughts, maybe my good friend @davee will pipe up with any yea or neh.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@zander Thanks for this. Oddly enough, when I was going through the station and toning out the wires to confirm each location, I was able to pick up an FM radio station on one of the brown pairs! I looked everywhere for an FM radio and was told there was no radio in the station. The broadcasting station is many miles away! This one was already isolated with a relay, but had to add relays for the other inputs as well to stop it from locking up.
@kozyautomation Thanks for that, but now you have made my point about not having enough info. WHAT relays? We really need a schematic as well as the code. (I am unsure if schematic is the right word; maybe wiring diagram, circuit, layout. I am an autistic 82-year-old tube guy, and I don't know squat about much of the modern stuff. Any circuit diagrams I needed back in the day were pencil and paper, maybe with the aid of a template.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
Hi @kozyautomation,
It sounds like there are some long wires there, albeit I am not saying that is the problem, it is something to look at.
Long wires can be problematic from the transmission line viewpoint, in that the signals can get totally distorted, and also as what may loosely be described as acting like antennae. For the latter, nearby wiring of power cables, especially if they are not encapsulated in earthed metal trunking, may inject noise that can also confuse logic based devices. Such coupling is commonly short range capacitive and/or inductive in nature, as against the longer range 'radio' communication normally associated with an antenna, but for now the difference is somewhat academic.
--------------
Can you provide wiring diagram(s) to match up with the text already provided? Sorry, but I usually find diagrams are a lot quicker and more accurate to visualise.
Plus, I should like to know the exact wiring you have tried with opto-couplers, relays, etc., together with the problems, symptoms and successes.
In particular, I have the impression that the problems continued with optocouplers, but were ameliorated with relays. Could you please clarify the details?
Also to be clear, you originally said it worked on the bench, but not in the station. From your second message, I understand, you are saying there are two systems, each one installed in a different station, but only one of them works. If so, could you explain in a little more detail about the differences in the systems. Here, comparative wiring diagrams annotated with wire types and wire length estimates would be great.
-------------
Noting Ron (@zander)'s comment, the Cat6 lengths he mentioned are for Ethernet, but my first 'gut feeling' concerns are more for the 'ad hoc' connections, because Ethernet driver chips+transformers, assuming they are installed correctly, are carefully designed for fairly long cables, but most logic chip inputs and outputs, are much simpler, and only designed for wiring inside a unit or cabinet at most, sometimes only for a track length on a PCB. Of course, in practical situations, you will find wires longer than this, but 'stretching' the acceptable wire length, is a bit like stretching a piece of elastic ... take it too far, and something will snap/fail.
-----------
I am sorry to be asking for a lot of data, but this is the kind of information that anyone, yourself included, will need to try to diagnose the issue. If you do not have it all to hand, then perhaps initially post what you have, and I may be able to prioritise on certain areas to follow up on.
Best wishes, Dave