I just switched to powering my system with one 12V battery, stepped down through a buck converter (AP1509) to 5V. At the same time, I added CAN chips MCP2515 and MCP2551 to my circuit to run from this 5V. I am experiencing a very strange problem: the MCP2515 only works when it gets the 5V from USB on my laptop. It does not work getting 5V from the battery and regulator, though the regulator is putting out a solid (noise-free) 5V. This 5V is also being converted to 3.3V to run my MSP430, and this part works just fine. I have also used an external power supply breadboard to give the circuit 5V, and that does not work either. Only 5V from the USB.
I am sure that the issue lies in my setup of the 12 to 5V conversion. However, the possibility of the MCP2515 being the cause of the issue has definitely crossed my mind. I have already had issues with this chip, since the datasheet says it can run down to 2.8V and I was not able to get it to work at 3.3V as I had planned.
Anyone have any suggestions for possible causes? I appreciate any help I can get!
It pretty much has to be a noise problem, and these are the most vexing
kind of problem. I see your chips have proper power supply by-passing.
Sometimes it helps to have all circuit grounds come to one point.
Switching power supplies are notorious noise generators. Do you
still have the problem using USB power but with the switching regulators
running? As an experiment you might try moving the switching supply
several feet from the rest of the circuit, and bring the power in on a
shielded cable or twisted pair, with a bypass capacitor right at the circuit
board. Good luck!
When you say the MCP2515 doesn't work, what precisely do you mean? Behaving in unexpected ways (data errors, etc) suggests a different set of root causes than if the device does nothing at all.
You mentioned that the device only works when supplied via the USB port of your computer, but not with a different 5v supply; assuming that both were connected in precisely the same fashion to the same points on the board, and that your alternative 5v supply was functioning properly, this suggests that the the problem might not be with your buck regulator after all, since the problem manifested itself when it wasn't even being used. Take a careful look at what differences are present between your standalone 5v supply and the USB supply, and what the standalone 5v supply might have in common with your buck regulator. If you reposition the board to attach the different supplies, perhaps you've got a cracked solder joint or other bad connection somewhere. Also, take note of things like the grounding & shielding of devices that are connected to the circuit; it's not hard to introduce noise or create an unexpected connection through the AC mains ground if, for example, you forget that the ground clip on your average 'scope probe is connected to AC mains ground.
Verify the simple things (power, ground, & signal applied, meter leads plugged into meter, meter set on proper setting, that you're taking measurements using the other ends of the test leads that are plugged into your meter, etc...) before you move on to more sophisticated problem theories. Start at the inputs to your circuit, and check each node to verity that it's doing what it's supposed to, measuring directly on the devices' pins when possible. At some point, things usually change from OK to not OK, and the point at which that occurs is a good clue as to the source of the problem.
As a last resort, try replacing the part that seems to be making trouble. Very few devices are defective when they leave the factory, but they can be damaged by improper handling (esp. ESD), incorrect assembly processes, or mis-application.