YOUYUE 858D+ hotair station — reverse engineering #4

Possibly (and hopefully) the last post in this little hot-air station series. I’ve opened and closed that device far too often – and popped out the chip multiple times in each instance. You see the designer failed to add a programming header!


So I finally decided to add my own programming header – lots of cables involved. Enjoy the images. I also took the opportunity to fix some other issues.

The main change in the firmware is that it now fully supports PD / PID control. PD is used if the error is large, PID is used once the temperature is somewhat close to the target value. This avoids issues with the integral part growing out of bounds.

I’ve also changed how some of the vital parameters are handled, i.e. I’ve made them user-configurable. The most important parameters (p_gain, i_gain, d_gain, i_thresh, temp_offset_corr) are available for the user to tweak. And just in case something goes wrong, the default values can be restored as well :-)

I’ve also made sure that values saved to eeprom and restored from eeprom are checked if they are within a predefined range. Hopefully nothing should go wrong, even if the eeprom data is messed up.

These parameters are stored in a struct:

typedef struct CPARAM {
        int16_t value_min;
        int16_t value_max;
        int16_t value;
        uint8_t eep_addr_high;
        uint8_t eep_addr_low;

CPARAM p_gain = { 0, 999, 0, 2, 3 };    // min, max, value, eep_addr_high, eep_addr_low
CPARAM i_gain = { 0, 999, 0, 4, 5 };
CPARAM d_gain = { 0, 999, 0, 6, 7 };
CPARAM i_thresh = { 0, 100, 0, 8, 9 };
CPARAM temp_offset_corr = { -100, 100, 0, 10, 11 };
CPARAM temp_setpoint = { 50, 500, 0, 12, 13 };

This entry was posted in Arduino., Soldering & PCBs. and tagged , , . Bookmark the permalink.

2 Responses to YOUYUE 858D+ hotair station — reverse engineering #4

  1. tx8 says:

    Thank you very much for sharing this! Looks very good. My station should arrive tomorrow. Will mod it right away. Which settings for PID do you generally use? the default ones or do you make settings every time depending on the job?

Leave a Reply

Your email address will not be published. Required fields are marked *



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>