Tuesday, December 16, 2014

Part 3 of Fuzzy Logic and the Paint Flow Control Project

George Halldin of Enclosures Engineering had passed away, having taken his own life, probably not wanting to face the music for the shame and probable 5 year imprisonment for his transgressions. Near the end of 2008, my friend Thomas Nguyen (of VividInc, www.vividinc.com) contacted me about developing a new Fuzzy Logic Paint Flow Controller for selling to other painting companies, particularly companies in China who were painting cell phones, computers and other such devices for RF shielding and for decorative coating. That was George's original idea, to develop a controller for selling to other painting companies but he had forgotten about or given up on the idea, probably had decided that business was so good at Enclosures Engineering that he wouldn't need to pursue the idea of expanding his domain to develop and sell a FL controller to others. Thomas and a representative of UEI, Universal Electronics Incorporated (UEI), came to Livermore to meet me at a cafe to talk about the possible project. The UEI rep said that he had been a partner for sales with George at Enclosures Engineering. George had forced the partner out, telling him that business was so good that he didn't need him to find any more sales prospects.

Much of the equipment from Enclosures Engineering had been purchased at auction by his cohorts following George's death, with the aim to resurrect a painting facility and they also had others who were willing and able to put up some funding for developing and selling a new Paint Flow controller. Chuck Nelson of Vacuum Metalizing (www.vacmet.com), Robert Watkins (then of Vacuum Metalizing) and Baxter Watkins (then of MuGahat Enterprises) were others in the venture. The UEI rep and Thomas wanted me to develop a FL controller, similar to the one that I had developed for Enclosures Engineering. I reminded them that I had used off-the-shelf microcomputer and analog modules from Z-World for the previous Paint Flow controllers and they suggested that I design a new module that would combine the microcontroller and analog circuitry on a single module. Further, I suggested that I could include Ethernet capability to enable faster communication to a PC and also allow connection to the Internet for remote monitoring and control of the controller. However, I knew it would take me a few months to develop the module since I was still working full-time at the Lawrence Livermore National Laboratory. Thomas and the UEI rep liked the idea of a single module with the addition of Ethernet capability.

Baxter Watkins incorporated Control Coat LLC in October 2011 with the aim of selling the Paint Flow Controller to painting companies around the world, especially to those in Asia where millions of TV remote controls, telephones, computers etc are manufactured and require RF shielding by use of conductive paints.

I got started on the project right away, producing a first-cut Requirements Document at the end of October, 2008. I was familiar with and favored Microchip microcontrollers because of my previous work with their 16F877 chips in the Vending Machine project and also the RadScout portable gamma detector project. But I figured that I would need a more powerful micro and I checked to see what was available from Microchip (http://www.microchip.com/), finding their dsPIC chips and an eval board, the Explorer 16, that had the dsPIC33FJ256GP710 microcontroller on board, plus Microchip had an Ethernet chip and plug-in module for the eval board and Microchip also had a MAC chip that had some EEPROM memory that I could use to save parameters for the FL code. What really sold me on the Microchip dsPIC part was the availability of a free GNU C compiler for the dsPIC chips. The dsPIC33FJ256GP710 might have been overkill, but I wanted to err on the side of overkill, so I went ahead and ordered an Explorer 16 eval board and the Ethernet plug-in module. With the eval board, I could begin the software development before designing my own circuit board. The circuit design was more complex and time consuming than I had realized and even though I could copy some of the Explorer 16 design, it took me until February of 2009 to create my first circuit board design but while developing the software, I made several changes to the hardware design and didn't finalize the hardware design until February 2010. Below is the design that I sent out to be fabricated at ExpressPCB ((http://www.expresspcb.com/)).

First Fuzzy Logic Paint Flow Controller, February 2010

The large chip in the upper left-of-center is the Microchip dsPIC33FJ256GP710 chip, the Microchip programming connector is at the upper left, the RS232 connecter is at the center-left, power enters at the lower left, the Ethernet connector is at the upper right, connectors for the flow-control input and output signals are along the bottom and indicator LED's are on the lower right.

I chose ExpressPCB for the design software since they provided free design software and could etch boards for me. Later on I was to find much cheaper board fab companies. However, I found the ExpressPCB software easy to use to design the board. They provide a schematic-capture software and the PCB layout software that also includes an autorouter which I found to be invaluable.

I purchased components from Microchip, Digikey (www.digikey.com), Mouser (www.mouser.com) and Newark (www.newark.com) and had my good friend and previous coworker Noemi Fortes load the parts on the four boards that were fabbed by ExpressPCB. Then to provide shielding and mechanical protection for the board, I installed mounted it in an aluminum box, shown in the photo below.

First Controller Board (modified) mounted in Aluminum box, ready to test..
I made a few mistakes in the design and some corrections can be seen in the photo such as a different power converter module at the lower left to accommodate an 18 VDC input. Also I added an LED in the middle of the board for the output current circuit and corrected the wiring to the Ethernet connector in the upper right corner.

The software development took me several months to write and debug. The FL part of it was pretty easy, converting from my earlier Paint Flow controller software for the K&H Finishing and Enclosures Engineering projects. However, for this project I wanted to provide a GUI to operate on a PC, communicating over the Ethernet from the PC to the controller board. So the GUI development for the PC was a separate project along with providing the necessary code and hooks in the Microchip code. I chose Microsoft C# for the GUI development as it was free and although it was a bit clunky and awkward in some ways, C# allowed me to set up the PC screen along with providing the base code for driving the GUI and communicating over the Ethernet to the controller board. I had the GUI code working in September 2010 and after a few tweaks, was ready to test the system out in December 2010, just before Christmas Day.

The GUI below allows the user to select either Manual or Automatic control mode, set the Manual Output in percent of full scale or set the Flow Setpoint and other settings. The system status is updated each second and displayed in the middle text boxes and the Flow Data (Flow Rate) and Control Data are also shown graphically with a time scale in seconds. The GUI shows that the system is set in Automatic Mode and the Flow Setpoint is 2 GPM. The graphs show the result of changing the Flow Setpoint to 2 GPM.

C# GUI for PC to control the Paint Flow controller board.


I met with Thomas Nguyen down in Santa Clara for testing of the Paint Flow controller and the GUI on my laptop PC. Thomas had set up a paint flow system with the mass flow sensor, the current-to-air converter and the air pressure controlled paint pump. The tests went well and proved that the FL code was ready for shipping to Chuck Nelson at VacMet in Rancho Cucamonga, CA for testing and operation at his painting facility. Chuck did set up the controller on his painting line. Chuck leased a robot for positioning the paint gun, connected up the Paint Flow Controller and verified that it worked satisfactorily to control the paint flow. Consequently, the FL Paint Flow Controller was now ready to demonstrate to potential clients with the hope of selling many. Baxter and Rob Watkins hoped to sell a complete system with the robot, mass flow sensor, current-to-air pressure converter, air pressure controlled pump and paint gun.

Baxter Watkins incorporated Control Coat LLC in October 2011 but the LLC is now canceled as of December 2014. Baxter and Rob Watkins had hoped to be able to sell many Paint Flow Controllers but apparently no real prospective buyers have been found in the intervening years and consequently they have decided to cancel the LLC. So unfortunately all the efforts of Thomas Nguyen and myself may have been for naught. We will have to see if anything will come of the venture.





No comments:

Post a Comment