I guess this is simple but I am stuck. I have a little NETMF system running that should control a little relay which is activating a classic car door lock actuator.
I agree with the back EMF, but from the relay, and I’d first make sure I put a diode across the relay coil
I suspect it’s a nuance of language, but can you explain this again?
If you mean when the relay is activated from your code, that it acts as a short circuit, then that’s not necessarily an EMF issue. Can you confirm how the actuator works with just a 12v power circuit? Do you need to apply power in one direction to lock, then the opposite to unlock it, for example? Or do you simply apply power for a time and it locks, then apply it again for the same time and it unlocks? And can you then show how you have the connections on the relay?
Hmm, EMF was not a part of my thinking. I have attached a drawing to make sure where I see my problem. Minimum circuit. In my real circuit I do the reversing of polarity with a DPDT relay and some more stuff. But the problem appears in this circuit as well.
When the actuator is activated using the relay, the Cobra shuts off or reboots, maybe there is a current draw spike which is big and takes all the power from the board? But I cannot get more power, and then the question becomes how do I limit the power it takes away from the whole circuit? Can I place a resistor somewhere?
What is the current requirements for the solenoid? Can you measure this with a meter in series on current setting connected across the battery if there is no data on it?
Is your supply a real battery or a power supply? A real battery will be able to handle the voltage surges of the coil.
Do you have a scope that you could use on the power supply at the cobra. Seems strange though as the Cobra is 3.3V so a drop to even 5V will not be an issue for the Cobra (and that would be a big drop for a small solenoid)
You say this happens when you energise the coil?
To be honest, a scope on the power line is your only way to test this. I had a similar issue the other day with a bench supply and an embedded PC. As the PC booted it would get so far and switch off. I never saw any spikes on the supplies current meters but a scope on the input to the board showed a drop to 3.9V and this was causing the shutdown. Using heavier supply cables sorted this but the scope was the only tool I had that would spot this. A valuable asset to any electronics workbench.
4A but is that just an instantaneous load, for a second or something? I’d suggest your battery is your problem; the only thing that makes sense to me in this situation is that the 4A draw causes a large voltage drop below what the VREGs on the Cobra can handle and still supply 3v3 (but this would have to be a REALLY huge drop). 4A draw isn’t usually a problem for a car battery, think about starter motor draw. The other potential way to check out whether it’s just the regulators on the Cobra that are not handling the voltage drop on the battery is to power a separate SMPS and have it feed the Cobra directly with 3v3 (I have a few jelly bean LM2596 modules from eBay for cheap that I use for that purpose). You might also get some benefit from a big capacitor across the input to the Cobra - but again these are all conjecture unless we know for certain the reason the reboot occurs… (edited LM2596 part number as I had type)
Oh just thought of another test. Switch the relay without the actuator attached to see if the reset still occurs (ie it’s the relay coil that might be the problem)
@ Brett - Tried putting a 1000uF 16V capacitor close to the actuator, and that seemed to solve the problem entirely, will re-assemble the setup again and see if I can get the Cobra and other peripherals to behave in a stable manner.