Shop OBEX P1 Docs P2 Docs Learn Events
SMPS in more detail — Parallax Forums

SMPS in more detail

In the "FPGA Files" thread, there has been discussion of using the new pin capabilities to support Switched Mode Power Supplies. SMPS is something I have very little experience with, so could someone explain how you would use the P2 for SMPS? @Rayman also mentioned dealing with multiple voltages. Again, how would the P2 be used to help with this?

Comments

  • evanhevanh Posts: 15,126
    In Rayman's case, the extra +5, -5 and +15 supplies are only for the display and maybe also a peripheral, so can be powered up later and doesn't much matter if it's stopped during firmware reload for example.
  • evanhevanh Posts: 15,126
    A side effect is initialising the display would have to be delayed a little until regulation is stable.
  • cgraceycgracey Posts: 14,133
    The idea here is to have a smart pin drive the gate of a FET. The FET's source may go to ground, possibly through a low-Z shunt resistor for saturation current sensing, while its drain goes to V+ via an inductor. The drain/inductor node goes through a diode, then a cap to ground, for smoothing. That diode/cap junction can go through a resistor voltage divider for feedback to the smart pin. This way, current feedback can optimize the FET on time, while voltage feedback regulates the output voltage. Another smart pin could monitor the duty cycle of the FET gate to measure ultimate load current.
  • If I understand that correctly you need two pins. One smart pin is configured in SMPS mode. Its output is connected to the gate of the MOSFET. The second pin is configured in DAC comperator mode and is routed to the input of the SMPS pin via the pin number -3/+3 selection.

    For a simple timing based feedback loop no CPU time is required. WXPIN/WYPIN is only executed once and then everything runs automatically. The PWM runs with maximum duty cycle until a set threshold is reached at the feedback pin. Then duty cycvle is reduced according to the trigger point of the comperator.

    With the same two pins you could also implement a "true" digital control loop if you configure the feedback pin as ADC. But this would require CPU time, regularly polling the ADC and calculating PWM duty cycle with PID or similar formulas.
  • RaymanRayman Posts: 13,798
    Maybe the Prop could drive it's own 3.3V regulator...
    That'd be a neat trick...
    Start off with LDO on just a few pins and then fire up the regulator for the rest of them...
  • kwinnkwinn Posts: 8,697
    I would not be even the least bit tempted to have the Prop or any other Micro drive it's own regulator. No way I can see how the micro can boot up fast enough to let it send signals to the power supply before the voltage is high enough to go up in a cloud of smoke. Having it control other power supply voltages once the Prop is running however is OK.
  • cgraceycgracey Posts: 14,133
    ManAtWork wrote: »
    If I understand that correctly you need two pins. One smart pin is configured in SMPS mode. Its output is connected to the gate of the MOSFET. The second pin is configured in DAC comperator mode and is routed to the input of the SMPS pin via the pin number -3/+3 selection.

    For a simple timing based feedback loop no CPU time is required. WXPIN/WYPIN is only executed once and then everything runs automatically. The PWM runs with maximum duty cycle until a set threshold is reached at the feedback pin. Then duty cycvle is reduced according to the trigger point of the comperator.

    With the same two pins you could also implement a "true" digital control loop if you configure the feedback pin as ADC. But this would require CPU time, regularly polling the ADC and calculating PWM duty cycle with PID or similar formulas.

    Remember the 8-bit level detection. That can be used to regulate voltage or current in the feedback loop. Hands-free.
Sign In or Register to comment.