Code Monkey home page Code Monkey logo

opendps's Introduction

OpenDPS

Give your DPS5005 the upgrade it deserves

OpenDPS is a FOSS firmware replacement for the DPS5005 (and DPS3003, DPS3005, DPS5015, DP50V5A, DPS5020 and possibly others) that has the same functionality, has a less cluttered user interface and is remote controllable via wifi (ESP8266) or via a serial port.

A DPS5005 with wifi

There are three accompanying blog posts you might find of interest:

  • Part one covers the reverse engineering of the DPS5005.
  • Part two describes the design of OpenDPS.
  • Part three covers the process of upgrading stock DPS5005:s to OpenDPS.

Upgrading your DPS5005

If you are eager to upgrade your DPS5005, you may skip directly to part three. Oh, and of course you can use OpenDPS for more than a programmable power supply. Why not use it as an interface for your DIY sous vide cooker :D

Cloning & building

First build the OpenDPS firmware:

git clone --recursive https://github.com/kanflo/opendps.git
cd opendps
make -C libopencm3
make -C opendps flash
make -C dpsboot flash

Check the blog for instructions on how to unlock and flash your DPS5005.

Second, build and flash the ESP8266 firmware. First you need to create the file esp8266-proxy/esp-open-rtos/include/private_ssid_config.h with the following content:

#define WIFI_SSID "My SSID"
#define WIFI_PASS "Secret password"

Next:

make -C esp8266-proxy flash

Setup dpsctl.py

The script runs with python2 and python3. The libraries pycrc and pyserial are required:

pip install -r requirements.txt

Usage

A vanilla OpenDPS device will support two functions, constant voltage (cv) and constant current (cc). A tool called dpsctl.py can be used to talk to an OpenDPS device to query functionality and supported parameters for each function.

Once upgraded and connected to an ESP8266, type the following at the terminal to find its IP address:

% dpsctl.py --scan
172.16.3.203
1 OpenDPS device found

Enable constant voltage (cv) at 3.3V limited to 500mA:

% dpsctl.py -d 172.16.3.203 -f cv
Changed function.

% dpsctl.py -d 172.16.3.203 -p voltage=3300 current=500
voltage: ok
current: ok

% dpsctl.py -d 172.16.3.203 -o on

Query the status of the device:

% dpsctl.py -d 172.16.3.203 -q
Func       : cv (on)
  current  : 500
  voltage  : 3300
V_in       : 12.35 V
V_out      : 3.33 V
I_out      : 0.152 A

List supported functions of the device:

% dpsctl.py -d 172.16.3.203 -F
Selected OpenDPS supports the cv and cc functions.

List supported functions parameters of current function:

% dpsctl.py -d 172.16.3.203 -P
Selected OpenDPS supports the voltage (mV) current (mA) parameters for the cv function.

Additionally, dpsctl.py can return JSON, eg.:

% dpsctl.py -d 172.16.3.203 -q -j
{
    "command": 132,
    "cur_func": "cv",
    "i_out": 151,
    "output_enabled": 1,
    "params": {
        "current": "500",
        "voltage": "3300"
    },
    "status": 1,
    "v_in": 12355,
    "v_out": 3321
}

Upgrading

As newer DPS:es have 1.25mm spaced JTAG pins (JST-GH) and limited space for running the JTAG signals towards the back of the device, a permanent soldered JTAG is somewhat cumbersome. People not activly developing OpenDPS will not need JTAG anyway. To facilitate upgrade, OpenDPS comes with a bootloader enabling upgrade over UART:

% make -C opendps bin
% dpsctl.py -d /dev/ttyUSB0 -U opendps/opendps.bin

If you accidentally upgrade to a really b0rken version, the bootloader can be forced to enter upgrade mode if you keep the SEL button pressed while enabling power.

The display will be black during the entire upgrade operation. If it stays black, the bootloader might refuse or fail to start the OpenDPS application, or the application crashed. If you attempt the upgrade operation again, and upgrading begins, the bootloader is running but is refusing to boot your firmware. But why? Well, let's find out. If you append the -v option to dpsctl.py you will get a dump of the UART traffic.

Communicating with /dev/ttyUSB0
TX  9 bytes 7e 09 04 00 27 86 0c b2 7f
RX 9 bytes 7e 89 00 04 00 03 66 0f 7f

The fourth byte from the end in the received data (0x03 in this example) will tell us why the bootloader refused to boot the firmware. See protocol.h for the different reasons.

Custom Fonts

If you would like to use a your own font for OpenDPS you may do so by doing the following:

% make -C opendps fonts \
    METER_FONT_FILE=<path_to_font> \
    METER_FONT_SMALL_SIZE=18 \
    METER_FONT_MEDIUM_SIZE=24 \
    METER_FONT_LARGE_SIZE=48 \
    FULL_FONT_FILE=<path_to_font> \
    FULL_FONT_SMALL_SIZE=15

Supported fonts are .ttf or .otf

Source code organisation

The project consists of four parts:

  • dpsboot/ The OpenDPS bootloader.
  • opendps/ The OpenDPS firmware.
  • esp8266-proxy/ The ESP8266 firmware for wifi connected OpenDPS:es.
  • dpsctl/ A Python script for controlling your OpenDPS via wifi or a serial port.
  • emu/ Xcode project and GNU makefile for running an emulated OpenDPS.

What about other DPS:es?

OpenDPS has been verified to work with other models in the DPSx0xx series, such as the DPS3003, DPS3005, DPS5015 and DPS5020. The maxium settable output current can be defined when building opendps, see the makefile. Plese note that the hardware design might change at any time without any notice (I am not affiliated with its designer). This will render OpenDPS unusable until fixed.


Licensed under the MIT license. Have fun!

opendps's People

Contributors

atx avatar bjerrep avatar cabalist avatar cortices avatar danielkucera avatar frederikvs avatar gojimmypi avatar goosenphil avatar howie-j avatar jacknewman12 avatar jenda122 avatar jimmyw avatar kanflo avatar kohrar avatar lukedempsey avatar m-kozlowski avatar mabels avatar marcuslindemann avatar martinstep avatar polihedron avatar spudmn avatar theassassin avatar tzarc avatar x-ryl669 avatar xenoamor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opendps's Issues

bin file for testing

Hi, i think I fail to compile opendps correctly.
To test that hypothesis - can someone please post a working opendps.bin file?

Support for DPS3005

Hi,
I have a DPS3005 power supply and would love to know if it is supported by OpenDPS. At the moment, the only difference I see is the max. output current of 3A instead of 5A as DPS5005 has. Is it sufficient to just change the MAX_CURRENT to 3000 in opendps/Makefile?

Cannot upgrade DPS5005

I have this DPS5005:
https://www.banggood.com/RD-DPS5005-50V-5A-Communication-Function-Constant-Voltage-Current-Step-down-Power-Supply-Module-p-1161704.html

I followed the instructions from Readme.md in order to upgrade it, but without success.
The errors I get are:

Traceback (most recent call last):
  File "dpsctl/dpsctl.py", line 617, in <module>
    main()
  File "dpsctl/dpsctl.py", line 612, in main
    handle_commands(args)
  File "dpsctl/dpsctl.py", line 385, in handle_commands
    run_upgrade(comms, args.firmware, args)
  File "dpsctl/dpsctl.py", line 451, in run_upgrade
    ret_dict = communicate(comms, create_upgrade_start(chunk_size, crc), args)
  File "dpsctl/dpsctl.py", line 349, in communicate
    if not comms.open():
  File "dpsctl/dpsctl.py", line 102, in open
    self._port_handle.open()
  File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 286, in open
    self._update_dtr_state()
  File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 634, in _update_dtr_state
    fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
IOError: [Errno 110] Connection timed out
root@ubuntu:/opt/kit/opendps# dpsctl/dpsctl.py -v -d /dev/ttyUSB0 -U opendps/opendps.bin
Communicating with /dev/ttyUSB0
TX  9 bytes [7e 09 04 00 d2 26 55 6c 7f]
Error: timeout talking to device /dev/ttyUSB0.

I checked and the TTL to USB device name is ttyUSB0.
I also ran these commands with success:

make -C libopencm3
make -C opendps bin
pip install pyserial
pip install pycrc

I tried on Ubuntu 18.04 and also on Fedora 28.
Any ideas?
Thank you

Dual Use of "serial_handle_rx_char"

Hey guys,

I wanted to play a bit with SCPI a implementation, although I am at the very beginning and currently trying to understand this project structure.

My idea was to make a Makefile definition to use either SCPI or the currently used protocol.
From:

serial_handle_rx_char(data);

I come to:

void serial_handle_rx_char(char c);

And than there are two implementations:

  1. void serial_handle_rx_char(char c)
  2. void serial_handle_rx_char(char c)

As far as I understand it command_handler.c is used to start the execution of the received commands.
protocol_handler.c parses the received payloads and also executes the commands?

I guess I don't understand how two functions can have two same definitions and when which is executed.

Thanks for the help.

Implement workaround for voltage drop at high currents

There is an issue with the DPS5005s (at least the three I tested so far) resulting in output voltage drops at high currents. If outputting 6V (according to UI settings and UI feedback) and drawing 1.2A, a multimeter will show a 340mV drop on the output voltage compared to the UI. The value on DAC1 needs to be increased to maintain 6A @ 1.2A which also increases the displayed voltage ADC measurement.

More measurements here under the 'Voltage drop at high current draw' tab

The following table shows DAC1 values maintaining an output voltage of 6V under different current draw:

I [mA]   DAC1
-------------
   16    430
  133    432
  416    436
 1263    456
 2494    468

This is not OpenDPS related as the stock firmware has the same "feature". Fixing it would be a nice OpenDPS addition.

Merge CV and CC modes

Most, if not all, benchtop power supplies operate by setting both a voltage and a current level and limiting whichever one is reached first. This is in effect operating seemlessly in both CV and CC modes

I sat down and watched Dave's great video series on designing a PSU and I believe we have a circuit similar to the one below (which can be found in the TL594 datasheet):
tl594

The way this works is it uses the feedback from the output to regulate the voltage. However the way the current limiting works is it uses the error amplifier as a comparator without feedback. This is on the contrary to the DPS3003 schematics that are present in this repo.

To test this I made some minor changes to func_cv.c so that both the voltage and current DACs can be controlled directly. This now works exactly as I would I expect it to.

In my opinion this is how the device should work. Although this does function it is still very important to calibrate the device and some kind of indicator would be necessary to indicate when the device is in CC mode. This could be done by turning the current value on the screen red using #49 for example

It is worth noting that some sort of software feedback loop is still required however as at high current loads the voltages drift from it's target set point. This appears to be a steady state error and employing just the "I" (integral) part of a PID would correct this. As there is already a hardware feedback loop I don't believe employing the "P" (proportional) or "D" (derivative) sections is necessary or really a good idea as the two systems may fight each other and cause instability.

Unable to set voltage when V_In > 32.7V

When I am in the CV-mode and V_In is greater than 32.7V I can't setup the voltage correctly. As you can see here in the pictures the voltage jumps between 0V and approximately 83V. Even if I am at the last digit.

My suggestion is a overflow of a 16-bit signed variable as the problem seems to happen when V_In is greater than 2^15 mV.

img_20181026_164009
img_20181026_164014

DPS5015 and DPS5020 seem to act the same to me. I have compiled the source with make -C opendps MODEL=DPS5015 MAX_CURRENT=9999

I also use a DP50V5A with the same issue.

Originally posted by @Jantek in #50 (comment)

Control DPS5015 fan with PWM, rather than on/off

Pin B11, which controls the fan on DPS5015, is channel 4 of timer 2. Theoretically, I believe we should be able to set up Timer 2 for PWM control of the fan, so the operating speed can be ramped according to output wattage (since there's no temperature sensor AFAIK).

Problem setting voltage with CV mode

I have flashed the dps5005 unit successfully and tested cc mode which works ok (setting 1A results in 1.6A running). Then i tried cv mode but when i go to set the voltage it jumps from 0.00 to 17.46 then 17.63 then 17.80. I cannot set the voltage correctly, tried rebuilding/reflashing without success. Not sure if this issue is just me or the version i have compiled

CC Mode

Any possibility of implementing Constant Current mode?

Output Voltage is not set if only remote control is used

powering up the DPS5005 and try controll by dpsctl.py only, the output voltage seems not to be set.

python dpsctl.py -d com4 -v -u 1000
Communicating with com4
TX 7 bytes [7e 02 03 e8 47 15 7f]
RX 6 bytes [7e 82 01 6d db 7f]

python dpsctl.py -d com4 -v -i 1000
Communicating with com4
TX 7 bytes [7e 03 03 e8 70 25 7f]
RX 6 bytes [7e 83 01 5e ea 7f]

python dpsctl.py -d com4 -v -p 1
Communicating with com4
TX 6 bytes [7e 05 01 ef d4 7f]
RX 6 bytes [7e 85 01 f4 4c 7f]

python dpsctl.py -d com4 -v -s
Communicating with com4
TX 5 bytes [7e 04 40 84 7f]
RX 17 bytes [7e 84 01 13 df 03 e8 00 00 00 00 03 e8 01 59 7b 7f]

V_in : 5.08 V
V_set : 1.00 V
V_out : 0.00 V (on)
I_lim : 1.000 A
I_out : 0.000 A

also the new set values are not shown in the dps5005 display (may its a following issue)

DPS5015 display freezes

My DPS5015 display freezes every time if I press buttons too fast. Firmware self still seems to work because I can switch output on and off but display doesn't update.
I tried to debug it my self but this hw platform is new for me, so I haven't managed to setup debugger yet..

DPS5005 Communication Module doesn't work at 115200 Baudrate

It looks like the isolated USB serial adapter that comes with the DPS5005 from this Aliexpress link doesn't operate at 115200 baud. Changing the default baudrate of opendps, dpsboot and dpsctl to 9600 fixes this problem.

It appears to be a CH341 IC that communicates through 2x EL357N optocouplers. It is the optocouplers that are too slow to respond

I'm not sure if this is worth changing for the general users as I have no idea how many people actually use this supplied device. One possible solution would be to have the firmware default to 9600 and then have a command that can renegotiate a different baudrate.

I'd be happy to implement this if anyone else is having a similar issue. If not I'll make a push with the baudrate set in the makefile so it's easy to change

Python get GIT hashes

It would be nice to be able to get the GIT hash strings for the bootloader and the application for debugging. This could be done via a new protocol command in dpsctl

Past corruption for units smaller than 4 bytes

I did not note today is Friday the 13th until I found a bug in the past.c code. Writing a unit smaller than 4 bytes will corrupt the past. Guess I could have been worse off today :D

Recommended header/socket for pinouts

I have been checking the headers and it would be very useful to advertise which JST-GH connector and socket match would fit. Both pitch and number of pins, as UART and JTAG/programmer IO are exposed together. Is it 1.25 pitch? I suppose we need both a 4P(in) and a 5P(in).

DPS5015 setting in dps-model.h does not work 100% with the latest hardware

Hi, I bought a dps5015 fairly recently from a distributor called "KKmoon" from Amazon EU, and I quickly put in opendps after I did some testing on the stock firmware.

Two problems as I can tell right now. First off the settings in dps-model.h does not work correctly on the hardware I have (on the PCB it says version V2.3):

  • ADC on the voltage reading seems to be OK
  • DAC on the voltage is off by about 5%, i.e when setting 12V, it outputs about 11.4V
  • ADC on the current fluctuates quite a lot (when the mean is about 200mA, it displays between 100 and 300mA), and the mean number is not accurate either (it's hard to say what exactly the mean is since it jumps up and down, but if I guess it'll be off by 50%
  • DAC on the current is hard to measure since I yet to find a way to turn it into CC mode on the UI, and I have not tried serial or wifi yet

The second issue is the fan, somehow the fan is slowing ramping up speed regardless of what kind of load is on the output, it feels there's some DAC/PWM output drifted upwards and causing the power supply to the fan to go up. It does turn off if I press the power button to disable output.

Saying that, for the first one, at least on the voltage DAC, I can give it a try and measure the numbers then refine the dps-model.h, as long as I know where to measure, any guidance on that?

Thanks for all your answers in advance!

/Tao

number_draw() could be improved to handle any font

There are a lot of magic numbers in number_draw() that could be removed to allow for better rendering of all fonts. The widest glyph could be determined by the font generator in #79.

static void number_draw(ui_item_t *_item)
{
uint32_t cur_digit = 0;
ui_number_t *item = (ui_number_t*) _item;
uint32_t value = item->value;
uint32_t w, h;
switch (item->font_size) {
case 18:
w = font_18_widths[4]; /** @todo: Find the widest glyph */
h = font_18_height;
break;
case 24:
w = font_24_widths[4] + 2; /** @todo: Find the widest glyph */
h = font_24_height + 2;
break;
case 48:
w = font_48_widths[4] + 2; /** @todo: Find the widest glyph */
h = font_48_height + 2;
break;
}
uint16_t xpos = _item->x - w;
switch(item->unit) {
case unit_volt:
tft_putch(item->font_size, 'V', xpos, _item->y, w, h, false);
break;
case unit_ampere:
tft_putch(item->font_size, 'A', xpos, _item->y, w, h, false);
break;
default:
assert(0);
}
xpos -= item->font_size == 18 ? 2 : 4;
for (uint32_t i = 0; i < item->num_decimals; i++) {
bool highlight = _item->has_focus && item->cur_digit == cur_digit;
xpos -= w;
tft_putch(item->font_size, '0'+(value%10), xpos, _item->y, w, h, highlight);
value /= 10;
cur_digit++;
}
xpos -= item->font_size == 18 ? 4 : 10;
tft_putch(item->font_size, '.', xpos, _item->y, item->font_size == 18 ? 4 : 10, h, false);
for (uint32_t i = 0; i < item->num_digits; i++) {
bool highlight = _item->has_focus && item->cur_digit == cur_digit;
xpos -= w;
tft_putch(item->font_size, '0'+(value%10), xpos, _item->y, w, h, highlight);
value /= 10;
cur_digit++;
if (!value && !_item->has_focus) { /** To prevent from printing 00.123 */
xpos -= w;
tft_fill(xpos, _item->y, w, h, 0);
break;
}
}
}

I'm happy to work on this once we have some of the outstanding font pull requests merged in

Bootloader 176 bytes too large (GCC 8.1)

$ make -C dpsboot
make: Entering directory '/home/mike/dev/opendps/dpsboot'
  CC      common.c
  CC      hw.c
  CC      dpsboot.c
  LD      dpsboot.elf
/usr/lib/gcc/arm-none-eabi/8.1.0/../../../../arm-none-eabi/bin/ld: dpsboot.elf section `.text' will not fit in region `rom'
/usr/lib/gcc/arm-none-eabi/8.1.0/../../../../arm-none-eabi/bin/ld: section .app VMA [0000000008001400,000000000800f7ff] overlaps section .text VMA [0000000008000000,00000000080014a3]
/usr/lib/gcc/arm-none-eabi/8.1.0/../../../../arm-none-eabi/bin/ld: region `rom' overflowed by 176 bytes
collect2: error: ld returned 1 exit status
make: *** [../libopencm3.rules.mk:199: dpsboot.elf] Error 1
make: Leaving directory '/home/mike/dev/opendps/dpsboot'
$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (Arch Repository) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I managed to build it okay with GCC 6.3.1, but it's close too:

                0x0000000000001400                boot_size = 0x1400
...
.text           0x0000000008000000     0x1394

Could this firmware also work on the step-up/boost DPH models?

They use the same front-panel, and are probably quite similar on the controller side, though the DC/DC converter is on a separate board. I guess it's unlikely, but maybe I can retrace the steps taken and try to identify where they differ? I'm in need of a couple of boost capable PSUs for a 12V electrical system, but am severely put off by the cluttered and clunky stock UI - I would only buy them if there's a decent chance of success with performing this firmware replacement.

Control Script errors

With stock python installations, I get the following errors. Maybe there is a module missing or something?

Windows:

C:\Users\bla\Downloads\opendps-master\dpsctl>python dpsctl.py -d COM5 --ping
  File "dpsctl.py", line 143
    except socket.error, msg:
                       ^
SyntaxError: invalid syntax

Linux:

~/opendps/dpsctl $ sudo python dpsctl.py -d /dev/ttyUSB0 --power on
Traceback (most recent call last):
  File "dpsctl.py", line 429, in <module>
    main()
  File "dpsctl.py", line 426, in main
    handle_commands(args)
  File "dpsctl.py", line 293, in handle_commands
    communicate(comms, create_power_enable(pwr), args)
  File "dpsctl.py", line 237, in communicate
    resp = comms.read()
  File "dpsctl.py", line 108, in read
    if b == uframe._SOF:
NameError: global name 'uframe' is not defined

Handle inrush current wrt. OCP

For resistors drawing, say, 400mA, the current limit needs to be set to 600mA or the OCP will kick in immediately when enabling power.

The inrush current needs to be handled, eg. by accepting inrush current > I_limit for a short period of time.

On/Off toggle on short circuit

When I connect plus and minus, the background flashes white and it turned of. If I then got another short circuit (connecting plus and minus again), the device turned ON, and stays ON!

Maybe this is related to #42 and #36 ?

At least some DPS5015 units have RGB displays, not BGR.

I modified my power icon to be red, and ran the graphics convert. However, when programmed, this rendered blue.

I modified line 29 of ili9163c_settings.h to the following:

    #define __COLORSPC		0// 1:GBR - 0:RGB

instead of

    #define __COLORSPC		1// 1:GBR - 0:RGB

and the problem was solved. This may be due further investigation into which units have which colour space, as it is not immediately apparent either way with the original black and white scheme.

Voltage does not turn off (goes back to zero) after pressing turn off button

I seeing a weird issue where the output voltage does not turn off after pressing on/off button.
When the press the on/off button (after resetting opendps) the power turn on but it does not turn off (goes back to zero) after pressing button again (though the lcd shows power off). Voltage remains the same even if i set the voltage to something else. Is this the intended behaviour or is it a bug in the firmware?

New board version? w/ Bluetooth and USB Board

Hey there,
I just received my DPS Power-Supply. It's a DPS5005 to be exact. I also ordered the additional Parts (Bluetooth and USB Board) along with it. Now my Board has a connector for these to interface, but I'm unsure whether these pins are the ones referenced for the installation of OpenDPS.

Attached are some images of the DPS I received.

Off topic: I'm also thinking about an OpenDps companion App for PC or Mobile... Maybe if I find some time.

Python dpsctl incompatibility with windows

When running the following on completion I get the following error:

python dpsctl.py -d COM7 -U opendps/opendps.bin
Download progress: 100%
Traceback (most recent call last):
  File "dpsctl/dpsctl.py", line 630, in <module>
    main()
  File "dpsctl/dpsctl.py", line 625, in main
    handle_commands(args)
  File "dpsctl/dpsctl.py", line 392, in handle_commands
    run_upgrade(comms, args.firmware, args)
  File "dpsctl/dpsctl.py", line 496, in run_upgrade
    sys.exit(os.EX_OK)
AttributeError: 'module' object has no attribute 'EX_OK'

SCPI support needed?

Hello guys. I would like to ask your opinion about SCPI support for opendps.

SCPI (Standard Commands for Programmable Instruments) is industrial standard for controlling of measuring equipment and also programmable power supply over Serial/USB/GPIB/Ethernet. As for opendps I can implement serial version of SCPI and it will be compatible with true serial (RS-232), USB (over USB-UART adapter) and even ethernet (wifi over esp8266 or RTL8710AF).

This give us ability to use standard software (anybody using it already?). As for me, I using whis protocol with my oscilloscope, but my software have no support for anything apart this oscilloscope.

You can see example command set for power supply here http://www.manson.com.hk/getimage3/index/action/images/name/SDP_SCPI_command_list_1_2.pdf
and https://github.com/eez-open/psu-firmware/blob/master/doc/SCPI%20reference%20guide/EEZ%20PSU%20SCPI%20reference%20guide.pdf

Bluetooth Module

I am interested in providing support for the bluetooth module that comes with the newer DPS. With the ultimate goal of eventually making OpenDPS available via an iOS application using Bluetooth.

As far as I can tell, the Bluetooth module just appears as a serial device.

I guess my questions are:

  1. Do you think this sounds possible?
  2. Has anyone attempted to make use of the bluetooth module?

Release pre-compiled builds?

Any chance you could release pre-compiled binaries for the different supported models and publish these in the "Releases" section?

I have a DPS5015 and a ST-LINK/V2 flasher but not much experience compiling the builds.

Limit voltage if > input voltage

I use an old Thinkpad power supply for the input source for my DPS5005, which gives me 20.5V. Would it be nice if the output voltage will be caped to that voltage, because higher voltages makes no sense (no boost converter). Or do I miss something here?

DPS3003 or DPS3203 schematics?

Are the files in the opendps/hardware/reverse-engineering/dps3003/ directory for the DPS3003 or the DPS3203? The folder name doesn't match the filenames

Bug in past makes boot loader halt

A bug in past_read_unit makes the bootloader halt when the current past block is completely full. As past_read_unitdoes not check if the unit was found, it breaks as it reaches the end of the past block and returns the current address. This tricks the BL into thinking the past_upgrade_startedunit exists and thus halts.

The workaround will be simple but for people not having proper/easy JTAG access, upgrading the BL might be difficult. The fix will include garbage collection of the past area when it becomes full after a write, rather than the current scheme of garbage collecting a full past before writing a new unit.

Issues with driving higher loads

When connecting a 4.7ohm 10W resistor at 5V, voltage drops to 1.4V. Currently the OpenDPS firmware is incapable of driving higher loads. Why remains to be found out.

Device Specific Calibration

Not sure if this is an actual bug. But I got my DPS today flashed it with OpenDPS and was playing with it. I currently set the voltage to 5.00 and when I turn it on it drops down to 4.74 even with out a load attached? Is this normal/expected behavior?

Cannot clone

`$ git clone --recursive https://github.com/kanflo/opendps.git
Cloning into 'opendps'...
remote: Counting objects: 864, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 864 (delta 13), reused 19 (delta 8), pack-reused 830
Receiving objects: 100% (864/864), 1.26 MiB | 1.20 MiB/s, done.
Resolving deltas: 100% (433/433), done.
Checking connectivity... done.
Submodule 'dpsctl/uhej' (https://github.com/kanflo/uhej-python.git) registered for path 'dpsctl/uhej'
Submodule 'esp8266-proxy/esp-open-rtos' ([email protected]:SuperHouse/esp-open-rtos.git) registered for path 'esp8266-proxy/esp-open-rtos'
Submodule 'esp8266-proxy/uhej' (https://github.com/kanflo/uhej) registered for path 'esp8266-proxy/uhej'
Submodule 'libopencm3' (https://github.com/libopencm3/libopencm3.git) registered for path 'libopencm3'
Cloning into 'dpsctl/uhej'...
remote: Counting objects: 30, done.
remote: Total 30 (delta 0), reused 0 (delta 0), pack-reused 30
Unpacking objects: 100% (30/30), done.
Checking connectivity... done.
Submodule path 'dpsctl/uhej': checked out 'dbb0a8aa12c58b739a4d3e5a0a4a812187ecc6a8'
Cloning into 'esp8266-proxy/esp-open-rtos'...
The authenticity of host 'github.com (192.30.253.113)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:SuperHouse/esp-open-rtos.git' into submodule path 'esp8266-proxy/esp-open-rtos' failed`

CC branch building issues with Ubuntu 17.10

I have to double check but the linker is complaining. The .data section is overflowing into .rom.
I did not build the CC branch before, but this is in a new 17.10 VM. 5015 support is still broken it seems, so we will see...

makefile can't cope with file path with spaces when flashing

$ make -C opendps flash

Results in

FLASH   opendps.elf
(echo "halt; program /Users/sparky/Documents/Making Projects/DPS5015 Upgrade/opendps/opendps/opendps.elf verify reset" | nc -4 localhost 4444 2>/dev/null) || \
		openocd -f interface/stlink-v2.cfg \
		-f target/stm32f1.cfg \
		-c "program opendps.elf verify reset exit" \
		2>/dev/null
��������Open On-Chip Debugger
> halt; program /Users/sparky/Documents/Making Projects/DPS5015 Upgrade/opendps/opendps/opendps.elf verify reset
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
auto erase enabled
Invalid command argument
image.base_address option value ('Upgrade/opendps/opendps/opendps.elf') is not valid
embedded:startup.tcl:476: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 532
at file "embedded:startup.tcl", line 476
> %

Missing input voltage on display

I seem to be missing the values after the decimal point on my display for the input voltage
This is contrary to what I see on my current development work so I think when the font changes were pulled into this repo something got messed up. Looking closely it looks like the decimal point has shifted and is taking up too much room?

This version
image

My development version (ignore the camera capturing the 3/4)
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.