📜 ⬆️ ⬇️

Power Transducer Control Module: Design and Build

It's no secret that complex modern converters, for example, online UPS, are running DSP / MK or ASIC. The main suppliers of DSP for power electronics are two companies - Texas Instruments and Infineon, but today we will discuss STMicroelectronics products - the STM32F334 series. This line MK is designed to control the drive and build power converters: PFC, inverters, switching power supplies, UPS and others.

Of course, the F334 series cannot withstand the “power” of such popular solutions as the TMS320F28335 and others, but it has one important advantage — the cost. The older STM32F334R8T6 stone costs $ 5, has the required set of peripherals (HRPWM, ADC, comparators) and performance for building powerful enough converters (tens of kilowatts) with good reliability and fault tolerance.

For the developer of electronics, the ecosystem around the DSP / MK with which he works is important: documentation, debugging tools, code samples and hardware. TI has it all, yes — it's expensive, yes — it's hard to buy, but there are, and that's why, in most modern solutions in the field of electric drive and power engineering, there are TMS320. For some reason, ST company overlooked the F334 series, although there is good quality documentation as any STM32 is available, but there are no examples of hardware with a full code and debug boards (the F3348-Disco toy does not count). Well, we will correct this deficiency.
')
In my last article, I talked about my “developer kit” project and even demonstrated one of the components - the power module. Today I will talk about the 2nd (there will be 3 in total) module, which allows you to implement any converter topology and at the same time is several times cheaper than competitors. The project is of course open and all the sources can be viewed at the end of this article.



Idea


I am far from being the first to think about using a kind of universal module on the basis of which you can build different converters with different topology options. This approach allows you to have one board for all occasions and the main thing is to reduce the amount of code, because the module is the same, once set up and forgotten.

Let's now look at a couple of examples of how this idea has already been implemented by other people / companies. I will give just two examples:


And so, what I wanted to do in the end ... A module that can be used both as a debugging tool and as a component in a small series. From here are a number of requirements that I have got:


The result was this structural scheme:



It is worth noting immediately that I managed to significantly reduce the cost of the module. I ordered components on 5 boards, where the components went around ~ $ 70, that is, $ 14 / module. Here the truth is cunning - this is the cost of all the components, but without the PCB. Arithmetic is simple: ordering 5 boards in 4 layers costs $ 80-100, that is, another $ 14-20 for each module, don't you agree humanely? With the number of 100 pieces, the cost of the board is already $ 1.5 / piece, so in the foreseeable future I plan to order 100-200 boards (see how cheaper it will be) and those who want will have the opportunity to buy boards at times cheaper than $ 14. Those who need 20-30 boards or $ 100 do not bother you, they can already order them themselves, the benefit of the gerbera will also be prepared.

Development


There is nothing complicated and incomprehensible in the circuitry of the module, for a start I suggest you open a schematic diagram so that you understand what it is about and I will tell you how the structural diagram above has turned into a ready-made solution. Download the scheme here - PDF .


This circuit diagram eventually turned into a 4-layer PCB size 115x40 mm. In principle, you can dilute your version in 2 layers, but the dimensions will grow. It was important for me to get a width of no more than 40 mm, so that after installation in PBD connectors, the total height was 47-50 mm - in terms of electrolytic capacitors 35x50 mm. The board looks like this:



Unfortunately, when I ordered the boards, I indicated a green instead of a black mask - the main fiasco of this revision)) Whoever didn’t understand how the module is inserted, I suggest looking here:




In the first picture you can also notice a certain board with a bunch of connectors and especially without components. This is something like a “motherboard” for more convenient prototyping. The BH-10 connectors (IDC-10) distribute the same 5 control channels + to the terminal blocks the communication interfaces are output and the power connector is installed. All this allows not to collective farm a bunch of wires. "Motherboards" were ordered separately, so they will come later and after verification there will be available source codes.

Assembly


As for the previous module, the PCBs were ordered from PCBway , the guys were provided with free cards and another stencil. The latter made my life much easier and saved time, 5 boards with 200+ components each were assembled in 1 hour. 2 weeks after ordering, couriers brought me such beauty:




Yes, I did not change the mask on the order form, but apparently feeling this I was gilded with a pen covered with immersion gold so that I would not be sad. This is not critical for my task, but due to the excellent planarity of the contacts, the solder paste is applied evenly and the components do not lead to the sides, even if the thermal profile for the furnace is not very optimal.

The stencil was ordered with a frame made of aluminum, because I have a screen printer, and without a frame I can’t fix it there. If you don’t have a printer, order without a frame: you will be able to apply paste (you spend a few minutes longer) and still save money, because stencil without frame weighs about 400 grams, and with a frame of 1.8 kg. Because of this weight, you immediately get on delivery by courier, because mail does not carry more than 2 kg, only EMS and you will have to pay $ 30-40 more, so consider. The stencil itself looks like this:



Now you need to install the board in the printer and apply the paste. Here are a couple of tips. Firstly, if you take the paste for aliexpress, then only 500 g cans, it is of the best quality (apparently it is stored correctly). Second, store the pasta in the fridge. Third, after using the stencil, be sure to wash it off the paste, a regular sponge and a droplet of detergent (the best is best) work wonders, then dry the stencil and, after drying, wrap it in cling film if you do not use it for more than a week. Apply the paste to the board:



After applying we get the following blank:



At this stage, I will be safe: I will remove the paste for the LQFP-64 case under the STM32F334R8T6 microcontroller. The fact is that I could nakosyachit somewhere the power system and there is a chance that + 12V will fall on the MC and burn it, but I would not want to destroy the stones at $ 5. Therefore, I solder everything at this stage except the microcontroller, the connectors and the buzzer. I will install them already manually after checking the voltages of + 3.3V and + 5V. Now the most boring stage is to install the components, but I’m going to buy a pick place machine and I’m going to just get home, I will only drink coffee))



The components are installed and now send them to the oven:



Now it remains to check the voltage levels at the output of dc / dc and if everything is normal, then we solder the remaining components with a soldering iron / hair dryer, go to launder the board from the flux residues and obtain the following result:



We connect the programmer, for example, the Chinese whistle st-link, but I strongly advise you to purchase a firm st-link v.2-ISOL with a galvanic isolation. Everything is like admins with backups: “Some have already burned a laptop and started using insulators, others have not yet started using insulators” . If the price tag on the native st-link frightens you, then there is an option to purchase an insulator module on Ali along with a Chinese whistle, they are usually implemented on ADuM-ah. In order not to suffer with a pinout when connecting a debugger, I made a cord for connecting these particular modules, now it’s not possible to prevent the connection error exactly:



It remains to check whether the module is ready for operation, whether the MK is being read, in order to calmly begin writing the code. To do this, you can install the STM32CubeProgrammer utility. Open it, you should decide your debugger, if you saw its id in the upper right corner, then click Connect and if everything is mounted correctly, then you will see the microcontroller id, the core, the MK series itself (I have F334):



That's all! The module is ready for operation and development of various converters.

Sources




Conclusion


Now there are 2 modules for development, this is enough to build a converter. Of course there will be a third module, but you can live without HMI, and those who wish can purchase nextion in their own pocket. In the next article, it will be possible to assemble a full-fledged converter, to realize the P and PI regulators which we so diligently asked in the comments. For obvious results, the following articles will be on specific topologies: their analysis, calculations, prototyping, code, and most likely will begin with the buck and boost topologies, as the simplest and most common.

I would also like to thank the guys from PCBway who help with boards of any complexity of excellent quality. Thanks to them, the project is moving quite actively and in a couple of months I managed to do what was too lazy to implement the previous couple of years.



I hope the article was interesting to you, if you have some questions about the topology of the buck in advance, then you can voice them in comments or drugs, and I will try to answer them when writing the next article and thus make the material more useful.

Source: https://habr.com/ru/post/430908/


All Articles