Announcement

Collapse
No announcement yet.

Need a power supply design for STM32 based PI detector

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need a power supply design for STM32 based PI detector

    I'm trying to build a digital PI detector from scratch learning from the Arduino Nano book, but instead of using an Arduino Nano, I want to use an STM32 development board (input 5v or 3.3v). I will use the same transmitter and preamp as the Arduino Nano project and I want to do all the rest by code.

    Is there anyone that can help me designing a power supply for it?

    Thanks.

  • #2
    I will suggest you think about implementing a switch mode supply using the stm32 as the controller. All you need is a fet switch an inductor and Schottky diode, resistive feedback and filter
    cap. Use a spare ADC input as feedback sense and a digital io line to switch the fet using pwm. You then have full control of the power supply and sensing of voltage/ current as you like. You can also make it synchronous and shut off switching during receive times. Once you've done that you can also implement a smart battery charger. So many possibilities ...

    Note : some of the STM32 packages come with a SMPS controller built in ... check data sheets.

    Comment


    • #3
      It it is a little dangerous to use ADC and DAC of the MCU in feedback circuit for controlling of output voltage of the switch mode power supply. After power-on, the MCU starts reset routine for some time and for this time, the output voltage of the SMPS is not defined with all possible consequences.

      Comment


      • #4
        You can design a SMPS using a micro, but why? There are cheap chips that already do this for you, and they have safety mechanisms like over-voltage and thermal protections.
        The easiest solution is to just use a linear regulator from +12V down to 3V or 5V. This wastes power but in the broader scheme it's not a lot. A switching buck regulator adds more efficiency, there are lots of these with data sheets that show you how to hook them up. Keep in mind that most SMPS chips are SMT, maybe another reason to use a linear reg.

        Comment


        • #5
          Here is my reasoning for a MCU controlled supply.

          1. You learn more.
          2. You have more control of voltage, the timing, sync off time during RX, the modes, current limiting ... and you can read out the values.
          3. Very simple changes make it a battery charger also.
          4. Prob need to generate more than 1 voltage ( eg neg for TX / analog frontend and pos for logic )
          5. Under reset conditions the ports are in known states not random states so the supply cant go wild.
          6. No chip dependancy ... as the supply does not use any specific SMPS chip.
          7. The simplest supply is driven off the TX pulse from the MCU and is actually simpler than a SMPS / Linear chip. ( and its synchronous ).
          8. 99% if not 100% of configurable power supplies ( eg solar inverters ) are MCU controlled ...

          Comment


          • #6
            Hi moodz,

            1. I not stop to learn every day.
            2. What is the real benefit of these possibilities to have so flexible settings of so much variables?
            3. Battery chargers in now days have many controls - not to charge if the start voltage is too low, not to charge in reverse connection of the accu, automatic control of charge current depend of the temperature of the accu, very exact control of finish charge voltage
            4. Need to control more than one voltage only make the situation more complicate
            5. Usually the output of the MCU ports are configurate as inputs during the reset and if they are configurate as outputs -they have only two states - log 0 or log 1
            6. Serious DC to DC control IC with high efficiency use internal additional voltage drivers for upper FET and this will need more complex hardware added to the output signals of the MCU
            7. This is not clear for me
            8. The requirements for solar battery charge circuits are not the same as for the simple DC-DC converters. They use sophisticate control for max efficiency in very different input power in the different hour of the day

            Comment


            • #7
              Originally posted by Detectorist#1 View Post
              Hi moodz,

              1. I not stop to learn every day.
              2. What is the real benefit of these possibilities to have so flexible settings of so much variables?
              3. Battery chargers in now days have many controls - not to charge if the start voltage is too low, not to charge in reverse connection of the accu, automatic control of charge current depend of the temperature of the accu, very exact control of finish charge voltage
              4. Need to control more than one voltage only make the situation more complicate
              5. Usually the output of the MCU ports are configurate as inputs during the reset and if they are configurate as outputs -they have only two states - log 0 or log 1
              6. Serious DC to DC control IC with high efficiency use internal additional voltage drivers for upper FET and this will need more complex hardware added to the output signals of the MCU
              7. This is not clear for me
              8. The requirements for solar battery charge circuits are not the same as for the simple DC-DC converters. They use sophisticate control for max efficiency in very different input power in the different hour of the day
              Clearly you only see problems where I see opportunities.

              Comment


              • #8
                Hi moodz,
                Don't be angry to me. All we want to add new ideas in this exciting hobby. But now, most of SMPS IC are deeply specialized with many useful functions - Under Voltage Blocking, Short Circuit Protection, Over Load Protection, Over Temperature Protection, Soft Start Function. All these features, if you want to be achieved by firmware in the MCU will need so many additional sensors and hardware and the final solution will be not simpler and cheaper. This is my opinion - tell me if I'm not right, please.

                Comment


                • #9
                  Originally posted by Detectorist#1 View Post
                  Hi moodz,
                  Don't be angry to me. All we want to add new ideas in this exciting hobby. But now, most of SMPS IC are deeply specialized with many useful functions - Under Voltage Blocking, Short Circuit Protection, Over Load Protection, Over Temperature Protection, Soft Start Function. All these features, if you want to be achieved by firmware in the MCU will need so many additional sensors and hardware and the final solution will be not simpler and cheaper. This is my opinion - tell me if I'm not right, please.
                  I am not angry ... the OP christiano is a software coder ... thought he might be interested in a more software approach.

                  BTW

                  here is my item 7 power supply PI so can use N type fet and grounded coil. Does not necessarily use MCU but is simple. I have made up different versions running from 6 volt gel battery ( but others work too ).

                  These parts chosen for sim. Real circuits use "real" parts. Adjust C1 size bigger for slower pulse rates.

                  Click image for larger version  Name:	image.png Views:	0 Size:	57.9 KB ID:	435516

                  Comment


                  • #10
                    Yes, this idea is interesting!

                    Comment


                    • #11
                      Thanks everyone for the ideas, although, for now, I will make a power supply based on the Pulse-5 Design from the ITMD book.

                      Comment


                      • #12

                        I have built this power supply (from ITMD page 453), although I have a doubt about the charge pump synchronization. The synchronization pulse must be the same as the TX pulse (same width) ? Thanks.​

                        Comment


                        • #13
                          Ideally you want the duty cycle to be 50%, but practically it can tolerate a fairly wide range.

                          Comment


                          • #14
                            Thanks! It's working:


                            Comment

                            Working...