Skip to content

Python Modbus Implementation to control a HanmaTek HM310P DC Power Supply

Notifications You must be signed in to change notification settings

notkevinjohn/HM310P

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HM310P

Python Modbus Implementation to control a HanmaTek HM310P DC Power Supply

I found a very cheap USB programmable DC Power Supply on Amazon. The price was great, but the software support was non-existent. I created the included python class to control this device using the minimalmodus library. This was a very quick and dirty implementation, but it got the job done.

image

I did not implement the full set of features for this device, just the ability to turn it on and off and set the voltage. The code that I wrote is for Linux and expects there to be a device at /dev/dcpowersupply. I have also included the udev rules file that will create the needed symlink for this device.

You can examine or run the included example script. This will turn on the supply, and then step the voltage slowly up to 12V before turning off the supply.

Notes

The MODBUS implementation is not perfect. It often fails to communicate with the device. I solved this by having the code try until it succeeds. This is obviously not very effcient, but it suits my needs.

About

Python Modbus Implementation to control a HanmaTek HM310P DC Power Supply

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages