digital ground issue(?) - Page 1
Forum section: electronics / beginners

author: LabRat
author_rank: Contributor
timestamp: August 12, 2017, 09:13:23 pm
content: Hi Folks,I have been working on a microcontrolled SMPS for a while now. Have the power supply itself working well (100KHz 50W 6-8.4V -> 25v 2A) and the microcontroller (MKL05Z) firmware working well. Combining the two is causing me a headache. The two circuits share a PCB and the digital side has a low noise LDO 3.3v supply (LP2992ILD-3.3) and the whole system runs from a 2S lipo. micro boots fine but as soon as it activates the SMPS (1KHz PWM at anything from a 1-100% duty cycle) the micro hangs. I'm presuming this relates to a dip in the 3.3V supply but extra capacitance (470uF on the 3.3V rail for testing purposes) hasn't alleviated the problem. The PWM on the pin is preserved but the micro will not output any update via the serial port or react to other inputs (voltage divider for battery, accelerometer or NTC thermistors). Before adding the extra capacitance I was getting 2v on the 3.3v rail (2.3-4.3V) though this has come down to 960mV (lowest voltage recorded was 2.78v).I'm not sure where to go from here. Any thoughts are appreciated. Happy to upload PCB if this would be useful.Thanks in advance.

author: LabRat
author_rank: Contributor
timestamp: August 12, 2017, 09:37:36 pm
content: hope this helps.

author: LabRat
author_rank: Contributor
timestamp: August 12, 2017, 10:11:47 pm
content: thanks for the insight, I will tweak the design and see how that helps. my bypass caps are all on the underside at the moment so will see if I can get them adjacent to the pins. Is the 0.1u per vdd and 1uf per ic a general rule of thumb? will post again after board mods doneSent from my Z using Tapatalk

author: LabRat
author_rank: Contributor
timestamp: August 13, 2017, 09:24:10 pm
content: got down to some surgery with an exacto knife and some mod wire, not much improvement I'm afraid. Using 2 boards (one for the digital logic and one for the SMPS) worked better, I'm presuming it is the extra 5cm or so between the noise source and the micro, I was considering a 2 board design anyway to fit in the case better so this might be the best option. was also checking the voltage regulator datasheet again and 4.7u (which is what I have on the board) is the bare minimum for stable operation so will be boosting this as well. Have done a bit more research and think I have become a victim of "ground bounce".Thanks again for the help.

author: StillTrying
author_rank: Super Contributor
timestamp: August 13, 2017, 10:44:21 pm
content: To get a better view of the 90MHz ringing you'll have to use the very small spring clip on the scope probe.

author: LabRat
author_rank: Contributor
timestamp: August 15, 2017, 09:33:24 am
content: I keep forgetting about the little clip, I have made a note to self to put more test points (ie >0), on the next board spin too. Probably a question for a different thread but where are sensible places to put test points? I'm thinking analog ground, digital ground, voltage rails, important I/Os and maybe points on the half bridgeSent from my Z using Tapatalk

author: ptricks
author_rank: Frequent Contributor
timestamp: August 15, 2017, 11:55:55 am
content: What is the load on the MCU pins when the SMPS is turned on ?The only time I have seen the supply on an MCU drop is when the output pins were overloaded.The MCU supply voltage should never change when the MCU is controlling a circuit.A MCU noise issue usually just causes the MCU to lock up but the voltage on the supply still doesn't change.Connect the MCU to a lab power supply and disconnect the on board supply and see if it works.

author: StillTrying
author_rank: Super Contributor
timestamp: August 15, 2017, 12:45:14 pm
content: Quote from: LabRat on August 12, 2017, 09:13:23 pmAre you sure it's not the software locking up when it gets to deal with real world noisy inputs.Sprinkling some 50ms LED flashes in the code can help to find where it's going/sticking.Are all the micro's unused pins accounted for, with no inputs left floating.

author: LabRat
author_rank: Contributor
timestamp: August 15, 2017, 04:44:30 pm
content: Quote from: StillTrying on August 15, 2017, 12:45:14 pmthanks again for the thoughts. the unused inputs are not connected to the circuit but set as outputs with the pull ups enabled. there are outputs for the rgb indicator led (around 20mA at full output), 2 mosfets (one of which drives the PWM input of the smps driver) and the I2c bus. 2 thermistors and a voltage divider across the battery as inputs. I have definitely made a rod for my own back with the lack of easily accessible probing points. hey, if nothing else this has been a great learning experience and got me involved in the forum!Sent from my Z using Tapatalk

author: StillTrying
author_rank: Super Contributor
timestamp: August 15, 2017, 07:18:00 pm
content: So what are you going to try next.Could you force the PWM value to be 0%, - just as a check that the micro carries on running and communicating without the PWM spikes being present.Have you checked there's not a diabolical level of ringing at the FET's gate.

author: LabRat
author_rank: Contributor
timestamp: August 15, 2017, 09:15:02 pm
content: What's next will have to wait a few days. Other duties have taken over and I think I need to come back to it with a fresh head! The MCU initialises at 0% on the PWM line and I get serial out until this is adjusted. Will definitely look for ringing on FET gate. This was an issue with the power FET on the driver side earlier in the project. The PWM persists despite the rest of the system hanging so I should be able to check fairly easily.

author: LabRat
author_rank: Contributor
timestamp: August 22, 2017, 09:43:21 pm
content: Ah bugger! magic smoke (and fire) ! must have been a fair current given the part that failed was a 20mOhm sense resistor. I did at least manage to confirm there wasn't much ringing on the FET gate. The current PCB is proving a real dog to work with, the qfn and wson packages may be pretty but are a pain to probe. Think it is back to the drawing board.Sent from my Z using Tapatalk