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

  1. jkvasan
    October 25, 2013

    AK,

    Great narration.

    I would like to know more about how you implemented the external trigger.

    Another question:

    How to find a boss who allows you to publish the work? 

     

  2. antedeluvian
    October 25, 2013

    Hi JK

     

    Long time no hear!

    I would like to know more about how you implemented the external trigger .

    The trigger is a function internal to the micro. I am sure there are many more sohpisticated ways to do this, but a) this is a fairly limited product as a 'scope and b) I am still learning. It is essentially a comparator driven by a DAC linked to some additional logic that allows which channel is triggering including the pattern generator from the logic analyser. In fact a combination will work as well. That is the beauty of the PSoC5- you can reconfigure in software and in fact if you mess up, which I did, you can revise the whole circuit in minutes without going through a PCB revision.

    How to find a boss who allows you to publish the work?

    That can be a problem. I have essentially worked for the same boss for 22 years so I guess we have evolved together as I started with a Design Idea and progressed through several of those to articles and then a book and then blogging. Today he views it as a marketing approach. 

    Mostly I write about our own in house developments but in rare cases I have had some difficulty with some customers who are not always keen for me to publish techniques that I have used, but we have normally negotiated our way around that.

  3. jkvasan
    October 25, 2013

    AK,

    Given that your acquisition uses a 8 bit ADC, I guess your DAC is 8 bit.

     

    BTW, I cannot publish any of my works, not even in my dreams!

  4. antedeluvian
    October 25, 2013

    JK

    Given that your acquisition uses a 8 bit ADC, I guess your DAC is 8 bit.

    Actually the acquisition is 12 bits- the ADCs cannot be configured for less or more (they can be limited to 8 bits in software but it is always a 12 bit conversion). The PSoC firmware reduces it to 8 bits for speed of transmission.

    The trigger is in fact set directly on the analog signal after the multiplexers, prior to the ADCs. It is also adjusted from the tablet by bumping the DAC setting up and down as seen visually on the screen, so there is only a convoluted relationship between the displayed waveform and the trigger. Having said all of that, yes it is an 8 bit DAC.

    BTW, I cannot publish any of my works, not even in my dreams

    My sympathies. I am not sure why I write, but there is definitely an element in my psychology that motivates me, If you are the same way it must be frustrating. Perhaps you should try fiction- there is certainly a lot more money and fame in that if you hit it big!

  5. antedeluvian
    October 25, 2013

    You can see some more about this subject in Martin Rowe's EDN article

  6. yalanand
    October 27, 2013

    As next-generation automated information systems grow, this is acute that all persons have access to the info available via these schemes. Examples of evolving and future info systems include collaborative television touch screen based info kiosks, and radical Internet packages.

Leave a Reply

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