This tutorial was extracted from Erich Styger blog http://mcuoneclipse.wordpress.com with his agreement.
About a year ago I started to use the FRDM-KL25Z board (RevD).
Finally, I had it in my hands: the RevE board
Using the RevD board, I faced several problems:
- 3.3V supply voltage drop because of low-cost diode D1
- Hard to use USB host mode, as no 5V supplied to the USB bus
- No 5V generated from V_IN
The good news: all of them have been improved in the FRDM-KL25Z RevE Schematics:
Board Frontside
The picture below shows the most important changes:
Board Power Supply
There are changes to the board with respect of power supply. The 3.3V power supply voltage drop has been fixed with better diodes with less voltage drop. Additionally the board has header J20 to bypass the voltage drop over D12:
Nearby J20 there is as well the unpopulated D7: before this diode was part of D1 on RevD. With this diode unpopulated, using the batter connector on the backside of the board requires this footprint populated (either with diode or 0-Ohm resistor).
5V Voltage Converter
As the RevD is not able to generate 5V to the Arduino header (pin 10 on J9), this makes it difficult to use it with any Arduino shield which needs to be supplied with 5V e.g. from the battery voltage. So far I have added a 5V regulator as the Pololu (seee ’5V Power for the Shield’ in this post). Another way is to solder a 5V (e.g. Pololu tiny S7V7F5) converter to the Ardunino shield as shown in this post):
Now the board has a 3 pin header (J22) on the board so such a converter (or a 3 pin ) can be soldered.
Additionally there is space for 3 10 uC capacitors (C26, C27, C28). Alternatively a 7805 in a TO-220 package can be used as low-cost alternative.
USB Host 5V Voltage
For USB host mode, the board needs to supply 5V to the bus. So far I had to use a wire (see this post). Now the board has a header J21 and resistor R82 option:
With J21 I can supply 5V to the bus, and with R82 I can pull down the USB ID pin.
The 5V are *not* protected against over-current. So I need to make sure I do not draw too much current.
Board Backside
The backside of the board has the RevE sticker. The pads for J6 and J8 are a bit smaller now to make it easier to solder a SWD 10pin debug connector. Additionally the wrong pin name writing has been fixed:
The new RevE fixes many limitations of the RevD board, and makes it easier to be used either in USB Host mode or with Arduino shields. Until then I’ll use my patched boards, but I’ll start using the new RevE boards in my courses as soon as I run out with the RevD boards.
Modify your FRDM-KL25Z revE to Generate 5V from V_IN
The Freescale Freedom boards like the FRDM-KL25ZFRDM-KL25Z feature an Arduino header so I can stack shields on it. Unfortunately, the Freedom board does not generate 5V if not connected to the USB cable. This makes it not possible to be used with many shields like the Adafruit Motor Shield: such shields expect that the Arduino board is providing 5V through the Arduino header (Pin 10 on J9 on the FRDM-KL25Z). So I had to do hardware changes to generate that 5V if I used my board disconnected from USB, e.g. running from batteries through V_IN (pin16 (P5-9V_IN) on the FRDM-KL25Z.
The good news is that the Rev.E of the Freedom FRDM-KL25Z board has now a header J22 to make things easier:
FRDM-KL25Z Schematic
This header can be populated to generate the needed 5V from V_IN:
The schematic/board provides footprints for several capacitors to counter LC voltage spikes. As I’m using low loads with short cables, I probably do not need them. Have a look at this Pololu article on this subject.
Pololu 5V Converter
Pololu sells a the “Pololu 5V Step-Up/Step-Down Voltage Regulator S7V7F5” 5V Buck Converter (Part number 2119) which generates 5V from an input voltage between 2.7V and 11.8V. This makes it ideal to generate the 5V from batteries.
The tiny 9×12 mm module has three normal 2.54 mm pins for VIN, GND and VOUT (5V):
Soldering the Headers to the Module
Pololu ships the module with two different headers (straight and right-angle male headers). I used the straight one:
Mounting on FRDM-KL25Z
Then the converter gets soldered on the FRDM-KL25Z:
I intentionally used the header in the above way (with the 3 pins going above the module: that way I have more test or connection points on the board. Of course otherwise it would make sense to cut the pins. Cutting the pins is advised if they could get in contact with components on a shield above the converter.
Summary
As the FRDM boards to not generate the needed 5V from V_IN as needed by many shields, I need to add a buck converter or similar power source to have 5V on the Arduino header. The FRDM-KL25Z RevE board makes it easier to add such a thing like a Pololu 5V Step-Up/Step-Down converter. That converter costs less than $5.