My project is a simple timestamp logger. I'm using a FRDM-KL25Z with a DS3231 I2C clock module, and 2 buttons with 22K pullups. I assume I have a Rev-D board since there is no provision on board for a 5v regulator and associated caps.
It works well when connected to my PC using the KL25Z-USB connector, but not when using the other supply options. I have tried regulated 5v on VIN and regulated 3.3 v on the 3.3v pin. The program does not work with either. Both behave the same as when I use the OpenSDA connector ( which I know does not allow the program to run). I have not tried attaching a coin cell yet.
How do I power the project with a battery?
Solved! Go to Solution.
I was barking up the wrong tree! It was a USB issue, not power.
The project is a pocket-size device that will log the time each time a button is pressed. At the end of the day it will bit connected via USB to my PC to upload the results.
I had the USBKeyboard declaration at the top of the code, so the USB initialisation occurred long before it was needed.
I moved it into the function that does the transfer with a 2 second delay after it and the project works as intended.
I was barking up the wrong tree! It was a USB issue, not power.
The project is a pocket-size device that will log the time each time a button is pressed. At the end of the day it will bit connected via USB to my PC to upload the results.
I had the USBKeyboard declaration at the top of the code, so the USB initialisation occurred long before it was needed.
I moved it into the function that does the transfer with a 2 second delay after it and the project works as intended.
Hi James,
the usual way is to connect your battery to V_IN. This is what I'm using (see 5V Generation from V_IN on the Freedom Board RevE | MCU on Eclipse ). However, if you need 5V on the 5V header, then you need to add a DC-DC converter (see that article) to generate 5V from V_IN, as this is otherwise generated from the USB connector (check the board schematics).
I assume that you have your DS3231 (or 3232?) powered by 3.3V, so you should be fine. But if you have other (off-board) peripherals, you need to generate that 5V from the battery somehow.
I hope this helps,
Erich
Unfortunately, no help. I do not need 5v, only 3.3v. The only reason I tried 5v was to see if it would work.
As I said before, connecting the proper voltage supply to the VIN and 3.3v pins does not work. I have tried with 2 boards with the same result.
Any clues on where to get a coin-cell holder for the board? All the ones I've seen do not have compatible pins.
Hi James,
I suggest you check the schematics as it could be that you have damaged the DC-DC converters somehow? Follow the path on the schematics and check if the parts have the proper voltage.
As for the con cell holder: Completing the FRDM-KL25Z Board | MCU on Eclipse
Erich
Curioser and curioser. Since the board works with the KL25Z-USB connection the DC-DC converter is working. Also, the 3.3v input bypasses the converter. I tried powering the board using a USB charger and the KL25Z-USB connection. No Luck! It appears that the USB library I'm using may be the problem. If it cannot initialise, it hangs. I think. I'm using the online mbed IDE.