I2C Chips for brewing controls

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

kladue

Senior Member
HBT Supporter
Joined
Dec 28, 2006
Messages
2,318
Reaction score
60
Location
Turner, Oregon
I have finally found a analog IO chip with I2C interface that will support 0-10V outputs to drive 0-10v input proportional control ball valves. The TI AMC7812 provides 16-12 bit analog inputs, 12 analog outputs, and 6 GPIO output/inputs. With a couple more devices like the LTC 2487 from Linear to do thermocouples, a PCA9535 for digital outputs, and a PCA9685 for PWM control, most of brewing applications could be handled with 4 IC's that would run about $30. This is overkill for 99.9% of the systems out there as brewtroller/BCS is all that is needed, but for the terminally crazy automation folks this would open up all sorts of possibilities. I expect the code and calculations to be beyond the Arduino platform capabilities, but with the ARM9 mini 2440 platforms or Raspberry PI platform there should be enough capability to make this work.
 
Yeah, i2c is easy to use and you can find tons of drivers already written in C for most platforms. I've used it for RTC applications on the PIC platform and it works great.
 
Hi

Looks like a nice chip. Price is right if you hit the "free sample" button :D.

My main concern with anything this big is soldering it down. That's not a problem if I'm at work. It's a bit more painful if I'm here at home.

My only other concern would be noise / drift. The data sheet is missing the usual noise histograms, linearity charts, and drift data. Most of the rest of TI's portfolio is full of that sort of information. The noise and drift numbers they have in the data sheet are not bad for a 12 bit part, I just wonder why no data.

This is more what I'm used to seeing from them:

http://www.ti.com/lit/ds/symlink/ads1271.pdf

Could just be the TI / Burr Brown divide showing it's self.

Were you planning to use the 3906 temperature sensor option?

Bob
 
It appears what the are willing to share is in the manual, not bad for the intended use it will see. The 2N3906 sensor is interesting, but I was looking to standardize analog input ranges 0 - 5 V and use precalibrated voltage output temperature sensors. I am debating whether to use onboard 250 ohm shunt resistors for use with 4-20 Ma loop powered devices, or just make that an external feature.
The automated system uses loop powered pressure and flow transmitters, voltage controlled mass flow controllers for gas flow to burners, and voltage input proportional valves for liquid flow control. With these chips I should be able to copy part of the IO functions performed by the Opto22 hardware in a much tighter package.
 
As long as the sensors are electrically isolated from the process there should be no problems, outputs are going to be photo isolated. The goal is not to repeat the design problems with direct attachment to the microprocessor like the current controllers, rather use satellite boards where the noise can be dealt with and microprocessor disruptions prevented.
 
I have finally found a analog IO chip with I2C interface that will support 0-10V outputs to drive 0-10v input proportional control ball valves. The TI AMC7812 provides 16-12 bit analog inputs, 12 analog outputs, and 6 GPIO output/inputs. With a couple more devices like the LTC 2487 from Linear to do thermocouples, a PCA9535 for digital outputs, and a PCA9685 for PWM control, most of brewing applications could be handled with 4 IC's that would run about $30. This is overkill for 99.9% of the systems out there as brewtroller/BCS is all that is needed, but for the terminally crazy automation folks this would open up all sorts of possibilities. I expect the code and calculations to be beyond the Arduino platform capabilities, but with the ARM9 mini 2440 platforms or Raspberry PI platform there should be enough capability to make this work.

I've used the PCA9532 in a bunch of designs. If you want code, just ask. I write in C. I think this part is very similar to what you are considering using.

For thermocouples, by far the easiest way is to use the MAX6675. It's SPI, not I2C. I've used this a couple of times and it is FAR easier than the custom circuits that I've created before - no trim pots, no calibration, no junction errors, etc. Nice (but $$$).

I don't know what the Arduino does, but I can tell you (because I've done it many times) that a simple 8 or 16-bit processor is more than suitable for almost any brewing app. My favorite small processor is the TI MSP430 series, but if you needed to do a lot of signal processing theres a zillion ARM7's out there with internal flash and ram that would get the job jone fine also. ARM9 is serious overkill. I can see the advantage though if you are looking for USB/Ethernet/Wifi and that kind of connectivity.
 
The arm9 is most certainly overkill for just a brewing controller, but meant for an application built for run time configuration and sufficient safety measures built in to prevent mayhem. This is not targeting the Brewtroller/BCS market segment, but for systems that are more complex and need proportional control and analog outputs.
I have the application and code to make this work, just taking time to design and make sure it all works correctly in spite of what a user should not but probably will do to control system.
 
As long as the sensors are electrically isolated from the process there should be no problems, outputs are going to be photo isolated. The goal is not to repeat the design problems with direct attachment to the microprocessor like the current controllers, rather use satellite boards where the noise can be dealt with and microprocessor disruptions prevented.

Hi

It's the odd pop when a sensor accidentaly goes "un-isolated" that worries me. You can have a lot of voltage on the 250 ohm sense resistor when it does. Consider that people like me get employed to put in sensors (40+ years ago...).

Bob
 
Having worked with equipment able to withstand 120VAC on an analog input, that design feature will be simple to implement with these devices. If you do not plan for things like that, it will inevetibaly bite you on the hind parts. During the 38 years doing control equipment installation, calibration, and comissioning, there are not many gotcha's I have not seen yet, not to say that someone might excel in their creative incompetence and suprise me. We have had sensors self destruct in various manners, with varying results with PLC's, which points out lack of preperation on certain manufacturers part.
 
Hi

So what's the plan for 50/60 Hz rejection? The chip doesn't seem to have filtering in it. CIC's maybe? Full blown FIR's? Ignore it?

Bob
 
With signal levels in the 0 -5V range the greater concern was overvoltage and rf noise pickup, 12 bit resolution makes 60 hz noise a minor if not insignificant problem. Plan for the outputs is to use a diode bridge and polymer fuse to eliminate hookup polarity and short circuit malfunctions.
 
Hi

If it's a voltage output sensor, a simple R/C filter should take care of the RF pretty well. Just be sure there's a good local ground plane to tie it into.

Bob
 
I have decided to consolidate the digital functions into one IC, a PCA9955 that combines on/off with PWM and is short circuit resistant and reduces IC count to 3 devices. With built in monitoring you can check outputs for opens/shorts/ over temperature conditions and respond with point shutdown.
 
Hi

If you will be running high voltage on the outputs - looks like a good heat sink connection to that back pad is a really good idea...

Bob
 
I was expecting to use the current limit feature to limit total TDP from the package, and still operate 24V relays. It is looking like multiple boards are going to be a better approach, control and signal on one, interface conditioning on another.
 
Hi

If you run enough layers on the pc board and solid enough ground plane, then you can get power out through those heat pads. Your solder paste process has to be up to the job, but it can be done.

That said, yes I would go with a second board or at least a second set of parts. It might get a bit crazy, but you could run the chip through cascade buffers. That would take care of the heat issue and might not mess up the rest of it to bad. I've never done it with that chip, so its only a guess.

Bob
 
Here is rev 0 of the I2C IO board, finally got all the things placed and wired so it can be networked up to 9 boards by adjusting addressing jumpers. Still need to build the input/output conditioning board. This will give you 16 0-5V analog inputs, 16 0-10V analog outputs, 4 thermocouple inputs, and 16 current controlled PWM - on/off outputs.
newbrew2-55297.jpg
 
How many different PWM rates can this part support simultaneously? I.e., these parts usually have a programmable "slow" and "fast" rate. While you can change the duty cycles on those, there are only 2 rates at any given time.

Also, no clock on that part? Does it have an internal oscillator?
 
The PWM chip is a PCA9955, all 16 channels can be PWM controlled at their own rate, or group flashed as needed. Additionally the channels are individually current controlled and short circuit protected.
 
Added a MAX6651 to read 4 cheap pulse output flow sensors, a few more decouple caps and it should be ready to go to hardware layout stage.

Hi

SMT bypass and filter caps are dirt cheap. If you are going to layout, I'd sprinkle them in here and there. 0603 size 0.1 uf X7R seems to be a pretty good pick these days.

Bob
 
Wrapped up board design for interface board, control board is ready to be sent for etch. Need to finish interface board trace work then get both etched and parts bought so they can be reflow soldered and tested. Here are the final schematics
Control board
newbrew2-55583.jpg
[/IMG]
Interface board
termination-board-55584.jpg
[/IMG]
I have tried to cover all contingencies and user wiring mistakes with a few extra low cost parts so it will be reliable in almost all conditions, in spite of how it gets wired.
On the to do list is an Arm3 controller and WIFI interface for distributed wireless brewery control, already have USB interface.
 
Hi

You might consider adding protection diodes on the power supply. They are cheap... PTC fuses are also an option on the supply, but not quite as cheap. They don't protect the solid state stuff as much as the board it's self.

Bob
 
I had picked up a polarity protection diode on the main board but forgot to add a polymer fuse. Probably going to add some additional pads and jumpers on the main board so you can use a multi output external power supply and skip the on board regulators. Interface board is proving harder to layout traces than the schematic layout looks. The polymer fuses used were not that expensive < $.50 each for .5 Amp for each of the digital outputs.
 
Hi

How many layers are you running at this point? If you are trying to keep it double sided, then yes that schematic will be a bit tough to do. It's been a long time since I did anything less than 4 layers ...

Bob
 
Both boards are double side to make this work with as many traces as are needed. Control board is situated on a 6.25 X 3.5 board and the interface is about half done on the same size board. Budget is not a concern with this project, but boards are looking like < $20 for production after other fees, components < $50 for control board and < $50 for the interface board. I hope to have the interface board layout done next week so both can go to production, then I will reflow solder the parts on so I can test and start building the code for these. It looks like 2 of these boards will bring the point count up to what the Opto system has for the automated system, then all I need to do is to rework the hardware IO class in the old application to make them work.
 
Hi

That sounds pretty expensive for an unpopulated / raw double sided board. Ground plane / power plane adds a lot to signal integrity in this day of cell phone everywhere....

Yes indeed, I do a lot of RF work, so I may be biased.:drunk:

Bob
 
It was the nature of the beast for getting free software to create boards, but as this is an experiment at this point and quantities are small, it will be more expensive than otherwise. While I have Cad at work and a bunch of Cad operators to consult, this is more for entertainment than for profit at this point just to see if it will do what I want it to do.
Like you I have come from the days of vacuum tubes dainty to vapor cooled beasts, and now manage industrial/commercial automation system installations in chip factories from bid to commissioning.
 
Hi

The "free software" can indeed be either a curse of a blessing. I can't say I'm happy with the stuff we use at work, but it's better than the free stuff. I've gotten to the point that I'm so picky about layouts (who would have *ever* guessed ...) I'm doing a lot of them myself....

Lots of fun.

Bob
 
Back
Top