STAR Firmware by JonnyC - Source Code and Explanation

I could be the only one who’s having trouble with your posts, but I’d really appreciate it if you put some more effort into making your posts easy to read. They seem to be very stream-of-consciousness or something.

I’ll try to reply to what you wrote, but what you wrote may not be what you meant.

IN ORDER:

  • You’re correct about not needing a PCB for the ATtiny13A - it’s just a lot easier that way. What you’re referring to is often called “dead bug” style wiring. As an example, here’s a picture of ImA4Wheelr doing it in post #176 of his HX-1175b thread.
  • Why do you say 4 resistors though? You need 2 for a voltage divider and… what? What are the other two resistors for?
  • Correct, you’ll generally use the VCC intended for the original MCU, regardless of whether you’re using dead-bug wiring or a child-PCB.
  • You will not cut the “gate” signal. That term has a specific meaning and the gate signal / trace does not need to be modified for any of this. Instead you would modify the trace for the PWM signal.
  • RE: the italicized stuff about voltage monitoring. Voltage monitoring will work fine as long as you choose appropriate resistor values.
  • For buck drivers you do not directly control the FET, the buck controller does that. The MCU simply feeds the buck controller a PWM signal. The buck controller establishes a duty cycle where it turns the FET off part of the time - the PWM signal from the MCU tells the buck controller how much additional time it should turn the FET off for.
  • Adding an additional, separately controlled [smaller] FET does not make sense with a buck controller. IMO it doesn’t make much sense for a DD driver either. Remember, the FET is not there to limit the current - it’s there to be controlled by the buck controller. A FET with more on-resistance will simply lower the efficiency of the buck circuit, not lower the output current!
  • Good news! :wink: There is plenty of AVR hardware out there which can do whatever your heart desires. The ATtiny25/45/85 all seem to have 6 PWM channels. They’ve also got other nice stuff, like additional flash space and a temp sensor IIRC. The ATtiny25 is available in the exact same package / form factor as the ATtiny13A-SSU we currently use. (The 45/85 are both very slightly larger.) We use 150mil or 8S1, the larger chips are 208mil or 8S2. Frankly I’m not entirely sure what the limit on actually using all those PWM channels simultaneously is. There are only 2 timers and our use case may [probably does] prevent them both from being used for PWM. If the Tiny25/45/85 can’t do 4x simultaneously in our application it I’m sure another AVR product can. For anything beyond the ATtiny25 you’ll be forced to switch to a QFN style package. EDIT: hmmm.

My advice is to make sure you’ve got both feet on the ground with your understanding of a buck driver. Read some stuff on the internet, look for simplified explanations. An animation of the various states used by a buck driver is probably useful. Once you understand how a buck driver operates you’ll see the mechanism for limiting current. This will make it clear why adding an additional FET in the way you described is not a good idea.

Don’t be discouraged, keep working on it!