Profi-Max Laboratory
Handmade Wonders
How to flash new firmware to DPS device
The easiest and cheapest way is to use a Chinese programmer sold on aliexpress ($3). Any ST-Link device or ST-Link clone can be used.
Then you have to download from st.com and install STM32CubeProgrammer. This is a free program from the chip manufacturer, no registration is required. The download link will be sent to your mail after request.


When you connect programmer first time, it is recommended to upgrade firmware of programmer itself. Open STM32CubeProgrammer application and choose Firmware update, then click Open in update mode and if newer firmware is available, choose Upgrade.

ST-Link to DPS connection
You should connect 3 pins between ST-Link and DPS device.
- SWDIO
- SWCLK
- GND
Also you should connect power supply (IN+ and IN-) to DPS as usual.
For DPS5005 take out PCB from plastic cover.






Open STM32CubeProgrammer application and click Connect. If the connection is successful, you will see the target information in the lower right corner.
Select Option Bytes (OB) in the left pane then Read Out Protection. If RDP is highlighted, deselect it and click Apply.
At the left panel select Erasing & Programming. Then Browse for FWxxxx_Vxx.bin file you wish to download and click Start Programming. In some cases you should do Full chip erase before programming. If everything is ok you will see new logo on device screen.

How to save the stock Chinese firmware
If you are afraid of new firmware and want to be able to restore Chinese firmware. Before programming must be replaced with new two chips: microcontroller and memory (marked as U7). Since the memory stores calibration data.
- microcontroller STM32F100C8T6
- memory I2C eeprom 256×8 (2KBit) sot23-5
For instance 24AA02E48T-I/OT Pdf document

Alternative firmware files
Don’t hesitate to ask for help if you face any trouble re-creating my projects. I will gladly help 🙂 admin@profimaxblog.ru
NOTE: After changing the firmware you should do the calibration.
Video – How to calibrate in Russian
NOTE: If you are using the Bluetooth module, before updating firmware check if baudrate is set to 9600 in the DPS “Communication” menu.
Old version archive
A WARNING ABOUT CHARGING BATTERIES
Connecting any rechargeable batteries directly to the output of the unit can crash the DPS device !!!
- In case of polarity reversal – 100% failure of any DPS model.
- When the output voltage of the power supply is turned off, the voltage from the battery will flow back to the power supply. This could damage it.
- These features are associated with the circuitry of the power supplies and do not depend on the firmware.
- To avoid the above charging problems, use an additional diode as shown in the figure below. Consider the amperage and voltage drop across the diode when charging.
- If you find it difficult to understand the above problems, do not charge the batteries using DPS power supplies, use specialized chargers instead.

- This topic has 32 replies, 8 voices, and was last updated 3 months, 3 weeks ago by
marburger.
-
AuthorPosts
-
-
19.12.2022 at 15:46 #3577
profi-max
KeymasterDPS3003 DPS3005 DPS3012 DPS5005 DPS5015 DPS5020 DPS8005
Новая прошивка версии 4.3
1)Расширенная защита.
2) Индикация автосохранения.
3) Скорость связи увеличена до 115200 бит/сек
4) Улучшена отзывчивость на запросы Modbus
5) Внесены дополнения в протокол
Подробности тут:-
This topic was modified 9 months, 2 weeks ago by
profi-max.
-
This topic was modified 9 months, 2 weeks ago by
-
23.12.2022 at 14:11 #3783
Jallaa
ParticipantА можно сделать прошивку под дисплей 3,5 дюйма, и распаять все кнопки и дисплей, прибор отличный, но мелкий экран и близко все кнопки.
-
23.12.2022 at 16:46 #3784
profi-max
Keymaster>А можно сделать прошивку под дисплей 3,5 дюйма, и распаять все кнопки и дисплей, прибор отличный, но мелкий экран и близко все кнопки.
В ближайшее время таких планов нет. И свободного времени тоже нет. Может быть когда-нибудь, но не факт. -
02.02.2023 at 06:23 #3834
wzn
ParticipantDPS5020 китайская прошивка. Пользователь несколько лет.
Зарегестрировался тут, чтоб поговорить о наболевшем.
1. Три цифры индикации это мало. Использую 4 цифры (штатный экран) на ток и внешний 5 цифр на напряжение (китайский модуль 5 знаков с поверкой в Самарском центре стандартизации).
Ваши три цифры – ни о чём.
2. Использую провод 7AWG чтоб при значительном выходном токе напряжение было похоже на то, которое на экране DPS5020.
3. Практически использую только m1 и m2 настройку. 1,65 и 14,5 вольт соответственно. Остальное под текущую задачу довожу донастройкой. Остальные m настройки я просто не запоминаю (забываю).
4. В штатном комплекте почему-то графики в Еxcel удавалось сохранить только на телефон (android). Они нафиг там не нужны. Нужны в компьютере, но компьютерное ПО их не пишет. За то имеет кучу настроек самого блока ( а они нужны как раз на телефоне.
5. Совершенно неочевидное управление кнопками и ручкой при настройке. -
02.02.2023 at 07:09 #3835
wzn
ParticipantВспомнил ещё пару взаимосвязанных пунктов:
6. Очень неудобное расположение кнопки включения DPS5020 под энкодером. Важно, что решение этой проблемы достаточно простое – положить (или поставить) DPS5020 на бок. Так что бы выходные клеммы были снизу. При этом решается проблема с доступом к кнопке включения и уменьшается используемое место на столе. Однако,это выявляет ещё одну проблему:
7. Экран не поворачивает информацию, если расположение DPS5020 отличается от горизонтального. -
02.02.2023 at 20:44 #3836
profi-max
KeymasterС удовольствием пообсуждаю эти блоки. В режиме обмена мнениями и информацией. Разные точки зрения приветствуются)
>>>Три цифры индикации мало.
Ответ: Выбрать 4 цифры вместо 3 можно в меню “Parameters” пункт “Smart Display”. Кроме этого, задать выходное напряжение и ток с высокой точностью можно в меню профиля M0…M9 Profile, даже когда включен 3 значный режим индикации.Посчитаем теоретически возможную точность DPS5020. Установлен процессор STM32F100 который имеет 12-разрядные АЦП и ЦАП. Двенадцать разрядов – это 4096 отсчетов. Получаем теоретическую точность для напряжения: 50 вольт разделить на 4096 равно 0,012 вольт. Теоретическая точность для тока: 20 ампер разделить на 4096 равно 0,00488 ампер (тоесть 5 мА).
Фактическая точность ещё хуже по двум причинам: 1) Используется не весть диапазон АЦП и ЦАП (что разумно и не спалит АЦП)
2) Очень большой уровень помех и наводок на входы АЦП. Наводки идут с самого блока, так как он импульсный. Никаких фильтров и экранов для защиты АЦП там нет (что объяснимо для очень бюджетного блока питания).Моё резюме такое. Не стоит ждать от блока питания за $30 такой же точности как у БП за $300.
В радиолюбительской практике в 99% случаев достаточно точности 0,1 вольт и 0,01 ампер.
В тех редких случаях, когда нужна высокая точность, я бы советовал использовать внешние вольт- амперметры. -
02.02.2023 at 23:32 #3837
wzn
ParticipantНаверное я хочу слишком много от такого блока питания. Однако точность я на контроллерах повышал делая 2, 4, 8 или более замеров с последующим усреднением.
Это не проблема, если требуемое число результатов в секунду является приемлемым.
Собственно требуется для тока только обеспечить минимально хотя бы 10 милиампер, а следующим шагом удвоить то, что есть. Это не контроль, а установка нужного. Для контроля ошибка в 4 знаке не столь важна.
Однако, для напряжения точность нужна выше и это при том, что как правильно отмечалось, импульсный блок генерирует ужасный сигнал, который содержит сильный шум. Меня спасает двойной Т-мост конденсаторный, без катушек перед внешним вольтметром с 5-ю цифрами. Да, вы правы. Только внешний вольтметр с отдельным питанием обеспечит точность измерения. Однако, теряется обратная связь с блоком питания для коррекции режимов по факту измерения.
Хотелось бы иметь возможность влиять на процесс обеспечения питания, если нагрузкой является заряжаемый аккумулятор.
p.s. Не ожидал быстрый ответ. Хотел только озвучить проблемы с которыми столкнулся. Вчера боролся с наводкой на осцилогаф от импульсных БП. Заметно помогло включение в разные розетки БП и осцилографа. Хотелось бы пообщаться Вайбером. -
03.02.2023 at 08:55 #3838
profi-max
Keymaster>>>Однако, теряется обратная связь с блоком питания для коррекции режимов по факту измерения.
>>>Хотелось бы иметь возможность влиять на процесс обеспечения питания, если нагрузкой является заряжаемый аккумулятор.
В моей прошивке, как думаю и в китайской, нет программной обратной связи. Вся обратная связь реализована аппаратно в драйвере TL594. Входы АЦП используются только для отображения фактического напряжения и тока.
Подробнее можно прочитать тут https://profimaxblog.ru/%d0%ba%d0%b0%d0%ba-%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b0%d0%b5%d1%82-%d0%bf%d1%80%d0%be%d1%88%d0%b8%d0%b2%d0%ba%d0%b0-dps/Усреднение в моей прошивке есть. Основной цикл программы составляет 100 миллисекунд. За каждый основной цикл прошивка выполняет следующие задачи: Замер напряжения и тока в АЦП, Опрос кнопок, Отрисовка экрана, Ответы на запросы модбас. В самом цикле замера делается 16 замеров через 3 миллисекунды. Потом эти 16 значений усредняются, пересчитываются через коэффициенты в напряжение и ток для последующего вывода на экран. Усредненное значение имеет уже 16 разрядов, что как бы повышает точность. Иногда называют такой подход повышения точности OVERSAMPLING, но я не уверен что это научно обосновано))))
-
14.02.2023 at 20:36 #3839
-
14.02.2023 at 20:57 #3841
Serdg
ParticipantДисплей катастрофически мелкий, не позволяет использовать DPS с блоком питания в одном корпусе-
нет гармонии. Большой ящик с микро дисплеем. Хорошая задумка, но размер дисплея убивает.
С большим дисплеем- потрясающая конструкция получилась бы.
Сделал ему переднюю панель. Перенес разъемы на другую сторону платы и развел печатку, как мне удобно.
Все будет на алюминиевом шасси. В процессе… Радиатор медный, куллер австрийский. -
14.02.2023 at 21:12 #3842
-
15.02.2023 at 00:00 #3844
profi-max
KeymasterОго! Супер конструкция получилась!!!
Фотографии размером больше 1.5 МБ движок форума не даёт загружать. Уменьшайте размер фоток.
Согласен, дисплей катастрофически маленький.
Но сделать переход на дисплей с разрешением 240х320 точек почти не реально на имеющемся процессоре STM32F100. Для экрана с большим разрешением будут нужны уже другие шрифты, которые занимают в 4 раза больше места. А в прошивке уже нет свободной памяти. Да и тактовая частота 24Мгц очень низкая, чтобы комфортно прорисовывать дисплей с большим разрешением.Мне видится, что для перехода на большой дисплей нужно будет ещё дополнительный процессор помощнее, который бы управлял DPSом через UART по имеющемуся протоколу. Что-то вроде внешней панели оператора.
-
15.02.2023 at 06:18 #3845
Serdg
ParticipantА если использовать сопроцессор (еще один) для управления только индикатором?
-
15.02.2023 at 08:31 #3846
profi-max
KeymasterЕсли только индикацию, тогда на новом экране не будет меню. Поэтому нужно что-то полноценное.
-
21.02.2023 at 10:00 #3847
dave
ParticipantI have a few of these and they’ve been working well, but one of them has stopped regulating. vout is always the same as vin when it’s on. I have tried calibration and resetting defaults, has it broken? What could have caused this? Do you know a way to repair it?
-
21.02.2023 at 18:25 #3848
profi-max
KeymasterIt is best to look at the gate signal of the output MOSFET with an oscilloscope. There should be a meander with an amplitude of Vin minus 5 volts and a frequency of about 65 kHz. The PWM should change depending on the Vset voltage. This signal is generated in the TL594 driver. Check out the diagrams here:
-
14.05.2023 at 07:14 #3998
Doodad
ParticipantКак вам новинка?
https://aliexpress.ru/item/1005005429587089.html-
This reply was modified 4 months, 3 weeks ago by
Doodad.
Attachments:
You must be logged in to view attached files. -
This reply was modified 4 months, 3 weeks ago by
-
17.05.2023 at 22:39 #4010
mavi
Participant5020 не прошивает на 4.4 стоит 4.3
Шнуры, скорости, драйвера- менял
При прошивке происходит выключение экрана и обрыв связи -
01.06.2023 at 22:44 #4024
mavi
ParticipantЗдравствуйте не получается
Attachments:
You must be logged in to view attached files.-
01.06.2023 at 22:45 #4027
-
02.06.2023 at 22:16 #4031
profi-max
KeymasterПопробуйте прошить через USB с помощью STM32CubeProgrammer.
Если и это не поможет, тогда остается только прошивать через ST-Link
-
-
-
09.06.2023 at 00:14 #4035
marburger
ParticipantHello,
while trying to flash the firmware I think I shorted SWDIO and SWCLK or GND on my DPS5020 with the sewing needles as a connector. I got a spark, but DPS was still showing something on the screen and reacting to buttons. Now, after one powercycle, the display stays dead 🙁
Any idea what happend and if I can revive my DPS5020?-
09.06.2023 at 00:40 #4036
profi-max
KeymasterHi. Most likely your DPS5020 is alive. Try another ST-Link if possible.
-
09.06.2023 at 01:03 #4037
marburger
ParticipantOk, will do. Any clue why the DPS5020 screen is staying dead now? I did not stated flashing while the shortcut occured!
-
09.06.2023 at 08:35 #4038
profi-max
KeymasterCheck the voltage supply to the controller between VCC and GND pins
https://profimaxblog.ru/wp-content/uploads/2021/05/SWD-Pins.jpg
-
-
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.
This Post Has 25 Comments
Comments are closed.
Do you have firmware for DPS3005 ?
firmware from DPS5005 is suitable for DPS3005
It is necessary to replace the input and output capacitors with a higher voltage. Or, if you do not intend to set the output voltage more than 32V, and do not use the input more than 40V – then you can not change anything. Thanks for your attention))
I’ve answered about DPS30xx firmware. As for converting DPS3005 into DPS5005, I’m not sure it’s simple changing capacitors. I cannot take responsibility for such advice.
Присоединяюсь к предыдущему оратору: существует ли у вас прошивка для DPS305?
И даже более нескромный вопрос:
Если DPS3005 прошить прошивкой от DPS5005, заменить входные конденсаторы, возможно ещё какие-то элементы (не разбирался ещё со схемой) – могу ли я получить на своём DPS3005 выходное напряжение как у DPS5005?
Сам спрашивал – сам отвечаю:
Да, прошивка от DPS5005 подходит для DPS3005. Необходимо заменить конденсаторы по входу и по выходу на большее напряжение. Или, если не предполагается выставлять выходное напряжение больше 32В, и не использовать вход более 40В – то можно ничего и не менять. Спасибо за внимание))
About DPS3005/3003 firmware
DPS3005/3003 has different resistive dividers then DPS50xx.
I don’t have DPS3005/3003 on my desk to experiment with.
So if you wish, do the next:
1) Flash DPS3005/3003 with my DPS5005 firmware
2) Calibrate the device as accurately as possible.
3) Connect DPS with DPSMaster application.
4) Then DPSMaster -> Common Parameters -> Advanced -> Callibration -> Log File
Save this logfile in google disk and send me the link to the file.
5) When I will have this log file with correct calibration data I will make firmware for DPS3003/3005
Не удаётся произвести калибровку. Вопрос к автору: какие резисторы (делитель) необходимо заменить? Предполагаю, что АЦП уходит в переполнение.
Try a lower input voltage. Since during calibration Uset High = 90% of Uinput.
But if you want to remake the device then
Uin divider is the same for 50/30 volts:
R2=100k R7=5.1k
Uout for DPS5020/5015/5005
first divider R3=100k R4=6.2k
second OA feedback divider (U2) R36=100k R31=6.2k
Uout for DPS3003/3005
first divider R3=100k R4=10k
second OA feedback divider (U2) R36=100k R31=10k
Hello, for I want to thank you for your great work! I have successfully installed your firmware. Now my DPS5005 is much more accurate and useful. Unfortunately I can’t control it via MQTT anymore. I have installed an an esp8266 which converts the mqtt commands into modbus signals. Can you provide any information how to control your firmware via serial connection, so that I can control it remotely again?
Thanks in advance
Here you can find info about Modbus protocol
https://profimaxblog.ru/dps-communication-protocol/
Hi,
looks great. does it work with a DPS5015 ver1.1?
the pcb is different, i don’t know how to connect the pins.
i could send you a picture.
Hello,
I Think It should work with DPS5015 ver1.1
Send the photo please
Hi, I have the DPS3012 which was the best model when I bought it. Just wondering if any of the firmware is compatible with this model or am I out of luc?. I don’t see this model listed although is does look very much like the DPS5015.
I have added DPS3012 firmware. You can find it above. But this firmware is not tested on hardware. I tested it on 5020.
the version 4 on dps5020 has a small bug on memory set
when you set the memory profile via modbus on reg 36 settings changes but the text on display doesn’t
Yes, that is right. I’ll fix it in the next release.
I recommend using Key Lock when working via modbus.
Можно ли прошить через USB2UART адаптер?
Первый раз прошивать нужно через ST-Link. Потом можно будет обновлять прошивку через USB-UART адаптер
Hello, after successfully update my DPS 5005 it seems, that I have bricked my DPS5020. I connected the STlink adapter to the corresponding pins and started the update. Then I got several error messages (see log). Can you give me any advice how to reanimate my device?
21:20:46 : STM32CubeProgrammer API v2.11.0 | Windows-64Bits
21:20:49 : ST-LINK SN : 49FF71065066505238482087
21:20:49 : ST-LINK FW : V2J40S7
21:20:49 : Board : —
21:20:49 : Voltage : 3.24V
21:20:49 : SWD freq : 4000 KHz
21:20:49 : Connect mode: Normal
21:20:49 : Reset mode : Software reset
21:20:49 : Device ID : 0x420
21:20:49 : Revision ID : Rev Z
21:20:50 : Debug in Low Power mode is not supported for this device.
21:20:52 : UPLOADING OPTION BYTES DATA …
21:20:52 : Bank : 0x00
21:20:52 : Address : 0x4002201c
21:20:52 : Size : 8 Bytes
21:20:52 : Bank : 0x01
21:20:52 : Address : 0x1ffff800
21:20:52 : Size : 16 Bytes
21:20:52 : UPLOADING …
21:20:52 : Size : 1024 Bytes
21:20:52 : Address : 0x8000000
21:20:52 : Read progress:
21:20:52 : Error: Data read failed
21:21:08 : Memory Programming …
21:21:08 : Opening and parsing file: FW5020_V42.bin
21:21:08 : File : FW5020_V42.bin
21:21:08 : Size : 62.75 KB
21:21:08 : Address : 0x08000000
21:21:08 : Erasing memory corresponding to segment 0:
21:21:08 : Erasing internal memory sectors [0 62]
21:21:08 : Error: failed to erase memory
21:21:08 : Error: failed to erase memory
21:21:09 : RUNNING Program …
21:21:09 : Address: : 0x08000000
21:21:09 : Warning: The core is locked up
21:21:09 : Start operation achieved successfully
I solved the problem. I’ve forgotten to press “apply” in the read protection setting. Now it’s working.
Thanks for your great work!
Bernd
Hello, would like to flash a DPS5015 with firmware 4.2. Unfortunately the STM32CubeProgrammer keeps resetting the Read protection option byte as soon as I press Apply and brings an error (Warning : “RDP=165 will be ignored as it has already been modified” and “RDP=187 will be ignored as it has already been modified been modified”). It is then not possible to flash the firmware. See log file 14:39:03 : STM32CubeProgrammer API v2.12.0 | Windows 64Bits 14:39:12 : ST-LINK SN : 0F0304157116303030303032 14:39:12 : ST-LINK FW : V2J29S7 14:39:12 : board : — 14:39:12 : Voltage : 3.14V 14:39:12 : SWD freq : 4000 KHz 14:39:12 : Connect mode: Normal 14:39:12 : Reset mode : Software reset 14:39:12 : Device ID : 0x420 14:39:12 : Revision ID : Rev Z 14:39:12 : Debug in Low Power mode is not supported for this device. 14:39:15 : UPLOADING OPTION BYTES DATA … 14:39:15 : bank : 0x00 14:39:15 : Address : 0x4002201c 14:39:15 : Size : 8 bytes 14:39:15 : bank : 0x01 14:39:15 : Address : 0x1ffff800 14:39:15 : Size : 16 bytes 14:39:15 : UPLOADING… 14:39:15 : Size : 1024 bytes 14:39:15 : Address : 0x8000000 14:39:15 : Read progress: 14:39:15 : Error: Data read failed 14:39:21 : Disconnected from device. 14:39:35 : ST-LINK SN : 0F0304157116303030303032 14:39:35 : ST-LINK FW : V2J29S7 14:39:35 : board : — 14:39:35 : Voltage : 3.14V 14:39:35 : SWD freq : 4000 KHz 14:39:35 : Connect mode: Normal 14:39:35 : Reset mode : Software reset 14:39:35 : Device ID : 0x420 14:39:35 : Revision ID : Rev Z 14:39:35 : Debug in Low Power mode is not supported for this device. 14:39:37 : UPLOADING OPTION BYTES DATA … 14:39:37 : bank : 0x00 14:39:37 : Address : 0x4002201c 14:39:37 : Size : 8 bytes 14:39:37 : bank : 0x01 14:39:37 : Address : 0x1ffff800 14:39:37 : Size : 16 bytes 14:39:37 : UPLOADING… 14:39:37 : Size : 1024 bytes 14:39:37 : Address : 0x8000000 14:39:37 : Read progress: 14:39:37 : Error: Data read failed 14:42:11 : Option byte command : -ob RDP=0xBB RDP=0xBB RDP=0xA5 14:42:11 : PROGRAMMING OPTION BYTES AREA … 14:42:11 : Warning: RDP=187 will be ignored as it has already been modified. 14:42:11 : Warning: RDP=165 will be ignored as it has already been modified. 14:42:11 : bank : 0x01 14:42:11 : Address : 0x1ffff800 14:42:11 : Size : 16 bytes 14:42:12 : UPLOADING OPTION BYTES DATA … 14:42:12 : bank : 0x00 14:42:12 : Address : 0x4002201c 14:42:12 : Size : 8 bytes 14:42:12 : bank : 0x01 14:42:12 : Address : 0x1ffff800 14:42:12 : Size : 16 bytes 14:42:12 : OPTION BYTE PROGRAMMING VERIFICATION: 14:42:12 : Option bytes programmed successfully 14:42:12 : Time elapsed during option Bytes configuration: 00:00:00.936 14:47:26 : Memory Programming… 14:47:26 : Opening and parsing file: FW5015_V42.bin 14:47:27 : File : FW5015_V42.bin 14:47:27 : Size : 62.75 KB 14:47:27 : Address : 0x08000000 14:47:27 : Erasing memory corresponding to segment 0: 14:47:27 : Erasing internal memory sectors [0 62] 14:47:27 : Error: Failed to erase memory 14:47:27 : Error: Failed to erase memory 14:47:27 : RUNNING program … 14:47:27 : Address: : 0x08000000 14:47:27 : Application is running, Please Hold on… 14:47:28 : Start operation achieved successfully Please help
Hello!
1) Upgrade STM32CubeProgrammer . The latest ver is 2.6
2) The most important: Upgrade ST-Link firmware. The latest is V2J37S7
3) Power up the DPS5015 from external supply, not from ST-Link
Hello, Thank you for your support.
With your information it worked.
A great job.
Best regards
Walter
Hello Profi-Max, Is there a way to install a larger display?
Would like to remove the electronics from the case and install it in a larger PSU case.
I will also replace the buttons and the rotary encoder with large buttons.
Greeting Walter
Hi Walter!
Good idea, but not for me. I’m too busy with my main job.