Stumped by MAX4820 - Page 1
Forum section: electronics / projects

author: MatCat
author_rank: Frequent Contributor
timestamp: May 04, 2018, 11:24:27 pm
content: So I am using a MAX4820 to drive a bunch of relays, I am testing my circuit but for the life of me I cannot figure out why this MAX4820 is not working!Here is the Schematic:Here is clock in purple and data in yellow:Here is clock is yellow and CS is purple:DOUT does shift out the data I shift in, so clearly that part of this chip is working!But none of the OUT's actively sink, even if I short SET to ground directly none of the outputs start to sink, any ideas what could be going on? I tried 2 different chips to no avail.

author: wholder
author_rank: Regular Contributor
timestamp: May 04, 2018, 11:46:49 pm
content: You schematic indicates that you're using a 5 volt supply for Vcc, but the signal levels shown on the scope traces show 3.28 volts and it's odd that the clock level in the the first trace and the ~CS levels in the 2nd trace are not at the same levels as the data signal. This may not be a root cause, but can you explain that?Your schematic and signal timing look correct to me, but have you rechecked all your wiring to make sure everything is wired as per your schematic? And, have you verified that both ~SET and ~RESET are setting at HIGH levels?Wayne

author: iMo
author_rank: Super Contributor
timestamp: May 05, 2018, 12:08:47 am
content: Are your coils connected to 12V??Mind the max voltage is 5V for the coils too..

author: MatCat
author_rank: Frequent Contributor
timestamp: May 05, 2018, 12:16:03 am
content: I am driving the chip with an ESP32 that is why logic is 3.3, logic high should be 1.7v according to data sheet so that can't be the problem plus dout works, relays are double coil 5v rated, I can short the coils to ground manually on the 5v rail no problems, I have checked 10 times that the schematic matches thepcb but I will check again next time I go in lab.

author: MatCat
author_rank: Frequent Contributor
timestamp: May 05, 2018, 12:26:34 am
content: Quote from: wholder on May 04, 2018, 11:46:49 pmI noticed that, no I have no idea why, all 3 lines are literally in a row on the ESP32, so it's not like they are even on split ports (maybe internally no idea), and the traces are all identical in length with a pretty straight direct path with nothing around the traces

author: iMo
author_rank: Super Contributor
timestamp: May 05, 2018, 12:29:36 am
content: Are the coils wired to 5V rail?

author: MatCat
author_rank: Frequent Contributor
timestamp: May 05, 2018, 12:38:27 am
content: Yes like I said I can short the side of the relay coil tracing to out connect to ground and make it manually switch

author: MatCat
author_rank: Frequent Contributor
timestamp: May 05, 2018, 12:40:33 am
content: I will be back in the lab in about 15 min I will post pics of the layout and do more measuring

author: iMo
author_rank: Super Contributor
timestamp: May 05, 2018, 12:48:18 am
content: QuoteThat is not the answer to my question.The answer is:a) yes, all coils are wired to 5Vb) no, some or all coils are wired to 12V.When there is a coil wired to 12V, the chip can smoke, or latchup.

author: MatCat
author_rank: Frequent Contributor
timestamp: May 05, 2018, 01:17:22 am
content: ALL coils are 5V. There is no 12V going to any coils. In fact, through all of this testing 12V ISN'T EVEN being used, I am powering the board with 5V and bypassing the 5V regulation circuit for now since I am not actually trying to drive any load through the relays, just make them switch.I have checked and made sure that every single pin on that chip is connected as drawn in the schematic, nothing is shorted to anything else, I am completely stumped this makes absolutely no sense to me. I double checked and even made sure there was good ground return from all grounded pins, and there is, I tied all grounds to the pad which has a huge open connection to ground plane, I think the chip's logic is working and only based on the fact that DOUT WORKS! If I stick data in, I see it spit back out the other side.There are 2 5V latching coil relays attached to this chip, No resistors, just direct 5V in on one side, and other side to OUT pin (as this device is a sink device), MAYBE without a resistor on the coil it's asking for too much (over 70mA rated for each pin on max chip, I doubt it), the relay is EE2-5TNU, datasheet says coil has 178 ohm resistance, at 5V that is 28mA, so yeah I don't think it's over current. Only other thing attacked is a 74HC04, I have the inputs pulled up with 10k (It's just acting as an inverting buffer to drive external SSRs)

author: MatCat
author_rank: Frequent Contributor
timestamp: May 05, 2018, 01:34:44 am
content: Oh also I solved why you saw a discrepancy in the voltage difference between the data and clock, I will give you a hint, it's really pretty obvious, I figured it was the problem when I first saw it but just didn't double check, the scope probe needed to be matchedSimple turn of the VC and all is right.Ok now to the DOH for me, I looked in the data sheet and saw it specified 2ms settling time, DOH I was resetting the latch after 5uS! I put in a 10ms delay, and whambo, click clack click clack. Stupid me trying to drive it too fast.