YOUYUE 858D+ hotair station — reverse engineering #6

Adding some more stuff is always fun.

IMGP8969

Inspired by a recent blog-post on dangerousprototypes.com, I chose to improve the fan-monitoring. The unmodified device only monitors fan voltage, which is close to useless.

With the addition of a current-sense shunt resistor (1 Ohm, very easily done), one can measure the fan-current, which is not perfect, but might be expanded to true commutation-detection (true fan-speed).

This is just the first part, simple current-monitoring. It works nicely.

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

35 Responses to YOUYUE 858D+ hotair station — reverse engineering #6

  1. Rafael says:

    Very nice mod. But PC2 is not a spare PIN, did you disconnect it on the PCB?

    • robert says:

      No I didn’t. PC2 is connected to the connector J5.1 – but nothing is plugged into that. So for all intents and purposes PC2 is a spare pin.

      J5.1 may have some function in a different model, but not in this one.

  2. Dzung Hoang says:

    Is that a 220 ohm 5% resistor inserted to the rightmost pin of U81?

  3. Jon Raymond says:

    I recently purchased a 2014 version of this reflow station. Here are the pictures of the board for reference.

    [Image1][Image2]

    I hope to move the trace connected to pin 28 (Ao5) on the MC to Pin 24 (A01). Should be simple with your firmware. This will free up the I2C to control a display.

    Thoughts?

    • robert says:

      Sounds good to me. The I2C shouldn’t take too much time and throw off the heater control loop though. No blocking code…

      The heating element turns into a red ball of fire if 100% on. The fan cannot cool it down to a safe state. The control loop must work flawlessly at all times.

      Don’t burn down the house.

      • Jon Raymond says:

        Good point.

        Maybe adding a second MC connected as a I2C slave to control the display would be a better route?

        • robert says:

          I don’t know what kind of I2C display you’re planning to use. Assuming 400kHz operation, sending a couple of bytes should be done sub ms, probably not critical with the thermal mass of the heater. Refreshing a large-ish dot-matrix display would be a different thing. Unless the 2nd MCU can be fed with the data significantly faster, I don’t see any benefit to it.

          • Dirty Engineer says:

            I’d like to use the common 1.3″ OLED display as it fits perfectly in the current display window.

            • robert says:

              Well, if you already have the display, measure how long it takes to do a screen update. Then measure how long it takes for the heater control loop to run once and compare the two numbers [via serial debugging & time stamps]. The screen update should take much less time. If that’s the case you might get away with just plugging the display-code in somewhere.

              If the display update takes longer, then it might still work, but you’d most certainly have to modify the PID parameters to compensate.

              It will be a very interesting project for sure.

  4. Sebastian says:

    Hi Robert,

    thanks a lot for your excellent work! I can also that it works on version 6.0.

    What’s strange is that the program says “FAN” if the fan is set to 6 on the potentiometer during start-up. I know this can be tweaked in the settings – but what struggels me is that the error message does not pop-up during normal operation. Could it be that the delay before the measurement is too short and that it’s measuring a higher current because the motor is still spinning up?

    Anyway, at first I thought that your firmware was not working for my unit. I would suggest replacing the “FAN” messages with “FN1” and “FN2” – this would make it easier for the user to understand what’s going on.

    Another suggestion: When keeping the buttons pressed to increase/decrease the temperature setting, it first adds or substracts 1 before continuing with 10s. It would be nice if these 1s are supressed. But this are only cosmetics …

    Anyway – great work! Thanks again!
    Sebastian

  5. Dirk says:

    Hi,
    i’ve git the V4.10 / 20140415 version of the board,
    and would really like to use your firmware, but i ran into a problem.
    i’ve got a spare atmega 328p-pu which can flawless be programmed with the arduino-ide, pushing it into the socket of a arduino duemilanove and connection my usbtinyisp, selecting a Lillypad 328.
    I am sure this medod dues not upload a bootloader since i can not reprogramm it “the arduino way” after that.

    if i programm the blink sketch this way it blinks, so my programming flow seem alright.

    Now to the problem, if i put the programmed chip into the youyue the display stays off, the fan does it’s thing, the air stays cold.

    do i something wrong, or am i missing something?

    Thanks so long, Dirk

    • robert says:

      * No display at all, error codes maybe?
      * Did you recompile the firmware, or did you use the binary for the 168?
      * Did you set the fuse settings for internal RC-oscillator?

      As your board revision seems to be among the ones that work, it appears that the 328 chip is not running, which might be caused by unsuitable clock-source / wrong fuse settings (expecting external x-tal, but the 858D+ board has none).

      • Dirk says:

        No display at all, it stays dark.
        i recompiled from the ino file using the arduino ide since i’m not very familiar with avrdude.

        i’ve checked my programming-method to be working, but i only checked on the arduino board, i’m going to check the if something simple will run on the breadboard without an external clock, thanks for the hint.

        So long, Thanks, Dirk

        • robert says:

          I’ve added a few comments to the code / readme file about FUSE settings & how to make sure they are set correctly using avrdude the Arduino-IDE. If you’re not familiar with avrdude, it is likely that step didn’t happen.

          • Dirk says:

            So, that’s it, the blink sketch (for testing) worked on the arduino board, but not on the breadboard.
            Installing the right bootloader, which apparently sets the fuses, did the job.
            Thank you very much for open sourcing the firmware and also for helping me out getting my tool set straight, thanks!

  6. endevite says:

    So, for anyone not using avrdude to write, (eg FlyPRO on a SP300u), be sure to in device/config.options, to manually set your fuse bits, since they don’t display like everyone elses options with just hard hex flags, I am including a screenshot for what worked for me on a 168-20pu with the current fan current mod (used 1% resistors 1ohm and 10kohm like stated in doc) on a 20140415 v6.0. in FlyPRO 3.32 (I used arduino soft to compile since src is provided as .ino, then used flypro+sp300u to write. note: hex is stored in folder created by arduinos compiler interface that sits in your users temp folder eg: users\username\AppData\Local\Temp\build*****.tmp\ for win7 and up, should be similar for xp but document settings based path for users temp)

    So far seems to work flawlessly.
    http://postimg.org/image/k9b73y04d/

    (I am including this screenshot so others might avoid having a clock divide by 8 switch or other incorrect fuse bits, order of writing using flypro = program,verify,write fuse, or erase,blank check,program,verify,write fuse and you should be good to go matching fuse options from screenshot.)

    Now to sort out my fan spd errors when speed is lower than 2 on startup and calibrate against my thermal meter. Will also be adding another eyelet terminal to bridge the ground from board to case for a decent ground connection due to the screw that should carry on the board ground is glued on and not making a connection on mine. ;p

    Also, is there any progress on the more advanced fan commutation-detection?

    Thank you for the work Robert, good stuff.

  7. Pingback: YOUYUE 858D+ hotair station — BLDC Fan-speed mod | My 2µF

  8. Maximiliano Gasquez says:

    Hello!! great Work!! i want to ask you, i have the same hot air gun, i have an question, the psu is rated 28v? i have to replace because its damaged, thanks!!

Comments are closed.