I had a project that needed a 12V to 3.5V DC-to-DC converter and rather than building one from scratch I decided to just modify a 12V (automotive-cigarette-lighter type) phone charger. Most newer phones have standardized on 5V USB-type charging systems, but before this standardization it seemed that every phone manufacturer had their own unique plug and voltage combination. Because of this variability, these older charger were almost always built with a adjustable DC-to-DC converter chips (where the output voltage is set by the ratio of 2 resistors). Thrift stores are a good source for these older-style chargers and these chargers are easily modified to generate nearly any voltage that you need (within some limits as will be discussed later in this instructable).
Step 1: Take it Apart
I picked up this charger at a thrift store for 25 cents. Before disassembly I measured the output voltage at 5.5V. It was relatively easy to disassemble; there are no screws at all, just use a screwdriver to pry it apart at the seam and it will click apart. In my project, I was not planning to re-use the housing, so I was not ultra-careful about saving the housing or the cigarette-lighter components.
The key components to look at here are the controller chip U1 and the voltage-setting resistors R1 and R2. U1 is a PJ34063 chip and the data sheet can be found online (Google it). I measured R1 and R2 at 2.47k and 8.2k respectively.
Step 2: Review the Data Sheet
From the data sheet we find that we can modify the output voltage of the converter by using this formula
Vout = 1.25 * (1+ (R2/R1))
Set Vout to 3.5V we will modify R2
After a little math and we see that
R2 = R1 (Vout - 1.25) / 1.25
And plugging in the values for Vout and R1 we get the required value for R2
R2 = 2.47k (3.5 - 1.25) / 1.25 = 4.44k
I didn't have a 4.44k resistor but I found a 4.7K so let's see if that will work
Vout = 1.25 * (1+ (4.7k / 2.47k)) = 3.6V .. which is close enough :)