Could Someone Review my First PCB - Page 1
Forum section: electronics / beginners

author: ConnorM
author_rank: Contributor
timestamp: November 15, 2017, 05:21:02 am
content: Hi, I am looking for somebody to review my work on the schematic that I've attached. This is my first ever attempt at making a PCB/Schematic. This PCB is for a school project, I am in mechanical engineering and I don't know a whole lot about circuitry so I have tried my best.My end goal is to have a PCB with two Teensy 3.6's mounted to it. These Teensy 3.6's will take in filtered analog signals to their ADC's and store the data to an on board SD card at a rate of 10,000 samples/s.The sensors will be:Two ADXL377 accelerometers (X, Y, and Z, +/-200g) - One ADXL377 will output X, and Y, the other ADXL377 will output Z (for frequency response reasons), for a total ofthree acceleration inputsEight FlexiForce A502 piezoelectric sensors - Four will go to each Teensy 3.6If that was confusing, sorry. More simply, there will be a total of11 sensor inputs, 7 to one Teensy 3.6 and the other 4 to the other Teensy 3.6What I need this PCB to do:Take in the accelerometer inputs and filter the signals with the OP281's (Dual Op-Amp), I've designed a filter already and checked the response. Send the filtered analog signal to a Teensy 3.6 analog in pin.Send a square wave to theOp-Amp inputsof the MCP6004's (Quad Op-Amp), this is required to pass through the FlexiForce sensors in order to reduce the amount of current passing through them.Take in the force sensor inputs and send each signal through one of the Op-Amps at the MCP6004's (Quad Op-Amp). Send the analog signal to a Teensy 3.6 analog in pin.The board can be no more than 19cm x 7cm, I think that I will be tight for space...The board will be powered with a 3.7V battery, unsure of mAh yet. I have to add some connector for the battery, I am just not sure how to connect it yet.What things have I missed?What should I improve?What have I done wrong?Thanks for the help in advance.

author: Nitrousoxide
author_rank: Regular Contributor
timestamp: November 15, 2017, 03:56:37 pm
content: Just a few pointers at a first glance:Power Supply:Be careful with batteries, as you may have to include your own charge controller and protection circuitry.-I don't see any decoupling capacitors for the IC's.(Im blind, but this still applies) Make sure to use hierarchical decoupling, i.e. larger capacitance at the source and smaller capacitance closer to IC's.- Make sure that all your components operate over the same Vcc/Vee range. (Simple questions, but you can get shafted if you don't check for these things)- Do you have a dual supply for the active filters? If not you may have to use a single supply op-amp or place it in a single rail configuration.- It looks like you're powering the op-amps (and accelerometers?) from the Teensys'. I'd advise to check the amount of current you can sink and to not exceed it.Other Thoughts:Have you considered using digital accelerometers? (I'm sure they exist) It would totally remove the need for any analog filtering.Must you use two separate 'Teensy's'? Are you storing onto a single SD card or one card per microcontroller? If its one SD car per the two microcontrollers, how are you going to avoid bus contention? I can guarantee laying out a single micro would be less of a headache than having to deal with that and any other issues that may pop up.P.S. You only posted a schematic.

author: pix3l
author_rank: Regular Contributor
timestamp: November 15, 2017, 04:14:35 pm
content: First suggestion would be to look into polarized / non-polarized capacitors ;-) Probably your 1000pF (1nF) capacitors should be non-polarized!Why did you use C1A / C1B etc? This kind of annotations are usually used for arrays (multiple caps built in to one package).

author: Twoflower
author_rank: Frequent Contributor
timestamp: November 15, 2017, 05:20:31 pm
content: Wow, for a MechIng that doesn't look to bad at all. Still a nice cleanup of the schematics would help reading it ;-)From an pure optical scan (not looked up the specs of the devices): I think the +INB pins are not connected (the circle is missing).The text close to the input of the 4xOpAmp looks strange. Isn't that the DAC/or PWM output that has 3.3V and you want to feed the OpAmp with 1.2V. If so Why? Shouldn't be the output of the OpAmp have this divider? (Note: I haven't checked the schematics here if the general functionality is given)Your resistors seem to be rather high value ones. This might help to reduce the power consumption but it could increase the noise.Depending on the noise present on the supply voltages (thinking of motor drivers, digital noise from the CPU, RF-Stages, ...) you might consider a well done filter for the analogue part. And be careful, ferrite-beads + decoupling Cs can cause some oscillations. So probably it would be nice to have a place for a beat and populate a 0-Ohm resistor in (look for similar sizes). Eventually separate VSS for digit and analogue.

author: ConnorM
author_rank: Contributor
timestamp: November 15, 2017, 10:02:28 pm
content: Thanks for the feedback!NitrousOxide"Just a few pointers at a first glance:Power Supply: Be careful with batteries, as you may have to include your own charge controller and protection circuitry.- I don't see any decoupling capacitors for the IC's. (Im blind, but this still applies) Make sure to use hierarchical decoupling, i.e. larger capacitance at the source and smaller capacitance closer to IC's.- Make sure that all your components operate over the same Vcc/Vee range. (Simple questions, but you can get shafted if you don't check for these things)- Do you have a dual supply for the active filters? If not you may have to use a single supply op-amp or place it in a single rail configuration.- It looks like you're powering the op-amps (and accelerometers?) from the Teensys'. I'd advise to check the amount of current you can sink and to not exceed it.Other Thoughts:Have you considered using digital accelerometers? (I'm sure they exist) It would totally remove the need for any analog filtering.Must you use two separate 'Teensy's'? Are you storing onto a single SD card or one card per microcontroller? If its one SD car per the two microcontrollers, how are you going to avoid bus contention? I can guarantee laying out a single micro would be less of a headache than having to deal with that and any other issues that may pop up.P.S. You only posted a schematic."The active filters will be single supply. How do I used them in single rail configuration?I will change how I am powering everything. I will try to power everything through the battery rather than through the battery-->teensy-->thing being powered.Digital will not work as I cant find any that would supply 10,000 samples/s. And I have a limited budget to work with so I cant buy very expensive digital accelerometers.Both Teensy 3.6's will be storing data to on board SD cards, this is needed due to the high sample rate @ 12bit and the Teensy 3.6 on board ram limit (256kB).pix3l"First suggestion would be to look into polarized / non-polarized capacitors ;-) Probably your 1000pF (1nF) capacitors should be non-polarized!Why did you use C1A / C1B etc? This kind of annotations are usually used for arrays (multiple caps built in to one package)."Whats the benefit of polarized/non-polarized? I don't know the difference.That was just me being lazy sorry!TwoFlower"Wow, for a MechIng that doesn't look to bad at all. Still a nice cleanup of the schematics would help reading it ;-)From an pure optical scan (not looked up the specs of the devices): I think the +INB pins are not connected (the circle is missing).The text close to the input of the 4xOpAmp looks strange. Isn't that the DAC/or PWM output that has 3.3V and you want to feed the OpAmp with 1.2V. If so Why? Shouldn't be the output of the OpAmp have this divider? (Note: I haven't checked the schematics here if the general functionality is given)Your resistors seem to be rather high value ones. This might help to reduce the power consumption but it could increase the noise.Depending on the noise present on the supply voltages (thinking of motor drivers, digital noise from the CPU, RF-Stages, ...) you might consider a well done filter for the analogue part. And be careful, ferrite-beads + decoupling Cs can cause some oscillations. So probably it would be nice to have a place for a beat and populate a 0-Ohm resistor in (look for similar sizes). Eventually separate VSS for digit and analogue."I wanted to feed it 1.2V because the Teensy ADC has a stable 1.2V reference voltage that I wanted to match. Maybe I did this wrong!(Yup you are correct. I will fix this)What would be a "well done filter"?

author: Nitrousoxide
author_rank: Regular Contributor
timestamp: November 16, 2017, 01:34:38 am
content: Quote from: ConnorM on November 15, 2017, 10:02:28 pmI'd recommend finding a single supply quad op amp (Very easy to do, and highly recommended). Alternatively, you can add a voltage divider on the non-inverting node of the op amp which will effectively "shift" the comparison point to 1/2Vcc, thus the waveform should then have a range between Vcc and 0v (Op-amp must then be rail-to-rail if you want good performance). However, as you may be able to tell the downside of doing this is that a DC offset will be present on the output and as such you will have to include an extra high pass filter on the output stage. And if you're powering the device via battery, the voltage divider will add a constant current draw regardless of the on/off state which may shorten the lifespan. (product battery life wasn't mentioned)As per always, good app note:https://www.ti.com/lit/an/sloa030a/sloa030a.pdfAnd an example of a single supply part:http://www.ti.com/product/OPA830You're correct in assuming a processing bottleneck, as it stands the data rate would be 5*12*10000 = 600kbps = 75kB/s, which would only give you a few seconds of record time (which may be enough time to just dump the data and refresh the buffer, but then you must consider buffer type and the consequence of missing samples).Alternatively, you could lay out an MSP432 (sorry, I can't help but being a TI fanboy) with external flash to increase your buffer size.I can also give a crack and answer your other questions (other people correct me if im wrong):Quote from: ConnorM on November 15, 2017, 10:02:28 pmEssentially it comes down to the physical construction and chemistry type of the capacitor, there are plenty of resources on how they're made.A more 'practical' response is that polarised capacitors have a polarity and should be treated similarly to active components. The positive side and negative side should never be connected in reverse as this will damage the capacitor (possibly less in small signal implementations).You'll usually find polarised capacitors in the mF to uF range, and as such are usually good for some large decoupling values or for power supply purposes.You would not use polarised capacitors in filters, but typically ceramic (nF to pF) or poly film (uF to nF) depending on the capacitance range.Because I'm paranoid, for decoupling I'd personally use a 4.7uF and 100nF capacitor in parallel placed near the component and a larger capacitance close to the supply output (or as per the power supply datasheet to not cause instability). Usually, you want the capacitance near the power supply to be the sum of decoupling capacitances.Quote from: ConnorM on November 15, 2017, 10:02:28 pmAs per Twoflower suggests, use lower values of resistance as ~2Mohm is quite a large resistance and any stray noise will be amplified. Also, if you have large resistances be careful of the op amp input bias/offset currents as it may create an output voltage offset.I would make sure the resistances are sane values (between 100's and 100k). If performance is critical and these restrictions prevent the filter from being within specification, you could just cascade more filters.Additionally:Do you know what the term 'ground bounce' is? How much information have you been given in terms of grounding procedures, techniques and layout?

author: ConnorM
author_rank: Contributor
timestamp: November 16, 2017, 03:10:59 am
content: Thank you, I will redo the filter and post back with one that has more sane resistance values and single power supply op-amps.I don’t know very much about grounding practice, what is ground bounce?

author: Nitrousoxide
author_rank: Regular Contributor
timestamp: November 16, 2017, 03:47:03 am
content: Ground Bounce:So, to be short: Ground isn't ground, well it's not constant.In schematics and simulations, you assume that the ground net is at a single potential. However, this is not the case in real life as all traces and planes have impedances between two points. Now we know that if a current passes through an impedance, a voltage is formed (ohms law, V=I*R).This voltage difference can occur between two points, for example, if a node is shared with a high current return and small signal amplifier the induced voltage difference from the high current load may shift the "ground" level at the op-amp, superimposing noise onto the output.To avoid this, make sure you have well-defined ground return paths andno shared impedances.And as suggested before, another method to remove oscillations and 'bounce' is to add some series resistance with the power supply, as this bounce phenomenon is formed from capacitance and inductance forming a resonant circuit and the series resistance dampens the oscillation.Now I know you don't have any relatively "large" current sinks/sources, but it is still good practice.I can do a small (MS paint) example: The current flowing from the large current source will shift the ground at the op amp, possibly causing oscillations.Grounding methods:Correct grounding schema is an art, I'll summarise some of following points:- Make sure high current loads have a well-defined return path (low impedance).- Decide whether the use of ground planes are appropriate.- Via stitch ground planes.- Ensure grounding impedances are low.Not grounding, but still useful:- Minimise dI/dt and dV/dt as much as possible- Minimise any loops (signal, ground).- Run opposing layer traces at 90 degrees.

author: pix3l
author_rank: Regular Contributor
timestamp: November 16, 2017, 11:33:00 am
content: Well there are different types of capacitors. Tantalum- and electrolitic capacitors are sensitive to their placement (polarized): if you apply a voltage to the negative terminal they will likely blow up and / or malfunction. The schematic symbol that you have used, is used for polarized capacitors (the symbol for non-polarized has two straight lines).I usually try to use ceramic capacitors (since they are non-polarized) when the capacitance is under 10uF (ie 10,000nF or 10,000,000 pF).

author: Twoflower
author_rank: Frequent Contributor
timestamp: November 16, 2017, 04:23:26 pm
content: Depending on the environment and requirements a well done power supply filter may look different. For very simple and forgiving circuits a single cap at the power source might be sufficient (e.g. most beginner breadboard circuits for example). Or it can go up to have separated voltage regulators for individual circuits (e.g. analogue and digital like in measurement equipment).It pretty much depends how much noise will be introduced into the supply voltages and how sensitive other parts of the circuits are.If your circuit has only these small processors and no actuators (motors, relais, ...) then you might probably fine if you use Nitrousoxide noted (central point ground).In doubt you can try to split the VCC on the board design like the VSS and add a L-C combination for the digital and the analogue part of the circuit. One ferrite bead plus multiple caps. But as I said: The ferrite bead could come with a bad side effect. So Just add a 0-Ohm resistor (check the max current of the parts) there and in case you need additional filtering for the analogue part, you have the possibility to check if it will help. It also might offers a place to completely split the supplies for debugging without cutting traces. As it has virtually no drawbacks beside the 0-Ohm jumpers I think it's worth. Unless you're extremely space limited.---|LDO|------*----|FB1|---*---->to analogue circuit| | |---- * | = C1/ \ | || | | VSSAVSSA VSSD |-----|FB2|---*--->to digital circuit|= C2|VSSDASCII-CADPlease note that the schematic is simplified. You still need the caps for the LDO and C1 and C2 can be be multiple Cs. For each IC at least one should be as close as possible to the supply pins. And a bigger C for filtering each branch wouldn't hurt. But again: If this is necessary depends on the sensitivity of the circuit.One thing that also came into my mind: For future designs you might consider using more symbol-like part drawings, not the 'package' style. For example: Use the normal OpAmp symbol for the schematics. It make the understanding of your intention much easier.

author: phil from seattle
author_rank: Super Contributor
timestamp: November 17, 2017, 02:45:20 am
content: Have you done an electronic rules check - ERC? (in Eagle, it's the ERC tool) This will catch a number of mistakes including unconnected wires and give you a better change of getting a usable board back. When you get to layout, use design rules check - DRC to catch layout problems.

author: ConnorM
author_rank: Contributor
timestamp: December 09, 2017, 03:36:24 am
content: Hi all,I have finally got around to updating and changing my design.I have posted a new thread,https://www.eevblog.com/forum/beginners/could-someone-review-my-pcb/,if you would like to come by and help out again.Thanks