Welcome back to the Digilent Blog!
When using a microcontroller or FPGA, or any electronic component for that matter, you will need access to a source of power. However, when you check out our numerous microcontroller and FPGA projects on our Learn site and Instructables, you’ll notice that most of them use our programming USB cable connected to our computer as a source of power. But what if we wanted to use our chipKIT project somewhere else besides next to the computer? Can we use any source of power? Let’s find out.
There are two main types of electrical power: alternating current (AC) and direct current (DC). Alternating current implies that the applied voltage alternates between the positive and negative polarity, causing current to flow in two different directions. For chipKIT system boards, along with the vast majority of electronics that are in existence, use direct current as a source of power since most circuits are designed to have current flow in one direction. Consequently, if the chipKIT boards are directly connected to an AC source of power, the microprocessor on the board will likely be damaged.
Luckily for us, finding sources of DC power isn’t too difficult. The USB port on your computer will output a reliable 5V signal which all chipKIT boards can easily readjust to their standard operating voltage with their 3.3V voltage regulator. As you probably know, or can suspect from the name, voltage regulators take a voltage input and regulates it to output a specific voltage. That being said, you cannot apply any voltage you want to a voltage regulator. The incoming voltage must be higher than the expected output voltage, usually by at least 2V to be on the safe side, for the regulator to work correctly. This “2V” is somewhat flexible though; a 5V signal from either the USB cable or the 5V regulator works just fine for the 3.3V regulator.
The 5V regulator on the chipKIT boards is generally what handles any external power supply that is not supplied through the USB port. There are two ways to supply power to this regulator, the barrel jack connector and the Vin pin on the shield header. For all chipKIT boards that have this regulator (this excludes the chipKIT PRO MX4 and the chipKIT PRO MX7), the recommended maximum voltage that can be applied is 15V. However, any voltage over 9V will cause the regulator to grow hot to the touch when it is drawing large amounts (about 600 mA) of current. This is an issue because if the regulator gets too hot, it will automatically shut itself down (along with the rest of the board) until it has cooled off enough. I found this out when attempted to run my project that was consuming about 500 mA of current at 12V. Although the 12V is well within the 15V maximum limit, the regulator became very hot to the touch and kept overheating and resetting my board after running for less than 30 seconds. Awkward.
So what can you do if your chipKIT project needs more than 500 mA of current? Or a better question, how do you know which power supply is rated for what? The easiest power supply to come by will be a “wall wart” of some kind. If we take a look at the “wart” portion of it, we can check out what the power supply is able to take in as an input and what voltage and current it is able to output. Each of the wall warts shown below are able to take an AC voltage, encompassing the the 120V at 60 Hz that we use here in the United States, and output a DC voltage that is at 15V or less (depending on which picture you are looking at). The output current rating for each of them is the maximum current rating, the power supplies themselves will only give as much current that the circuit requires. You can learn more about how wall warts rectify the AC voltage from one of our blog posts here.
You may have noticed that out of the four different power supplies I showed, only two of them had an output voltage below 9V, but both of those were also below the 7V I would need to make the 5V regulator work correctly. However, I still used the 5V regulator and had it work with my circuit just fine. This is because the board that I used, a chipKIT uC32, has a jumper block that will allow you to bypass the 5V regulator. I knew that this would be safe to do because the 3.3V regulator is able to handle a maximum input of 6V and it is normally supplied with power from the on board 5V regulator anyway, so 5V from a different, yet still reliable, source would also work just fine.
You are also able to run chipKIT boards off of battery packs. The boards are most easily run through the 5V regulator with 4 AA batteries for a total of 6V or a 9V battery with the positive terminal connected to the Vin pin and the ground pin connected to ground. This leaves us with the question of why 6V of batteries work just fine with the 5V regulator, but the 6V wall wart causes the 5V regulator to heat up, indicating that the regulator is having to work harder than normal. Although not directly stated anywhere, the answer can be found in the schematic of the uC32. On page two in the “second section” we are able to see our two inputs of interest, Vin and the barrel jack connector J4. Although both of them lead to the input of the 5V regulator, the voltage coming in through J4 has to pass through two resistors first, R10 and R8, before reaching the input of the 5V regulator causing the 6V input on J4 to drop to a lower voltage than the 6V input on Vin.
What is the takeaway from all of this? The takeaway is that chipKIT boards can be powered from a variety of sources, but there are limitations on how well each way works. You can power your chipKIT from a wall socket that is 15V or less but if your regulator is getting too hot, unplug the board and check your circuit to see if you have a short anywhere. If you don’t have short, check out the rating on your power supply; if it’s above 9V, you may need to get a power supply with a lower voltage rating that can still output enough current for your circuit.