I have not done any circuit design in 40 years, and that was freshman circuits (from Smith) and a senior MCU project (w/ 6800), but I have done a lot of embedded s/w study and development. I got into AVR MCUs about 9 months ago, and looking for smal projects to get my hands dirty.
Just for fun I wanted to see if I could design and prototype a 12v pulse for potential use in UPDI protocol. The objective is learning correct electrical and software design. Optimal end-cost of the implementation is not my objective, but comments appreciated on that in any case.
The components are AVR 5v MCU (e.g., mega328 or mega32U4), and the usual capacitors, resistors, etc. My approach is to use a charge pump. In three cycles I intend the following:
1) charge C1 from MCU
2) charge C2 from MCU
3) charge C3 from C1, C2 and MCU +5v in series
1) The output should provide 11v-12v for a period of 100 ms.
2) There is no limit on time to charge C3, before 12v source becomes available.
3) The max output current draw is guessed to be 2 mA. T
4) Since the MCU can provide ~ 40 mA to the pin I use 1 k resisters to limit current to 5 mA.
5) With 0.1 uF caps, the time constant is (1000 ohm)*(0.1e-6 F) = 0.1 msec, clock at 8-ish kHz
In the table, +5v means pin is output-high, gnd means pin is output-low, inp means input-low.
Note: On at least the mega328 the transition from output-high to input-low requires two separate instructions.
Is this sufficiently safe to hook up and go for a run to measure the output voltage?
In the diagram C1 is the lower 0.1 uF cap, C2 is the upper 0.1 uF cap and C3 is the right hand side cap.