Needing feedback and advice on refining a product for manufacturing - Page 1
Forum section: electronics / projects

author: OM222O
author_rank: Frequent Contributor
timestamp: December 29, 2018, 09:41:05 pm
content: Hello everyoneI have watched dave's videos about making a commercial product and how to design for manufacturing etc, but I still think I need some more feedback for the final design. I attach the schematics of the prototype and the PCB layout, the improvements that I'm considering and also asking about the user interface and whatnot. The project will be open source, so I will also provide the code as soon as it's a bit more polished.The product itself is a 4 channel 24 bit ADC (ADS1219) , a very stable and high accuracy voltage reference (ADR440BRZ) and an atmega328P-au.I have not used an external oscillator with the MCU in order to reduce noise from the digital section of the board and aimed to use the internal 8Mhz oscillator instead.I will also be completely turning off the MCU while taking readings (the data ready terminal of the ADC is attached to a pin with an interrupt vector to wake up the device) to further reduce noise.I will also be using a 9V battery with a low dropout regulator as well as turning off the unused parts of the micro controller in order to maximize the battery life.Here are pictures of the assembled prototype:digital section:analog section:and here's a picture of it measuring the 2.048V reference in single ended mode (the readings are much better with differential mode):as you can see when I got a good and stable connection, the readings are fairly stable and accurate. looking at the last few readings it's 2.04800 or 2.04799.I'll be improving the design with star grounding for analog section and better filtering, etc. to see if I can it stable all the way ti 1uV range but I think 10uV which is the current accuracy, is fairly respectable. The intended application is a 4 channel precision voltage meter (or 2 channel differential, or a mix of differential and single ended which can be done in software) as well as a low frequency (1Ksps is the limit of ADC) data acquisition system with same configurations as before.now here is where I need some feedback:1) I followed the datasheet layout guideline example for the ADS1219:I was planning on using small detachable PCBs which act as either a divide by 10 (3k and 27k), or a direct short in order to have a wide input range (0.512v , 2.048v, 5.12v, 20.48v) depending on which PCB is attached on the pin headers:PCBs with shorts:PCBs with divide by 10 resistors:If I use this method, it will basically put the 27k resistor, in series with the ones that I'm already using for input filtering to reduce noise, which will create more error due to 5nA input current of the ADC. I'm also worried that this will couple noise , etc. from one channel to another due to the capacitor that's between AIN0 & AIN1 and AIN2 & AIN3. should I create more specialized "daughter boards" for single ended vs differential, each with their own separate divide by 10 + input filtering? The value of the filter would be in a way that it's more than 500Hz (nyquist frequency of 1Ksps) but I'm not sure how much it will hurt the AC performance in data acquisition mode. Should I use mosfets to switch in / out the RC filters or something fancy like that? how about switching in just a capacitor for AC coupling?2) For the physical interface, what connectors should I include? BNC? Banana plugs? IC hooks(see picture below)? a mixture of them (e.g IC hooks + banana plugs (which is my own preference))? also which USB cable should I use? Mini B like the micro controllers? USB type C? micro USB?3) I'm planning on using some pads on the PCB for capacitive touch sensing instead of push buttons, would you prefer normal push buttons?4) I think I've included a large feature set such as wide input range, high accuracy, 4 customizable channels, a 128x64 oled for when it's not connected to a PC, long battery life, ability to add things like current sensing if you create your own "daughter board" with a shunt resistor on it, and more. is there anything you would like me to add? for example AC coupling as I mentioned before, or something I haven't even taught of yet?

author: jbb
author_rank: Super Contributor
timestamp: December 29, 2018, 10:27:43 pm
content: OK, here’s a hot take:- I suggest getting all SMT parts on one side of the board to make manufacture easier (and cheaper if outsourcing)- I understand you’re using a Mega328 to make it Arduino compatible. I suspect that the internal oscillator on that will be a bit bad for drift and board-to-board tolerance. I think you might wind up needing an 8MHz crystal- I thoroughly recommend some ESD protection for user inputs. The ADC might have enough built in... or not- if you want the best grounding, you could consider adding digital isolation between the ADC and microprocessor. This maintains ADC accuracy while breaking ground loops and keeping noise from the PC /laptop out of the precision stuff.

author: OM222O
author_rank: Frequent Contributor
timestamp: December 29, 2018, 10:53:28 pm
content: Thank you very muchYes I will be moving all of the components to one side for the final product and using the other side as the front panel, this was just the first prototypeThe frequency of the MCU does not matter in my case at all, the ADC has an internal 1.024MHz clock and it communicates via I2C.I considered using 5V zeners but I read somewhere they can introduce a significant error sometimes ... I tried looking for 5V VCBO NPN transistors to make the circuit which dave proposed in one of his recent videos, but I couldn't find any SMD versions, feel free to correct me on this one(Also the ADC includes them)I am aware of that, on my prototype I moved the digital section to the other side of the board in order to solve this issue easily: the only ground connection between the digital and analog is the plated through hole that's also connected to the computer / power source this way if I didn't use any GND vias which I didn't, the return paths were kept separate naturally.Also what do you think of having modular boards for the input? You also didn't mention the 2 1k resistors and 3 100nF capacitors that I use for filtering, do you think they can cause an error?

author: Kasper
author_rank: Frequent Contributor
timestamp: December 30, 2018, 06:59:04 am
content: This is a neat sounding project. I hope it goes well.For your extra PCBs to hold resistors, have you considered using thru hole resistors? If you put a female header(s) (that you may or may not populate) on your main board then you can plug in whatever thru hole resistors you want.Also you might want to increase the space between PCB edge and copper pours. I've been told 1mm or more space between copper and PCB edge is ideal, 0.5mm is acceptable.It is good that you are managing your ground paths, you should also be managing the power supply paths. Not sure if you are but it doesn't look like there are any fat power supply traces. The board is pretty small so probably not a huge concern but if you put effort into widening and isolating the ground paths you mind as well atleast widen the supply paths too.

author: OM222O
author_rank: Frequent Contributor
timestamp: December 30, 2018, 07:22:24 am
content: Hi kasperYes there will be female headers but it will be the standard 0.1 inch spacing, so it's a bit tough to place resistors (usually 0.4 inch if not connected vertically) people can certainly place their own value of resistors and tweak the code to match those valuesI have checked with my PCB manufacturer and the copper pour is not an issue even if it goes to the edge, also my board will be only 2 layers, so there won't be any shorting of internal layers per se, but thanks for reminding.For the VCC I used 30mil traces as this is quite a low power application (C1 and C5 are connected across it on the pictures) which narrows down to 10 mil by the time it reaches the ADC. it's also 30 mil for the MCU as well. I will try to widen them up a bit more for my final design, but it hasn't been an issue so far

author: ebastler
author_rank: Super Contributor
timestamp: December 30, 2018, 08:48:13 am
content: You have various questions around the user interface/physical interface. What do you expect people to do with your board? Is it mainly meant to be (permanently) integrated into custom-built devices, or is it meant for prototyping and temporary assemblies?A few thoughts on the "packaging"; some answers will depend on the use case question above:Personally, I'm not a fan of the "input daughter board" concept, for purely practical reasons: The currently unused daughter boards will quickly get lost... A shielded input jack makes sense, I think, if this is meant to provide precision voltage readings.Depending on your use case, you may want to consider a form factor and connectors which integrate nicely with popular µC platforms -- Arduino or Raspberry Pi? This would also imply providing the option for powering the board via those connectors, or alternatively via a dedicated (USB?) connector. In any case, don't forget mounting holes!How do users actually get to the digitized data -- connect to a USB serial interface and read whatever the µC spits out? Or do you expect users to write their own code for the µC -- and then have the µC use the data and provide output or control actions via which interface(s)?

author: jbb
author_rank: Super Contributor
timestamp: December 30, 2018, 08:55:08 am
content: Sorry, I wasn’t clear; I meant that you have to be careful about clock frequency for the serial / USB comms. Also it’s good to have a stable clock in case people need precise control of sampling frequency (very relevant if someone wants to sample 50 / 60 Hz signals).A couple of further thoughts:- it’s really good to try to reduce the number of different types of components, e.g. try to use the same resistor value for all pull-ups and capacitor values for decoupling- add ground pins for the channel input- if that ADC has multiple input channels I suggest you break them all out- capacitors in the signal path can be tricky. X5R, X7R caps change value with changing DC voltage and can act like micorpohones (vibration / shock creates voltage). So the ADC inputs should probably have C0G or NP0 capacitors.- think about how to panelists the PCBs; you won’t be doing one at a time. Our Gracious Host has done some videos on this- check your parts are RoHS compliant / compatible

author: OM222O
author_rank: Frequent Contributor
timestamp: December 30, 2018, 10:59:35 am
content: Quote from: ebastler on December 30, 2018, 08:48:13 amI think I should provide a little more details:There will be extra headers where the upto 4 other unused daughter boards can sit and be quickly swapped out to change the configuration, you won't be losing them unless you decide to have more than 4It will be a permanent test equipment, but people can thinker with it if they desire. I will be using the standard spacing , either with banana plugs or with the pin headers. I think I will include both banana plugs and IC hooks for completeness. You can purchase cheap banana plug to BNC connectros if you desire (I honestly can't think of any other relevant input connector).The project must be battery powered to reduce the supply noise as much as possible, so USB will only be used for programming purposes.There will be a small oled and some buttons as I mentioned before , so the user can select the channel configuration (i.e division factor, single ended vs differential, etc) and have a display of reading as well, but for better ease of use, I'm also creating a java program in processing to run on the computer to allow more user friendly interaction than a small oled and a few buttons. alternatively the user can write their own code or modify the existing one if they wish to add their own functionality.Quote from: jbb on December 30, 2018, 08:55:08 amI have tried to use the same value components as much as possible, thanks.I have also already included extra ground pins next to each channel and used all 4 output channels.The absolute value of the input capacitors isn't really a huge concern as they are meant for just filtering. but I'm aware of the noise issue ... I was considering using 2 tantalum back to back so it's non polar but I'll probably go with C0G as you mentioned.I will most likely be hand making them as I'm not expecting to sell more than a maximum of 200 units . I'll order stencils and solder paste and I can do each board in a few minutes so not a huge issue with your last two points, although I buy from mouser which is 99.9% of the time RoHS compatible

author: coppercone2
author_rank: Super Contributor
timestamp: December 30, 2018, 11:18:44 am
content: If I bought something like that it might be nice to have actual connectors on it. and a shield if its 24 bits.

author: OM222O
author_rank: Frequent Contributor
timestamp: December 30, 2018, 05:19:47 pm
content: Which connectors would you like to be included? as I mentioned, I will include banana plugs (which can be converted to BNC with a cheap adapter) and IC hooks which connect via 0.1inch headers.what kind of shield do you mean? physical shielding for EMI or development shields so you can expand on it with your own boards, etc?

author: coppercone2
author_rank: Super Contributor
timestamp: December 30, 2018, 06:02:53 pm
content: for 24 bits EMI.I noticed a huge difference with just copper shielding on a 16 bit system, built with isolation and all that stuff.not so much with the DUT (I tried shielded and unshielded cables) but much more so for the actual circuitry.

author: OM222O
author_rank: Frequent Contributor
timestamp: December 30, 2018, 06:09:47 pm
content: the top layer will be a solid ground plane (except for the places where there are connectors which will help with shielding. I might also add some metalic tape to the inside of the box if I see it makes a big difference.

author: coppercone2
author_rank: Super Contributor
timestamp: December 30, 2018, 06:51:52 pm
content: my circuit had a solid ground plane but on the bottom layer, the impedances of the filters and stuff were around 20k and the input impedance was high with a instrumentation amplifier (but leading wires out of the box did not seem to result in high noise, when comparing shielded and unshielded RTDs.iirc i had something like 14 bits usable without a shield that went to full 16 bits usable with a shield and much less spikes, resolving a 20Hz filtered signal. IIRC something like 0.002C usable fairly stable resolution with I want to say 300C span of 100 ohm rtd biased by like 300uA? i don't remember the details but I used oversampling and some DSP. i could do it better now because I resolved alot of uncertainties about the design over all that time and I can identified some mistakes with capacitor choice, circuit lay out, and I have better equipment to tune the design. still want some specific signal analyzers to get into the heart of whats going on behind the scenes though.IIRC it was a 16 bit system oversampled to 18+ bits and filtered after over sampling. You can get like 0.001 but it was kinda slow and I did not like how it behaved with the time constants of the measurement piece, It looked stupid without higher speed (i like when it moves around nice not jumping last digits), I like dynamic response, it also got some jumps once in a while which was where I was messing with different box-car filters etc to try to stop that behavior but it was getting really slow and I don't have the energy to deal with trying to make efficient sort algorithms for stuff like median/outlier rejects. We will see eventually. Past the 18 bit oversampling it was janky. I suspect there was RF and other issues. Did not have money at the time to pursue it and i got burned out working on the same thing with little reason.the whole circuit had a bunch of stuff and it was medium density and filled a 6x6 inch sheet.with a modern Delta-sigma ADC you should have a much easier time though. I was using a mid speed SAR.I do suspect though, that aside from the spikes, more then 3 bits of oversampling for resolutions sake is going to end up shitty. I don't think they are made that well.if you need code I used quite a bit off some arduino controlled beer fridge blog post that I found a while back. at least for more complicated stuff like trying FIR filters etc

author: OM222O
author_rank: Frequent Contributor
timestamp: December 30, 2018, 08:47:47 pm
content: Ah! that's your issue then! SAR ADCs usually have bad INL and noise response. If you read the datasheet the ADS1219 is a SigmaDelta ADC which automatically over samples at 1.024Mhz. as I showed in the pictures, I could read downto 10uV accurately (not just resolution) with +-1 LSD. I used a fairly basic RC filter with 100n X7R and 1K resistors (cutoff frequency of about 1.6KHz) I can improve that by using better capacitors to reduce noise, and maybe add an option to bypass the capacitors for better AC performance (unlikely tho ... I don't wanna add a lot of complexity for no good reason the data acquisition mode isn't that great with 1Ksps anyways!) but I think 5uV accuracy should still be possible with 1uV resolution. that is honestly more than enough for anyone who buys a device like this rather than a 400$+ lab equipment. that's not the market I'm aiming for either, so I'm pretty happy with how it performs so far.