Load Cell - PCB Review - Page 1
Forum section: electronics / projects

author: tech_builder
author_rank: Contributor
timestamp: May 15, 2015, 10:27:18 pm
content: Hi EEVBloggers,The purpose of this post is to get feedback on a data acquisition circuit that I have designed. The intent of this circuit is to improve on the results of a previously built design; specifically to increase the resolution of the recorded signal and decrease its noise as much as possible. I have included some background on the use of the circuit, as I thought it would be nice to know. I thank you in advance for any assistance that you can provide.BackgroundI have designed a device to apply a compressive load to the electrodes of a flat plate battery and measure that load while it is cycling (charging and discharging). Initially the idea was to be able to cycle the battery under a known load and to try different loads in order to optimize the amount of compression required.A circuit was designed using the 10bit ADC from a PIC18F2550 to read the load cell (FC22 100lb Compression load cell 0.5-4.5V) used to measure compression. The measured load was displayed on a 2x16 LCD. The data was also sent through a serial connection to a computer to record it. The latter was almost more of an afterthought.However, after looking at the recorded data we noticed that the data showed the electrodes’ expansion and contraction as they discharged and charged. This showed up as an increase in load during discharge and a decrease during charge. The problem is that the resolution of the ADC was too low (and noise in the circuit too high) resulting in poor quality plots (See attached figure). We are interested in obtaining higher quality data.After researching as much information on the topic as I have had time for I came up with the attached design (Schematic, PCB – top, bottom, and both). Below is a list of some of the books and articles I read on the topic of analog to digital interfacing:Circuit Design Know it All - NewnesCh 15: InterfacingCh 18: Bridging the Gap Between Analog and DigitalCh 38: Layout and Grounding for Analog and Digital CircuitsSuccessful PCB Grounding with Mixed-Signal Chips Follow the Path of Least Impedance (tutorial 5450) – MaximTechniques that Reduce System Noise in ADC Circuits – ADN007 Microchip TechnologySome of the principles I was trying to adhere to can be summarized as follows:Layout and component placement is critical to maximizing performancePut high speed digital components closer to the power supplyPut analog components farther away from the power supplyGround planes are very importantMinimize traces (interruptions) on the ground planeTraces on ground plane should be parallel to ground return paths to minimize interference with ground current return pathsMinimize islands on the ground plane (non connected pieces)Use a low pass filter on ADC input to minimize noiseBypass/decoupling capacitors! (are important)CircuitNow that the background to the project and its previous incarnation are complete, I will talk about the next version of the circuit (V2). To increase the resolution I decided to go with a Microchip MCP3422 12 to 18 bit ADC. The ADC has selectable resolutions of 12, 14, 16 and 18 bits, where at least 14 bits or greater is the target. The ADC communicates via I2C with the microcontroller (which is now a PIC18F4550).In front of the ADC is a 4th order low pass Butterworth filter with a cutoff at around 10Hz (designed in Filterlab). Typically a data point is only collected every 30 seconds, but we may want up to once every second (1Hz). Data is collected over several hours, with changes occurring slowly. I wasn’t sure what cutoff frequency to choose for this application, is there a rule of thumb for this?The PIC sends data to the LCD display and a serial to USB convertor (MCP2200). The previous version of this device used an external serial to USB convertor, but we didn’t like having it separate so I built it in for this revision. I did not solder a USB connector directly to the board, but rather ran it out to a header that I was going to wire to a Bulgin PXP6042/B panel mounted USB connector. I’m not sure if there will be a problem with the header to USB connector implementation?To lower the noise in the circuit due to the SMPS I did some research and found a voltage regulator by TI, the TPS7A4901. This is supposed to be an ultra low noise linear regulator for post DC-DC convertor regulation. I have it powering my whole system; however, I think it might have been better to use it to power only the analog section.Those are the potential problems I could think of.I am interested in any critique you may have on the layout of this PCB, as it wasn't something that I covered a lot in school and it interests me immensely. I would eventually like to build a more general purpose data acquisition device with SD card storage and higher bandwidth, but I’ll start here.Once again, thank you for your help, and if I you have any questions or constructive criticism please comment below.

author: Kleinstein
author_rank: Super Contributor
timestamp: May 16, 2015, 08:51:57 am
content: The sensor is ratiometric, that is the output is proportional to supply voltage. Thus it would be better to have an ADC with an external reference derived from the supply. A more suitable ADC would be a MCP3550/3551.With a sigma delta ADC there is no real need for such a complicated low pass filter. A simple RC filter (e.g. 2 K and 500 nF) should be enough - if accuracy (linearity) is important check the data-sheet for the input filter. So no more need for the OP-amps. The ADC already has filtering inside, so external filtering is not critical any more.If you want to keep the MCP3422, use the second channel to measure something like 1/3 of the supply, to compensate for drift.The USB interface and also the connection µC to ADC might want to use HF filtering with ferrite beads or similar.I don't know much about PICs, but the decoupling of the µC does not look that good - there may well be more VCC pins, that need decoupling too. The PIC is not that fast as you need 100 nF and 10 nF capacitors. A well placed 100 nF one is good enough. It's more important to do the routing the right way (it's wrong at the ADC): from VCC Pin to the capacitor and from there on to the supply grid. Also supply lines should be wider. An extra capacitor directly at the connector to the load cell and the power input might be a good idea.The regulator looks like it could need some cooling. So I would prefer a larger case one, space does not look so tight. I would even consider a TO220 size. The sensor and ADC should not be that sensitive that an extra low noise regulator is needed - if so a separate regulator for just the sensor (and ADC ref) would be the right way.If noise is important, its a good idea to let the ADC run continuously and average the data in software to the requires rate. So the ADC might run at 4 SPS and the average of 120 values give one reading every 30 seconds.

author: PeterFW
author_rank: Frequent Contributor
timestamp: May 16, 2015, 11:12:24 am
content: I tried to understand how your power routing works and were each rails starts and ends.My attempt failed after several tries.You have VCC connected to the input of the linar regulator but i can not find it annywere else.It seems VDD is your main 5V supply, but you have VDD connected to the output of the regulator *and* the +5V pin on the USB connector.But the output from the regulator is only connected to VDD through a 100k resistor.Additionally, if you are concerned about noise, do not connect VUSB to annything, make it a self powered usb device. The +5V you get from a USB port are horrible.

author: max_torque
author_rank: Super Contributor
timestamp: May 16, 2015, 12:55:23 pm
content: The interesting thing here is that you are trying to measure something that is changing really very slowly. If you want a new result every 1sec, even a basic micro can sample a single ADC channel 1000 times in that period these days, so that opens up a huge range of possibilities for signal processing on your raw ADC data!For example, you could take your 10bit ADC, and over-sample it to 12bits (or more) really very easily. And when over-sampling random "white noise" is your friend ;-)The first thing i would do is to look at the RAW adc data you already have, which will be a number of counts between 0 and 1023. Plotting this and as for the graph posted up there^^^, the human brain can already interpret that graph and filter out the noise, so you just need to find the mathematical process that achieves the same result.If you use something like excel, you can try various oversampling and filtering algorithms until you find an one that looks to produce the best data (the data that you think is the best fit to what you expect to see). Then code that algorithm, and your output should be much improved.

author: tech_builder
author_rank: Contributor
timestamp: May 18, 2015, 06:04:52 pm
content: Thanks so much for your replies. I am going through them, and hopefully they will lead to an improved design. I will post back with any changes I make or questions I might have.

author: edavid
author_rank: Super Contributor
timestamp: May 18, 2015, 06:23:17 pm
content: Why not use an HX711 ADC? It's very cheap, and designed for this purpose.

author: tech_builder
author_rank: Contributor
timestamp: May 19, 2015, 06:21:58 pm
content: Thank you all for taking the time to respond. Many good points were brought up, and a few mistakes caught as well! I really appreciate this kind of community support!I never thought about oversampling. It sounds like a solution that might work, however, I am also interested in this project as a learning experience, so I am still going to integrate an external ADC for V2 of the circuit mostly for that reason. I also want to have the possibility of increasing the sample rate. I think I will reprogram the existing hardware to oversample and compare results. Should be interesting. As Kleinstein suggested, I will change to the MCP3550 ADC, and simplify the input filter. I would still like to try at least a second order Butterworth, but I will also look into a simple RC more. Edavid brought up using an HX711 ADC for use with the load cell, however, the load cell I am using is already amplified so I don't think I can use that ADC.As Kleinstein mentioned, the decoupling on my PIC could be a lot better. I will try to put the caps right next to the pins. I must have blanked out when I was placing those parts because I'm pretty sure I knew thatI am not sure what's wrong with the decoupling of the ADC though. I have the datasheet for the evaluation board for the MCP3422, so I will look more closely at how they have laid out their solution.I completely forgot to put a cooling pad with some vias under the regulator (TPS7A4901). I also connected it incorrectly as well as PeterFW brought up, so not much about the regulator went right! I think I will rewire the regulator to only supply the ADC with power as well. And again as he noted, I will disconnect the +5V line to the USB on the computer.Another thought that occurred to me is to put some caps by the input buttons to help with debouncing. I didn't have any problems with the previous design though...I will work on the revisions over the week and post them when I am finished. I look forward to your thoughts. Thank you!