Advertisement

Blog

Trace Signals From Behind Closed Doors

Until now, I have probably bored the socks off most of you discussing my hassles with Bluetooth and the use of the PSoC5 (ARM Cortex M3). You have seen the evolution of the product that I am working on, probably without realizing where I was going, since I have been rather circumspect about what I have been trying to achieve. Now it's time for the rest of the story.

When I first blogged about my project, I stated that I wanted to build a data acquisition unit for some electronic equipment on an oil rig. That is certainly how the project started out several years ago, but that concept remained dormant. What has since evolved from it is a sort of oscilloscope, one that gets embedded into an electronic panel and connects to the outside world via a wireless Bluetooth connection. We call it BluDAQ.

I know there is a need for something like this. Recently, I worked on a project in the automobile manufacturing industry in which we were never allowed to try out our module on a fully-working system. Part of the problem was that, by regulation, you are not allowed to work on an operational electrical panel with the door open. The reasons are moot — you just can’t. In a factory, there can be many hundreds of panels, and the truth is, you can’t measure what is going on inside any one of them because you can’t get your instruments into them.

In the middle of that project I went on a business trip to China. I was playing around with my (then) new iPad, passing some time in Hong Kong and learning the device. The iPad doesn’t have an RJ45 jack or USB port, and so I was frustrated in trying to connect to the Internet. The hotel only had RJ45 Ethernet or paid WiFi.

One thought led to another, and it occurred to me that if you couldn’t connect a USB Internet adapter, then you couldn’t connect a USB scope, either. My mind-drift continued and I reflected that it would be nice to scale the scan and gain of a scope with hand gestures. Then an idea struck, and quickly evolved to a low-end scope that could be placed inside the panel and connect to a tablet via wireless to provide a graphic display.

On my return to Toronto, I presented the idea to my boss, and then we allowed it to percolate a bit. It triggered the thought that if we could make it cheap enough, we could have one placed in every panel so that any panel can be debugged and serviced while operational, and of course, everyone remains at a safe distance.

That led to the next idea. On a scope you have to move the probe from point to point, but if the door is closed you can't do that. It would be nice to have a multiplexer, so you can select which channel you want to look at without having to power down, open the door, change the connection, and then power up again after closing the door. Also, inside panels there is a mixture of signals. Typically, they are not high frequency, but may be large AC or DC currents, 4-20mA signal currents, AC voltages, DC voltages, and temperatures. That meant we had to provide quite a bit of interfacing, but we really didn’t want a large module.

I've discussed the use of the PSoC5 in previous blogs on the former Microcontroller Central site. I select it because of its integrated hardware capabilities. Not only can it can handle a large number of analog signals coming into its two high speed ADCs, but it has comparators, DACs, and logic that makes triggering a completely internal function. That's why it forms the core of BluDAQ.

Figure 1

The PCB front and back. The view on the left shows the board inserted into its rail-mounting plastic housing.

The PCB front and back. The view on the left shows the board inserted into its rail-mounting plastic housing.

In fact, all the external circuitry on the board in Figure 1 is the power supply and input conditioning. We used the Allegro ACS712 Hall-effect devices to measure high AC/DC current and the Avago ACPLC870 for isolation for the high voltages. There are also 0-24V analog inputs (nominally, the PSoC has a PGA to scale any input) and 24VDC digital inputs. A floating 4-20mA input signal will allow for the scope to be in series with another 4-20mA device to monitor the current. Most analog inputs have AC and DC coupling. There is also an input for a conventional temperature sensor, a thermocouple input, and the requisite cold-junction compensation circuitry.

All in all, the scope has eleven analog inputs (switchable to two displayed analog channels), six digital inputs (did I forget to mention that it is also a 6-channel logic analyzer?), and two temperatures. Space permitting, we are considering adding some digital outputs to allow switching of panel functions to allow additional variations in test. The scope samples at 1Msps on all channels and has a 2000-reading buffer for both channels with 8 bit A/D conversions, plus another 2000-byte buffer for the digital inputs.

Each conversion is initiated by a trigger (or free run) and the sample rate is regulated by a hardware timer. The conversions are copied to RAM using DMA leaving the processor plenty of time for other functions. And that is only for starters. I have also added an event counter, a frequency counter, and a D/A converter, just because I could! Well, I also thought they could come in handy inside a closed panel.

I opted to use an external complete Bluetooth module for two reasons. First, it is a complete package and it has its FCC approval with no additional input on our part. Secondly, with the BluDAQ circuitry inside a steel cabinet, no wireless signal would get out. The modules connect over an RS232 interface and there are several methods to connect to the module allowing the RS232 to pass through the cabinet without compromising the environmental certification. Figure 2 shows one possible option.

Figure 2

When closed, the housing meets IP65 standards. There is a 9-way D-sub on the bottom of the housing for a cable connected to the BluDAQ module inside the panel. When operational, the enclosure would be opened and the Bluetooth module inserted into the visible DB9.

When closed, the housing meets IP65 standards. There is a 9-way D-sub on the bottom of the housing for a cable connected to the BluDAQ module inside the panel. When operational, the enclosure would be opened and the Bluetooth module inserted into the visible DB9.

I have tried to create the user interface on the Android tablet that is intuitive to use. It is rather hard to describe on paper and so I have uploaded a video on YouTube to demonstrate the whole system’s capabilities. The video quality is far from good and it seems to me that you can see it better when you watch with the screen fully expanded. Moving my hand in front of the camera gets the autofocus working overtime and so there is also quite a bit of blurring. Please forgive me.

Figure 3

I am including a screenshot to give you a better idea of the screen appearance.

I am including a screenshot to give you a better idea of the screen appearance.

Since I made the video, I have added a display of ambient and thermocouple temperature, an event and frequency counter, and I have also added the ability to measure the waveforms using the same kind of touch approach.

So, that's the rest of the story. From the initial idea of remotely reading oil well pump monitors the design evolved into an isolated, in-panel oscilloscope using Bluetooth to link with a mobile device for display and control. We are trying to democratize industrial automation — one panel, one scope!

Note that this is the world premiere in “print.” BluDAQ has only been exhibited twice, at the ISA show in April at Calgary and the OTC show in Houston in May. You saw it here first, and got to watch my design struggles along the way!

Any questions?

Related posts:

6 comments on “Trace Signals From Behind Closed Doors

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.