Hardware noob here...
I have a 12V regulated power supply feeding an Arduino uno.
My sketch is just analogWrite(9,255) which puts 5V out of pin 9.
Pin 9 runs through a circuit with a 2n2222 to increase the voltage up to Vin. (http://imgur.com/xB0H67T is the circuit)
So, I have 11.7V coming into the breadboard I'm doing now. The point of my breadboard is to lower that 11.7V to 10V.
I send that 11.7 to the LM317, using this diagram; http://imgur.com/cDZIY9a
Should be Vout=1.25V(1+(R2/R1))
With R1=1K and R2=1K I would expect 1.25*(1+1)=2.5V but I actually get 2.84V. That could be my multimeter, something weird in the circuit, I dono, I don't think that's too bad.
Now, replacing R2 with a 6.8K resistor, I would expect 1.25*(1+6.8 )=9.75V. I actually get about 7V
Being the noob that I am, I just kept plugging bigger resistors in for R2 until I got to 100K. With a 100K for R2, I get Vout=9.5V
At that point I figured it was best to stop trying to blow things up, and just ask here.
Any advice? Thanks for reading!