EEVblog Electronics Community Forum

Products => Other Equipment & Products => Topic started by: madworm on November 25, 2013, 06:47:47 pm

Title: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on November 25, 2013, 06:47:47 pm
I'm writing a custom firmware for this device. More to come pretty soon. More info on my blog (http://blog.spitzenpfeil.org/wordpress/2013/11/25/youyue-858d-hotair-station-reverse-engineering-1/#more-7141).

What works so far:

    display
    reading the 2 buttons
    reading the wand sensor (reed contact)
    fan ON / OFF override
    crude heater control – just ON / OFF

Todo:

    read the thermo-couple voltage from the OP-7
    implement a control loop for the temperature (most likely PID) + sensible calibration
    read the fan status signal (not quite sure what it is)


For now, here's a part of the schematic and a short video.

 (https://www.youtube.com/watch?&v=1XuNRPd1y8w#)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: KingsTwisted on November 27, 2013, 06:16:57 am
A bit of a quinky-dink....   

Check out the ** SCHEMATIC ** and  ** PROGRAM **
posted at https://www.eevblog.com/forum/reviews/yihuastandigyum-cha-937d-soldering-station-got-one/ (https://www.eevblog.com/forum/reviews/yihuastandigyum-cha-937d-soldering-station-got-one/)

I just got through reverse engineering a YiHUA 937D Temperature controlled soldering iron.
It's a bit simpler then your 858D+, but you might find some of the work useful.

NOTE: Schematic done with KiCad (Open Source "Schematic and PCB designer" Dave reviewed some time ago)
NOTE: If you want the KiCad files, let me know.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: george graves on November 27, 2013, 06:52:06 am
What's your goals in this?

Someone did a video, and apperently the display is totally faked, and that the air temp totally overshoots at start up.  Is that what you are trying to fix?

Also, think you can do it all with a firmware only solution - if so - that would be niceeeeeeeeeeeeeeeeeeeeeee!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on November 27, 2013, 08:40:25 am
The first goal is to get it to display the actual temperature and not just the set-point. The set-point is a nice-to know, but I really do like to know the real thing.

I've accomplished that. It is usable as of now.

The temperature overshoot issue is my 2nd goal. As of now I have implemented a PD control loop, which works reasonably well, but the parameters need more tweeking. Initial power-up is still a bit iffy with respect to overshoot, but once the device is warmed up, moving the temperature around isn't too bad. Work in progress :-)

Youyue 858D+ running my custom firmware (https://www.youtube.com/watch?v=YkGdvCPwFfY#)

I'll tweak the way the device controls the heater a bit more and may finally go to full PID control. Currently the very low temperatures ( < 130°C ) take too long to reach, as the minimum duty cycle for the heater is still too long, so the tiniest bit of heating action will almost overcompensate any intended temperature drop.

I hope there is a firmware-only fix for this device.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on November 28, 2013, 03:28:10 pm
I think I'm done :-)

The massive overshoots are a thing of the past.

I've also managed to lower the minimum temperature to about 65°C and added the option to let it blow cold air.

Youyue 858D+ no more massive temperature overshoot (https://www.youtube.com/watch?v=RAo3wwsGQOE#)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: jinzo on November 29, 2013, 12:04:35 am
Looks quite interesting. I'm eyeing this hot air station for quite some time, looks like I'll have to get one finally.
For anyone interested in the code itself, it's hosted in madworms git: http://git.spitzenpfeil.org/cgi-bin/gitweb.cgi?p=Youyue-858D-plus.git;a=summary (http://git.spitzenpfeil.org/cgi-bin/gitweb.cgi?p=Youyue-858D-plus.git;a=summary)

Thank you for your work and effort.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on November 29, 2013, 10:46:35 am
Just in case my server should be offline, all the stuff is also on github (https://github.com/madworm/Youyue-858D-plus).
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: amyk on November 29, 2013, 12:18:36 pm
After the improvements, maybe you should call it the 858D++ :D
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on November 29, 2013, 03:18:03 pm
Maybe :-)

Some more stuff:

* persistent set-point storage (I somehow forgot about that)
* better button handling ( +-1 or +-10 depending on press-time)
* displays error message if wand is not connected or temperature out of range
* show °C set-point when temperature is within +- 4°C (don't show insignificant fluctuations on display)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on December 01, 2013, 11:26:55 pm
Firmware now supports full PD / PID control. Vital parameters can be changed by the user (via buttons / display) and are stored in eeprom. The default values can be restored in case something goes wrong.

Tuning PID parameters is a good exercise for one's patience...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Monkeh on December 02, 2013, 12:25:53 am
I'll have to see if I can adapt this to my Atten unit.

E: If the Youyue is meant to be the clone, it's significantly better built than the Atten.. No isolation slots, no attention to clearance, single-sided PCB with all the dodgy reverse soldering that implies, two 14-pin sockets used for the 28-pin micro, flux everywhere, damaged ground lead from poor stripping..

And of course a completely different (Holtek) micro.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: amyk on December 02, 2013, 07:16:11 am
I'll have to see if I can adapt this to my Atten unit.

E: If the Youyue is meant to be the clone, it's significantly better built than the Atten.. No isolation slots, no attention to clearance, single-sided PCB with all the dodgy reverse soldering that implies, two 14-pin sockets used for the 28-pin micro, flux everywhere, damaged ground lead from poor stripping..

And of course a completely different (Holtek) micro.
According to some other posters here, there's also fake Attens. Youyue (Google suggests "youtube" on searching for it :-DD) sounds like a clone of Aoyue. How long until we see a Yatten? :o
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Monkeh on December 02, 2013, 04:55:38 pm
I'll have to see if I can adapt this to my Atten unit.

E: If the Youyue is meant to be the clone, it's significantly better built than the Atten.. No isolation slots, no attention to clearance, single-sided PCB with all the dodgy reverse soldering that implies, two 14-pin sockets used for the 28-pin micro, flux everywhere, damaged ground lead from poor stripping..

And of course a completely different (Holtek) micro.
According to some other posters here, there's also fake Attens. Youyue (Google suggests "youtube" on searching for it :-DD) sounds like a clone of Aoyue. How long until we see a Yatten? :o

Atyue?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on December 02, 2013, 05:19:40 pm
I'll have to see if I can adapt this to my Atten unit.

I think the basic principle of operation is pretty much the same. Even if the Atten units have a different micro. You may get away with designing a small adapter PCB and do a brain-swap with a suitable AVR. Or try getting a compiler for the holtek chip.

BTW, here's that latest (and probably final) video. I'm playing with the PID settings a bit.

As usual, my camera-work is terrible. I know.

Youyue 858D+ with user-configurable PID control (https://www.youtube.com/watch?v=fQZGTBUHnlk#)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Monkeh on December 02, 2013, 05:26:45 pm
I'll have to see if I can adapt this to my Atten unit.

I think the basic principle of operation is pretty much the same. Even if the Atten units have a different micro. You may get away with designing a small adapter PCB and do a brain-swap with a suitable AVR. Or try getting a compiler for the holtek chip.

It appears to be an identical circuit, yes. I'll probably just splice together an adapter as I have a few 328PUs kicking around the place.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on December 02, 2013, 05:49:14 pm
Judging by the number of Atten units out there... you might be able to sell a couple of those adapter boards. Don't forget a programming header. You don't want to know how many times I had to pull those chips out before I added the code to change parameters via the buttons.

If you have the boards made at the usual suspects, you will naturally end up with a couple of spares...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Monkeh on December 02, 2013, 05:54:00 pm
I shall ponder it after I lace one together the old fashioned way :)

On the other hand, I might just make a whole new main board, because what's there is.. far from pretty.

Feast your eyes:
(https://lh3.googleusercontent.com/-s308y5Og8aY/Upv-WHi8gmI/AAAAAAAADbE/tixhatQBA90/w671-h895-no/IMG_20131202_032757.jpg)

I'm sure you recognise that part of the circuit.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on December 02, 2013, 07:27:34 pm
Yes, the colour looks familiar :-DD

And someone forgot to whittle away parts of the PCB in critical locations.

Well, whatever you do, be safe and make a post about it.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Monkeh on December 04, 2013, 05:33:47 am
Yes, the colour looks familiar :-DD

And someone forgot to whittle away parts of the PCB in critical locations.

Well, whatever you do, be safe and make a post about it.

(https://lh6.googleusercontent.com/-J-r2T6Tnmrg/Up647lUqFzI/AAAAAAAADb0/QQSEy8Ffqwo/w542-h722-no/IMG_20131204_050842.jpg)

That didn't work so well.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on December 04, 2013, 04:42:56 pm
Sooo, the TRIAC went with a bang?

Surely something must have (been) shorted out. Was the micro pulled out when it happened?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Monkeh on December 04, 2013, 04:44:41 pm
Sooo, the TRIAC went with a bang?

Surely something must have (been) shorted out. Was the micro pulled out when it happened?

I made a stupid at 4am. I pulled the power TRIAC, forgot the driver. Did not stop the heater coming on. Just added a second one. Gotta go clean that up and replace some resistors..

You did ask me to post whatever I did..  ;D
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Monkeh on December 05, 2013, 12:45:57 am
Well, now that I've tested the pinout, blown the shit out of my TRIAC driver, and renewed my hatred for working with AVRs.. I'll get cracking on a real adapter board for this thing. And order a new driver..
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on January 04, 2014, 02:23:18 pm
Got my simple adapter boards in the mail. Finally a device with an ISP connector. I still have a grudge against the person who did the board layout for omitting it.

It works fine, but it was a trivial thing anyway :-)

Whether the clearance distances to the HV parts are still sufficient is subject do discussion.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Orpheus on January 05, 2014, 04:19:24 pm
Atyue?

Gesundheit
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Monkeh on January 05, 2014, 07:27:23 pm
Atyue?

Gesundheit

Do you know how long I've waited for that?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Lurch on January 05, 2014, 08:01:57 pm
Atyue?

Gesundheit

Do you know how long I've waited for that?

34 Days?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Monkeh on January 05, 2014, 08:02:46 pm
Atyue?

Gesundheit

Do you know how long I've waited for that?

34 Days?

Well.. yes.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DomesticHacks on February 07, 2014, 10:03:03 am
Is the fimware in a usable state for a "every day use"?

I'm planning to buy ether the Youyue or the Atten and i think i will go with this one.
Which one would you suggest?

Does anybody know if the Atten has the same problem with the huge temperature overshoot?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 07, 2014, 11:21:51 am
The firmware will not work with the Atten, as they use a different micro-controller. The Youyue has an ATmega8. Different pinout...

The firmware is usable. Definitely not worse than the original. I haven't felt the need / urge to add features or change things lately.

Most important parameters (PID, shutdown timeout, temperature offset...) are user-configurable via the buttons, so its behaviour can be tweaked without dismantling and reprogramming the chip all the time.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DomesticHacks on February 07, 2014, 11:34:23 am
Ok, thanks I will order the Youyue.
Any other mods I should consider?

BTW nice YouTube channel. Subscribed ;-)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 07, 2014, 11:44:39 am
Hmmm... looking at the unit I got, I'd do the following:

* Check the bolts on the transformer, might need some tightening
* Use a DMM to check if all exposed metal parts are connected to the earth-pin on the plug (safety first)
* Remove some of the paint on the back side of the front-panel for better earth connection to body

And just to be on the safe side, compare the board revision. I doubt they have changed things, but you never know.

If you want the cpu adapter board, I have one left. You'd still need some parts though (2x IC socket with machined pins, pin header, caps). The board is 3.50€ incl. shipping in DE.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DomesticHacks on February 07, 2014, 12:51:54 pm
Isn't the adapter only required for the Atten?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 07, 2014, 01:18:34 pm
Oh, maybe I wasn't too clear about what kind of adapter I was talking about.

The board I was talking about merely adds an ISP connector and a bunch of through-hole pads, should you feel the need to add further mods. You can take a look at it in one of my previous posts.

If you just want to flash the firmware once (you'll have to remove the chip for that, no programming connector on board), you probably don't need it. But if you plan to  improve the code, you will need a programming connector. The alternative is going crazy. Of course you can add an ISP connector by soldering 6 wires, but it's kinda messy. And you don't want to have wires dangling inside close to 220V.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: GiskardReventlov on February 11, 2014, 08:03:02 pm
Nice work!  Now you need to find the OEM and submit a contract to them to fix their broken crap.  Don't go too low,  make it $21,972. Find an escrow service where they put the money then you submit all the code and instructions. Maybe that's too low?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DomesticHacks on February 11, 2014, 10:00:12 pm
I got mine, now and I'm quite pleased with the build quality. I expected worse.
But how can I compile the firmware for an ATmega328p, since it seems to be an Arduino project. Did I need a custom hardware definition for this (with 8Mhz internal oscillator)?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 12, 2014, 09:58:20 am
Choose one of the 'Lily Pad' boards that suit your chip. It has the FUSE settings for running with the internal RC oscillator. OR create a custom board with the settings you desire.

http://www.engbedded.com/fusecalc (http://www.engbedded.com/fusecalc)

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DomesticHacks on February 12, 2014, 10:27:06 am
Ok, thanks.

Do you use the Arduino Bootloader?
I ask because your binary for the ATmega168 has fuses in the filename which enable the bootloader.

When I have the time, I think i will port the firmware to plain AVR-GCC.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 12, 2014, 11:18:09 am
Yes, that is the case. Personally I use a custom board definition that does away with the bootloader crap.

For sake of simplicity I suggested the 'Lily Pad', it should work. No need to fight for another 512 bytes of flash in this case. There's plenty left :-)

Converting to plain avr-gcc should be simple, almost not worth it IMO. Nowadays everybody can use the Arduino stuff, simply unzip it and go. That's quite appealing to me.

I didn't use a whole lot of the Arduino security blanket. As far as I can see, you only need to deal with the analog reference selection and the ADC read. The rest is plain C. The timer registers of the 328 might even be the same as the 168's.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DomesticHacks on February 12, 2014, 12:14:31 pm
Hof did you defined the pin constants, because i get errorls like "'PB1' was not declared in this scope"?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 12, 2014, 12:43:44 pm
That's an issue with iom328.h

The 168 and many many other chips have PB1... defined, the 328 for some reason uses PORTB1...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DomesticHacks on February 12, 2014, 05:55:45 pm
Thanks, that was the problem. The firmware now compiles and runs but the heater didn't work. The fan runs, the reed switch works, I can set the temperature but it doesn't heat up.
I have the same board version as you have.

Edit:
Found the problem:
The settings aren't set to the default ones if the chip EEPROM is empty.
I made a settins reset and it works fine, now (see image).

Thanks

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 12, 2014, 08:20:28 pm
Yes, that is a known issue.

You need to reset to default values after flashing the firmware. Unfortunately the Arduino-IDE can't generate a hex-file for the eeprom. Otherwise I would've fixed that already. I've added a note to the 'modes_of_operation' file in the Docs folder.

Glad it works for you. Happy soldering!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: thm_w on February 13, 2014, 12:02:11 am
You can add eeprom initialization to the code, something like:

Code: [Select]
#define INITIALIZED 0x22

if eep_load(&init) != INITIALIZED
 eep write(default_values)
 ...
 eep write(&init, INITIALIZED)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 13, 2014, 12:20:34 am
Yes. That relies on the eeprom being wiped when flashed. Not always the case though.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: brainwash on February 15, 2014, 01:15:31 am
I don't know which model is this but it hints to a 936 by design. Sorry for hijacking the thread but I initially thought it was going to be the exact same station.
Anyway, some obscure 20-pin chip but everything else seems similar.
Bought from amazon.de, comes with a 110V socket and a shoddy 220V socket adapter.

I haven't probed any signals yet and it will remain that way until I can safely hook the grounding since the included adapter does not pass-through this pin.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Monkeh on February 15, 2014, 01:26:05 am
Looks like the same circuit with yet another layout and µC.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 15, 2014, 10:27:12 am
That's an obscure micro indeed. Couldn't find anything on google at all. At least we can safely say that it doesn't have an on-board eeprom (external atmel chip), and must be really cheap.

The thermo-couple amp is the same as in mine. It seems to be a proven design :-)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DomesticHacks on February 17, 2014, 10:13:28 am
I made kind of a review video on my YOUYUE (in German):

https://www.youtube.com/watch?v=6PAujd4Fye4#ws (https://www.youtube.com/watch?v=6PAujd4Fye4#ws)
https://www.youtube.com/watch?v=6PAujd4Fye4 (https://www.youtube.com/watch?v=6PAujd4Fye4)

@brainwash
That PCB looks scary, especially those resistors.


I think the YOUYUE has the best PCB of all the 858D+ variants and the chances to get a lower quality clone are lower than getting a cloned Atten.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: brainwash on February 17, 2014, 01:18:08 pm
I'll take a look at the review once I get home, though I kind of remember seeing it on the suggestion list.
A nice touch on the build quality is the socketed chip which never made it all the way through.
Unfortunately I was not able to open this thing up when I first got it (it sit unused for two months) and I would never have imagined it is any different than the station on the OP.

It suffers from the same issues though so whenever I will get the time I will try to power up the chip from a standalone PSU and probe the pins, who knows, it might be an Atmel clone. That in itself would be the real find. Otherwise, it would be interesting to see what the signal levels are and if the chip can be swapped with a PIC/AVR/MSP430.

The major issue is that the displayed voltage "snaps" to the set voltage really early: even if the temperature probe is reading 170C the display is showing 350C. Putting the tool back in the stand displays the real temperature. It does not seem to overshoot a lot though, it errs on the low side. Either the gain curve is set really low or the heating element is undersized.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: neslekkim on February 17, 2014, 01:19:01 pm
did anyone come up with an new pcb on these?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tx8 on February 27, 2014, 08:09:55 pm
I did this mod right away after receiving my unit today. Here is are my experiences:

The grounding seems to be a means of population control post 1 child policy.
The complete chassis wasnt grounded including the metal plug and the switching supply. Only the handle was grounded.
It was a hassle to get everything fixed properly. Plus there was really lots of Flux on the board.
After cleaning i didnt get my atmega328 to run although i burned bootloader and uploaded as lillypad etc with Arduino IDE :| . Tried 328p and 328 in various configs. I finally got it running with an breadboard 328 8mhz setting but the 16mhz crystal attached uploading with Nano 3.0 clone as ISP.

Now the display worked the firmware version showing up but afterwards i got error message "FAN" blinking in the display. Tried resetting values... no luck.
So i changed the message for the reed switch to be sure it was the fan voltage. Uncommented tracing part for the fan voltage an the fan seemed to work.  :-/O It was still showing FAN error. But i dont know why. i tweaked here and there an now and in the end got it working. i adjusted the fan default values a little to 120 - 360. I also speeded it up to 1500ms and it is still working reliable now.

Thanks again for loading this up for the community.

Great work!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 27, 2014, 08:32:23 pm
The fan-test is a bit iffy. Starting the fan when the unit is powered up is more useful to ensure the user knows it spins. If the fan should fail during operation, the over-temperature fail-safe will kick in if things get too hot.

Measuring the fan-voltage doesn't really help if the fan stalls for example. The electronics in the fan cut power, and that doesn't reflect in the measured signal at all. It would work to detect if the cable were broken (if the threshold levels are set correctly).

Ideally there should be a fan with a tacho signal, but that is not the case.

It might be possible to add a current-sense resistor for the fan, which should give a bit better feedback as to what the fan is doing. But that would require cutting traces.

---

Using the bootloader while the chip is running with the internal RC oscillator is very unreliable. Using an ISP is always the preferred way.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 27, 2014, 08:48:56 pm
Grounding of my unit wasn't as bad as with yours it seems. I measured continuity (< 1R) for all parts of the case where exposed metal could be found. Just to be on the safe side I removed some paint where metal parts should be touching (front-plate etc.).

From my point of view, the most offending part is the grounding of the heating element case. It should definitely be checked and ideally be redone properly (e.g. with spade-connectors).

We should also make sure not to operate this device without GFI protection.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 01, 2014, 03:35:01 pm
This looks like a nice way to add true fan-failure monitoring:

http://dangerousprototypes.com/2014/03/01/app-note-fan-health-monitoring-and-the-mic502/ (http://dangerousprototypes.com/2014/03/01/app-note-fan-health-monitoring-and-the-mic502/)

It requires a current sense resistor and a couple of comparators + little stuff.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 10, 2014, 06:08:18 pm
Adding the current-sense shunt resistor was trivial. I'll give the commutation-detection a try later.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: mos6502 on March 11, 2014, 11:50:41 am
Is there a reason to not use the original ATMega8? Why go to through the hassle to add an extra PCB?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 11, 2014, 12:11:35 pm
No ISP connector on the damn board!

I don't know about you, but I don't want to pull the chip every time I upgrade the firmware. That happens quite often during development.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: neslekkim on March 11, 2014, 12:16:29 pm
And some of these stations doesnt have the atmel.. .
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 11, 2014, 12:33:48 pm
Which one? Surely different brand / name?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: mos6502 on March 11, 2014, 12:37:26 pm
No ISP connector on the damn board!

I don't know about you, but I don't want to pull the chip every time I upgrade the firmware. That happens quite often during development.

OK, makes sense :D. Just to be sure, I can use the original Mega8 with the custom firmware? I just need to know if I have to order anything else when I buy the station.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: neslekkim on March 11, 2014, 12:42:33 pm
Which one? Surely different brand / name?

Didn't take mine apart yet, but there is an noname up in the thread here, and i have the Atten one, maybe it have the atmel..
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 11, 2014, 12:43:18 pm
Yes, you can use the ATmega8 that comes with it. But then there is no going back, the original firmware cannot be read out, it will be lost when you upgrade. One reason for me to use a new chip.

On 2nd thought, using at least an ATmega168 might be advisable, as I've never checked my code against the old chip. Some timer registers are different... will check if it compiles, but can't test in device.

You may want to get a new DIP28 socket, mine was extremely corroded. But it worked, I just didn't like the looks of it.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: mos6502 on March 11, 2014, 12:47:44 pm
Which one? Surely different brand / name?

Didn't take mine apart yet, but there is an noname up in the thread here, and i have the Atten one, maybe it have the atmel..

Yes, the Atten one is different. That's why the title says "Youyoue"  ;)

Yes, you can use the ATmega8 that comes with it. But then there is no going back, the original firmware cannot be read out, it will be lost when you upgrade. One reason for me to use a new chip.

You may want to get a new DIP28 socket, mine was extremely corroded. But it worked, I just didn't like the looks of it.

Thanks for the info. Luckily I do have a bunch of Mega8s and Mega88s lying around so no problem there.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 11, 2014, 12:49:22 pm
Using the mega88 would be better! They are register compatible with the 168... might have to adapt the Arduino IDE for that chip. Will check.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: mos6502 on March 11, 2014, 12:54:24 pm
Right, thanks. Yeah, the 168/88 has a couple additional registers. No biggie.

The code is for Arduino? Oh no! ;) Guess I'll have to port it to gcc  :)

But seriously, if Arduino has preprocessor commands, you could easily adapt the code for all kinds of CPUs using a couple of #ifs.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 11, 2014, 01:36:06 pm
Could, yes... will, probably not.

Once I start to make it so for less common mcus, I'd have to add entries to 'boards.txt' as well, so people can upload code using the GUI, as apparently using avrdude by hand is too difficult. Too big a can of worms.

Of course I could've used arduino's library for everything to avoid portability issues, but direct port manipulation is so much faster. And I like twiddling bits myself, thank you very much.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tjb1 on March 17, 2014, 03:26:48 pm
I havea WEP 858D arriving today and will attempt to add this firmware to it.  I have a few blank 328P chips I believe so hopefully I can toss one of those inside.  I've seen quite a few threads about the case not being grounded and fusing the neutral instead of the hot so that will be the first thing I check out.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: brainwash on March 19, 2014, 02:18:57 pm
Just had a few minutes to reverse engineer the chip connections on my 898D clone (meta-clone?).

It's a 20 pin chip, no known data on it but it's at least a micro, not just a 7 seg display driver/digital voltmeter.
Vss is on pin 1, Vdd on pin 20, that's similar to the Microchip layout, I don't know about the AVR chips.
Pin 11 is ADC goes through a 10k to pin 6 of OP07 clone which would be the opamp output.
Pins 2, 3, 5, 7, 13-19 drive the 7seg display (SM310401k)
Pin 6 goes to the opto driver.
Pin 10 goes through SD8050 + S8050 -> TIP122 to fan.
Pin 8 goes to button up AND to SCL line of the EEPROM
Pin 9 goes to button down AND to SDA line of the EEPROM
Pin 4 goes to the hall sensor in the handpiece.

The eeprom is a 2k one, I assume it only holds the last set temperature but I have not read it yet.

If anyone has any idea what kind of microcontroller this would be please give me a shout: MK(?)1841D3 C1Y21319, 20 pin PDIP, VDD pin 20, Vss pin 1, 5V, ADC pin 11, possibly I2C on pins 8,9.
Drop-in replacements from Microchip, MSP430 or AVR would also be nice.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tjb1 on March 19, 2014, 07:01:03 pm
Just had a few minutes to reverse engineer the chip connections on my 898D clone (meta-clone?).

It's a 20 pin chip, no known data on it but it's at least a micro, not just a 7 seg display driver/digital voltmeter.
Vss is on pin 1, Vdd on pin 20, that's similar to the Microchip layout, I don't know about the AVR chips.
Pin 11 is ADC goes through a 10k to pin 6 of OP07 clone which would be the opamp output.
Pins 2, 3, 5, 7, 13-19 drive the 7seg display (SM310401k)
Pin 6 goes to the opto driver.
Pin 10 goes through SD8050 + S8050 -> TIP122 to fan.
Pin 8 goes to button up AND to SCL line of the EEPROM
Pin 9 goes to button down AND to SDA line of the EEPROM
Pin 4 goes to the hall sensor in the handpiece.

The eeprom is a 2k one, I assume it only holds the last set temperature but I have not read it yet.

If anyone has any idea what kind of microcontroller this would be please give me a shout: MK(?)1841D3 C1Y21319, 20 pin PDIP, VDD pin 20, Vss pin 1, 5V, ADC pin 11, possibly I2C on pins 8,9.
Drop-in replacements from Microchip, MSP430 or AVR would also be nice.

Mine is also a 20 pin chip unfortunately as I was hoping to load this new firmware.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: amyk on March 19, 2014, 07:46:08 pm
Just had a few minutes to reverse engineer the chip connections on my 898D clone (meta-clone?).

It's a 20 pin chip, no known data on it but it's at least a micro, not just a 7 seg display driver/digital voltmeter.
Vss is on pin 1, Vdd on pin 20, that's similar to the Microchip layout, I don't know about the AVR chips.
Pin 11 is ADC goes through a 10k to pin 6 of OP07 clone which would be the opamp output.
Pins 2, 3, 5, 7, 13-19 drive the 7seg display (SM310401k)
Pin 6 goes to the opto driver.
Pin 10 goes through SD8050 + S8050 -> TIP122 to fan.
Pin 8 goes to button up AND to SCL line of the EEPROM
Pin 9 goes to button down AND to SDA line of the EEPROM
Pin 4 goes to the hall sensor in the handpiece.

The eeprom is a 2k one, I assume it only holds the last set temperature but I have not read it yet.

If anyone has any idea what kind of microcontroller this would be please give me a shout: MK(?)1841D3 C1Y21319, 20 pin PDIP, VDD pin 20, Vss pin 1, 5V, ADC pin 11, possibly I2C on pins 8,9.
Drop-in replacements from Microchip, MSP430 or AVR would also be nice.
Not an AVR, those have power supply either on pins 10 and 20 or somewhere in the middle for the DIP20 versions.

(Someone needs to make a datasheet site that offers parametric search by pinout...)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: GiskardReventlov on March 19, 2014, 10:37:46 pm
If anyone has any idea what kind of microcontroller this would be please give me a shout

Thye might know over in microcontroller/fpga.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: GiskardReventlov on March 19, 2014, 11:37:43 pm
(Someone needs to make a datasheet site that offers parametric search by pinout...)

That's a good idea. There's lots of room for better parametric searching.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tjb1 on March 19, 2014, 11:46:03 pm
The 20 pin chip in mine is

samsung s3f94c4ezz-dk94

http://www.samsung.com/global/business/semiconductor/file/media/MCU_selection_guide-0.pdf (http://www.samsung.com/global/business/semiconductor/file/media/MCU_selection_guide-0.pdf)

Datasheet is here I believe - http://www.zilog.com/index.php?option=com_product&Itemid=26&task=docs&businessLine=&parent_id=172&familyId=173&productId=S3F94C4 (http://www.zilog.com/index.php?option=com_product&Itemid=26&task=docs&businessLine=&parent_id=172&familyId=173&productId=S3F94C4)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: amyk on March 21, 2014, 02:49:14 am
That Samsung matches the pinout for power/gnd, and the fact that pin 4 is input-only also matches how it's used in the circuit. ADC is also available on the right pins.

A little more searching on the Internet about how to read/write those MCUs (the phrase "tool mode" in particular) lead to a forum about programmable remote controls (http://xxx.hifi-remote.com/forums/viewtopic.php?t=12482&postdays=0&postorder=asc&&start=45), and eventually a patent (http://www.freepatentsonline.com/6839774.pdf) and programming software and utilities (http://www.cnatech.com/download.htm) (written in Visual Basic, it seems) for them... anyone want to do some more RE'ing with all this info? ;)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Carrington on April 01, 2014, 06:17:36 pm
MLINK H1 Pictures:
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Carrington on April 01, 2014, 11:06:22 pm
@ madworm: Good job.  :-+
Have you thought about programming this reflow curve (or something similar)?

(https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/?action=dlattach;attach=87512;image)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 02, 2014, 12:22:04 am
I'm not sure that it would be helpful. The air temperature (once outside the device) varies a lot, depending on nozzle size, air-speed, distance to board...

If you need / want that functionality, you'll have to code it yourself.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Carrington on April 02, 2014, 01:20:56 am
I'm not sure that it would be helpful. The air temperature (once outside the device) varies a lot, depending on nozzle size, air-speed, distance to board...
Yes, that's right.

If you need / want that functionality, you'll have to code it yourself.
The truth is that my goal is very specific. I'm thinking about using two 858D + (one above and one below), to create similar conditions as an oven (a small oven).
Are all microcontroller pins used? Because a serial port could be a solution.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 02, 2014, 12:32:16 pm
Code: [Select]
/*
 * PC5: FAN-speed (A5 in Arduino lingo) (OK)
 * PC3: TIP122.base --> FAN (OK)
 * PC2: fan-current-sense mod (OPTIONAL) - see Docs folder
 * PC0: ADC <-- amplif. thermo couple voltage (A0 in Arduino lingo) (OK)
 * #21: AREF <--- about 2.5V as analog reference for ADC
 * PB1: opto-triac driver !! THIS IS DANGEROUS TO USE !! (OK)
 *
 * PB0: 7-seg digit 0 (OK)
 * PB7: 7-seg digit 1 (OK)
 * PB6: 7-seg digit 2 (OK)
 *
 * PD0: 7-seg top (OK)
 * PD1: 7-seg bottom left (OK)
 * PD2: 7-seg bottom (OK)
 * PD3: 7-seg top left (OK)
 * PD4: 7-seg dot (OK)
 * PD5: 7-seg bottom right (OK)
 * PD6: 7-seg middle (OK)
 * PD7: 7-seg top right (OK)
 *
 * PB5: SW1 (button1) (OK)
 * PB2: SW2 (button2) (OK)
 * PB4: reed switch (wand craddle sensor) (OK)
 *
 */
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: GiskardReventlov on April 10, 2014, 04:55:31 am
Atyue?

How about Gaoyue or is this old? Did this start the naming chain reaction or are the names randomized or just a mystery?

It's only an 858 not 858D

eBay auction: #131087676123

Are  these non-D units simpler and therefore less problematic?  Does anyone know how temp is controlled in these?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tx8 on April 10, 2014, 12:20:03 pm
http://www.aliexpress.com/item/Free-shipping-BEST-858-BEST858-BEST-858-858-welding-station-rework-hot-air-gun-solder-Rework/546575498.html (http://www.aliexpress.com/item/Free-shipping-BEST-858-BEST858-BEST-858-858-welding-station-rework-hot-air-gun-solder-Rework/546575498.html)
I dont know, but there are several versions of that one, too. Maybe they are completely analog.  This one i found says 1600w others only 400w. Its a jungle out there. I think the youyue 858D+ is the best with madworms firmware no doubt. Cheers again for that!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Carrington on April 10, 2014, 01:49:00 pm
Are crap, but are cheap and easy to modify.
For example the NT F-204:

(https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/?action=dlattach;attach=88970;image)

Not fun:

(https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/?action=dlattach;attach=88968;image)

Funny:

(https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/?action=dlattach;attach=88972;image)

(https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/?action=dlattach;attach=88974;image)

I need another one below the board.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: GiskardReventlov on April 10, 2014, 03:15:24 pm
Its a jungle out there.

It's a junk-le out there.

Quote
I think the youyue 858D+ is the best with madworms firmware no doubt.

I have been following this thread and I thought I read that you never know what's inside even though the name and model are the same.  I've seen a lot of W.E.P. for sale too. I guess it's a crap shoot.  Emphasis on crap.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tx8 on April 10, 2014, 05:13:01 pm
I have been following this thread and I thought I read that you never know what's inside even though the name and model are the same.  I've seen a lot of W.E.P. for sale too. I guess it's a crap shoot.  Emphasis on crap.
As far as I read the Youyue 858D+ models are all the same technically. Or did i miss something? Build quality varies at least check for propper ground connection for all exposed metal parts.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: linux-works on April 10, 2014, 05:20:40 pm
I have some interest in this thread.  in fact, I was planning on building my own PID controller for the hakko 936 series.

I recently bought some hot tweezers that are 936-style plugs and it would be great to have a dual display to show the set point and the current temp point.  I'd also like a safety auto-off timer and maybe some other features.

my first task would be to create a table of the resistance of the temperature sensor (or the voltage out, if its a thermocouple and an amp stage) so that I can display the 'oper' (current) value.  since this is currently a bang-bang thermostat, the 'admin' (set value) is nothing real or measured but just a reference that is used to stop sending current to the iron.  that can be done entirely in firmware.

I find it very useful to display both, the admin and the oper values; and so I'll probably use a small lcd or maybe dual led display rather than modifying the existing driver board in the base station.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tx8 on April 10, 2014, 05:47:13 pm
I have some interest in this thread.  in fact, I was planning on building my own PID controller for the hakko 936 series.

I recently bought some hot tweezers that are 936-style plugs and it would be great to have a dual display to show the set point and the current temp point.  I'd also like a safety auto-off timer and maybe some other features.


http://makezine.com/2012/01/10/open-source-soldering-iron-driver/ (http://makezine.com/2012/01/10/open-source-soldering-iron-driver/)

too bad its in serbian... might be helpfull
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: linux-works on April 10, 2014, 05:55:54 pm
I'll give that a look.

the basics of heat control are not hard.  I wrote software to 'manage' my espresso machine and its the same exact concept, probably even most of the code can be re-used.

I'm not sure, yet, if the temp sensors in the tweezers and the 936 style iron are t-couples or something else.  I think its simple resistance but I will have to find out for sure.  if its a true t-couple, adafruit makes a nice amplifier/driver board that works a treat.  if its simple resistance, then I can read that pretty much directly with simple circuits.

the value is the user interface and features and I find off-the-shelf consumer grade irons to have really minimal user interfaces and feature sets.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: GiskardReventlov on April 10, 2014, 07:24:37 pm
As far as I read the Youyue 858D+ models are all the same technically. Or did i miss something?

No I think I missed something, there was another model by atten I thought it was a youyue. Dave did a video on the atten. I don't know if he identified the mcu though.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tx8 on April 10, 2014, 07:38:07 pm
Monkeh pointed that out already:


E: If the Youyue is meant to be the clone, it's significantly better built than the Atten.. No isolation slots, no attention to clearance, single-sided PCB with all the dodgy reverse soldering that implies, two 14-pin sockets used for the 28-pin micro, flux everywhere, damaged ground lead from poor stripping..

And of course a completely different (Holtek) micro.

some other guy reported he had mains voltage on the metal nozzle on his atten.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tjb1 on April 13, 2014, 02:46:12 am
So my WEP branded hot air station just died today and I was wondering if someone here could help me troubleshoot it.

I had finished using it and put the gun back into the holster and it did the normal cooldown and shut off routine.  Few minutes later I noticed the fan had come on but the screen was off(power to unit still on).  Removing gun and putting it back in does nothing, fan stays on but no heat when in holster or when removed from holster.  Screen does not come on at all.  If I shut unit off and turn back on, screen comes on real quick and goes back off and then fan comes on.

Using my E4, the first time I took it apart I noticed the big capacitor in the front of the picture was up at 114F.  Put it back together and turned it on again for a little while, turned off and took apart and seen the TIP122 transistor was up around 104F.  The regulator seems to get a little warm but I think that is to be expected.

Board picture - https://www.dropbox.com/s/tr38qt46xdvy74b/2014-04-12%2022.18.11.jpg (https://www.dropbox.com/s/tr38qt46xdvy74b/2014-04-12%2022.18.11.jpg)

(https://dl.dropboxusercontent.com/u/3090951/2014-04-12%2022.18.11.jpg)

Thermal picture - https://www.dropbox.com/s/6mu0yq5gsdpy273/FLIR0067.jpg (https://www.dropbox.com/s/6mu0yq5gsdpy273/FLIR0067.jpg)

(https://dl.dropboxusercontent.com/u/3090951/FLIR0067.jpg)


And a video showing what it is doing

https://www.dropbox.com/s/h36domywr8syxzf/2014-04-12%2022.26.03.mp4 (https://www.dropbox.com/s/h36domywr8syxzf/2014-04-12%2022.26.03.mp4)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tjb1 on April 13, 2014, 04:12:55 am
Well after some poking around with the E4, I did find the issue.  Little ceramic capacitor had a baked top, I'm sure the issue is more than that but I found an axial with the same value and tossed it in and all is good for now.

(https://dl.dropboxusercontent.com/u/3090951/2014-04-12%2023.48.14.jpg)

(https://dl.dropboxusercontent.com/u/3090951/2014-04-12%2023.51.44.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: eldosergio on May 28, 2014, 06:05:19 pm
Hello everybody, I recently bought a Baku 858D and found that, inside, it's like the one from Brainwash or Tjb1 (i.e. 20-pin micro, mine is completely black). The PCB is the same.
I would be interested in adapting this project to my station, as far as I've seen all schematics foresee the same blocks (not-inverting thermocouple amplifier built around OP07), linear regulation of fan voltage and feedback to uC, AC regulation by means of triac + opto 3020 or 3040), it should be simple by just using an adapter board for the uC (display connections still to be verified).
I've found that temperature regulation in my station is not that good. For example, setting a temperature of 350° C and an airflow in the upper part of the scale, looking inside the wand I see the heater glowing red, then the temperature decreases and it looks less bright, then it glows again. It stays hot for 1 second, then "less hot" for another second and it repeats.
Is this a common behaviour with factory firmware, also for Youye or Atten?
I'm a little worried that cycling temperature this way could lead to a premature death of heater...
For the moment I managed to reduce this behaviour by reducing the power to the heater. Basically I put a diode in series to heater with a 20k resistor in parallel to said diode (resistor was needed most probably because the opto needs it, I didn't investigate why without resistor it doesn't work). This way the maximum power to heater is 350W (instead of 700W), it's sufficient also at max airflow and the effect is to reduce temperature swing of the heater (still present, but at a lower degree).
Any plan to introduce a phase modulation of 230V to the heater instead of on/off control (would require an hardware mod)?

Thanks
Sergio
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on May 30, 2014, 10:08:54 pm
I'm certainly not going to touch any of the HV stuff in there. If it ain't broken, don't fix it.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: rob77 on May 30, 2014, 11:01:01 pm
very interresting thread and excellent job madworm !
i just wanted to suggest the proskit SS-969 - it's the same unit from outside, and it has a atmega8 inside - so you can mod the firmware easilly (you won't be surprised by a weird 20pin MCU while expecting an atmega)
on the other hand i have no need to mod my SS-969 - it works like a charm. and the build quality is simply excellent for a product which costs ~70Eur.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: GerdJ on July 23, 2014, 12:19:46 pm
Hi there,
really nice work creating a custom firmware for the YouYue 858D+.

I own a Atten 858D+, which has a different board and mcu.
I found the schematics for the Atten 858D+ (don't know if they are 100% correct!), but I think it should not be a problem to change the mcu to a Atmega mcu like done for the YouYue with some sort of adapter board.

My question is, how to calibrate the device after changing the firmware. I guess that YouYue maybe has another temp-sensor values compared to the Atten. I need to know what value the sensor (resistance in ohm) will produce at a certain temperature. Or am I totally wrong and it's much easier?

Anyone can help?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 23, 2014, 12:30:00 pm
You just need an external high-temperature thermometer to calibrate the temperature sensor. Many multimeters can connect to thermo-couples, which can do a couple of hundred °C.

It is not hard to make a table of raw ADC values vs. measured temperature. In case of the Youyue, the relationship was linear. Do a least-square fit on the data with a linear model (openoffice can do that), and you have your 2 parameters to translate between raw-ADC and temperature.

So... when you first upload your alpha-firmware, set the duty cycle for the heater to a safe level (e.g. 1% or so), let your firmware show the raw ADC value on the display and measure the air temperature at the nozzle with a thermo couple. Then increase the duty cycle carefully a bit to get a higher temperature and repeat the process for enough data points up to 500°C or so. As at this stage there cannot be any temperature regulation, make sure you have a very close watch on the heater and have the fan spin at maximum rpm. Once you have enough data points to calibrate the sensor, your next step should be implementing a fool-proof over-temperature shutdown. Once that works, do PID and user interface.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Carrington on July 23, 2014, 04:03:44 pm
You just need an external high-temperature thermometer to calibrate the temperature sensor. Many multimeters can connect to thermo-couples, which can do a couple of hundred °C.

It is not hard to make a table of raw ADC values vs. measured temperature. In case of the Youyue, the relationship was linear. Do a least-square fit on the data with a linear model (openoffice can do that), and you have your 2 parameters to translate between raw-ADC and temperature.

So... when you first upload your alpha-firmware, set the duty cycle for the heater to a safe level (e.g. 1% or so), let your firmware show the raw ADC value on the display and measure the air temperature at the nozzle with a thermo couple. Then increase the duty cycle carefully a bit to get a higher temperature and repeat the process for enough data points up to 500°C or so. As at this stage there cannot be any temperature regulation, make sure you have a very close watch on the heater and have the fan spin at maximum rpm. Once you have enough data points to calibrate the sensor, your next step should be implementing a fool-proof over-temperature shutdown. Once that works, do PID and user interface.

Linear? Sure?

And the cold junction? You have an error equivalent to the room temperature.

Look attached code (is not finished), I have tried several PID, but I can't get it work properly (without cheating).  |O
I attached the impulse response, but the heater is turned off after reach 450º C.
So I use the RC response as approach, because runing free it  probably reach over 600° C.
I think that is necessary a zero crossing detection. It need also different KP, KD and KI values, according to the air flow (different response).

I forgot to mention that I use only the AVR's internal reference and a gain of ~57, so the resolution is ~0.5ºC (theoretical, of course, and without the ADC errors).

The truth is that this stuff are boring me...



Another thing: The 858D uses a single resistor (to save two cents) for each digit (as current limiting). So, if you turn on several segments simultaneously the brightness varies. My code only allows one segment active at a time, for each digit.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Carrington on July 23, 2014, 05:08:30 pm
I need to know what value the sensor (resistance in ohm) will produce at a certain temperature.
uVolts, the temp. sensor is a thermocouple.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 23, 2014, 05:11:42 pm
If you want to do a polynomial fit on the data, go ahead! If you want to fully characterize the system analytically and go crazy... your choice.

I just did a 2-point calibration for the readings and checked if the middle point is close enough, and that was the case. This is not a precision instrument that requires 0.5°C resolution, +-5°C is plenty good.

Sure, the fan-speed messes with the PID a bit, but you can find parameters that give overall satisfactory results applying the principle of trial and error. You do have to limit the I-term if you're far away from the target.

If your code is giving you a headache, you may want to look at mine. Don't re-invent the wheel. It works quite well.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Carrington on July 23, 2014, 05:46:54 pm
LOL...

You can say whatever the hell you want.

I attached a simplified version, only ON/OFF control. If someone wants to use it as a starting point, go ahead.

Cheers,
Carrington.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 23, 2014, 06:56:34 pm
Dude! Chill out a bit, will ya?

You might not have noticed yourself, but you appear to be a bit on the edge. Have a beer or whatever people drink these days and wind down a couple of orders of magnitude.

Have a nice day.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Carrington on July 23, 2014, 07:06:02 pm
Dude! Chill out a bit, will ya?

You might not have noticed yourself, but you appear to be a bit on the edge. Have a beer or whatever people drink these days and wind down a couple of orders of magnitude.

Have a nice day.
  :-//

You have a PM...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Carrington on July 23, 2014, 10:24:22 pm
I just want add this:

If anyone has any suggestions about the PID (fuzzy PID, tuning, discrete implementation, etc) and also about the triac control method (power regulation for example), please feel free to share.

http://en.wikipedia.org/wiki/PID_controller (http://en.wikipedia.org/wiki/PID_controller)
http://en.wikipedia.org/wiki/Integral_windup (http://en.wikipedia.org/wiki/Integral_windup)
http://bestune.50megs.com/typeABC.htm (http://bestune.50megs.com/typeABC.htm)
http://www.yokogawa.com/ns/support/onepoint/utadv/ns-onepoint-utadv14.htm (http://www.yokogawa.com/ns/support/onepoint/utadv/ns-onepoint-utadv14.htm)

Notes: The heated behaves as an integrator and have a large thermal inertia.
Also should be noted that the HW (this HW sucks) don't have a zero crossing detector, but make one is easy and cheap.
A a zero crossing detector is essential for phase control, I think that is the best way to control this thing.
The sensor (thermocuople) is deep inside the hot air gun, so obviously, the temperature at the output is different.
Also exist thermal gradients inside the hot air gun (only a few degrees).



I don't plan to continue with all this stuff, if anyone is interested in continuing (probably nobody), go ahead.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: texaspyro on November 29, 2014, 12:05:46 am
Just had a few minutes to reverse engineer the chip connections on my 898D clone (meta-clone?).

It's a 20 pin chip, no known data on it but it's at least a micro, not just a 7 seg display driver/digital voltmeter.
Vss is on pin 1, Vdd on pin 20, that's similar to the Microchip layout, I don't know about the AVR chips.
Pin 11 is ADC goes through a 10k to pin 6 of OP07 clone which would be the opamp output.
Pins 2, 3, 5, 7, 13-19 drive the 7seg display (SM310401k)
Pin 6 goes to the opto driver.
Pin 10 goes through SD8050 + S8050 -> TIP122 to fan.
Pin 8 goes to button up AND to SCL line of the EEPROM
Pin 9 goes to button down AND to SDA line of the EEPROM
Pin 4 goes to the hall sensor in the handpiece.

The eeprom is a 2k one, I assume it only holds the last set temperature but I have not read it yet.

If anyone has any idea what kind of microcontroller this would be please give me a shout: MK(?)1841D3 C1Y21319, 20 pin PDIP, VDD pin 20, Vss pin 1, 5V, ADC pin 11, possibly I2C on pins 8,9.
Drop-in replacements from Microchip, MSP430 or AVR would also be nice.

I traced out the circuit of my Yihua 858D.  It also uses the 20 pin Samsung processor.  The pinouts are different from the Atten unit:

1 - GND
2 - SCL
3 - SDA
4 - Reed switch
5 - LED 5
6 - LED 3 (decimal point)
7 - LED 2
8 - LED 1
9 - LED digit 2
10 - LED digi 3
11 - LED digit 1
12 - Fan
13 - Heater
14 - temperature
15 - LED 4
16 - LED 10
17 - LED 6/button 2
18 - LED 9/button 1
19 - button common
20 - Vcc

LED segments:
10 - top
9 - top left
6 - top right
5 - middle
1 - bottom left
4 - bottom right
2 - bottom
3 - decimal point
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ao2 on January 25, 2015, 12:59:58 pm
Just had a few minutes to reverse engineer the chip connections on my 898D clone (meta-clone?).

It's a 20 pin chip, no known data on it but it's at least a micro, not just a 7 seg display driver/digital voltmeter.
...

If anyone has any idea what kind of microcontroller this would be please give me a shout: MK(?)1841D3 C1Y21319, 20 pin PDIP, VDD pin 20, Vss pin 1, 5V, ADC pin 11, possibly I2C on pins 8,9.
Drop-in replacements from Microchip, MSP430 or AVR would also be nice.

I traced out the circuit of my Yihua 858D.  It also uses the 20 pin Samsung processor.  The pinouts are different from the Atten unit:
...

I've got a Baku 858D and this unit also comes with a MK1841D3 MCU, the datasheet is here:
http://wenku.baidu.com/view/41d09779650e52ea551898f2.html (http://wenku.baidu.com/view/41d09779650e52ea551898f2.html)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Ardvaark on February 05, 2015, 05:19:08 am
Thanks guys! I burned the new 1.33 firmware onto a 168 and popped it into my Youyue 858d+ and its a new machine. I love it now. I actually bought another machine and chip to do this mod to.
Very nice!

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 05, 2015, 02:38:18 pm
Glad you like it!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Ardvaark on February 05, 2015, 05:27:35 pm
Glad you like it!

The stock firmware I posted below turns out to be garbage.
I first tried loading the new firmware onto the 8 and it did not work at all, black screen but the fan would turn. That's when I used the 168 and it worked perfectly.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 05, 2015, 05:35:25 pm
You can download the firmware, but look at the text file!

It is way to regular and repetitive. It's garbage. Normal code looks quite random on that level (except text strings).
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Ardvaark on February 05, 2015, 05:55:29 pm
I did not know. Thanks!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bianchifan on March 26, 2015, 12:46:44 pm
I just wanna order a rework station from Banggood when I found the Youyue 858 at Amazon's with mostly positive reviews and the option on a custom FW... at last I fetched one  in a well known bay ;)

For I remembered eevblog from some time ago (Transistor/componen tester, chineses soldering stations..) I did a little look..well, I found this here.
Thank you!

My problem, long time ago I did something with ATTiny13, that's all.
One year ago I started with Arduino, low flame only.
No ATMegas lying around, only acouple of Tiny13 and pro minis.
Ok, the minis have a 328p on board so let's go and find some datasheets, a veroboard, some wire..
Hmm. only the last digit was showing something..what's going on??
I checked  all connections, again and again...
AT least I searched for the pins in the source...what? PB6? PB7? What's that?
Arduinos doesn't know.
So I stripped out the crystal and did the two forgotten traces..oh no!
Only lotta weired stuff, fan on, fan off, heat..on..off..display dangling around..when pressing the lower button it ran up to 992!??!??
I checked all connections, again and again.
I checked the code, changed some things, compiled again and again..nothing, the station kept spinning around.
I tried another code I found in here, at858d, wow, 150 degrees!
Today early morning I checked for the upper button 'cause it was hardly reacting.
PB2? PB5? In Arduino spraak there are no PBs, only A..s and D..s.
AT least I found it, PB5. For me it's only SCLK.
But it's also D13, and D13 is standard LED.... :palm:|O |O :-DD
After cutting the trace everything was all right.
I guess, I'll give me some beer tonight
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: littlebill on April 14, 2015, 09:06:57 pm
based on this post I bought this unit.
http://www.amazon.com/gp/product/B00P8Z4RPG/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1 (http://www.amazon.com/gp/product/B00P8Z4RPG/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1)

i have just started with arduino. i am very new to all of this, also did some work with a rasp pi. http://www.dslreports.com/forum/r29940332-My-little-Raspberry-Pi-Project (http://www.dslreports.com/forum/r29940332-My-little-Raspberry-Pi-Project)

i am extremely noobish

that said i will check my unit once it arrives, although this is my first reflow, i love modifying everything, my question since i am new, how do i program this chip

i assume i would order this,

http://www.ebay.com/itm/1-x-ATMEL-Atmega168-20PU-AVR-8-bit-Microcontroller-FREE-SHIPPING-/321044246485?pt=LH_DefaultDomain_0&hash=item4abfba6fd5 (http://www.ebay.com/itm/1-x-ATMEL-Atmega168-20PU-AVR-8-bit-Microcontroller-FREE-SHIPPING-/321044246485?pt=LH_DefaultDomain_0&hash=item4abfba6fd5)

i have a Uno but a counterfeit one, my chip is not socket ted, so what exactly are my next steps, other then to verify?

if the programmer becomes expensive, i will even pay for a chip to be flashed

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 14, 2015, 09:21:17 pm
You can use the Arduino UNO as an AVR programmer by loading the "Arduino-ISP" program & wiring it to the new ATmega168 on a breadboard.

On the other hand, decent AVR programmers are quite cheap, e.g. the "USBasp" (supported by Arduino-IDE) is way below 10$ on ebay.

If your unit is similar to mine in terms of build quality, you may want to get a new socket for the chip. Mine was badly oxidized and wasn't too happy when I extracted the IC.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: littlebill on April 14, 2015, 09:32:32 pm
"You can use the Arduino UNO as an AVR programmer by loading the "Arduino-ISP" program & wiring it to the new ATmega168 on a breadboard."

like i said i am newbish, i see the isp stuff in arduino program, is there some form of wiring diagram i can follow or a basic link?

i am assuming i can use this?
http://arduino.cc/en/Tutorial/ArduinoISP (http://arduino.cc/en/Tutorial/ArduinoISP)

at the bottom is the diagram, which one do i use? the internal or external clock?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 14, 2015, 10:04:43 pm
External crystal is preferred. Less chance to get stuck with an unusable chip.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: littlebill on April 14, 2015, 10:59:36 pm
i only need that for the programming right? i don't need to transfer that over to the actual machine right?

this comment concerns me

"(If you select the wrong item and configure the microcontroller to use an external clock, it won't work unless you connect one.) "
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bianchifan on April 18, 2015, 05:10:50 pm
Today I decided to give the current mod a chance, although I can't see clearly for the advantage.

But let's start... howto and ino told me something about PC2..!?? ::)
On my PCB PC2 is connected to J5 via 10k! Ok, J5 isn't wired yet..but nobody knows.
Nevertheless two analogs wre free, PC1 and PC4, last one was my chosen one.

First, it works! That's fine!

But something is weired..

Sometimes the station doesn't start, only error message is displayed, something with fan.
Sometimes it starts after turning the hadle in the cradle.
Sometimes it starts after taken it off and into again.
Sometimes I must power off and on again a few times.
I couldn't imagine what's wrong with the reed.

On full speed (Pos 9) presets above 300° C won't be reached, the fan fan speed must be reduced to Pos 5 for reaching the preset.
For ex. preset 320° C, full speed Pos 9 - temp raising stops at about 280 degs.
At preset 400° C stopping occurs at about 300 to 320 degs.
Otherwise when preset is reached with low to middle speed, it remains stable even when speed is boosted to 9.
Perhaps the fan is more powerful after this mod.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 18, 2015, 06:31:40 pm
Regarding the turn-on behaviour:

a) what firmware do you use

b) error codes?

There have been issues with some ATmega168 chips that for whatever reason seem to like to fire their watchdog timers for no apparent reason. This was usually fixed by replacing the chip with a known-good [genuine] one.

c) https://github.com/madworm/Youyue-858D-plus/blob/master/Docs/modes_of_operation.txt

It seems like the PID parameters are not quite optimal for your device. The issue you observe with the fan-speed and not reaching the set-point could be due to a somewhat weaker heating element. You can try to increase the capture range for the integral control, which should correct that temperature offset.

options:

a) slowly increase the "iTh" parameter [setup menu] and see if that fixes it. This may worsen temperature regulation.
b) if a) doesn't sufficiently help, reset the values to default [see manual] and try increasing the "P" parameter a bit.

If you find values that work for your device, write them on a sticker and attach it to the bottom of it.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: littlebill on April 18, 2015, 06:32:46 pm
i only need that for the programming right? i don't need to transfer that over to the actual machine right?

this comment concerns me

"(If you select the wrong item and configure the microcontroller to use an external clock, it won't work unless you connect one.) "

any help with this?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 18, 2015, 06:42:41 pm
Get a breadboard, a genuine ATmega168 (or 328), a 16MHz crystal (HC-49U package) and 2x 20pF capacitors. The chip is a few bucks, the xtal + caps less than 1 buck (combined).

https://www.adafruit.com/products/2215 (https://www.adafruit.com/products/2215)
https://www.adafruit.com/categories/22 (https://www.adafruit.com/categories/22)

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 18, 2015, 06:46:11 pm
Setting the chip to using an external clock is ONLY a problem IF there is no external clock. Therefore the strong advice to get the crystal. Even if this step should go wrong, the chip can still be reprogrammed to correct settings. Without the crystal, it will appear dead.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bianchifan on April 19, 2015, 02:44:30 pm
a) what firmware do you use

the last one, should be 1.37

b) error codes?

FAN, CUR

There have been issues with some ATmega168 ..

I'm using a modified Arduino pro mini - ATMEGA328P

I switched back today, no current hack anymore.
I do not think on the PID, should be anything else.

Without current hack preset Temps will be reached in a very short time, even with full fan speed.
But cooling down will last longer, much longer.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 19, 2015, 05:41:23 pm
OK...

the current-sense mod per se is not really helpful, as you've found out. The current consumption of the BLDC fan doesn't vary significantly enough to be useful (indicate stall).

A true measure of RPM would be needed. You may want to look into commutation-detection (Docs folder). I have a very crude prototype, but never got any further with it. It needs to be tuned quite a bit to work, ideally with a scope. The waveform changes quite a bit with fan-speed.

https://www.youtube.com/watch?v=uFG36IYRQAc (https://www.youtube.com/watch?v=uFG36IYRQAc)

If you don't want to go any further with this, I suggest to use the standard firmware settings.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: giovannirat on April 19, 2015, 05:43:30 pm
I have a similiar problem as bianchifan.

My hardware:
Youyue 858D+
PCB ver 6.0    20140415
ATMEGA 328P  (tried  3 different chips)

firmware 1.37

I have also a strange turn-on behaviour:
The first time i power on the station i get the following messages on the display:  005 -> 008 -> rSt
Power off the station and power on again immediately  has the following result:  005 (visible very short time, about 0,5s) -> 000 -> 1.37 ->  ---   (sometimes also 005 -> 1.37 -> 000 -> 1.37 )
Then the station works as it should .

BTW: Due to a failure of  the station I opened  the handle connector. And guess, what i found: One cable (for the reed relay) in the connector was disconnected and the heat shrink tubes in the connetor were NOT shrinked !!!  So may have a look at that.

Sometimes I must power off and on again a few times.

No idea what's wrong. :-//


Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 19, 2015, 06:28:23 pm
Code: [Select]
#ifdef DISPLAY_MCUSR
        HEATER_OFF;
        FAN_ON;
        display_number(_mcusr);
        MCUSR = 0;
        //
        // ATmega168 MCUSR (MSB to LSB): x-x-x-x-WDRF-BORF-EXTRF-PORF
        //
        delay(1000);
#endif

#ifdef USE_WATCHDOG
        if (_mcusr & _BV(WDRF)) {
                // there was a watchdog reset - should never ever happen
                HEATER_OFF;
                FAN_ON;
                while (1) {
                        display_string("RST");
                        delay(1000);
                        clear_display();
                        delay(1000);
                }
        }

005: BORF (brown-out reset flag) + PORF (power-on reset flag) bits are set. NORMAL after cold-start.
000: strange, NOT normal.
008: the WDRF (watch-dog reset flag) bit is set. This should NEVER EVER happen.

Make sure you DO NOT USE any form of bootloader when the watchdog function is used!


The next thing is speculation:

It could be that the on-board RC-oscillator is a bit wonky in your chips, meaning it runs quite a bit too slow.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bianchifan on April 21, 2015, 12:58:34 pm
the current-sense mod per se is not really helpful, as you've found out. The current consumption of the BLDC fan doesn't vary significantly enough to be useful (indicate stall).
I do think so, too.

It could be that the on-board RC-oscillator is a bit wonky in your chips, meaning it runs quite a bit too slow.
Hmm.. maybe I'll solder back the crystal..
As I told above, sometimes the station starts more than once, even without current mod.
FW Display, FAN on, off, FW display, FAN on, off.., "- - -" and running.

Nevertheless I did a little change to the Fan_test function for more comfort.
So no need any more for turning the switch always on and off.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 21, 2015, 02:38:48 pm
If the chip resets multiple times, I suggest looking at

a) power supply: stable 5V?
b) enough decoupling capacitors?

That definitely sounds like a very unhappy AVR.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: littlebill on April 21, 2015, 04:28:50 pm
my unit came in today,

i wonder if they redid the programming, mine seems to show the actual temperature and seems to have zero overshoot,

mine actually seems to work very similar to your modification, i will post a video of it running when i get a minute


My hardware:
Youyue 858D+
PCB ver 6.0    20140415
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 21, 2015, 04:36:04 pm
That should be interesting!

A bit of caution though. Only because it doesn't display overshoot doesn't mean there isn't any >:D

Or have you actually measured temperature at the nozzle?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: littlebill on April 21, 2015, 05:22:01 pm
i was watching the blinking . which indicates more so then the temperature number that said, i redid the video and used a temp prob best i could by myself, let me know what you think,

for me i honestly think its fine.

Youyue 858D+ (https://www.youtube.com/watch?v=zZj_Dv1Q3IM#)

whats the trick to imbed the youtube video here?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 21, 2015, 05:43:47 pm
Your video contains some sort of music... it is blocked here.

Now I have to use the proxy plugin again...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 21, 2015, 05:47:34 pm
It runs quite a bit hotter than "advertised", doesn't it?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: littlebill on April 21, 2015, 05:47:56 pm
sorry, didn't even realize it was on

how do i embed?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 21, 2015, 05:48:45 pm
I think you just paste the link.

Youyue 858D+ (https://www.youtube.com/watch?v=zZj_Dv1Q3IM#)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: littlebill on April 21, 2015, 05:49:23 pm
not showing up like yours, mine just shows the url
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 21, 2015, 05:50:26 pm
It doesn't like "https"
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: littlebill on April 21, 2015, 05:52:41 pm
that fixed it ty
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 21, 2015, 05:53:36 pm
Code: [Select]
https://www.youtube.com/watch?v=zZj_Dv1Q3IM
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Leonelf on May 02, 2015, 04:57:01 pm
I flashed your firmware on an ATMega328, but the thing just stays in this "FANSpd" mode. turning the dial for the airspeed doesnt do anything :(
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on May 02, 2015, 07:03:32 pm
Did you read the manual?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Leonelf on May 03, 2015, 09:05:03 am
the stations' manual just says that the knob exists to adjust temperature.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on May 03, 2015, 10:24:47 am
What are you talking about? There are NO knobs for temperature adjustment.

Knob --> fanspeed
buttons --> temperature + options

It appears to me you've got a completely different device.

And by 'manual' I meant the one I wrote for the custom firmware. Before you complain, please RTFM!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Leonelf on May 03, 2015, 05:54:19 pm
sry, was tired and misspelled^^
It *should* control the fanspeed, but doesnt (at least w/ your firmware). but I read the intro post (and saw the fanspeed circuit), so I assume my device is just damaged inside or so, since the fanspeed should be adjustable independently from the firmware.
I've read the readme and saw that "FANSpd" means that it's out of range, but turning the knob didn't do anything.
I'll open the thing up and look for the board rev. anyways^^

EDIT: Datecode is 20140415 which was confirmed to work by "Aric" in the comments of your ino file, so I assume my unit is semi-dead...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on May 03, 2015, 06:30:58 pm
If the fan doesn't ever spin or the fan speed doesn't change at all when turning the knob, check the potentiometer!

The type used in the device is shall we say not the most reliable design. I've had to replace the one in mine, the wiper didn't make proper contact with the resistive element anymore and it behaved quite erratic. I was lucky and found the exact type on ebay.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Leonelf on May 03, 2015, 06:38:35 pm
turning the poti changes the resistance (measured it), so I assume some rest of the circuit is improper... I saw an empty transistor footprint w/ tin filled holes

EDIT:
Got a new unit from the seller on amazon (replacement). Now your firmware works. I assume the old unit was defective. Love your firmware!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: krivx on July 02, 2015, 03:57:36 pm
Has anyone looked at modifying this firmware for use on non-Atmega boards, like the S3F94C4 in the Yihua? The pinout is not exactly the same but could an Atmega with altered firmware be implanted?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: moemoe on July 09, 2015, 07:54:26 pm
JFYI: There are some new releases available, depending on current merge status on
https://github.com/maugsburger/Youyue-858D-plus/tree/master/binaries or https://github.com/madworm/Youyue-858D-plus/tree/master/binaries
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ljkenny on September 30, 2015, 11:06:46 am
I just bought a YouYue 858d+ from HERE (http://"http://www.aliexpress.com/item/Free-shipping-858D-ESD-Soldering-Station-Hot-air-rework-station-LED-Digital-Hot-Air-Gun-220V/32324103731.html"), but a UYue turned up instead.

(https://goo.gl/e014WV)

Inside it looks like brainwash's, but the 2014 version, rather than the 2011 one shown in his pictures.

@brainwash: Did you ever get round to reverse engineering it?

I saw the pinouts you traced, but did you ever get round to re-purposing/re-flashing the device?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on October 20, 2015, 12:52:36 am
Made a board to adapt the samsung 20 pin chip to the atmega328P.  I had to cut 2 traces on the board because the digits and the up/down buttons share 2 pins on the samsung.  The gray and yellow wires connect the atmel to the digits and they are working.  The rest of the functions seem to work also, fan speed, cradle sense and temp sense and buttons. This original board is pretty lousy, there are about 6 or seven resistors that don't match the silkscreen value marked with a line next to them.  I wonder if I should change them.  I also have to adjust the overshoot.
 
(https://wayneg.smugmug.com/Electronics/i-DDsDzQN/0/X3/20151019_202141-X3.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: krivx on October 20, 2015, 06:32:30 am
Made a board to adapt the samsung 20 pin chip to the atmega328P.  I had to cut 2 traces on the board because the digits and the up/down buttons share 2 pins on the samsung.  The gray and yellow wires connect the atmel to the digits and they are working.  The rest of the functions seem to work also, fan speed, cradle sense and temp sense and buttons. This original board is pretty lousy, there are about 6 or seven resistors that don't match the silkscreen value marked with a line next to them.  I wonder if I should change them.  I also have to adjust the overshoot.
 
(https://wayneg.smugmug.com/Electronics/i-DDsDzQN/0/X3/20151019_202141-X3.jpg)

Care to share the files?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on October 20, 2015, 11:21:39 am
Sure, I also had 40 made I could mail them out for $1.50 each if the shipping wasn't too high.  I could also assemble them with the chip and resistors/cap for $5. Still have to figure out the FAN SPD error on startup sometimes.  I adjusted the parameters and it went away, but the error came back when I started it this morning the first time.   Attached is the Gerber files and the layout done in Sprint Layout PCB designer.

(https://wayneg.smugmug.com/Electronics/i-zxCbHFX/2/L/858D%20adapter%20board-L.jpg)

Updated with ICSP header, redownload if gotten early.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on October 21, 2015, 03:49:30 am
Upon further testing it seems the shitty board/samsung chip lacks reporting the Fan Speed.  This on the atmega8 board reports to pin 28 of the atmel, gonna have to modify the board with 2 more resistors to create a voltage divider and read the voltage at the potentiometer directly.   

So in summary, the board plugs into the 20 pin socket, 2 traces are cut going to the LED segments, 2 Wires go from the header pins (labeled 5 and 13) on the board and go to 2 legs of the segments. 1 wire goes from the FANSPD header pin to 1 of the legs of the potentiometer.  The other pins labeled 24, 25, and 27 are just breakouts from the atmel in case of future development, they are the unused analog pins.  I'll post more pics when I take it apart again. 

(https://wayneg.smugmug.com/Electronics/i-ZSScWQZ/0/M/858D%20board-M.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on October 21, 2015, 12:56:45 pm
Now I found a new problem.  When the temperature is set to 50, it functions, reads 50, but the temperature coming out the nozzle is 100.  It doesn't seem to be able to go below 100 at the tip even though the display is saying 50.  If I increase the temperature to 160, it says 160 and the air coming out is ~160.  If i go higher the temperature gets hotter, but struggles to come close to the marked temperature.  set at 390, the highest I could get it to read at the tip was ~250.   
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on October 21, 2015, 01:09:39 pm
The heater might be weaker.

250°C at nozzle vs 390°C setpoint is way outside the "capture range" for the integral control part (can be changed in config menu), which will "pull" the temperature towards the setpoint, once inside the range.

I'd try increasind the P-parameter carefully. This will effectively increase the on-time for the heater and should allow for higher temperatures. You will most likely have to tweak "I" and "D" as well, to optimize over-shoot and offset and avoid oscillation.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: brainwash on October 21, 2015, 01:20:30 pm
@brainwash: Did you ever get round to reverse engineering it?

I saw the pinouts you traced, but did you ever get round to re-purposing/re-flashing the device?

No, as I wrote, I don't think it makes any sense to go that way and re-engineer the whole thing from scratch. Better to stick an AVR in there or some of the cheap Nano clones, rewire and flash the firmware from this thread. Much less work and with a higher chance of success.

How do you guys measure the temperature of the nozzle? At what distance, which nozzle, what kind of temperature probe, is it against a surface (black? shiny?) or in thin air? All these measurements are nonsense unless we agree on a common measuring technique.

Now, w.r.t. real usage, how do you set the airflow and temperature for reflowing a BGA chip (SDRAM)? What successful settings have you used to desolder a larger BGA chip (like PS3 one)? I haven't succeeded in getting chips bigger than 50x50mm to lift cleanly off the board. For a PS3 video chip I even build my own nozzle but it was not getting hot enough, I had to resort to a paint stripper.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on October 21, 2015, 01:34:42 pm
Thanks madworm, I'll check it out later tonight.  What about the temperature reading 50, but the air coming out is 100+.  Do I need to calibrate the thermocouple over the temperature range?  Sorry, 1 more thing.  I get a rst every once in a while on startup, I have one 0.1uF decoupling cap on the board, I notice your board has 2, should I add more.  Thanks again.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on October 21, 2015, 01:45:44 pm
Adding more decoupling capacitance is good.

However, if you repeatedly get the "RST" error, consider replacing the AVR chip.

I have had many people contact me about this issue, and EVERY SINGLE TIME it was a bad chip (usually a cheap China clone from a non-reputable source). "RST" indicates that a watchdog-reset has occured, which should never ever happen.

Regarding the temperature offset, the code allows for an offset correction. That assumes the analog voltage coming from the thermo-couple, once converted to a 10-bit ADC number, is basically in °C already. This may or may not be the case with this device.

Ideally you'll have to use an external temperature probe and graph a calibration curve for °C (at nozzle) vs. ADC value and compensate accordingly. For this to work, you'll have to fix the "cannot reach high temperatures" first, I think.

Quite a bit of work...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on October 21, 2015, 01:59:24 pm
In case of the "original" Youyue 858D+, the ADC is configured to work with an external 2.5V as reference voltage.

An input voltage of 2.5V will therefore result in a reading of "1024 °C" [2.44mV / °C] (ignoring any offsets).

I'd check the external reference voltage as well (unless you've explicitely made sure it is 2.5V already).
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on October 21, 2015, 02:18:18 pm
I'll change out the atmel I think I have a few from mouser left, but I did buy some from other places ebay etc.  My board sets the Aref to 2.5V with the 2 10K resistors as a divider, It's reading spot on.    How long is the firmware version supposed to be displayed, mine stays on the screen for just under 15 seconds?  I notice the delay in the code is 2000, is my clock reference wrong or is something else going on delaying it?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on October 21, 2015, 02:25:37 pm
Just about 2 seconds or so.

If it stays for 15 (close to 16), my guess is that the FUSE settings are wrong. There is one that divides the system-clock by 8.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on October 21, 2015, 06:10:41 pm
I programmed a new chip,  the fuses were correct 2.7vBO
,  spien checked,  256 memory,  8mhz int 65 ms.   clock divided by 8 not checked.   started up the unit,  displayed 1.43 for about 3 to 4 seconds,  heard fan run then the temp.  shut it off and restarted it and it took 15 seconds for the 1.43 to change to temp.   seemed like it was analyzing fan and stuff  during the 15 seconds. is it doing diagnostics that could delay the boot?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on October 21, 2015, 09:58:19 pm
It seems that the watchdog timer is getting tripped,  because if I add a clear screen after the show_firmware routine, the screen blanks and then a second later the firmware displays again, the chip is restarting.  I also notice that if I engage Fan only mode on a real Youyue unit with your firmware, the word FAN displays and the cold air comes out when the wand is lifted from the cradle.  If I do the same with the samsung board, the word FAN alternates with 42 degrees every second.  Also the Fan runs with the wand in the cradle, is that because it thinks the temperature is above the safe temp and it's still trying to cool it down?  Apparently I've got more work to do with this unit.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on October 22, 2015, 07:25:00 am
If the watchdog trips, the device will display "RST", nothing else.

Anything that appears as if it restarted is not normal. There is nothing in the code that would do that.

Get a new chip from a reputable source... it is a waste of time discussing this odd behavior.

Over and out.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on October 22, 2015, 01:53:03 pm
Let me start off with I don't think there is anything wrong with your firmware and thank you for develping it.   The chip I'm using now is from Mouser.  I don't think it's the chip cause it works fine in the Youyue unit with your firmware.    When I put it in the clone that had the samsung chip with the adapter board is where its acting up.  The samsung board is a lot cheaper looking with through hole components, half the resistors on the board don't match the silkscreen.   One of them is marked 100K and has a 54 ohm resistor in the spot.  The samsung board has no fanspeed signal to the chip, I had to add a voltage divider to the adapter board to read directly from the pot. I was just hoping you had insight so that I could narrow down the symptom to a wrong i/o signal/short that might be causing this.   The chip is definitely rebooting and not going to your rst routine when it happens.   I'll probably put the scope on it and see whats going on electrically.  Maybe this is just waste of time, I just thought since I owned both units it would be a fun project and helpful to the people on here asking for an adapter board.   Thanks for your help

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on November 03, 2015, 05:14:01 am
Well I got my hands on another Hot air machine and put the same atmel chip in and it is working fine with the adapter board.  So as much as you say it is always a counterfeit atmel chip causing weird behavior, thats probably not the case.  These machines are pretty cheap crap.  When I get a chance I'm gonna put a scope on the first machine.   Thanks for the great firmware.
   
(https://wayneg.smugmug.com/Electronics/i-GgwLbwJ/0/XL/20151102_214640-XL.jpg)

Here's a video of it working, still needs to be calibrated.

(https://wayneg.smugmug.com/Electronics/i-LWLfXcM/0/L/20151102_221135-L.jpg) (https://wayneg.smugmug.com/Electronics/i-LWLfXcM/A)

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on November 03, 2015, 12:26:36 pm
Well, in my opinion "defective" also includes sub-standard resilience to supply rail noise, which might be the case here. I don't know if Atmel does batch-tests of fabrication runs (I guess they would).

I guess that this chip would be flagged as an "anomaly" in one or the other test. Unfortunately we will probably never know if this very chip was ever meant to be sold or if it somehow escaped destruction and was sold via strange channels.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on November 18, 2015, 10:48:52 pm
Well I think it's finally working as it should.  Apparently the analog signal to the Samsung chip is a different scale then on the Atmel YouYue board.  I modded the firmware to divide the temp reading by 1.9 and set the offset to 30.  It seems very close and can reach well into the 400's which it couldn't do before.  I also played with the calibration pot on the front and settled in on 560 Ohms, ymmv.

I sent out 2 boards to 2 members on here, they were $6 each including shipping.   They were assembled with the Surface Mount components, but no atmel included.   

Here is the modded line:

temp_inst = (analogRead(A0)/1.9) + temp_offset_corr.value;   // approx. temp in °C

In summary, you have to cut 2 traces, disconnecting the LED segments from the push button circuits (they are shared on the samsung). Solder 2 wires to the LED segment legs to connect them to the new board. Solder 1 more wire to the fan speed controller pin on the main board and connect it to a header pin on the adapter board. Mod the firmware with the division factor.


It also appears madworm has made a daughter board that can sense the fan running or not.  That should easily interface to the adapter board because the samsung adapter board has 5V / GND and FANSPD pins broken out already.  He tells about it here:

http://budgetlightforum.com/node/27876?page=2#comment-850659 (http://budgetlightforum.com/node/27876?page=2#comment-850659)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: timofonic on November 18, 2015, 11:41:24 pm
Does it deserve the effort to buy this cheap shit and mod it than suffering a soldering iron pencil?

What about replacing the controller? Is the case worth it?

I've seen these units at the vocational school, I'm not so convinced. Are they usable?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on November 19, 2015, 09:30:31 am
I sent out 2 boards to 2 members on here, they were $6 each including shipping.   They were assembled with the Surface Mount components, but no atmel included.   

wguibas I've got a Yihua 858D if you have a board spare I'd like to grab one as well please.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: krivx on November 19, 2015, 11:14:41 am
Does it deserve the effort to buy this cheap shit and mod it than suffering a soldering iron pencil?

What about replacing the controller? Is the case worth it?

I've seen these units at the vocational school, I'm not so convinced. Are they usable?

Absolutely usable out-of-the-box. Mine paid for itself pretty quickly just in lifting qfps quickly without any board or part damage. I'm just interested if any improvement is possible.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on November 19, 2015, 12:27:35 pm
Quote
wguibas I've got a Yihua 858D if you have a board spare I'd like to grab one as well please.

I have plenty. I had 40 boards made, when I ordered them the shipping is the bulk of the order $25 DHL,  10 boards were total $38 and 40 boards were total $45.  so for $7 more I got 30 extra.  I use PCBway now, they do a nice job and the last 2 orders I got in 1 week.  They also seem to put the job number inside a chip area so you don't see it when assembled. Unfortunately they put it in the footprint of the samsung chip so it shows on these boards. 

(https://wayneg.smugmug.com/Electronics/i-S8TXfg7/0/X2/20151119_071551-X2.jpg)

(https://wayneg.smugmug.com/Electronics/i-sGd9vh8/0/X2/20151119_071623-X2.jpg)

Here is another board they made for 1 of my projects. Ignore the crap on the blank board, I spilled some gorilla glue on it. Notice they put the job number in the atmel footprint.

(https://wayneg.smugmug.com/Electronics/i-XDmfsmW/1/X2/20151119_072225-X2.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kovo on November 27, 2015, 02:31:53 pm
hi, I have one of yihua 858d+ with mk1841d3 mcu, so do some search and it looks like clone of samsung MCU used in some of this stations:

from [1]:

Quote
MCU for a detailed description of the thermostat electric iron thermostat soldering station 936, a heat gun control:

Supply of heated iron, hot air gun control MCU MK1841D3, may be set to write programs according to user requirements. PID control temperature constant. There are a variety of packages, cost-effective industrial grade. MCU 20-pin compatible Samsung SC9454.

Existing iron, air guns, thermostatic station established procedures: 936,858,850,852,854,380,857,952,953,946,898 etc., are welcome to inquire 18820603450.

[1] https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=sk&ie=UTF-8&u=http%3A%2F%2Fproduct.ch.gongchang.com%2Fd580816583.html&edit-text=
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on December 01, 2015, 04:14:07 pm
I'm posting the instruction here for the boards I sent out.  Also attached is a modified hex for the samsung 858 board. 

The fuse settings for the chip:
2v7 Brown Out
spien checked, 
256 memory (this setting doesn't really matter with no bootloader option), 
8mhz internal oscillator 65 ms.   
clock divided by 8 not checked.
all other setting unchecked.

Here are the pics of the connections:

Please note the 5 and 13 connections cross over each other.  Pin 1 of the LED segment goes to 13 on the samsung board and Pin 4 goes to 5 on the samsung adapter board.
(https://wayneg.smugmug.com/Electronics/i-zhhLGMH/0/XL/LED%20Connections-XL.jpg)

(https://wayneg.smugmug.com/Electronics/i-Dj7GbB9/0/XL/LED%20traces-XL.jpg)

(https://wayneg.smugmug.com/Electronics/i-PwKCQgt/0/X2/Fanspeed%20connection-X2.jpg)

Fuse Settings in AVR studio
(https://wayneg.smugmug.com/Electronics/i-LQKwhkW/0/L/Fuses-L.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on December 02, 2015, 09:26:13 am
Thanks wguibas for taking the time to do the mod and installation instructions for the Samsung owners amongst us, and obviously madworm for all your work setting up the new code for ATmel. Looking forward to playing with mine.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: timofonic on December 02, 2015, 08:45:11 pm
Hello.

I finally was able to get some money, but most of it got into a laptop. Silly on me. Now I need to get some cheap stuff and improve it progressively, the extreme DIY way!

I found the following soldering stations:

- WEP 858D
- BAKU-878L (700W)
- MLINK H5
- 3-in-1 GOWE (damn expensive, from 500 to 800, one of them features a PCB heater)
- Different stations with different features with 852D+ reference on them.
- "2in1 862bd+ Lead-free Soldering Station SMD Rework Welding Tool Digital Repair Tool with Samsung Chip SMD Repair Tools 5 Nozzles as Free Gifts by Yescom"
- Aoyue 852A++
- 852D+ 2in1 SMD Soldering Iron Hot Air Rework Station w/ Stand 4 Nozzle 5 Tip by freebird trading
- AOYUE 899A+

This is crazy! I have no idea what to buy. Please help :(
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on December 03, 2015, 06:36:35 pm
Now I need to get some cheap stuff and improve it progressively, the extreme DIY way!
This is crazy! I have no idea what to buy. Please help :(

I suggest you read the thread very carefully and if you cannot figure out what to buy by the end of it quit electronics.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: timofonic on December 03, 2015, 08:26:55 pm
Now I need to get some cheap stuff and improve it progressively, the extreme DIY way!
This is crazy! I have no idea what to buy. Please help :(

I suggest you read the thread very carefully and if you cannot figure out what to buy by the end of it quit electronics.
Thanks for your motivational response! ;)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on December 10, 2015, 05:49:16 am
Quote
wguibas I've got a Yihua 858D if you have a board spare I'd like to grab one as well please.
I have plenty. I had 40 boards made

Thanks wguibas I just received my PCB, looking forward to messing with it.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on December 10, 2015, 05:31:55 pm
Glad it arrived safely.  Let me know how it works out

Wayne
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: eehowie on December 29, 2015, 05:22:05 pm
Thank you robert, my small contribution, a logo to print on sticky label and properly rebadge this:

(http://)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on December 31, 2015, 11:48:19 am
Now I'm famous :-DD

My highest accomplishment in life so far...

Happy New Year 2016.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: timofonic on January 01, 2016, 09:14:29 am
Now I need to get some cheap stuff and improve it progressively, the extreme DIY way!
This is crazy! I have no idea what to buy. Please help :(

I suggest you read the thread very carefully and if you cannot figure out what to buy by the end of it quit electronics.
Thanks for your motivational response! ;)


Your response motivated me a lot to find and not care about negative things people say to me. Thanks a lot!

I found the following models.

- BEST BST-858D+
- BAKU 868D

The prices are from 29,34 EUR to over 80 EUR.

My question is: Are there different versions of 858D? Are there differences between 858D and 858D+?

I just want to buy the right model to be able to install the board. I would like to buy one board for it, too :)

Thanks in advance.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on January 03, 2016, 11:38:13 am
I suggest you read the thread very carefully and if you cannot figure out what to buy by the end of it quit electronics.

Your response motivated me a lot to find and not care about negative things people say to me. Thanks a lot!

Did you read the thread carefully as I suggested?

I was being serious, there is literally dozens of different hot air stations with different PCBs, but there are only two brands/models of hot air station and two micro controllers mentioned in this thread. The PCB that wguibas made (if that is what you want) was for a specific hot air station, which was also discussed in the thread.

I think it's reasonable that you either purchase one of these models or if not figure out what controller the one you intend to buy uses. But either way the whole discussion including everything I've told you here has already taken place in the thread. So you might think it was negative but perhaps you missed the point about reading carefully as I suggested.

To answer your question (specifically) yes and yes many. But unless you're willing to go the solo route I would stick to what others said works.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on January 04, 2016, 06:47:59 pm
My question is: Are there different versions of 858D? Are there differences between 858D and 858D+?

858D and 858D+ are just labels. They're just the book cover. As the old saying goes, "Don't judge a book by its cover." What's inside could be drastically different. Afterall, a knockoff only has to look and operate enough like the original to get someone to buy it. It doesn't have to be built the same way.

For the highest probability of getting a unit with one of the microcontrollers discussed here, it's best to buy exactly the same brand and model. Even then, there's no guarantee it will be the same, but the chances are better.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on January 04, 2016, 08:03:37 pm
My observation is this one the Youyue is the best built of these cheap air stations and it directly takes the atmel chip without need for an adapter board.  The Yihua which looks the sames has much cheaper circuit board construction and needs the adapter board for the samsung chip.

http://www.amazon.com/gp/product/B00P8Z4RPG?psc=1&redirect=true&ref_=oh_aui_search_detailpage (http://www.amazon.com/gp/product/B00P8Z4RPG?psc=1&redirect=true&ref_=oh_aui_search_detailpage)

I've also noticed the ones with a removable hand piece cord (screws on) are better built with the atmel chip. 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on January 05, 2016, 11:53:39 pm
A little while ago, I got a Youyue 8586. This is like the 858D hot air station, but with the addition of a knob-controlled soldering iron.

(What? You bought a combo station? Yes. Since I already have a trusty Hakko 926, for a few bucks more than the 858D, the 8586 gives me a backup iron...makeshift hot tweezers...hot chopsticks!)

Anyway, I was hoping that since the iron portion was analog, that the hot air part would be identical to the 858 and be controlled via the ATmega328. Lo and behold, it is. I haven't yet acquired extra 328 ICs to try out the replacement firmware on it, but that's on the list of things to check out.

So, for now, having the right microcontroller is all the info I can provide as far as another possible device for the modded firmware.

Edit: Fixed typo 8589 to 8586.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: krondor on January 12, 2016, 05:21:12 pm
Well,
today I got my own Youyue hot air station.

Or - I almost got one:
As you can see, I got a "Uyue". I bought it from a dealer on aliexpress - this one, to be specific:
http://www.aliexpress.com/item/220V-700W-YOUYUE-858D-ESD-Soldering-Station-LED-Digital-Solder-Iron-with-3-Nozzle3/1966416691.html (http://www.aliexpress.com/item/220V-700W-YOUYUE-858D-ESD-Soldering-Station-LED-Digital-Solder-Iron-with-3-Nozzle3/1966416691.html)
I specifically asked it it was an original Youyue before ordering and the dealer confirmed.
When the device arrived today I was to be surprised getting this "Uyue"-crap.
I instantly opened a dispute on Aliexpress. Interestingly enough the seller now doesn't use the "Youyue" pictures anymore to illustrate his device as he did up to a few hours ago (probably before I opened the dispute...). He already tried to tell me that Youyue and Uyue are the same.
Bullshit...

When I opened the device I saw the same pcb and components as brainwash already showed in the thread. Only difference seems to be a more recent pcb revision. Mine is 2015.08.21.
Pictures below.
After some looks at the whole assembly I can say: The soldering quality could be worse. At least ground is connected well enough in my device .
Quite irritating is the mains connector just hot-glued into the casing. I also consider the diameter of the mains wires pretty small. Both probably wouldn't survive a certification in Europe.

My question now is: Are the Samsung microcontroller mentioned above and the "MK1841D3" somehow compatible? Has anyone tried mods on this crap?
Actually I initially wanted the "Youyue" to modify it with madworm's mods. 

To Madworm, what about just re-designing the whole Youyue-pcb? I'd replace mine with it for sure... Being just a beginner I can't do it myself.



Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on January 15, 2016, 01:52:41 am
Welcome to the forum, krondor.

Wow, that is quite different inside. Bummer. Hopefully, you'll still be able to mod it.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Bryan on January 28, 2016, 08:55:49 am
Has anyone received the "newer" version that is advertised. All the descriptions seem to say 858D, but the picture is of a 2008D.

http://www.amazon.com/WEP-858D-Soldering-Station-Suitable/dp/B0055B6NGE/ref=sr_1_fkmr0_1?ie=UTF8&qid=1453971145&sr=8-1-fkmr0&keywords=wep+2008d (http://www.amazon.com/WEP-858D-Soldering-Station-Suitable/dp/B0055B6NGE/ref=sr_1_fkmr0_1?ie=UTF8&qid=1453971145&sr=8-1-fkmr0&keywords=wep+2008d)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on January 28, 2016, 12:06:14 pm
You should just get this one, it is cheaper and doesn't require an adapter board if they are still shipping the real one that I got. 


http://www.amazon.com/gp/product/B00P8Z4RPG?psc=1&redirect=true&ref_=oh_aui_search_detailpage (http://www.amazon.com/gp/product/B00P8Z4RPG?psc=1&redirect=true&ref_=oh_aui_search_detailpage)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Bryan on January 29, 2016, 03:03:12 am
Yes, but wondering if the *newer version*, has any improvements that negates updating the board and the hacks.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on January 29, 2016, 06:41:56 am
Third time in a row this sort of question has been asked. The WEP 2008D is not only a different model to the Youyue and Yihua 858D it's another brand entirely, all the brands and models have variations.

I get where you're going but even if the WEP 2008D shared some features, it's more about cheaply modifying your own micros firmware to add any feature you like.

So buy whatever you think looks good. Or the two models mentioned in this thread if you want to mod it straight away with less work. Or trace out the schematic and get out the datasheet for the Atmega and do a little "reverse engineering" and reuse the code.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on February 09, 2016, 12:32:43 am
Hi Wayne,
You have a PM.
Kovo said a few posts before that MK1841D3 is a clone of the Samsung micro, so I'm interested in buying your PCB :-)
Thanks to you and madworm for this very good job!
Denis
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 09, 2016, 02:47:04 am
I'm gonna have my hands on a unit with the MK1841D3 chip next week and I can see if the pinout is the same.  If it is I'll test the board and see how it controls.  I'll let you know what I find out then.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on February 09, 2016, 06:18:15 am
Splendid! I'm looking forward to reading from you.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on February 11, 2016, 12:23:27 pm
Sigma R700 Hot Air
Samsung S3F94CEEZZ-DK94
http://tw.taobao.com/item/37631232059.htm?spm=a1z3o.7695283.0.0.i6dr3D (http://tw.taobao.com/item/37631232059.htm?spm=a1z3o.7695283.0.0.i6dr3D)

https://www.youtube.com/watch?v=dRSLN3C-ILE (https://www.youtube.com/watch?v=dRSLN3C-ILE)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 11, 2016, 03:09:03 pm
Nice video, I have the same unit originally.  Are you gonna try Madworms firmware?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on February 11, 2016, 04:10:20 pm
No it's not mine I have the Yihua remember. Just putting it there so people know what it is.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 18, 2016, 02:12:44 am
Got my hands on the Kaleep 858D+ with the MK1841D3 chip today,  looks like the adapter board has to be completely remade.  I sent out a new design today and should have them in about a week, then I can test and tweak.

(https://wayneg.smugmug.com/Eevblog-/i-GkxSR2Q/0/L/MK1841D3-L.jpg)




Quote
Kovo said a few posts before that MK1841D3 is a clone of the Samsung micro, so I'm interested in buying your PCB :-)
Thanks to you and madworm for this very good job!

It might be a clone, but the pin layout on the board is completely different other than power and ground, so the blue samsung adapter board won't work.  This green board should do the trick, I might have to tweak the resistors and or code for the temperature feedback to be accurate like I did on the samsung board. 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on February 18, 2016, 06:16:26 am
Full respect Wayne. And thanks!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 18, 2016, 05:50:27 pm
Oh by the way I used my new EEVBLOG multimeter to trace the circuits.  I really like the way the backlight flashes during continuity testing.  Thanks Dave
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 18, 2016, 06:37:05 pm
A place to watch: http://www.heartoftechnology.com/reverse-engineering-the-858d-hot-air-rework-station/ (http://www.heartoftechnology.com/reverse-engineering-the-858d-hot-air-rework-station/)

He's traced out the full schematic for the YouYue 858D+

As far as I've read, he's planning to do a complete redesign of the control board.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 18, 2016, 07:13:56 pm
Very cool info, I also noticed your work and my samsung board is mentioned on his pages.   
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Jetiman on February 19, 2016, 09:58:52 am
I have same front and Outside. But inside different.
German manufacturers - dealer.

200 degrees Unit. Front measure 230 degrees.
This goes back. Will this firmware  :-+

Will get me a "right" Youyue-858D-plus.

(http://fs5.directupload.net/images/160219/temp/4jpyeslq.jpg) (http://www.directupload.net/file/d/4269/4jpyeslq_jpg.htm)(http://fs5.directupload.net/images/160219/temp/wg7lkjej.jpg) (http://www.directupload.net/file/d/4269/wg7lkjej_jpg.htm)(http://fs5.directupload.net/images/160219/temp/oh7hlmje.jpg) (http://www.directupload.net/file/d/4269/oh7hlmje_jpg.htm)(http://fs5.directupload.net/images/160219/temp/sqlcxfk7.jpg) (http://www.directupload.net/file/d/4269/sqlcxfk7_jpg.htm)(http://fs5.directupload.net/images/160219/temp/jktrxw4f.jpg) (http://www.directupload.net/file/d/4269/jktrxw4f_jpg.htm)(http://fs5.directupload.net/images/160219/temp/rfijjgkg.jpg) (http://www.directupload.net/file/d/4269/rfijjgkg_jpg.htm)(http://fs5.directupload.net/images/160219/temp/dwx4yjs3.jpg) (http://www.directupload.net/file/d/4269/dwx4yjs3_jpg.htm)(http://fs5.directupload.net/images/160219/temp/juh7xs78.jpg) (http://www.directupload.net/file/d/4269/juh7xs78_jpg.htm)(http://fs5.directupload.net/images/160219/temp/q95rreq9.jpg) (http://www.directupload.net/file/d/4269/q95rreq9_jpg.htm)
(http://fs5.directupload.net/images/160219/temp/dvcacas9.jpg) (http://www.directupload.net/file/d/4269/dvcacas9_jpg.htm)(http://fs5.directupload.net/images/160219/temp/mw7ncnc4.jpg) (http://www.directupload.net/file/d/4269/mw7ncnc4_jpg.htm)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 19, 2016, 12:22:38 pm
That's the samsung chip, but it is mounted 180 degrees differently then my board.  I would need to see the other side of the board to check the traces.  If the traces match up then the samsung adapter board should work though it looks like you might have to bend over a few capacitors for clearance.

(https://wayneg.smugmug.com/Eevblog-/i-tdHBR3m/0/L/20160219_070554-L.jpg)

Quote
200 degrees Unit. Front measure 230 degrees.
This goes back. Will this firmware  :-+

Will get me a "right" Youyue-858D-plus.

It sounds like unit needs to be calibrated slightly (little pot above red button in hole),  Check the video 1 page back from shock.  Even with the new chip, it would still need to be calibrated.  The firmware adds new features and better control, but getting the temperature spot on would still take some work.

Sigma R700 Hot Air
Samsung S3F94CEEZZ-DK94
http://tw.taobao.com/item/37631232059.htm?spm=a1z3o.7695283.0.0.i6dr3D (http://tw.taobao.com/item/37631232059.htm?spm=a1z3o.7695283.0.0.i6dr3D)

https://www.youtube.com/watch?v=dRSLN3C-ILE (https://www.youtube.com/watch?v=dRSLN3C-ILE)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Jetiman on February 19, 2016, 06:06:58 pm
(http://fs5.directupload.net/images/160219/temp/hcn9755u.jpg) (http://www.directupload.net/file/d/4269/hcn9755u_jpg.htm)(http://fs5.directupload.net/images/160219/temp/85c85qo9.jpg) (http://www.directupload.net/file/d/4269/85c85qo9_jpg.htm)(http://fs5.directupload.net/images/160219/temp/fazl593p.jpg) (http://www.directupload.net/file/d/4269/fazl593p_jpg.htm)

I can still replacement to Youyue-858D+.
Or work the firmware work with the adapter ?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 20, 2016, 04:51:06 am
It doesn't look like the adapter board will work on yours, the pin configuration seems different.  Your best bet would be to return it and get a YouYue with the atmel chip already.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: lberezy on February 22, 2016, 04:47:23 am
wguibas,

I've just received one of your blue adapter boards in the mail, and have flashed an ATMega328p with it and installed it as per your instructional post a few pages back. The ATMega is flashed with the firmware that was attached to that post.

Upon power up, the Yihua 858D screen shows "1.43", the firmware number, and then spins up the fan and flashes "rSt".

According to the firmware information:

Quote
* If the WATCHDOG is used (by default) and the device becomes unresponsive for more
  than about 120ms AND the heater is ON, a watchdog-reset is triggered.

  THIS SHOULD NEVER HAPPEN.

  The device will turn off the heater and turn on the fan. The display will blink
  the error code "rSt" until power is cycled.

I've got no idea why the watchdog timer is timing out.

Do you or anyone else have any ideas?


Edit: I've tripple checked my fuses and have used the following avrdude command to program the fuses
Quote
avrdude -c usbasp -p atmega328p -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xfd:m

With further testing, I've found that when the station has been sitting in the "rSt" state for a few seconds, the transistor labeled "TIP122" becomes very hot.

The station board has silkscreen of "YH858D V6", the same as the one in the instructions.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 22, 2016, 08:51:24 am
This problem seems to pop up quite a lot. Try a new ATmega chip from a reputable source (not ebay).
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: lberezy on February 22, 2016, 12:15:50 pm
I'll try and track down another chip, but this is a known-good chip I've used for other things and fully tested. It was a sample directly from Atmel, so I'm reasonably sure it's legitimate.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 22, 2016, 06:39:12 pm
I had similar problems if you look a few pages back.  I put the questionable chip in another machine and it worked fine.  At the same time I was messing with the FANSPD input and figuring out the temperature offset, plus messing with the calibration pot.   When all was said and done the original RST error machine worked with a different chip.  So as madworm says try another chip first.  I'll try and figure out if I did anything else to make that machine work.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: lberezy on February 23, 2016, 11:45:57 am
Well the plot has now thickened.

I found a couple of other ATMega 328Ps, but I think previously had messed the fuses up on them such that they require HV programming or an external clock to recover. Oh well.

After some more playing around with the unit I was able to get it to work, with some caveats.

In order for me to get the station working, I power it on without the handpiece in the dock, to be greeted by "1.43" (the firmware version) and then the "cradle" warning. The warning flashes by, then there is a quick return to the display of "1.43" for about 200 ms, then back to the cradle warning. At which point, I replace the handpiece in the cradle. The screen goes blank and the fan on the handpiece spins up before being greeted by the "---" idle screen. From here, the station works as intended with the custom firmware.

This is mostly repeatable, but occasionally I get the "rSt" watchdog timeout error upon replacing the handpiece in the cradle. To combat this, I replace the handpiece during the first part of the cradle warning.

What the hell is going on?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 23, 2016, 12:43:39 pm
If you get the cradle-warning, the only thing that should be displayed is "cra" - "dle" until you place the wand back into it.

The fact that you get "1.43" after "cra-dle" indicates that the device resets itself. This is erratic behaviour and NOT according to what I programmed.

Please do not waste your and our time. Please replace the chip with a known-good one.

You might want to check the electrolytic capacitors next to the 7805 voltage regulator (C14, C5). Clearly your AVR chip is not happy.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 24, 2016, 01:35:32 am
I couldn't remember if I made any adjustments to the machine to make it work months ago, so I decided to see if I could get it to act funky like it did months ago by just changing the chip. It didn't take long.

I took apart the machine that was resetting and rebooting the program originally.  I took one of the chips that was giving me trouble and reprogrammed it from the link above, I also took the chip I currently had in the machine that worked fine and reprogrammed that with the same hex file.  If I put the chip with the gold marker on it in the machine, it acts all funky.  Change the chip to the one with just the gold dot and the machine runs flawless.  Nothing changed but the chip, I also switched back and forth numerous time with the same result everytime.  I used the same machine and adapter board.  Here is the video.

http://youtu.be/RPArjABy3mM (http://youtu.be/RPArjABy3mM)


Summary, Listen to MADWORM, try another chip from a reputable source.
 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bianchifan on February 24, 2016, 10:57:39 am
This is mostly repeatable, but occasionally I get the "rSt" watchdog timeout error upon replacing the handpiece in the cradle. To combat this, I replace the handpiece during the first part of the cradle warning.

RST...
When starting with this little project I used a partly stripped Arduino pro mini (for I haven't any AVR DIPs lying around) and struggling a lot with this ugly watchdog.
At least I ommitted this shitty bullterrier.
I gave it a new try when replacing the arduino with the newly programmed original ATMega8.
Now all is runnin' fine.

CRADLE..
It may appear sometimes even the handpiece is put in. Take it out/ reput in or turnining the angle will solve the prob.
The reed seems to be a little sluggish..
In my case best chance for working well is to align the "wings" parallel to the ground.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: lberezy on February 26, 2016, 04:12:14 am
Thank you all for the responses.

I guess it must be the chip, even though I've used this chip for other tasks involving the watchdog as well where problems should've definitely shown up. Perhaps it's being run out of spec in this configuration. I'll have to hook up the scope and get it in action.

Unfortunately, I don't have any other ATMega328 or 168 chips right now, only ATMega8 and 88s.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 26, 2016, 02:18:28 pm
I dropped  a  chip in an envelope  with a kitten card and a couple of stamps.  Hope you get it, they wanted $14.00 ship it any other way.  Let me know if it arrives
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bianchifan on February 26, 2016, 03:29:36 pm
Unfortunately, I don't have any other ATMega328 or 168 chips right now, only ATMega8 and 88s.
No problem, original Youyue comes with ATMega8A, madworm uses 128 due to missing ATMega8 ;)
IIRC the only difference is the timer register, please refer to the datasheets for correct name.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: lberezy on February 27, 2016, 01:47:29 am
I dropped  a  chip in an envelope  with a kitten card and a couple of stamps.  Hope you get it, they wanted $14.00 ship it any other way.  Let me know if it arrives

That's very kind of you, thank you :)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: lberezy on February 27, 2016, 12:45:04 pm
bianchifan, I thought the issue was with the size of the binary for the chip, in that it would only fit on an 16 KiB or higher chip.
Correct me if I'm wrong, but I couldn't find a smaller prebuilt .hex (though I know these aren't fully representative of binary flash size)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 27, 2016, 01:06:58 pm
A smaller prebuilt hex wouldn't work anyway because it doesn't have the change for the temperature correction. The hex file would have to be compiled with that change.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 27, 2016, 02:59:37 pm
Here is a hex file compiled with changes necessary for the ATMEGA8 chip/Samsung adapted program. I used the atmega8L that came with my youyue because that is all I had other than 328P's.  I had to change the TIMSK1 register to TIMSK. Make sure WDTON fuse is NOT enabled, it is enabled in the program.  I tested the WDT by removing the reset at the end of the main loop and once booted the machine displayed RST anyway, so I know the WDT is working. 

(https://wayneg.smugmug.com/Eevblog-/i-pnmLnXt/2/O/atmega8%20fuses.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Jetiman on February 27, 2016, 07:44:27 pm
Here is a hex file compiled with changes necessary for the ATMEGA8 chip/Samsung adapted program. I used the atmega8L that came with my youyue because that is all I had other than 328P's.  I had to change the TIMSK1 register to TIMSK. Make sure WDTON fuse is NOT enabled, it is enabled in the program.  I tested the WDT by removing the reset at the end of the main loop and once booted the machine displayed RST anyway, so I know the WDT is working. 




Thank you. Do you have the simple "#define CURRENT SENSE MOD" activated?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 27, 2016, 08:28:29 pm
No, I haven't tested a unit with that mod.  Here is one compiled with the define enabled for current sense that is also modified for the samsung chip temp offset on a atmega8 chip.  You are putting this in a samsung chipped machine?

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 01, 2016, 02:41:55 am
I got the boards tonight for the MK1841D3 Kaleep 858D+ machine.  Still working on the temperature profile it's different from the samsung chip, but I'm getting close

(https://wayneg.smugmug.com/Eevblog-/i-fXJdHvL/1/X2/20160229_212330-X2.jpg)

Here's a video of it in action.

http://youtu.be/ksJmkeIBQ5o (http://youtu.be/ksJmkeIBQ5o)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 01, 2016, 06:20:03 am
Excellent! Let me know how to pay for one of these boards. Congrats.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ApplePi on March 01, 2016, 07:20:46 am
Really neat project I'll have to check this out on my 858D+
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: lberezy on March 01, 2016, 11:58:12 am
wguibas, thank you again for all your help with this.

Do you think it's worth setting up a little wiki page somewhere (maybe madworm might consider using the github wiki) to document all the different 858D configurations out there and what's known working?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 01, 2016, 12:40:09 pm
Quote
Do you think it's worth setting up a little wiki page somewhere (maybe madworm might consider using the github wiki) to document all the different 858D configurations out there and what's known working?

Sounds like a good idea, I know madworm has a page that decribes the project and has links to this thread for the adapter boards. 


On another note, we need to get ahead of this RST/reboot problem.  I have a dozen chips on my bench and most of them RST/reboot at some point, mostly outside of the main heating routine.   Some reset immediately and some only at the end of the CRA DLE display, or during FAN TST.  It is definitely related to the watchdog timer, because if you disable it in the code, the chip doesn't reset or reboot.  Of my current chips I don't know if any are genuine or chinese/ebay sourced.  I'm not even sure of the one I sent to Iberezy is genuine, but it seemed to work fine here in my machine.  I have 3 machines and they all work fine, so I forgot about the RST problems I initially had, but now working on these machines again with the new adapter, the atmega8 chip,  and iberezy's machine it is rearing its ugly head again.  I just placed an order with mouser for more chips and will label them genuine and try to see if any of them reset too.  The chips that reset seem to do it more frequently in places of the code with big delays.  I don't know if there is a problem with the internal watchdog oscillator in these chips or the whole watchdog timer itself.  I ordered 28, so we will see if they reset at all and have some confidence that this is a counterfeit/bad sourced problem or just luck of the chip.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Jetiman on March 02, 2016, 01:13:39 pm
I have the same problem RST. Two ATmega328P tested. One from an Arduino Uno and the other from Reichelt. Both show during cold start RST.

After fast on / off it works.

Youyue 858D+ V6.0  - Firmware 1.43
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 04, 2016, 09:11:13 pm
So I got my 28 chips from mouser today.  I marked them and numbered them.  The first chip #1 was programmed with correct fuses and hex file.  Put in 858D+ Kaleep and it worked like a charm.  10 Seconds from switch on to ---.  No RST, no 1.43 reappearing.  Chip #1 was happy.  I thought it is the counterfeit chips.  Then 1 tried chip number 2.  It was not as good.  It seemed to run the FanTest and the 1.43 quickly blinked once then repeated the FanTest and then displayed ---.  It took about 16 seconds to get to ---.  So Chip #2 was not as happy as chip #1.  Chip #3 was even more upset as it displayed 1.43 and then immediately went to RST almost everytime I turned the machine on.  I stopped at chip #3.  Playing with the code and chip #2, the chip was definitely rebooting during the 3 second FANTEST delay.  Disabling the watchdog option, the chip works fine.  Re-enabling the watchdog option and it fails.  If you look at the code, the watchdog_on doesn't even happen yet in the code to be triggered?  So I added a watchdog_off at the beginning of the code, which it should be off at this point anyway and all works fine for both chips 2 and 3.   I don't know where the problem lies because some chips work without any change and the ones that don't work, fail differently.  With the change added the unit will still reach a RST if the watchdog timer tripped in the main heating loop, MADWORM turns the watchdog timer on after all the setup, Tested it, RST displays if a delay is added in the main loop greater than 120us. So I apologize to china for now.  Sorry China. 

(https://wayneg.smugmug.com/Eevblog-/i-mc2ZBWx/3/XL/20160304_155134-XL.jpg)

(https://wayneg.smugmug.com/Eevblog-/i-f9kZv2j/0/XL/watchdog_off-XL.jpg)

(https://wayneg.smugmug.com/Eevblog-/i-TNDmPJS/1/L/20160304_161427-L.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 04, 2016, 09:58:27 pm
The watchdog_off you added should not be necessary, this is already done by watchdog_off_early, which runs way before the whole c- runtime stuff. See the header file. I will check the assembler output and see what is actually in there, just to make sure this function wasn't optimised out.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 04, 2016, 10:44:04 pm
Code: [Select]
youyue858d.cpp.elf:     file format elf32-avr                                                                                                                                       
                                                                                                                                                                                   
                                                                                                                                                                                   
Disassembly of section .text:                                                                                                                                                       
                                                                                                                                                                                   
00000000 <__vectors>:                                                                                                                                                               
       0:       0c 94 3b 00     jmp     0x76    ; 0x76 <_Z18watchdog_off_earlyv>
       4:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
       8:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
       c:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      10:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      14:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      18:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      1c:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      20:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      24:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      28:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      2c:       0c 94 84 02     jmp     0x508   ; 0x508 <__vector_11>
      30:       0c 94 0f 02     jmp     0x41e   ; 0x41e <__vector_12>
      34:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      38:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      3c:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      40:       0c 94 ef 08     jmp     0x11de  ; 0x11de <__vector_16>
      44:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      48:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      4c:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      50:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      54:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      58:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      5c:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      60:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      64:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      68:       40 02           muls    r20, r16
      6a:       34 02           muls    r19, r20
      6c:       36 02           muls    r19, r22
      6e:       38 02           muls    r19, r24
      70:       3a 02           muls    r19, r26
      72:       3c 02           muls    r19, r28
      74:       3e 02           muls    r19, r30

00000076 <_Z18watchdog_off_earlyv>:
      76:       a8 95           wdr
      78:       84 b7           in      r24, 0x34       ; 52
      7a:       80 93 f0 01     sts     0x01F0, r24
      7e:       84 b7           in      r24, 0x34       ; 52
      80:       87 7f           andi    r24, 0xF7       ; 247
      82:       84 bf           out     0x34, r24       ; 52
      84:       88 e1           ldi     r24, 0x18       ; 24
      86:       0f b6           in      r0, 0x3f        ; 63
      88:       f8 94           cli
      8a:       80 93 60 00     sts     0x0060, r24
      8e:       10 92 60 00     sts     0x0060, r1
      92:       0f be           out     0x3f, r0        ; 63
      94:       11 24           eor     r1, r1
      96:       1f be           out     0x3f, r1        ; 63
      98:       cf ef           ldi     r28, 0xFF       ; 255
      9a:       d8 e0           ldi     r29, 0x08       ; 8
      9c:       de bf           out     0x3e, r29       ; 62
      9e:       cd bf           out     0x3d, r28       ; 61

I've compiled and checked the assembler source code. As you can see, the reset vector points to "watchdog_off_early". So the watchdog is automatically turned off, every time the chip resets. Later it is turned on only after the setup stuff is over (unless it has previously fired --> error message).

Yet another option to possibly fix this might be to increase the watchdog timeout to 250MS

Code: [Select]
WDTO_250MS
There is some DEBUG code in the main loop to find out how long it actually takes. 120ms should suffice.

If we assume that the chips are OK & the power supply is stable and clean, one possibility is oscillator drift. The internal RC oscillators are very temperature dependent. It might be interesting to shoot a good and a bad chip with a hair-dryer and ice-spray to introduce a frequency drift, which might upset the watchdog timeout. This should old matter much, if the main loop takes close to 120ms to run, but I guess it should be much faster.

I might check the timing tomorrow, if I can find an Arduino board ;-)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 04, 2016, 10:58:24 pm
I tried increasing the timer all the way up to 2 seconds and it still changes nothing.  The timer shouldn't even be on and it's not always a watchdog reset, but a chip reboot.  Either way adding the off command at the beginning of the program or disabling the watchdog all together eliminates the problem it seems so far.  As you can see these are genuine atmel chips from mouser.com and the first 3 behave differently from each other with the same hex file and fuse bits.   I have no explanation especially since the chips are behaving differently in a bad way.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 05, 2016, 12:20:44 am
I don't understand how turning the watchdog timer off 2x should change anything. The watchdog timer is already off when your addition runs.

...thinking...

OK. I think I have found the error. I've released version 1.44 which should be fixed and NOT require any changes with regards to the watchdog timer.

The issue is as follows:

The code provided by avr-libc that turns off the watchdog timer (see previous assembler code) requires that register R1 (zero-reg) is ZERO. This is usually the case, but not when said code is put into the memory section ".init1". The intention for that was to have the code run as early as possible.

Code: [Select]
      8a:       80 93 60 00     sts     0x0060, r24
      8e:       10 92 60 00     sts     0x0060, r1
      92:       0f be           out     0x3f, r0        ; 63
      94:       11 24           eor     r1, r1

As you can see, in line #2 it writes R1 to 0x0060 (watch dog control register) - assuming that R1 is zero (which is not the case yet). R1 is zeroed in line #4.

I've now put the watchdog_off_early into ".init3", which comes after R1 being zeroed. It should work now.

Code: [Select]
Youyue-858D-plus.elf:     file format elf32-avr


Disassembly of section .text:

00000000 <__vectors>:
       0:       0c 94 3b 00     jmp     0x76    ; 0x76 <__ctors_end>
       4:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
       8:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
       c:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      10:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      14:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      18:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      1c:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      20:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      24:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      28:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      2c:       0c 94 84 02     jmp     0x508   ; 0x508 <__vector_11>
      30:       0c 94 0f 02     jmp     0x41e   ; 0x41e <__vector_12>
      34:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      38:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      3c:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      40:       0c 94 ce 08     jmp     0x119c  ; 0x119c <__vector_16>
      44:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      48:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      4c:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      50:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      54:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      58:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      5c:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      60:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      64:       0c 94 67 00     jmp     0xce    ; 0xce <__bad_interrupt>
      68:       40 02           muls    r20, r16
      6a:       34 02           muls    r19, r20
      6c:       36 02           muls    r19, r22
      6e:       38 02           muls    r19, r24
      70:       3a 02           muls    r19, r26
      72:       3c 02           muls    r19, r28
      74:       3e 02           muls    r19, r30

00000076 <__ctors_end>:
      76:       11 24           eor     r1, r1
      78:       1f be           out     0x3f, r1        ; 63
      7a:       cf ef           ldi     r28, 0xFF       ; 255
      7c:       d8 e0           ldi     r29, 0x08       ; 8
      7e:       de bf           out     0x3e, r29       ; 62
      80:       cd bf           out     0x3d, r28       ; 61

00000082 <_Z18watchdog_off_earlyv>:
      82:       a8 95           wdr
      84:       84 b7           in      r24, 0x34       ; 52
      86:       80 93 f0 01     sts     0x01F0, r24
      8a:       84 b7           in      r24, 0x34       ; 52
      8c:       87 7f           andi    r24, 0xF7       ; 247
      8e:       84 bf           out     0x34, r24       ; 52
      90:       88 e1           ldi     r24, 0x18       ; 24
      92:       0f b6           in      r0, 0x3f        ; 63
      94:       f8 94           cli
      96:       80 93 60 00     sts     0x0060, r24
      9a:       10 92 60 00     sts     0x0060, r1
      9e:       0f be           out     0x3f, r0        ; 63


Please get V1.44 and test :-)

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 05, 2016, 06:07:24 am
I'm at work now,  I'll test it tomorrow.   thank you
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 05, 2016, 08:51:46 am
 :clap:
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 05, 2016, 09:08:09 am
This shows that it's still useful to know assembly language and system's architecture. At least for micro-controllers. I personnally prefer to program directly in assembly, but I'm an old style guy now :-(
I think that 90% of today's Arduino users wouldn't be able to find such a bug.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 05, 2016, 01:26:55 pm
I loaded your new firmware on my worst chip and it works fine.  Glad we could get this figured out and hopefully things will be a lot more stable for everyone now.   Thanks again.  I'll upload some compiled 1.44 hex files for the Samsung and MK1841D3 boards soon.

 On a separate note,  I guess I adjusted the FANSPD upper and lower thresholds in the old  .h file because I did get a FAN SPD error with the POT turned all the way down.  My FAN SPD range with the adapter boards and voltage divider goes from 140 to ~385 so I had changed the .h file to 130 to 390 and all is well again, so anyone with my adapter boards will need to adjust those if your compiling yourself.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on March 05, 2016, 02:24:28 pm
Thanks, madworm, for tracking down the issue and posting the details. It's been a while since I've done assembler (though it was x86 at the time) and it's cool to see even if for a different processor.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 05, 2016, 07:24:17 pm
Version 1.44 Hex files for the adapter board chips.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 06, 2016, 10:25:28 am
Hi Wayne,
You have a PM
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: GiantGnome on March 06, 2016, 05:32:36 pm
wguibas (Wayne?), The resets are not due to a lack of a pull-up resistor to the AVR's reset pin? I can't seem to find it on your adapter board, and as far as I can see, reset only connects to the ISP. App note AVR042 recommends a 10K pull-up resistor in noisy environments.

Sorry if this has been discussed before. I've just received my Kaleep 858d+, and randomly stumbled over this thread.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 06, 2016, 06:30:22 pm
Quote
wguibas (Wayne?), The resets are not due to a lack of a pull-up resistor to the AVR's reset pin? I can't seem to find it on your adapter board, and as far as I can see, reset only connects to the ISP. App note AVR042 recommends a 10K pull-up resistor in noisy environments.

I thought that might be the problem too, but jumpering the ICSP header with a 10K resistor between RST and 5V made no difference. I have implemented a resistor in future board files, but I have so many already made without it, probably 30 of each board, that a new version will never be produced.  A resistor can always be bodged on the underside of the board for good measure, but for now it doesn't seem to be an issue.

The problem lied in the firmware putting watchdog_off_early at init1 instead of init3 as Madworm has fixed in his firmware version 1.44.

I did find this obscure reference in the AVR notes referring to the problem being an issue with programming in C code.

http://www.atmel.com/webdoc/AVRLibcReferenceManual/FAQ_1faq_startup.html (http://www.atmel.com/webdoc/AVRLibcReferenceManual/FAQ_1faq_startup.html)

[/quote]
Quote
How to modify MCUCR or WDTCR early?

... Note that in C code, any such function would preferably be placed into section .init3 as the code in .init2 ensures the internal register __zero_reg__ is already cleared.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 06, 2016, 07:57:39 pm
On another note, I'm getting requests for the board to put in 220V machines.  Someone needs to test the temp output and make sure at double my 110V that the output isn't much higher than what I've calibrated here.  If it's wrong, the handle could easily go up in smoke, setting the temp to 300 and the output goes to 500+.  .  You would need a thermocoupler like on a fluke 87V  and I would say set the temp to 100-150 and see what comes out the tip.   If it's 300 when set to 150 than an adjustment needs to be made to the firmware or my code change removed.  If it's close than proceed higher and test at 200-250 etc.  Better safe than sorry.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 06, 2016, 08:18:02 pm
Also attached are the board files for the MK1841D3.  Gerbers and Sprint Layout 6 file.

 (https://wayneg.smugmug.com/Eevblog-/i-GkxSR2Q/1/M/MK1841D3-M.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: GiantGnome on March 06, 2016, 09:56:56 pm
On another note, I'm getting requests for the board to put in 220V machines.  Someone needs to test the temp output and make sure at double my 110V that the output isn't much higher than what I've calibrated here.  If it's wrong, the handle could easily go up in smoke, setting the temp to 300 and the output goes to 500+.  .  You would need a thermocoupler like on a fluke 87V  and I would say set the temp to 100-150 and see what comes out the tip.   If it's 300 when set to 150 than an adjustment needs to be made to the firmware or my code change removed.  If it's close than proceed higher and test at 200-250 etc.  Better safe than sorry.

I have a 220V version. I have laid out and ordered a clone of your board, modified to use of the pile of TQFP32 versions of the Atmega328p I have lying around. It is away at OSH Park, but it will probably take about a month to get to me, and there is always a chance I have messed up the connections.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: JHammer on March 06, 2016, 10:43:44 pm
I will get a 220V version of a MK1841D3 machine in the next days, I've ordered a board from Wayne (@Wayne: Thanks to your great support!) and I have a Fluke with a thermocoupler in my shop. So as soons as Waynes board arrives, probably in one or two weeks, I will start some measurements and post my results.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 06, 2016, 10:45:42 pm
OK cool. Thank you
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 06, 2016, 10:53:14 pm
So I'll do. I already have the Kaleep, just wait for the Wayne's board ordered tonight :-)
I can also compare before/after modification as I did a complete measurement table before mod.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 06, 2016, 11:40:17 pm
Just to be sure : which firmware has to be used for MK1841D3 board with Waynes's adapter? The one provided by Wayne or the original from Robert?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Christe4nM on March 07, 2016, 10:13:40 am
A place to watch: http://www.heartoftechnology.com/reverse-engineering-the-858d-hot-air-rework-station/ (http://www.heartoftechnology.com/reverse-engineering-the-858d-hot-air-rework-station/)

He's traced out the full schematic for the YouYue 858D+

As far as I've read, he's planning to do a complete redesign of the control board.

Thanks for mentioning my blog. I am indeed working on a redesign. It's in progress and I haven't been able to find time to update my blog or start a topic here. Here is just a tiny teaser of the board in progress. (Just to be clear: I don't want to hijack this tread, so let's keep it on Madworm's firmware and directly related)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 07, 2016, 01:05:42 pm
Quote
Just to be sure : which firmware has to be used for MK1841D3 board with Waynes's adapter? The one provided by Wayne or the original from Robert?


It's the same firmware, It just has this 1 line edited.  The files I provide are just the compiled hex files with the change done already

Original code from madworm:
temp_inst =analogRead(A0) + temp_offset_corr.value;   // approx. temp in °C


For the samsung chip board it's

temp_inst =(analogRead(A0)/1.9) + temp_offset_corr.value;   // approx. temp in °C

For the MK1841D3
I'm still tweaking the number but it's somewhere around 2.3-2.4

temp_inst =(analogRead(A0)/2.4) + temp_offset_corr.value;   // approx. temp in °C



I also changed the default low and high FAN SPD limits to 130 and 400.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 07, 2016, 01:38:52 pm
OK, clear. And this is this value which could also depend on main voltage.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Jetiman on March 07, 2016, 04:51:06 pm
#FAN-speed mod https://github.com/madworm/Youyue-858D-plus-FAN-speed-mod/blob/master/youyue-858d-plus-fan-speed-mod__schematic.pdf (https://github.com/madworm/Youyue-858D-plus-FAN-speed-mod/blob/master/youyue-858d-plus-fan-speed-mod__schematic.pdf)
If the C1 and C3 100n  a  100nf ?

And C2 = 1 µF but C4 = 1µ? :-//
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 07, 2016, 05:13:44 pm
n == nF
µ == µF
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 07, 2016, 08:30:03 pm
OK, clear. And this is this value which could also depend on main voltage.

I'm not sure yet, technically reporting the temperature back to the chip is independent of the power heating the air, it would just get hot quicker.  But, if the electronics are different for the 220v vs 110v, even just a resistor, then the calibration could be way off. 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 07, 2016, 10:05:49 pm
And C2 = 1 µF but C4 = 1µ? :-//

What's wrong with 1µF for C4? A bit of decoupling doesn't hurt. Just a few cents for the cap.
Title: Youyue 858D+ some reverse engineering + custom firmware
Post by: Votality on March 08, 2016, 12:13:57 am
Hi guys a little off topic but I'm considering getting one of the 858d's clones is anyone able to help me get up to speed on the differences between the models and different sellers.

I.e atten 858, yihua ,youyue, scotle.

I'm guessing given this thread that the temperature regulation isn't perfect on the youyue and needs some improving. Are the other brands any better (atten etc). Also you guys seem to talk about a number of different controller boards. Can someone recommend a particular ebay seller and brand and why. (Sorry not up to speed on all the variants) edit: After reading through the forum it appears you guys recommend the youyue can anyone recommend an ebay seller for a known good quality clone.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: giovannirat on March 19, 2016, 11:31:09 am
A big thank you to madworm for investigating and solving the RST problem on 858D+

Changed both of my 858D+ to V1.44 and all problems gone ! :-+
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bianchifan on March 19, 2016, 04:50:48 pm
The issue is as follows:

The code provided by avr-libc that turns off the watchdog timer (see previous assembler code) requires that register R1 (zero-reg) is ZERO. This is usually the case, but not when said code is put into the memory section ".init1". The intention for that was to have the code run as early as possible.
Last time I did some register programming was 1985 ;)
Last use of a cross-reference list in the early 90th..

Please get V1.44 and test :-)
I'm still happy with my personal variation of v 1.37 - having-a-beer-smiley

I think that 90% of today's Arduino users wouldn't be able to find such a bug.

You may rise the number to 99% and more...
Those shit is the reason why some clever people developed JAVA ;)

I wonder sometimes why Atmel&Co are still alive.. :palm:  |O :scared:
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 20, 2016, 06:12:04 pm
Hi Wayne,
Back from skiing holidays. I've found your adapter board in my mailbox: many thanks for providing me with an already programmed Atmel chip.
On which pin of the potentiometer shall I connect the FANSPD wire? I tried to compare this device (Kaleep) with the schematic at www.heartoftechnology.com (http://www.heartoftechnology.com) but there the fan speed is sensed with a divider on the fan wires, not on the pot.
Looking forward to reading from you and test this upgrade..
Denis
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 20, 2016, 09:11:12 pm
It solders to the inner most pin of the pot.  My board has the divider on it with the two resistors on the front bottom left.

(https://wayneg.smugmug.com/Eevblog-/i-7gd9mkn/0/L/20160320_170749-L.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 20, 2016, 09:28:50 pm
I saw the divider. Thx for the photo. I'll keep you informed as soon as the upgrade is done.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 22, 2016, 10:10:42 am
Hi Wayne,
Yesterday night I installed your board in my 230V Kaleep 858D+. Everything went well at start-up : firmware version, fan ON during approx 3 seconds then OFF, operationally it works (no reset, no errors).
Then I began to measure the temperature with a DMM/thermocouple just at the output of the smallest nozzle. I did two runs from 50°C to 400°C upwards and backwards.
Here are the results, compared with the original version with MK1841D3. You can see that there is a big difference between the displayed set point and the real temperature. An other issue is that when increasing the set point the value is achieved without overshoot, as when decreasing there is always a large undershoot (between -20°C to -30°C) before going back to the set point. Let me know if you need some more information to adjust the parameters accordingly. Shall I try to play with the calib pot? Thanks in advance,
Denis

     MK1841D3                            ATMEGA328P               
Set point   Run #1          Set point    Run #1      Run #2          Mean delta           %
  50°C         53°C               50°C        37°C         38°C                 12,5°C           25%
100°C       106°C              100°C        73°C         70°C                 28,5°C           29%
150°C       147°C              150°C       112°C       110°C                39,0°C           26%
200°C       191°C              200°C       154°C       149°C                48,5°C           24%
250°C       234°C              250°C       204°C       203°C                46,5°C           19%
300°C       275°C              300°C       250°C       249°C                50,5°C           17%
350°C       317°C              350°C       295°C       291°C                57,0°C           16%
400°C       363°C              400°C       337°C       330°C                66,5°C           17%
350°C       320°C              350°C       299°C       294°C                53,5°C           15%
300°C       283°C              300°C       258°C       255°C                43,5°C           15%
250°C       240°C              250°C       214°C       210°C                38,0°C           15%
200°C       198°C              200°C       156°C       155°C                44,5°C           22%
150°C       156°C              150°C       115°C       114°C                35,5°C           24%
100°C       113°C              100°C        77°C         82°C                 20,5°C           21%
  50°C         54°C               50°C        38°C         40°C                 11,0°C           22%
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 22, 2016, 12:03:25 pm
Ran a test with the 858D+. Nonlinear temp delta. Possibly due to airflow restriction effect with small nozzle. Needs new calibration for each nozzle diameter and ideally lookup table or decent nonlinear fit on data. No time now to fix it right.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 22, 2016, 01:02:25 pm
Thank you Robert,
I'll try another set of measurement with the other nozzles. I don't remember well, but it is possible that I made the MK1841D3 measurement with the middle-size nozzle.
I also set the fan at level "6", knowing that the "FAN" menu shows 145 and 375 as extreme values.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 22, 2016, 08:55:19 pm
Felt like doing another test run. This time I aligned the temperature probe coaxially with the 7mm nozzle & chose a fan speed of 4.5 ripms. The results were quite different and much better. It didn't go up to 500°C, but that is due to restricted airflow. Once I cranked the fan up to max, temperature went up. Too bad the sensor can't be at the exit of the nozzle.

I've changed the firmware a bit (not yet released, probably V1.45). There is now a config option in the menu (like the PID parameters) to show raw adc values instead of "temperature". Makes it much easier to record calibration data :-)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 23, 2016, 08:06:32 am
Did something similar last night with the 7mm nozzle. The probe was at 45° from the nozzle axis, 3mm from its output. Fan speed at 5. I notice that fan speed has not a big influence on the exhaust temperature at low distance. All in all I confirm that results are much better, around 7 to 12 degrees of difference at much, after having also played with the calibration potentiometer (but not with the temp_corr parameter which is set at 33).

A real issue is that when I tried to set the target temp at 500°C, the temperature suddenly rose up, above 650°, which made the heater body and nozzle becoming blue and gold, and the probe red... I just had time to lower the target before ruining everything.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 23, 2016, 09:05:38 am
The blueing does happen. 650°C should have triggered an auto shutdown and temp error. Maybe the heater is stronger and the PID parameters don't quite fit your model.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 23, 2016, 09:25:08 am
This is the Kaleep device, with the adapter board from Wayne, but it is a 220V/700W. This indeed may imply different PID parameters, although below 450°C everything went well.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: GiantGnome on March 26, 2016, 05:15:49 pm
I just got my board from OSHPark, and I have assembled it and tried it out on my 220V Kaleep 858d+

My temperature probe only goes to 250°C, so that is what I tested by hand-holding the probe over the nozzle-less handle. It went almost straight to 250, with a small overshoot to 251°C. When i turned it back to 170°C, it went all the way down to 127°, slowly rising to 155°C and stayed there.

I clearly need to do more testing and I have only changed one line in madworms code, I need to check if I need more code changes. I used an atmega88pa, but a few corrections to the makefile later, it was no problem.

Quick tip: Do not use an angled programming header. I have to unplug the board to reprogram it  :). Luckily OSHPark sends you three boards :-)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: steve41993 on March 26, 2016, 07:42:20 pm
Hi GiantGnome,
your PCB looks pretty nice  8). I try to make one for the MLF package of the ATMEGA328P. So im searching for schematics. Can you send me yours please?
Just following the traces of the design from wguibas and match them up is a bit unreliable.
I have to do this because I want to put it on a PCB with an other layout. Got a bit room left on my 10cm x 10cm order by elecrow. (I cant import the gerber files and place them on a existing layout in Altium. Maybe there is a way, but I cant find it.)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: GiantGnome on March 26, 2016, 09:05:02 pm
Thanks, Steve  :)

I have made my schematic by following the traces. So, no guarantees at all. The basic functionality seems to work (buttons, display, temperature settings), but I have not tested fan speed sensing and the like.

I should probably upload my entire KiCad project to some place, but here is the schematic I made for it. It's not pretty, but it made it possible for me to lay out the board.

The OSHPark project is here https://oshpark.com/projects/vLy9R74P .

Wguibas, madworm, Is there somewhere I can throw a small donation your ways? I feel like I am freeloading on your hard work.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: steve41993 on March 26, 2016, 10:46:24 pm
Hi,
thanks for the schematics :). I compared your schematics with my schematics and they match up.
I will start the layout tomorrow and post the results here.
And thanks to all who worked on this project  :-+

Edit: The layout is now finished (untested!). Ordering will be in the next few weeks. So testing is possible in maybe two months.
Download project files: https://goo.gl/ixK7Va (https://goo.gl/ixK7Va)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on March 29, 2016, 12:57:29 pm
@GiantGnome:
Did you manage to find a probe able to measure more than 250°? It should be interesting to work together on the 230V version of this device in order to find the best combination of PID parameters.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: doctormord on April 09, 2016, 10:50:25 pm
Hi guys,

i received a "Kaleep 8586" 2in1 station today (hotair + soldering iron), bought because the possibility to change the firmware. :)

To my suprise, the non-modified station acts pretty much like the alternative firmware in the mean that it is not showing the set temperature only, but the real air temperature after ~1 second. Also heating phases are indicated by the small dot on the right. Secondly, when putting back the handle into the holder, the controller keeps "blowing" until the temperature is < 100°C.

As i haven't read through the whole thread yet, is this as expected? From my knowledge, the "Youyues" are only showing the setpoint and some linear ramp + they don't do a cooldown.

Regards,

Christian
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on April 10, 2016, 10:13:23 pm
The Youyue's show the actual temp and do cool the heater when in the cradle. One of the major issues with the stock firmware is that when the actual temp approaches the set temp, the display locks onto the set temp so that it looks like it's ready when, in reality, it's overshooting. In essence, it's fake accuracy. The modded firmware has better temp control and doesn't hide the actual temp when near the set point.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: doctormord on April 10, 2016, 10:16:15 pm
Hmm, mine does show the overshoot temperature as well, like set to 280 and air "4", it goes/overshoot up to ~305 and then cools down until temp is reached.  :-/O
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on April 10, 2016, 10:19:20 pm
Oh, that's good. Makes you wonder if it's using this mod or their own correction to that behavior. I don't remember all the differences between the stock and mod firmwares, but if you're curious, then it'd be good to compare yours to the modded one feature-for-feature.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: doctormord on April 11, 2016, 01:13:39 am
Yeah, maybe the skipped their own R&D and flashed the mod already at the fab. Will have a look into it again and post some pics.

Thanks. :)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kmlee on April 16, 2016, 11:54:16 am
Hi to all

After the marvellous work started by Robert aka Madworm, I took the plunge and just ordered a youyue 858D+ but I report some not so good news:

The product was from banggood, but the PCB showed a MK1841D3 processor -  >:(
I had half a mind to send it back - but based on what?

I would guess that the cheapest processor wins out - I'll post more later, but it would seem that these Taiwanese chips would win out...and maybe the days of the atmel chips are numbered  :'(

But there is hope in the work of wguibas...to which I thank a heap as well!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kmlee on April 16, 2016, 12:42:30 pm
Hi to all

After some investigation, it seems the MK1841D3 besides being a clone of a Samsung (reply #171) is a custom ROM programmed version of the MK7A23 microcontroller from Mikkon Technology http://www.mikkon.com/ (http://www.mikkon.com/) or just search for ??. The datasheet can be found here:

http://www.mikkon.com/datasheet/8bit/MK7A23P%20v07.pdf. (http://www.mikkon.com/datasheet/8bit/MK7A23P%20v07.pdf.)

This company seems to be Taiwanese with manufacturing done in China.

Further searching in Chinese mentions that this chip has the same core (=code compatible?) with the Samsung s3F9454 - see https://detail.1688.com/offer/598345751.html. (https://detail.1688.com/offer/598345751.html.)
It seems Zilog has bought over the Samsung microcontroller setup and there is a C compiler for the S3F9xx chip, which is actually based on the KS58 family.

With regards to my previous post, where I found a MK1841D3 instead of an Atmel chip in my Youyue 858D+ (sticker says - left factory - March 2016) it could signal a move to using the presumably lower cost Mikkon chip rather than the Atmel.

I say this because now, how can one be *sure* of ever getting an Atmel powered device?  :'(
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kmlee on April 16, 2016, 01:05:43 pm
Hi again

After posting, I looked a bit more and saw that Zilog, (now part of ixsys) do offer samples for their S3 family. They are in circuit flash programmable in the same way as the Atmels. It may be that the Mikkon parts are too! - but a s3F94C8 (s3F9458 are obsolete now) could fit in the socket. Hopefully there is a free C compiler for the part.

So this could be a possible direction for development?

Cheers!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: steve41993 on April 17, 2016, 02:58:27 pm
Hi,
finally i got all parts for my adapter PCB. But I'm getting in some trouble with flashing the Atmega328p. I got some in the MLF(32pins) package from aliexpress. They behave a bit strange:
First of all i need to apply a clock to it (without clock nothing happens on the MISO). I thought that they are using the internal oscillator by default. To solve this problem I'm using a xmega-A1 xplained borad and generate a clock with around 680kHz.
Now the chip seems to be alive but the device programming dialog in Atmel Studio shows always the wrong device signature: 0xFFFFFF
Can someone give me some hints how to solve this problem?

In the attachments are some measurements with a working ISP (also a atmega328p but in a DIP package) connection and one with the fault.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 17, 2016, 03:50:46 pm
Try slowing down programming speed as far down as it can go.

If I remember correctly, ISP clock <= system clock.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: steve41993 on April 17, 2016, 05:08:07 pm
Hi,
I've tried every single speed (from ~2kHz up to 250kHz or so). But every time i got the same result... The timings look always exactly the same (wrong). The max ISP clock is 1/4 of the system clock.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on April 17, 2016, 05:18:27 pm
Can you tell studio to ignore the device signature and get it to at least blink an LED?

I hope you did not spend too much on those "atmel" chips.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: steve41993 on April 17, 2016, 06:28:26 pm
Ok, got it to work now.
1. Install drivers for for avrdude and Winavr
2. Read fuses with the -F (disable device signature) command (with external clock)
3. Write new fuses with the -F command (with external clock)
4. Write program still with -F (without external clock)
5. LED is blinking now  ;D (without external clock)

But i got still the wrong device signature. Hope I can fix this.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on April 27, 2016, 06:03:02 pm
the device sig can probably be erased and re-written.
i have done this by accident on pic chips.

it sounds like the chips you have are "recovered" and have been erased.
that's why the device id is "FF" and probably all the fusebits were set to 1 - causing your clock problems.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: JackM on April 30, 2016, 07:58:44 pm
Does the Youyue 858D branded model exist at all in a 110VAC / 120VAC version? The only ones I am finding are all 220VAC input rated.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on May 01, 2016, 01:49:19 am
Does the Youyue 858D branded model exist at all in a 110VAC / 120VAC version? The only ones I am finding are all 220VAC input rated.

ebay.com
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: JackM on May 01, 2016, 01:54:56 am
Does the Youyue 858D branded model exist at all in a 110VAC / 120VAC version? The only ones I am finding are all 220VAC input rated.

ebay.com

Where? Honestly. I've searched and every one of the Youyue brand ones I've seen are 220V. The ad may say 110V/220V, but pictures show only 220VAC input. I have not found one being sold that says it takes 110VAC and has the pictures to prove it.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on May 01, 2016, 04:50:58 am
I've seen lots of them. Here's the first one that came up for me. It has the brand, the correct cable, and 110VAC printed on the back. There shouldn't be a shortage of them.

http://www.ebay.com/itm/152069653907 (http://www.ebay.com/itm/152069653907)

(http://i.ebayimg.com/images/g/Nk8AAOSw-zxWnJYZ/s-l1600.jpg)

(http://i.ebayimg.com/images/g/~XoAAOSwqYBWnJYW/s-l1600.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: JackM on May 01, 2016, 04:59:46 pm
Thanks bitseeker. I'd love to buy that exact one but unfortunately they do not ship to Canada... Seems that when I was searching for a listening it was only showing me ones that would ship to Canada, and because of that I didn't see any of the Youyue branded ones that were 110VAC.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on May 01, 2016, 08:48:48 pm
Yes, that is an important factor that could significantly change what you see vs. what I do.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kcbrown on May 05, 2016, 10:02:30 am
You should just get this one, it is cheaper and doesn't require an adapter board if they are still shipping the real one that I got. 


http://www.amazon.com/gp/product/B00P8Z4RPG?psc=1&redirect=true&ref_=oh_aui_search_detailpage (http://www.amazon.com/gp/product/B00P8Z4RPG?psc=1&redirect=true&ref_=oh_aui_search_detailpage)

I ordered that very unit from that very link.  And what I got is a "UYue 858D", not a "Youyue 858D".  Mine has the MK1841D3 microcontroller.

I'm slightly tempted to return it, but if even the "Youyue" versions now have the Samsung-based microcontroller (or a clone of that), then there probably wouldn't be any point.  And since there's an adapter board for this now, I doubt I'd be gaining much in the process anyway.

Between my experience and kmlee's, I don't even know if it's possible to get the original one with the Atmel microcontroller anymore.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: spinkidiver on May 05, 2016, 03:17:11 pm
Hello friends .! Excuse me but my english isn't good. I want to buy a 2 in 1 station soldering. i'm between  two options.
a) Yihua 8786D (60 $). http://www.amazon.com/Soldering-Rework-Station-Solder-Display/dp/B00XTK1JLC/ref%3Dsr_1_1&usg=ALkJrhj5y03iaLmqGGn1BjHwqSHx2VQrsA (http://www.amazon.com/Soldering-Rework-Station-Solder-Display/dp/B00XTK1JLC/ref%3Dsr_1_1&usg=ALkJrhj5y03iaLmqGGn1BjHwqSHx2VQrsA)
b) Youyue 8586 (54 $). http://www.amazon.com/Rework-Soldering-Station-Solder-Nozzles/dp/B00P8Z4RQ0/ref=sr_1_1?ie=UTF8&qid=1462460214&sr=8-1&keywords=youyue+8586 (http://www.amazon.com/Rework-Soldering-Station-Solder-Nozzles/dp/B00P8Z4RQ0/ref=sr_1_1?ie=UTF8&qid=1462460214&sr=8-1&keywords=youyue+8586)

Can you talk about these? quality? durability? Tips useful(hakko)? i prefer option A, because it have more certifications (for example: CE). But youyue is more cheap and i could buy best tips similiar to hakko or http://www.amazon.com/Marrywindix-Anti-static-Non-magnetic-Electronics-Jewelry-making/dp/B00DVIEJ14?ie=UTF8&psc=1&redirect=true&ref_=ox_sc_act_title_1&smid=A17ZZD0COKS85P. (http://www.amazon.com/Marrywindix-Anti-static-Non-magnetic-Electronics-Jewelry-making/dp/B00DVIEJ14?ie=UTF8&psc=1&redirect=true&ref_=ox_sc_act_title_1&smid=A17ZZD0COKS85P.) I read  comments but i don't understand all. I wiil not change (mod) the station, only i want one station of quality for the price.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on May 05, 2016, 05:22:06 pm
Hi spinkidiver,

Welcome to the forum.

The 8786D that you linked to has the correct title, but incorrect images and price (858D). Perhaps you meant this one http://www.amazon.com/Soldering-Rework-Station-Solder-Display/dp/B00XTK1JLC/ref=sr_1_1 (http://www.amazon.com/Soldering-Rework-Station-Solder-Display/dp/B00XTK1JLC/ref=sr_1_1)

I have the 8586 and it works well. I prefer the separate temperature controls for hot air and soldering iron on the 8586. As for quality and durability, the only way to know is to buy one. The insides can change in time, so I wouldn't try to predict what you will get.

As far as certifications, I wouldn't look too seriously at any of them on these brands of devices.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: spinkidiver on May 05, 2016, 08:53:45 pm
Hi spinkidiver,

Welcome to the forum.

The 8786D that you linked to has the correct title, but incorrect images and price (858D). Perhaps you meant this one http://www.amazon.com/Soldering-Rework-Station-Solder-Display/dp/B00XTK1JLC/ref=sr_1_1 (http://www.amazon.com/Soldering-Rework-Station-Solder-Display/dp/B00XTK1JLC/ref=sr_1_1)

I have the 8586 and it works well. I prefer the separate temperature controls for hot air and soldering iron on the 8586. As for quality and durability, the only way to know is to buy one. The insides can change in time, so I wouldn't try to predict what you will get.

As far as certifications, I wouldn't look too seriously at any of them on these brands of devices.


Thanks..!
already I edited the link,  about the temperature controls is not very important because only will be back up(iron), i have a soldering iron. if I will not look too seriously the certifications i will choose 8586 for price. I live in latinoamerican. the wheather is hot (35 ºC   :phew:). i read the yihua's triac can be burn. What is quality for youyue?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on May 05, 2016, 09:48:23 pm
It's not so hot here, so I'm not sure. At this price/quality range, I would not rely too much on anything being significantly better or worse. It could change in the next production run.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: spinkidiver on May 05, 2016, 10:42:17 pm
good, thanks :clap:.
I can see two models yihua 8786D.
1) http://www.amazon.com/dp/B015ODWOJC/ref=twister_B015ODWO6U?_encoding=UTF8&psc=1 (http://www.amazon.com/dp/B015ODWOJC/ref=twister_B015ODWO6U?_encoding=UTF8&psc=1)
2) http://www.amazon.com/YiHUA-8786D-Display-Rework-Soldering-Station/dp/B00O40NO50/ref=sr_1_2?ie=UTF8&qid=1462487625&sr=8-2&keywords=yihua+8786d (http://www.amazon.com/YiHUA-8786D-Display-Rework-Soldering-Station/dp/B00O40NO50/ref=sr_1_2?ie=UTF8&qid=1462487625&sr=8-2&keywords=yihua+8786d)
Wich is the original? the first one or the second one? the difference is the logo logo CE, 1 in the  right and the other in the left.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on May 05, 2016, 11:26:45 pm
I'm not sure. It's really hard to tell with these things. They could both be fakes or just different batches or something in between. Some people have even received devices with a different name or different microcontroller, but functionally the same thing.

Sorry I don't have more definite information. This market is just so crowded with variants that anything is possible. Amazon is pretty good about returns, though, in case you are not satisfied. But verify what return policies apply in your country.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: happydad on May 17, 2016, 08:55:32 pm
Hi Madworm,
I am thinking of adding a perf board to do the BLDC fan speed mod, and am trying to clarify some connections.  Looking at the fan-speed mod schematic, is the input (I_BLDC) connected to the pig-tail resistor attached to the upper right side of the main board?  And I'm assuming v_out goes to pin28 of the Atmel?
Thanks in advance.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on May 23, 2016, 10:10:45 am
You'll find more info here: http://blog.spitzenpfeil.org/wordpress/2015/10/23/youyue-858d-hotair-station-bldc-fan-speed-mod/ (http://blog.spitzenpfeil.org/wordpress/2015/10/23/youyue-858d-hotair-station-bldc-fan-speed-mod/)

Mostly images.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: mixih on May 28, 2016, 08:41:29 pm
Hello everyone,

Recently, I bought a Youyue 858D in the hopes of applying this mod to it. Only problem is that the internals don't match. Like kcbrown, I have a one sided board with the MK1841D3 processor. The board layout looks very similar to the Kaleep. I'm wondering whether they changed the insides or if this is just a re-branded Kaleep. Is there anywhere I can get the original with the Atmel?

Edit: The board revision is 858D04.PCB 2015.08.21
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on May 28, 2016, 10:02:31 pm
Is that the LED display that looks like it's not even soldered on?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: mixih on May 28, 2016, 10:26:22 pm
Yes, that is. It seems to be soldered on the reverse side.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on May 28, 2016, 11:21:57 pm
Yeah, just looks funny. Single-sided board and really long leads left on.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Tausif36198 on June 04, 2016, 01:18:10 pm
Hi sir I have quick 858 D so my hot gun not work display not work total hot gun death haw this repair
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: doctormord on June 05, 2016, 03:42:03 am
Change fuse?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Tausif36198 on June 05, 2016, 12:59:00 pm
Sir , fuse is OK sir 858D04 PCB new available .and haw many programing IC  in PCB .and haw to programing system and software.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Tausif36198 on June 05, 2016, 01:40:35 pm
Sir, I have quick 858d 220 volt my machine fuse OK .I check PCB components remove n check found OK .now display is showing nothing and machine is not working..5 volt supply is taken by IC..so guide me about that it's hardware problem or programing problem.. I have no programing tool to ...so gudie me what should I do to repair my machine.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on June 05, 2016, 10:49:22 pm
Are all the power supply output voltages correct? If not, then the problem may be the power supply or something after the power supply causing the voltage to be incorrect (usually lower than what it should be).

Did I read correctly that you removed and checked all the PCB components? All of them?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Tausif36198 on June 06, 2016, 03:00:52 am
Sir, My means I will try to 5volt power supply directly to all PCB IC spark the circuit no PCB line damage it's OK. My machine ic( mk1841D3c1y21535) this is a programable ic?I think so IC program is empty? Haw many programing IC in PCB board. and sir system to program details .
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on June 06, 2016, 03:09:27 am
If you recently purchased this and the IC is empty, you should return it.

I don't know how to program that IC. Read the old posts here about how others modified their machine. I don't remember if anyone programmed it or replaced it with an ATmega.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Tausif36198 on June 06, 2016, 03:19:57 am
No sir this is machine company ic
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Tausif36198 on June 06, 2016, 05:01:14 am
Sir can I purchase 858D Mk 1841DAtmega328p IC board online .In INDIA  .purchase details plz sir.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on June 06, 2016, 07:14:28 am
You can check the earlier posts in this thread for more information. The board is made by forum member wguibas, so you may want to check with him if he has any more boards available.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Tausif36198 on June 06, 2016, 08:51:21 am
Sir 858d display work anode or cathode working position
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on June 06, 2016, 05:36:06 pm
I don't have the same model as yours. Some ways to find out:

1. Turn it on and use a multimeter to see which way it is.
2. If there is no power to the display, follow the traces on the PCB to determine how it's configured.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Tausif36198 on June 13, 2016, 05:06:28 am
Sir can I purchase 858D PCB board in INDIA online ? Website name plz post immediately plz sir.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on June 13, 2016, 07:02:59 am
I don't know. You'll have to look through the messages here to contact the person who made the PCB.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: mixih on June 16, 2016, 02:17:00 pm
Ok. Just bought another one from a totally different seller. It also had that MK1841D3 chip. As @kmlee posted, I think they've switched to this design. :'( Oh well. Is there such a thing as a "Fake" YOUYUE?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on June 16, 2016, 04:16:54 pm
For the rework station with MK1841D3 chip, the adaptation board of Wayne (wguibas) works perfectly with the software of madworm.
Unfortunatelly the calibration and the PID parameters are not adapted for the 230V version. I have to work on it as soon as I have time...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on June 19, 2016, 05:52:07 pm
Well, found some time to work on this.
I took the V1.45 version of the software and made the modifications from Wayne (wguibas) on the relationship between adc_raw and temperature, as well as min and max values for fan speed.
His formula is temp = adc_arw/2.4 + offset (33 by default).
I flashed the software and made a complete set of measurement. I don't know why, but this time the results are much better than before: the bias between target and mesure from 80°C to 400°C stay inside +/- 1 or 2 degrees: excellent! I made a linear regression to determine the equation and found:
temp = adc_raw/2.456 + 35, which is pretty close to the software's formula above, so I changed nothing.
Many thanks to Robert and Wayne!
Denis

Kaleep 858D+ with MK1841D3 chip

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: happydad on June 29, 2016, 04:50:05 am
Robert, I may need some help.  I was able to flash the v1.45 binary to the ATMega168A chip.  But when I turn it on and attempted to measure the fan speed pulses, I got nothing.  When I first turn it on, the fan turns on for about 2 seconds before shutting down, and the display then continuously read 'fan spd'.  Any idea what's going on?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on June 29, 2016, 10:25:24 am
Did you try the manual fan-test to see what the device gets from the ADC?


Fan Speed/Current:
==================

* Can be tested when pressing up while powering on, current value is shown and updated.
* Hard reset to leave

https://github.com/madworm/Youyue-858D-plus/blob/master/Docs/modes_of_operation.txt
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: happydad on June 29, 2016, 05:23:06 pm
Thanks for the quick response, Robert.  I tried the manual fan test and it appears to at least blow air  :-DD.  When I look at the scope, it doesn't seem as clean as yours, i.e. I get a double pulse no matter what speed I'm at.  See Attached and sorry for the poor quality.  I assume this is ok?

Also, The readout is always 23, even when I crank it up.  It only jumps to 940 or so when I max out the speed knob.  More hints?

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: happydad on July 02, 2016, 11:27:50 pm
Hi Robert,
I have messed with the pots during fan-speed testing.  For the most part, I was able to get a good pulse, except at the lowest speed setting, the pulse is erratic.  Anyway, I think the mod is working.  However, when I power it up in its default state, I still get the 'fan spd' message.  The manual mentions adjusting fsl/fsh/fcl/fch.  So I attempted to un-comment the bldc section of the youyue.h code.  After building it using AVR Dragon, it now appears that the leds are not displaying, i.e. dead.  The fan now runs and speeds up according to the knob.  So I'm now lost.  Since I'm really new to AVR programming/compiling, is youyue.h all I need?  Or do I need some other files like youyue.cppproj?  I am using Atmel Studio 7.
Thanks in advance.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitwelder on July 03, 2016, 08:25:35 am
I recently got a WEP 858D, which is a second brand for Yihua (the station has even a QR code to check the 'authenticity' (*), and in the 'certificate' they state that Yihua Electronics has two brands YIHUA and WEP).

It uses the Samsung chip S3F94CEEZZ-DK94, but the PCB seems a newer version than what wguibas showed in this picture (V5 vs V2).
Do you think the adapter board would work with it, or does it need to be further changed?

(http://i.imgur.com/sfRiVm4.jpg)

(*) the check seems to work so that if the web page linked to the unique 'security code' has been accessed more than once, it warns you of a possible fake (plus it reports the timestamp of the first access).

EDIT1: The version name seemed like a V5, but actually after clearing it, turned out it's a V8.
EDIT2: front and back photos of the PCB at https://imgur.com/a/YPXcD (https://imgur.com/a/YPXcD)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 03, 2016, 01:16:46 pm
Since I'm really new to AVR programming/compiling, is youyue.h all I need?  Or do I need some other files like youyue.cppproj?  I am using Atmel Studio 7.
Thanks in advance.

There need to be modifications in the .h and .ino files. I've added a few comments today about that.

I haven't used AVR Studio since version 4. I don't even know if 7 runs on my XP VM. I usually don't touch anything windows while at home.

Do you have a build-log from your experiments? Maybe Studio changed the fuse settings?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: happydad on July 10, 2016, 02:41:58 am
Hi Robert,
Some progress.  I was able to compile your 1.45 code with the bldc fan mod.  Now when I turn it on, it displays "1.45", then stop at "FAN Cur".  Can you explain the difference between fan_current_min/max and fan_speed_min/max?  The section of code in .ino says
#ifdef CURRENT_SENSE_MOD
CPARAM fan_current_min = { 0, 999, FAN_CURRENT_MIN_DEFAULT, FAN_CURRENT_MIN_DEFAULT, 22, 23 };
CPARAM fan_current_max = { 0, 999, FAN_CURRENT_MAX_DEFAULT, FAN_CURRENT_MAX_DEFAULT, 24, 25 };
#else
//
// See youyue858d.h if you want to use the 'FAN-speed mod' (HW changes required)
// The following 2 CPARAM lines need changes in that case
//
CPARAM fan_speed_min = { 120, 180, FAN_SPEED_MIN_DEFAULT, FAN_SPEED_MIN_DEFAULT, 18, 19 };
CPARAM fan_speed_max = { 300, 400, FAN_SPEED_MAX_DEFAULT, FAN_SPEED_MAX_DEFAULT, 20, 21 };
#endif

whereas the ones in the .h file are
CPARAM fan_speed_min = { 0, 999, FAN_SPEED_MIN_DEFAULT, FAN_SPEED_MIN_DEFAULT, 18, 19 };
CPARAM fan_speed_max = { 0, 999, FAN_SPEED_MAX_DEFAULT, FAN_SPEED_MAX_DEFAULT, 20, 21 };
//
#define FAN_CURRENT_MIN_DEFAULT 30UL
#define FAN_CURRENT_MAX_DEFAULT 71UL

So what does 'UL' mean?  Does fan_speed_min/max refer to just the resistor mod without the BLDC comparator stuff?  I have the LM2904 comparator mod done, so should I be looking at fan_current_min/max instead?  Also, I am confused about what was displayed in fan test mode.  When using your binaries at github, I thought I was getting numbers in the high 900 range.  But now with the binaries derived from youyue858d.h and youyue858d.ino, I get readings between 23-81, and the time constant is really slow.  Any help is greatly appreciated.
Thanks in advance.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 10, 2016, 11:12:20 am
* The "current sense mod" & related settings just measures current via the 1R resistor, quite useless for the BLDC fan. Doesn't detect stalling. I don't ever use this. Maybe it should be thrown out.

* The normal "fan speed" settings (code as is) are used for the unmodified device (no 1R resistor...), it measures BLDC supply voltage & somewhat correlates with fan speed, but still doesn't (can't) detect stalling.

* The "fan-speed hw-mod" requires adjustments to the "fan-speed" settings as described in the code. This is due to other numerical values coming from the ADC. Once the device has run for a minute or two, readings in fan-test mode should be ranging from > 500 to about 1000 or thereabouts. When the fan is stalled (piece of paper) it should read below 450.


"UL" stands for "unsigned long" It is to make sure the right data-type is used for constants. I know my usage of this is a bit "lax".

https://stackoverflow.com/questions/13134956/what-is-the-reason-for-explicitly-declaring-l-or-ul-for-long-values

Now to the hex files. I've compiled these so they work on my device, constants chosen to match the settings for the mod described in the manual for the mod (see github).

https://github.com/madworm/Youyue-858D-plus
https://github.com/madworm/Youyue-858D-plus-FAN-speed-mod
https://github.com/madworm/Youyue-858D-plus-MCU-adapter
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: happydad on July 10, 2016, 08:52:03 pm
Robert,
To recap, I have done the hardware mod.  Fan test mode showed values in the 500-999 range from min to max.  It some times underrun and overrun, but I guess that is ok.  When I used your binaries taken from the github area, I get '1.45' displayed, and then stops at 'fan spd'.  I then proceeded to modify the code by extending the range like so:
CPARAM fan_speed_min = { 0, 999, FAN_SPEED_MIN_DEFAULT, FAN_SPEED_MIN_DEFAULT, 18, 19 };
CPARAM fan_speed_max = { 0, 999, FAN_SPEED_MAX_DEFAULT, FAN_SPEED_MAX_DEFAULT, 20, 21 };

I am assuming the max range is 0 to 999.  Right now, I get the attached display at lowest to mid range.  At max range, I get the 'fan spd' display.

So are the above parameters correct?  What should I do next?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 10, 2016, 09:48:11 pm
The range extension looks ok to me. You did change the min/max defines as well, didn't you?!?

I don't know what this "rrr" is supposed to be. Never seen that before.

Fan speed set to max on the dial will cause an error. This is intended.

As of now, the fan-speed must be greater than FAN_SPEED_MIN and smaller than FAN_SPEED_MAX to pass the test. You can change these variables in the config menu of the device.

When I have time & inspiration I will have to clean this up a bit. But right now life / job come first.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: happydad on July 11, 2016, 09:42:40 pm
Latest update:
It seems that there's an issue with the display, because when I removed the wand from the cradle, it started to get hot.  When pushing the up and down buttons, it sure looks like the display wants to reflect the temperature, but it's just putting out gibberish.  Also looks like pushing both buttons together gets it to the config menu.  It's just that I can barely figure out the gibberish on the display.  Anyone have any idea?  The thing is that when I am in fan test mode, the display is behaving correctly.  In normal mode, it starts up displaying '1.45' correctly, and then gets into the 'rrr' with the wand on the cradle.  With the wand off the cradle, that's where I get garbage.  I suspect perhaps clock is going too fast?  But then why is it okay in fan test mode?   :-//
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 11, 2016, 10:00:48 pm
Fuse bits are correct? There is one "clkdiv8" that would certainly mess things up.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 11, 2016, 10:02:46 pm
Could you post a video somewhere?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: happydad on July 11, 2016, 11:30:55 pm
Here you go:
https://www.youtube.com/watch?v=9cls7NOD0s8&feature=youtu.be (https://www.youtube.com/watch?v=9cls7NOD0s8&feature=youtu.be)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: happydad on July 20, 2016, 04:50:18 pm
Hi,
I would appreciate if you guys can drop some hints as to why I'm having problems with the display:
https://youtu.be/VwirBtHQnIY (https://youtu.be/VwirBtHQnIY)

I am using Atmel Studio 7.0 to burn the '168 chip, and I suspect something's not translated correctly.  Why would the speed test display be fine, but the main program's display is all whacked?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 20, 2016, 04:58:00 pm
The firmware version gets displayed for way too long. It should only show for 1 or 2 seconds. This makes me believe that either the clock settings are wrong (fuse bits, DIV8) or that the code was compiled with the wrong F_CPU define. Either way, the timing is way off.

Could you post a Screenshot with the fuse settings after you've read them from the chip? The programming dialogue should have that option.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 20, 2016, 06:33:38 pm
I stand corrected - to some degree at least.

I've tried to replicate the error you get by deliberately programming the "CKDIV8". The result was unspectacular,  the device still worked, just awfully slow. The display was flickering noticeably.

I didn't see the strange "rrr" artefact at all.

To test against this possible issue I've added some dumb code that checks whether the timing is grossly off & causes a watchdog reset if that is the case.

It is quite a puzzler that the firmware version is displayed correctly, and only after that everything goes south with the display.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: happydad on July 20, 2016, 06:42:34 pm
Fuse settings are attached.  I don't think this is an issue with different pinouts, because the LED segments work correctly in fan test mode.  I should say that I'm not too familiar with Arduino.  So when using AS7.0, I had to point it to the Arduino IDE directory that I had to download and install separately.  It was version 1.6.9 that I downloaded, if it means anything.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 20, 2016, 06:58:15 pm
The fuses look OK.

I use 1.6.4 here, if it means anything ;-)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on July 20, 2016, 09:00:04 pm
@ happydad

I don't know how you're using ATmel Studio 7 (AS7) to compile the sources. If you use the VisualMicro plugin, you can manage things just as  a pure Arduino project. But if you want to create a true C++ project, this is another story:
Converting the arduino project (.ino) to a standard Atmel Studio C++ project is not a simple thing. I did it and found some problems.
The main one has been corrected by the Atmel support who sent me a modified arduino.dll (I'm using Windows 10). I also modified the functions and arguments types/cast for EEPROM access which are different in the Atmel Arduino lib.
see https://www.eevblog.com/forum/microcontrollers/atmel-studio-7-create-project-from-arduino-sketch/msg969568/#msg969568 (https://www.eevblog.com/forum/microcontrollers/atmel-studio-7-create-project-from-arduino-sketch/msg969568/#msg969568)
Here are the two files sent by Atmel to correct the bug in the "create project from Arduino sketch" function of AS7, as well as the .cpp source with the modifications for eeprom access. This source is for the station with the MK1841D3 MCU, which implies to modify the conversion formula for temperature: just suppress the division by 2.4. Then you can insert the modifications for the fan you're trying to make...

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: happydad on July 20, 2016, 11:06:52 pm
Hi Gixy,
I go to File-New-Project, then pick "Create project from Arduino sketch".  As you can see from the screenshot, VisualMicro plugin was also there, but I didn't go that route because it seems to want to see an Arduino board, which I don't have.  It gave me these messages:
"Intellisense build error: Object reference not set to an instance of an object.
Visual Micro found a missing or redundant board selection
Please ensure a valid micro-controller application and board are selected".

How would you add the .ino and .h file going the VisualMicro route?  At this point, I'm only guessing there's an issue in the translation.  Perhaps there is really an issue with AS7.  I would like to try your files, but I think your zip file is empty.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on July 21, 2016, 08:21:16 am
Hi Happydad,
Sorry for the zip file, I uploaded it again and it seems to be OK now.
There is 3 ways to proceed:
- Using the Arduino IDE. Indicate Arduino/Genuino Uno as the target and that's it. You load the .ino file and build the binary (.hex) without bootloader. This is for sure the simplest solution. You can then flash the firmware with your programmer (TL866 or anything else)
- Using AS7 with VisualMicro. File / New / Project / (VM) Arduino sketch and select Arduino/Genuino Uno as a target. No need to modify anything in the sources, VisualMicro does the job to link everything. You can then flash the firmware with the binary stored in the release directory.
- Using AS7 after converting the sketch into a normal C++ project. File / New / Project / Create Project from Arduino Sketch. This is the hardest way, where you need the patch files I posted and you have to modify the sources in order to compile the project without errors. Use this method only if you're conformtable enough with C++ development.
Clearly to get your project working rapidly and focus only on hardware tuning, go with the first solution.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 21, 2016, 12:31:54 pm
Did you ever try the .hex files I've posted here?

These things are "known-good" & not working with these would point to a non-code issue. Maybe chosen wrong target MCU when uploading (i.e. 168 code in 328 chip or vice versa).
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on July 21, 2016, 04:31:40 pm
Right, first thing to try...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: happydad on July 22, 2016, 03:02:10 pm
Thanks for the suggestions.  I have tried Robert's hex file version 1.45, and kept getting the 'fan spd' error.  I just noticed today that he has uploaded 1.46.  I tried that too, and got the 'cradle' error even though I removed the wand from the cradle.  Fan test worked as usual.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 22, 2016, 03:56:26 pm
1) You got the fan speed error because Your hardware mod doesn't output the required voltages (as described in the manual in great detail).

2) You get the cradle error, when you power up the device with the wand OUT of the cradle. A safety measure.

3) As you didn't see the "rSt" error with V1.46, we can now confirm that your device runs @ 8MHz (correct "CKDIV8" fuse setting).
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: happydad on July 22, 2016, 04:53:21 pm
Thanks Robert.  I had a brain fart about the cradle error.  How does the cradle sensor work?  I guess the cradle has to be grounded?  I momentarily touched the cradle to the case, and things are now appearing to work fine.  Cannot quite get the time to do a full test since I will be going camping in the next few minutes.  But it sure looks promising now.  Sure would like to find out what was wrong with the AS7/Arduino translation.  Will try Gixy's fix when I can fine the time.  Thanks so much for version 1.46.  I must add that I verified required voltages with the mod with 1.45, and it still gave fan speed error.  But 1.46 works.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on July 22, 2016, 05:16:54 pm
The cradle sensor is a reed switch. There is a small magnet in the base.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: doctormord on July 22, 2016, 07:22:53 pm
The cradle must always be grounded/earthed for security reasons.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tto4ka on July 24, 2016, 04:02:19 pm
I recently got a WEP 858D, which is a second brand for Yihua (the station has even a QR code to check the 'authenticity' (*), and in the 'certificate' they state that Yihua Electronics has two brands YIHUA and WEP).

It uses the Samsung chip S3F94CEEZZ-DK94, but the PCB seems a newer version than what wguibas showed in this picture (V5 vs V2).
Do you think the adapter board would work with it, or does it need to be further changed?

(http://i.imgur.com/sfRiVm4.jpg)

(*) the check seems to work so that if the web page linked to the unique 'security code' has been accessed more than once, it warns you of a possible fake (plus it reports the timestamp of the first access).
For this type of a board changes in the adapter are necessary, it is also necessary to change a firmware, control of the heater is realized on the contrary
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: xnorbi on August 05, 2016, 07:46:38 am
Hello,

I would like to buy one 858D Hot air rework station.  Can anyone recomend me type(wep, yihua, etc..) and/or seller from it have the most chance to be easy modifiable with custom firmware? I prefe the cheapest station of course. Thank you! 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: xnorbi on August 08, 2016, 06:46:18 am
Hello,

I would like to buy one 858D Hot air rework station.  Can anyone recomend me type(wep, yihua, etc..) and/or seller from it have the most chance to be easy modifiable with custom firmware? I prefe the cheapest station of course. Thank you!

I asked seller on ebay who selling WEP858 station ( http://www.ebay.co.uk/itm/220V-WEP858D-SMD-SMT-SOLDERING-REWORK-STATION-welder-HOT-AIR-858D-Sale-/151993774809?hash=item236388f2d9:g:DbQAAOSwGotWjcCH (http://www.ebay.co.uk/itm/220V-WEP858D-SMD-SMT-SOLDERING-REWORK-STATION-welder-HOT-AIR-858D-Sale-/151993774809?hash=item236388f2d9:g:DbQAAOSwGotWjcCH) )

I get the following answer with attached picture:
"Dear customer,
Thank you so much for your interest on our prosuct!
The picture is attached.
And the type of the processor is samsung.
Have a nice day!
"

Its seems this is the almost same (v8 vs v5 or v2) board in the prveious post from tto4ka.

What do you mean on this:

it is also necessary to change a firmware, control of the heater is realized on the contrary

Can you describe it in detail? Thank you!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tto4ka on August 13, 2016, 09:08:35 pm
Here a PinOut for this PCB.
1 - GND
2 - LED 1 PD1
3 - LED 2 PD2
4 - null
5 - LED 3 (decimal point) PD4
6 - LED 4 PD5
7 - LED 5 PD6
8 - LED digit 1 PB0
9 - LED digit 2 PB7
10 - LED digi 3 PB6
11 - heater PB1
12 - button 2 PB5
13 - button1 PB2
14 - LED 8  PD0                                                                                         
15 - LED 6 5 PD3
16 - LED 9 13 PD7
17 - ADC temp sense PC0
18 - red switch PB4
19 - fan on of PC3
20 - Vcc

LED 9 5 PD3
LED 12 13 PD7

I can lay out approximate distributing of Adaptive PCB.

It is also necessary to change control of the heater in firmware on:
// THIS IS WHERE IT GETS DANGEROUS
// YOU CAN START A FIRE AND DO A LOT OF HARM WITH
// THE HEATER / TRIAC COMMANDS
#define TRIAC_ON ( PORTB |=  _BV(PB1) )
#define HEATER_ON TRIAC_ON
#define TRIAC_OFF ( PORTB &= ~_BV(PB1) )
#define HEATER_OFF TRIAC_OFF
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: robimarko on August 18, 2016, 06:36:16 pm
Hi,does anybody know component size for Waynes MK1841D3 to Atmega 328 board?
Also Is there any good firmware for 230V version since I have Baku 858D for EU.

Thanks
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anman on August 21, 2016, 08:21:46 pm
I was looking for Hot Air Station with MCU atmega. I found an interesting instance on

atmega8L - SR858D (http://got.by/1t71ua).

The first impression - the management fee is made in the form of complete SMD mounting, there is a connector for in-circuit programming J6.
http://g01.a.alicdn.com/kf/UT8zANMXUpaXXagOFbXs.jpg (http://g01.a.alicdn.com/kf/UT8zANMXUpaXXagOFbXs.jpg)

Pinout terminals: 1-VCC, 2-MOSI, 3-SCK, 4-Rst, 5-MISO, 6-GND.
Features on the board "TGK SR858D 20150507A": TR1 - BTB12 600SW, Q1 - MJD122, U2 - MOC3041, U3 - 78M05, IC1 - LM358, Q2 Q6 - J3Y, Z2 - 431, LEDS - 4301BS (In datasheet analogue SM310401K).

Was atmega168 soldered and programmed binary file version 1.46.
Other hardware configurations changes I did not make.

1. When the station (hair in the cradle) - the indicator FAN - t5t.
Powered fan adjustment potentiometer leads to changes in speed, the display from 168 to 399. The heater does not work. Removing the hair dryer from the cradle, press the buttons one by one and long double do not make changes.

The same results are obtained if you turn the station with the pressure on the top button.

2. The fan is in the cradle. When the station and pressing the two buttons - the display 1.46> P - at the release buttons on the display 650 and further gradual increase to 990. The fan does not work and is not heated.
 When removing the fan from the cradle and pressing the lower button on the display value of 990 can be reduced to 010. The fan is not working.

3. When the station and the pressure on the lower button - the indicator 1.46, then     ( CrA-dLE-empty indicator ) repeated in a loop. The fan and heater did not work.
   When removing the fan from the cradle - the fan and the heater did not work.

   If you make a long press on the two buttons, regardless of whether the fan is in the
cradle or the fan removed from the cradle - is turned on the fan and heater !!!


   In this state, the temperature can be adjusted.

   When the pressure on the button at the bottom there is a temperature decrease of up to 40 degrees, fan and heater will not turn off.
   When the pressure on the top button, the temperature drop to 40 degrees and turn off the fan and heater. If you release the top button, then turn on again and the heater fan. The temperature rises to its former value.

   When placing the fan in the cradle and the reed switch is triggered.
In this state, there is an increase in temperature to 500 degrees.
   Stop if the temperature rise can release the fan from the cradle.

  Help respected community in debugging hardware and firmware modifications.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anman on August 21, 2016, 09:30:45 pm
Additionally, I attach the fan image disassembled from the housing station SR858D.
Added video station SR858D mode on firmware 1.46.

https://youtu.be/2k1CYtB1jqo (https://youtu.be/2k1CYtB1jqo)

P.S  I want to thank the author of the firmware, the station SR858D brilliantly keeps the set temperature.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on August 23, 2016, 03:59:18 pm
Try this. I've swapped the pins for up-button and reed-switch. PB4 <--> PB5.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anman on August 24, 2016, 09:54:11 am
Thank you Robert!
Now everything fell into place. modes SR858D station management is determined to a single standard.

Now, the station claims to be the "hit of the season", thanks to the new firmware   :-DD.

P.S. Special nuances of station modes are shown in the video, It will be added later.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on August 24, 2016, 10:19:17 am
Great! Looking forward to the video.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anman on August 29, 2016, 02:25:58 pm
Work stations SR858D with modified firmware 2016-08-23__commit-e3c28c9__ATmega168-8MHz-RC-osc__FUSES-0xE2-0xDD-0xFD__V1.46-WDT_TGK-SR858D.hex
Hardware

Change hardware - only the replacement of atmega168.

https://youtu.be/-4sgWdcNG1M (https://youtu.be/-4sgWdcNG1M)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: gbomacfly on September 04, 2016, 06:21:03 pm
Hello there,

is there any chance to get one of these pcb?
And if, what will it cost to ship it to Germany?
I could pay in advance with paypal if this is ok for you?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anman on September 05, 2016, 12:44:20 pm
Hello there,

is there any chance to get one of these pcb?
And if, what will it cost to ship it to Germany?
I could pay in advance with paypal if this is ok for you?

https://oshpark.com/profiles/madworm
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anman on September 06, 2016, 03:02:18 pm
Try this. I've swapped the pins for up-button and reed-switch. PB4 <--> PB5.

Robert, please add Version atmega328 MCU.

Thank you, I've compiled.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: felixe on September 06, 2016, 11:04:16 pm
Anyone have an adapter PCB (w/ components preferred) for the MK1841D3 version to sell me? Also is there any functioning firmware for this with 220V?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anman on September 09, 2016, 06:18:23 am
I compiled firmware and get the error

youyue858d.ino: In function ‘void eep_save(CPARAM*)’:
youyue858d.ino:581:9: error: ‘class EEPROMClass’ has no member named ‘update’
youyue858d.ino:582:9: error: ‘class EEPROMClass’ has no member named ‘update’

I answer myself, and it may be useful to others, it corrected version 1.6.2 arduino and higher
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: LeWidget on September 15, 2016, 04:45:11 am
Hey guys, sorry to jump in, but it looks like you guys know your stuff about the hot air stations.

I have a WEP 862D+ 2-in-1 station and the hot air has borked itself. Looks like it might be the heating element.. but was considering replacing the handle.. though its $30..

Just wondering, I've opened up the hot air handle and the PCB inside says YH858-2 ...

(http://i998.photobucket.com/albums/af101/Widget1983/Electronics/IMAG0229_zpsnnkbashs.jpg)

From that I'm thinking its a handle from the 858 hot air station and that a replacement for the 858 would work?

I'm not sure on the power requirements / layout from the handle > the PCB.. whether it'll be a straight swap or there's power differences  .. I did see YH862DV3 printed on the main PCB inside the case.. but cant find a schematic to view power input/output etc..

Thoughts ?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anman on September 22, 2016, 03:56:07 pm
.....
Thoughts ?

They are almost the same power of 650-700 watts

https://www.aliexpress.com/premium/core-hot-air-858D.html?ltype=wholesale&d=y&origin=y&isViewCP=y&catId=0&initiative_id=SB_20160922075400&SearchText=core+hot+air+858D&blanktest=8 (https://www.aliexpress.com/premium/core-hot-air-858D.html?ltype=wholesale&d=y&origin=y&isViewCP=y&catId=0&initiative_id=SB_20160922075400&SearchText=core+hot+air+858D&blanktest=8)

P.S.  Does someone have a video of the station in the fan test mode modification HW sensor?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: jaaa1976 on September 24, 2016, 10:33:13 am
I am looking for Youyue 858D+  with MCU atmega ..can somebody send link ..because new  Youyue 858D+ stations dont have MCU atmega

for example buyer feedback left on ali express ..Fast delivery. goods reached 19 days. test the functionality. inside mcu MK1841D3.

it mean..if i buy from https://www.aliexpress.com/?spm=2114.10010108.1000002.1.haLDAr (https://www.aliexpress.com/?spm=2114.10010108.1000002.1.haLDAr)  i will receive with mcu MK1841D3
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anman on September 24, 2016, 02:14:36 pm
I am looking for Youyue 858D+  with MCU atmega ..can somebody send link ..because new  Youyue 858D+ stations dont have MCU atmega
......... i will receive with mcu MK1841D3

A successful example (http://got.by/1t71ua) ... also I have been looking

I was looking for Hot Air Station with MCU atmega. I found an interesting instance on
atmega8L - SR858D (http://got.by/1t71ua).
....
 there is a connector for in-circuit programming J6.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: jaaa1976 on September 24, 2016, 04:17:31 pm
which tools i need if i buy SR858D+ ESD Soldering Station ? for flash mcu...I have universal programmer MiniPro TL866A
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anman on September 24, 2016, 07:55:10 pm
which tools i need if i buy SR858D+ ESD Soldering Station ? for flash mcu...I have universal programmer MiniPro TL866A
Buy in reliable source MCU atmega168 or 328 to replace atmega8L. If you yourself never soldered chip it is better to give in "capable hands". Solder the pins on the board J6 and program a new MCU, the port circuit programming.
Pinout terminals J6 SR858D board: 1-VCC, 2-MOSI, 3-SCK, 4-Rst, 5-MISO, 6-GND.
How to set fuses look at the enclosed picture.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: 0xPIT on October 12, 2016, 02:03:58 am
Hey,

as I've got the cheapo version with the samsung proprietary controller, I'm considering to redo the PCB with a MAX31855.

Does anyone happen to know
1) the type of the thermocouple (K?)
2) if the thermocouple is floating or has ground connection? (the MAX31855 does not work properly if the TC has ground connection)

Thanks,

  - pit
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: neutrino on October 26, 2016, 12:59:17 pm
In Poorman's Electronic Projects blog there is a full schematic and teardown of BAKU 858D (http://poormanelectronics.blogspot.pt/2016/08/schematic-and-teardown-of-baku-858d-smd.html).
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Brenex on October 26, 2016, 06:16:53 pm
I just purchased a Youyue from amazon and I'm excited for it to come and get to tinker with it. It comes in tomorrow. I'm totally happy with what I'm getting in to which is a basic unit that I can have fun messing around with as part of my hobby. It seems that Atmel hasn't been coming with the new youyues since around january or earlier so it looks like I'm going to have to see if a samsung/mk adapter is going to be necessary. I also read through the "Heart of Tech." of blog but it seems he stopped his replacement project in April. I reached out to him on twitter but haven't heard back.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Brenex on October 28, 2016, 02:13:40 am
My unit just came in today from Amazon (https://www.amazon.com/gp/product/B00P8Z4RPG/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1). Very happy with it! I made some modifications like switching the live and neutral wires as they go to the switch. The fuse was real and correctly connected to the live wire. The grounding wire to the metal shroud on the handle was just wrapped as can be seen in the last pic so I soldered it on. Also cleaned up one solder joint that was shorted with another incorrectly.

(http://i.imgur.com/WaqhH68m.jpg) (http://imgur.com/WaqhH68.jpg)

(http://i.imgur.com/ygU216Lm.jpg) (http://imgur.com/ygU216L.jpg)

(http://i.imgur.com/P5L17kim.jpg) (http://imgur.com/P5L17ki.jpg)

EXCELLENT QUALITY!

(http://i.imgur.com/5V4e75mm.jpg) (http://imgur.com/5V4e75m.jpg)

(http://i.imgur.com/oCfHRNmm.jpg) (http://imgur.com/oCfHRNm.jpg)


(http://i.imgur.com/9jvzwhHm.jpg) (http://imgur.com/9jvzwhH.jpg)

Too bad there is no sweet holographic QC sticker.

(http://i.imgur.com/q244oD8m.jpg) (http://imgur.com/q244oD8.jpg)

(http://i.imgur.com/bpt5JCQm.jpg) (http://imgur.com/bpt5JCQ.jpg)

Seems to have been made June 22, 2016. Not bad.

(http://i.imgur.com/TWSuCk3m.jpg) (http://imgur.com/TWSuCk3.jpg)

I'm not sure what the empty socket on the back is for. It's connected to ground on the inside.

(http://i.imgur.com/LmrgqLNm.jpg) (http://imgur.com/LmrgqLN.jpg)

Hello little solder blob.

(http://i.imgur.com/IpW5WHym.jpg) (http://imgur.com/IpW5WHy.jpg)

(http://i.imgur.com/yDHcfuwm.jpg) (http://imgur.com/yDHcfuw.jpg)

(http://i.imgur.com/fDoB3SYm.jpg) (http://imgur.com/fDoB3SY.jpg)

(http://i.imgur.com/fAE7Nf4m.jpg) (http://imgur.com/fAE7Nf4.jpg)

(http://i.imgur.com/dwvFpuYm.jpg) (http://imgur.com/dwvFpuY.jpg)

(http://i.imgur.com/ZxDS6Ccm.jpg) (http://imgur.com/ZxDS6Cc.jpg)

PCB labeled with 2015.08.21
Controller MK1841D3

(http://i.imgur.com/0kh5d1Wm.jpg) (http://imgur.com/0kh5d1W.jpg)

(http://i.imgur.com/WKEiMhim.jpg) (http://imgur.com/WKEiMhi.jpg)

(http://i.imgur.com/HAONuOum.jpg) (http://imgur.com/HAONuOu.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on October 29, 2016, 09:37:09 pm
Too bad there is no sweet holographic QC sticker.

Bummer! Looks pretty OK, otherwise.

Quote
I'm not sure what the empty socket on the back is for. It's connected to ground on the inside.

You can connect a grounding strap to it while doing your SMD rework.

Nice job with the touch-ups. Happy reworking!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: JackM on October 29, 2016, 09:51:55 pm
My unit just came in today from Amazon (https://www.amazon.com/gp/product/B00P8Z4RPG/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1). Very happy with it!

What type of tips did it come with? The turn-locking type or the nut and bolt friction fit type?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: neo__04 on November 01, 2016, 09:32:22 am
Any source on where to buy these hot air stations?
Amazon won't ship to Australia so i have to find somewhere else.

Any good sources, with versions we know we can mod?

Thanks
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: 0xPIT on November 01, 2016, 12:25:45 pm
I've found out the the thermocouple in my W.E.P. 858D+ model does not seem to have ground connection, which is good.

I started a new Project (Eagle 7) at https://github.com/0xPIT/Air858/tree/master/hardware

The PCB fits into the sub-40€ W.E.P 858D+ stations available from eb*y. The hardware seems comparatively OK, even has proper earth connection in the hand piece. PCB uses this odd-ball s*msung controller.

The intention is to simplify the schematic, using a MAX31855 to read the thermocouple, use single-MOSFET PWM for the fan, and a 126x64 OLED display, plus a rotary encoder alongside the two buttons. Some parts of the original hardware can be reused.

The idea is to use wave packet control in software, as I did for my https://github.com/0xPIT/reflowOvenController. So I need detection of zero-crossing. I think I'll eliminate the 2nd optocoupler (a dual antipolar led type) and detect the zero-crossing by tapping the signal from D5 and adding a 2nd diode to arrive at the desired 2x mains frequency.

Any suggestions? Feedback is welcome.

 - pit
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on November 01, 2016, 05:02:15 pm
Any source on where to buy these hot air stations?
Amazon won't ship to Australia so i have to find somewhere else.

Any good sources, with versions we know we can mod?

Thanks

I don't know about sources for Australia, but as far as models go, it seems the latest ones no longer use the ATmega microcontroller.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Brenex on November 02, 2016, 02:48:03 am
My unit just came in today from Amazon (https://www.amazon.com/gp/product/B00P8Z4RPG/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1). Very happy with it!

What type of tips did it come with? The turn-locking type or the nut and bolt friction fit type?

Turn lock which I prefer over the bolt on.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on November 02, 2016, 07:47:08 am
126x64 OLED display
Any suggestions? Feedback is welcome.

 - pit

why not a colour TFT display?
then you can make full use of the colours for warnings etc.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anman on November 02, 2016, 01:17:55 pm
Any source on where to buy these hot air stations?
Amazon won't ship to Australia so i have to find somewhere else.

Any good sources, with versions we know we can mod?

Thanks

A successful example - atmega8L (http://got.by/1t71ua)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Brenex on November 06, 2016, 03:53:20 am
The author of Heart of Tech replied to me. Thought I would share it here, "temporarily on hold between work and moving. I'm determined to get it running again asap or at least start writing about the design process on my blog. Thanks for asking!"
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anman on November 08, 2016, 10:08:00 pm
Board for BLDC Fan-speed mod attached  to the fan speed potentiometer on the double-sided tape.  Considering it an optimal solution    ;D

 !! REMOVE R31 (10k, SMD 0805) on the main circuit board BEFORE adding this mod for SR858D. This disconnects the FAN voltage sensing (default state) going to PC5.

GND and VCC can be obtained from the findings for in-circuit programming.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: 0xPIT on November 13, 2016, 12:19:38 pm
126x64 OLED display
Any suggestions? Feedback is welcome.

 - pit

why not a colour TFT display?
then you can make full use of the colours for warnings etc.

Because not even my JBC has a color display, they fit without changing the cutout, and I had these regular OLED displays in my box.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: 0xPIT on November 13, 2016, 12:23:37 pm
My project for a replacement controller for the 858 has progressed, I've ordered the first batch of PCB today.

You can follow progress here:
https://github.com/0xPIT/Air858
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: JackM on November 13, 2016, 03:26:02 pm
I started a new Project (Eagle 7) at https://github.com/0xPIT/Air858/tree/master/hardware

Any suggestions? Feedback is welcome.

I only have some suggestion regarding the schematic. I would change the heater drive header so the AC live line is the one being switched, instead of the neutral side. Right now the neutral line is being switched by the triac and the live line is always on the heater element in the handpiece. Safety wise I think it's better to have it the other way around.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: 0xPIT on November 13, 2016, 04:38:14 pm
I started a new Project (Eagle 7) at https://github.com/0xPIT/Air858/tree/master/hardware

Any suggestions? Feedback is welcome.

I only have some suggestion regarding the schematic. I would change the header drive so the AC live line is the one being switched, instead of the neutral side. Right now the neutral line is being switched by the triac and the live line is always on the heater element in the handpiece. Safety wise I think it's better to have it the other way around.

I guess that would just mean changing L and N when wiring the AC connection. (Note that we have reversible plugs in most parts of the EU)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: JackM on November 13, 2016, 04:56:34 pm
I guess that would just mean changing L and N when wiring the AC connection. (Note that we have reversible plugs in most parts of the EU)

Yeah, that would be a simple fix when wiring up the board. Otherwise it's just a labeling issue on the schematic that would need changing.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: netdudeuk on November 29, 2016, 11:21:37 pm
WEP -

https://www.ebay.co.uk/itm/252057037600 (https://www.ebay.co.uk/itm/252057037600)

Kaleep -

https://www.ebay.co.uk/itm/152293215180 (https://www.ebay.co.uk/itm/152293215180)

Is there a view on which of these is safer, more reliable, more accurate and more modable ?

Thanks
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tyfon on December 08, 2016, 11:44:49 am
Hi to all!

Just got the adapter boards from GiantGnome. Everything seems to work fine, but I'm not sure which firmware I should put on exactly.
I've got the YouYue858D+ 230V Version with the MK1841D3 controller. PID seems overshooting a little bit, but it's not too bad. Do I have to modify the firmware like Gixy and wguibas did?
Unfortunately I don't have any way to measure the actual temperature right now.

Well, found some time to work on this.
I took the V1.45 version of the software and made the modifications from Wayne (wguibas) on the relationship between adc_raw and temperature, as well as min and max values for fan speed.
His formula is temp = adc_arw/2.4 + offset (33 by default).
I flashed the software and made a complete set of measurement. I don't know why, but this time the results are much better than before: the bias between target and mesure from 80°C to 400°C stay inside +/- 1 or 2 degrees: excellent! I made a linear regression to determine the equation and found:
temp = adc_raw/2.456 + 35, which is pretty close to the software's formula above, so I changed nothing.
Many thanks to Robert and Wayne!
Denis

Kaleep 858D+ with MK1841D3 chip

Thank you!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tyfon on December 08, 2016, 10:48:24 pm
I found a demo board for the SHTC1 Temp and Humidity sensor lying around and tested the temperature myself.
The sensor goes only up to 100°C, but it seems like the formula from Gixy with 2.4 approximates the temperatures pretty well.
Only the correct PID values are yet to be found for the 230V version. I've got huge over and undershoot, but at least now I see the real values on the display.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: peterloron on December 15, 2016, 06:08:56 am
Hello, folks. I have one of these with the main board marked "youde 858DV2++" and the microcontroller is a S3F94C4EZZ-DK94.

I've gone through the thread(s) here but I'm not clear if anyone has made an adapter for that chip yet.

Anyone in the know? Thanks.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: raihei on December 21, 2016, 05:32:03 pm
Hi folks,

I also ordered a Kaleep branded 858D+ from amazon germany (only 36.66€ at the moment!) and it came with a MK1841D3 chip.

I successfully did the following hardware changes:
- Rewired internal earth connection, because between power connector and gun nozzle I had around 20 Ohms.  :--
  Wired earth directly to the case, to the front plate and to the gun.
  Crimped the earth cable in the gun to the nozzle metal it was only twisted around as you can see in some other pictures in this thread.
- Added a heatsink to the TIP122 because it got really hot when the fan was running on lower speed. Is this usual?
- Soldered a adapter board based on wguibas great board :-+ and installed an ATMEGA 328P.
  The only problem I had was that the two 10K resistors for VREF=2.5V were somehow to high, the VREF pin pulled the voltage to 2.14V.
  So I changed the values to 1K and now I have a VREF of 2.5V
- I added a small buzzer (eBay auction: #222121496866) to the board because I like how the Hakko soldering stations beep when they have reached the setted temperature and to get an accustic feedback when the gun was correctly placed in the cradle.  Because of that, some changes in the custom firmware were necessary.

So here is my own custom firmware V1.47 based on V1.46 from madworm:


 * - Added an output (arduino pin 18, hardware pin 27 on a 168P/328P) for a buzzer which will beep on the following events:
 *   Power on (high beep)
 *   Set temperatur reached (only one time after removing gun from cradle and after changing temperature with the key buttons) (high beep)
 *   Put gun correctly back in cradle (low beep)
 *   Setted timeout reached (low beep)
 *   Keypress (comment out "#define KEYBEEP" in youyue858d.h to disable) (very high beep)

 * - Added a multiplicator entry (TPL) to setup menu for stations with samsung or MK1841D3 chip
 *   For stations delivered with atmel chip set multiplicator to 10 (=1, default), for stations with MK1841D3 set to 21-24 (=2.1-2.4)
 *   (According to the forum on some stations a value between 2.3-2.4 is correct, on my station with MK1841D3 2.1 was correct)
 *   Possible values 10 to 40 (= multiplicator 1.0-4.0)
 *   This change avoids a seperate firmware version (thanks wguibas!) for stations delivered with non atmel chips

 * - Added raw ADC value monitoring to the overtemperature shutdown process, because when you fiddle around with the multiplicator
 *   and set it wrong, temperature input may overflow which results in no shutdown on too high temperatures.
 *   Station will shut down and show "°C ERR" when analog input for temperature reaches 1000 (analog input is 10bit so max value is 1023)

 * - Changed standby display from "---" to "STB" because in my opinion it looks nicer :-)

 * - Added a delay time entry (DEL) to the setup menu which kicks in when the fan_off temperature is reached (default 45°C)
 *   to avoid fan off-on-off-on-off bevaviour because temperature rises to fan_on temperature again after fan was switched off.
 *   Delay will only be active if a temperature of 100°C was reached.
 *   Possible values 0 to 60 seconds

 * - Changed back max temperature to 450°C and shutdown temperature to 500°C because (depending on cal poti setting) 500° can lead to overflow of temp analog input.
 *   (If you set the cal poti to 100°C = 0.5V like me, this gives you 2.25V at 450°C.)
 
 :-+ Thanks to madworm, wguibas and all others here in this thread for a lot of useful information, the custom firmware and the adapter board which saved a lot of time! :-+

Attached my firmware V1.47 (based on madworm's V1.46) as source and as compiled hex for the ATMEGA 328P and 168P.

Before first heating process, set "TPL" in setup menu according to your hardware:
- Original Youyue with atmega: 10 (=multiplicator 1.0) according to madworm
- Yihua with samsung chip: 19 (=multiplicator 1.9) according to wguibas
- Kaleep with MK1841D3: 21-24 (=multiplicator 2.1-2.4) 2.1 was correct for my station with 220V, wguibas figured out 2.3-2.4 for the 110V version.

You may also need to adjust the low and high limits of the fan, in case of my Kaleep station it was low 120 and high 320

raihei

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on December 21, 2016, 07:50:28 pm
Those look like good enhancements. Thanks for sharing them, raihei.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: dimkasta on January 12, 2017, 10:11:55 am
I just received mine from amazon.de
It is Uvistar branded and it comes with a CE sticker which is a bit reassuring.
I double checked mains wiring with my multimeter and I do not see any dangerous issues there.

It seems to work ok, although I do not see any sleep mode or magnetic sensor action.
This is a bit disturbing, so I will open it up later today and see if there are any issues with it.

My todo list for now is to verify proper earthing, fusing and DPST switching of mains power, and then check for miswired magnetic switch.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: dimkasta on January 13, 2017, 10:24:01 pm
I found some time to check the wand.

The first issue was that the earth wire was just loosely wrapped around the metal, with strands flying every each way. It was probably shorting the magnetic switch.
I added some solder to the wire. Solder does not wet the metal on the wand but at least there will be no loose strands flapping in the wind in there.

The sensor now works, but I noticed that there is a magnet only on one side on the stand. This means that if you place the wand on the stand rotated by 180 degrees the device does not go into sleep mode. Not a big deal to work with, but I do not know if it is as intended.

The rest of the unit seems ok. I expected much worse. The only issue is the pour conductivity between the metal panels. Nothing some paint scratching won't solve though.

I hope to find some time to research the custom firmware soon
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on January 13, 2017, 10:59:53 pm
The sensor now works, but I noticed that there is a magnet only on one side on the stand. This means that if you place the wand on the stand rotated by 180 degrees the device does not go into sleep mode. Not a big deal to work with, but I do not know if it is as intended.

I don't recall if there's one switch or two for sleep mode. I thought there were two, although that's still not enough to guarantee no dead spots. You could always paint a spot or put a sticker to take the guesswork out of aligning it properly to the cradle.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: netdudeuk on January 17, 2017, 11:29:03 pm
Is there any way that these (potentially wrongly wired) units could damage the 240v UK mains socket ring cabling ?  I'd like to get one myself but would like to know that it couldn't damage any existing equipment.

Thanks
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on January 18, 2017, 01:05:09 am
impossible, the most it could do is blow it's fuse.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: dimkasta on January 18, 2017, 12:47:06 pm
Provided it is actually fused, and the fuse is on the live.
It is quite difficult to predict what a randomly misswired device may do.

At least check it with a DMM for obvious faults. There is another thread that has more info.
And make sure your mains panel is properly wired with all the protective devices required in your area
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: compman2 on January 18, 2017, 03:37:35 pm
I would like to get one of Wayne's adapter boards for the MK1841D3.  Are they still available?  What is the process?  I have tried PMing but haven't gotten any reply.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on January 18, 2017, 04:56:31 pm
Provided it is actually fused, and the fuse is on the live.

in the u.k. the negative and earth are bonded together, and the plugs are all fused - no problems.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: netdudeuk on January 18, 2017, 10:15:58 pm
What fuse should go in these ?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ass20 on January 22, 2017, 07:48:21 am
hi
anibody, do you have pin out of fan handle?
please post it
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Nprod on January 23, 2017, 12:02:42 pm
I would like to get one of Wayne's adapter boards for the MK1841D3.  Are they still available?  What is the process?  I have tried PMing but haven't gotten any reply.

I'd love one too,waiting for a reply as well. Incidentally, has anybody tried adding a female connector to these stations? From what i've read, older Youyues had removeable handpieces, but the connector had exposed pins with mains AC on them so they switched to wiring them directly. I was thinking why not add a female connector like this instead:

(https://www.shireeninc.com/osc/media/catalog/product/cache/1/image/650x/040ec09b1e35df139433887a97daa66f/c/o/con-8002_head_1_1_1.jpg)

It would make the station a bit more portable and easier to store and move around...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on January 23, 2017, 08:57:50 pm
Reversing the gender of the connectors makes sense for safety. Give it a try. Mine has the killer male connector on the station. :o
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tambaki on February 03, 2017, 12:16:48 pm
Hello! Guys help me understand Do not know what is the problem in the firmware or hardware! Baku 861d station with chip MK1841d3 (adapter 328p firmware 1.47) when the (hair dryer is in the holder), the display shows the firmware 1.4 cooler turned on for 5 seconds and turns off the display lights STB (---), pressing the buttons work, but if you remove the hair from the stand disple? it all goes silent hair dryer! Where to dig prompt! Programming is only beginning to learn! :)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Jonas-fr on February 05, 2017, 12:21:25 pm
My project for a replacement controller for the 858 has progressed, I've ordered the first batch of PCB today.

You can follow progress here:
https://github.com/0xPIT/Air858

Hi 0xPIT

I've got the same WEP 858D+ Samsung based rework station as you, would be ready to make some test of your PCB if you're selling one. If you've got one with components (as kit or presoldered) I'm also interested. Let me know. Cheers
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tambaki on February 07, 2017, 03:27:52 pm
Thanks to all! I found what the problem is! baku 761d chip MK1841d3 adapter 328p with a small alteration of a button in place of the encoder works fine!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Satscript on February 09, 2017, 07:19:22 am
Hi all. Has anyone calibrated the station with firmware 1.46? What values in the menu do you get?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: garyww on February 10, 2017, 04:52:55 pm
Curious to know this too.

hi
anibody, do you have pin out of fan handle?
please post it
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: cephyr on February 15, 2017, 04:31:25 pm
hey @raihei thanks for sharing!

I also recieved an Kaleep rework station with the same chip
looking forward to mod mine too.
Which conversion PCB did you use?

@all is there someone which has one MK1841D3 available for sale?
I wanted to order this one https://oshpark.com/shared_projects/vLy9R74P but I have to order three boards minimum.

Are there any recommendations for the conversion board?


thanks in advance guys!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on February 15, 2017, 05:34:36 pm
If you give me your address I could send one out to you for just the shipping.  The shipping costs like $13.50 USD, at least thats what it was to bulgaria for a package.  Maybe just the board without the components could be sent in a regular Letter envelope for much cheaper.

Wayne
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: cephyr on February 15, 2017, 05:46:37 pm
If you give me your address I could send one out to you for just the shipping.  The shipping costs like $13.50 USD, at least thats what it was to bulgaria for a package.  Maybe just the board without the components could be sent in a regular Letter envelope for much cheaper.

Wayne

thank you very much for your fast reply, I would take the offer if I solve the problem with my Kaleep that is occuring right now
just had it opened to check the chip

after putting it back together, the fan spin down mechanism does not work anymore. I did not touch any wiring.
The funny thing is, if I unscrew the front panel with the pcb, so that the pcb is not grounded anymore, the fan spin down mechanism works again  :palm:

does anyone know how to troubleshoot this?

edit: by the way, it is just the fan that does not spin down anymore after going into standby, the microcontroller recognizes the reed switch triggering and stops heating
I will return the unit if no one knows an answer
don't get it why it worked before dissasembling int

bad luck... the first unit I've got (Uvistar brand) also had this issue
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on February 15, 2017, 07:13:22 pm
It might be a crack in the PCB that only shows when mounted. The fan spin down works by pulling the base of the big TO-220 transistor (TIP122 ?) to GND via a 2nd small transistor (TO-92). You mighty try a continuity tester and bending the board slightly.

Power unplugged of course!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: cephyr on February 15, 2017, 07:50:41 pm
It might be a crack in the PCB that only shows when mounted. The fan spin down works by pulling the base of the big TO-220 transistor (TIP122 ?) to GND via a 2nd small transistor (TO-92). You mighty try a continuity tester and bending the board slightly.

Power unplugged of course!

hey, thanks for the answer
that's a good explanation haven't thought about that, just had bad wiring in mind because of all the horror reports about this station :D

I will try to return it as long as I am able to, I like tinkering but would be nice to have a working unit to start with :D
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: manianac on February 21, 2017, 02:00:03 am
I thank you Madworm for your firmware and board design, and wguibas for the MK1841D3 adapter board.

This is my first time making a board design, but I figure I'll attempt combining the BLDC detection board with the adapter board, and using smaller components.

(https://oshpark.com/assets/badge-5b7ec47045b78aef6eb9d83b3bac6b1920de805e9a0c227658eac6e19a045b9c.png) (https://oshpark.com/shared_projects/W8PiBjsy)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: horga83 on February 21, 2017, 11:40:49 pm
Anyone know where the schematic and parts list is for these boards?  I've searched high and low and can't find anything.
I of course mean the wguibas MK1841D3 adapter board in the previous post.

Many thanks.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: manianac on February 22, 2017, 02:16:08 am
Anyone know where the schematic and parts list is for these boards?  I've searched high and low and can't find anything.
I of course mean the wguibas MK1841D3 adapter board in the previous post.

Many thanks.

https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg888729/#msg888729 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg888729/#msg888729)

This is wguibas' board, I followed the traces to make mine.  I don't know of any schematics currently though.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on February 22, 2017, 06:37:13 am
@manianac
Hum, in your board the traces width seems too thin. Are you sure that your manufacturer can do that? Usually 6 or 8 mils is a minimum and you can't put 3 traces then between two pins of a DIP package.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: manianac on February 23, 2017, 01:03:44 am
@manianac
Hum, in your board the traces width seems too thin. Are you sure that your manufacturer can do that? Usually 6 or 8 mils is a minimum and you can't put 3 traces then between two pins of a DIP package.

I used 6mil traces except for the power/ground.  OSHPark has worked flawlessly for me on a board in the past (PCB size was the primary goal) with 6mil, so I"m not too worried about that.

That all said, I am still very new to this, so there's always a great chance I messed up.  Where did I put three traces between the pins?  I don't see that looking at the pcb.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gixy on February 23, 2017, 06:53:21 am
You're right. Only two traces, I haven't seen the third one turning around the pin very near from the hole. Aniway if you have enough space, you'd better using 8 mils minimum width.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: cephyr on February 24, 2017, 10:52:45 pm
If you give me your address I could send one out to you for just the shipping.  The shipping costs like $13.50 USD, at least thats what it was to bulgaria for a package.  Maybe just the board without the components could be sent in a regular Letter envelope for much cheaper.

Wayne

hey wayne,

Got an replacement unit. I've sent you an PM
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: raihei on March 09, 2017, 05:15:15 pm
hey @raihei thanks for sharing!

I also recieved an Kaleep rework station with the same chip
looking forward to mod mine too.
Which conversion PCB did you use?


Sorry for the late reply, I soldered a conversion PCB by myself with a protoype solderboard.

If you give me your address I could send one out to you for just the shipping.  The shipping costs like $13.50 USD, at least thats what it was to bulgaria for a package.  Maybe just the board without the components could be sent in a regular Letter envelope for much cheaper.

Wayne

Do you still have a conversion PCB from MK1841D3 left which you could send me without components via letter to germany? How much will it cost? I want to replace my handmade prototype board with a professional one  :)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: manianac on March 11, 2017, 12:18:53 am
I have finally assembled my MK1841D3 conversion board, and it works like a champ.  Thank you madworm for your awesome firmware, and wguibas for the MK1841D3 layout.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wguibas on March 11, 2017, 12:43:54 am
Quote
Do you still have a conversion PCB from MK1841D3 left which you could send me without components via letter to germany? How much will it cost? I want to replace my handmade prototype board with a professional on

 I'll check it out  and let you know.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: iflorinache on March 11, 2017, 09:36:13 pm
Hi, guys.
I began to read long ago about changes to this station soldering and decided to buy it. Even if I had a whole adventure with buying, finally got to me.
After a few experiments I decided to open it, during which I found to have the same defect: loose ground.
The chip is MK1841D3, but I have a new version for PCB.
The question is how to mod the station? What boards can I use?
Thank you.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: dorin on March 12, 2017, 06:10:45 pm
I got a "YOUYUE" from Aliexpress in hopes of easy hackability but this also has the MK1841D3, bummer. It wasn't one of the cheapest at 55 euros, but at least the assembly quality is decent. It has okay soldering, good grounding and the physical switch is not on the same line as the triac switch, therefore there's no mains voltage on the front connector when the unit is turned off.

Instead of bothering with an MK to ATmega adapter board, i'd rather redesign a complete mainboard for this station, that would also overcome the hardware limitations that the custom firmware can't solve, like fan detection and electronic dimming for better heater control.

Wondering how many folks would be interested in this?
Proposed features:
 - Powerful STM32 MCU (can run classical arduino no worries, see stm32duino)
 - Digital dimming for heater (currently the triac is only being switched on/off at a relatively low frequency, causing thermal fatigue and non-optimal control)
 - BLDC fan detection (to check that it spins at least, best to measure RPM using signal extraction from power noise)
 - Full digital control of the fan (currently the external pot is hardwired to the fan, MCU can only turn on/off)
 - Beeper
 - ?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on March 13, 2017, 05:19:54 am
That sounds like an interesting project, dorin.

I wonder how much more work would be needed to make it support the Youyue 8586, which added a soldering iron to the station. I'm not sure if a dual-purpose PCB could be concocted, but it might be nice to have improved temp control for the iron, too.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: mleyden on March 13, 2017, 11:20:40 am
@dorin - I'd be interested...

OLED Display?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: dorin on March 14, 2017, 09:26:06 am
That sounds like an interesting project, dorin.

I wonder how much more work would be needed to make it support the Youyue 8586, which added a soldering iron to the station. I'm not sure if a dual-purpose PCB could be concocted, but it might be nice to have improved temp control for the iron, too.

The circuit logic part of the air gun would definitely be the same, but the PCB would need to be redesigned from scratch because the 8586 has a different layout for the LED display and buttons. I am not sure how much this would be worth it since it doesn't seem to be a popular model.


@dorin - I'd be interested...
OLED Display?

Because LED segments are so last century right  ;D
SSD1306 128x64 would vertically fit well in the existing cutout, but horizontally it is not wide enough so there would be some gaps.. And any bigger OLED that I know of is way too big for the cutout and not cheap at all.
Plus, the current display has good contrast too, the only problem is displaying messages.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on March 14, 2017, 08:58:06 pm
I wonder how much more work would be needed to make it support the Youyue 8586, which added a soldering iron to the station. I'm not sure if a dual-purpose PCB could be concocted, but it might be nice to have improved temp control for the iron, too.

The circuit logic part of the air gun would definitely be the same, but the PCB would need to be redesigned from scratch because the 8586 has a different layout for the LED display and buttons. I am not sure how much this would be worth it since it doesn't seem to be a popular model.

Yeah, I kind of figured it'd be like that. It's true that the 8586 isn't as popular as the 858. I got it because it was only a few dollars more -- the iron alone cost more than it did to get it as part of the 8586. So, it's my backup iron in case my Hakko ever needs fixing.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on March 16, 2017, 12:10:28 am
Some repair videos that show internals and heater operation. Interesting in the last video, perhaps the always on failure of wands burning out is caused by the RC snubber circuit failing.

https://www.youtube.com/watch?v=nraSdSs2dKM (https://www.youtube.com/watch?v=nraSdSs2dKM)
https://www.youtube.com/watch?v=utdZLxwqnXc (https://www.youtube.com/watch?v=utdZLxwqnXc)
https://www.youtube.com/watch?v=E7uoLxUhwlQ (https://www.youtube.com/watch?v=E7uoLxUhwlQ)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: dorin on March 22, 2017, 09:33:56 am
Looks like someone tried to redesign this before but the project has been dead for the past 11 months after progressing reasonably far:

(https://i2.wp.com/www.heartoftechnology.com/wp-content/uploads/2016/04/858Dpp_pcb_RevA.png?w=612)

http://www.heartoftechnology.com/blog-update-858d-and-reddit-design-challenges/ (http://www.heartoftechnology.com/blog-update-858d-and-reddit-design-challenges/)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Christe4nM on March 22, 2017, 04:42:58 pm
Hi all,

I'm the guy behind Heart of Technology and I feel like it's past time that you hear more about the project. I'll think about maybe starting my own thread, but here's an overview for everyone reading this tread.

History
I did start out about a year ago and got the PCB almost done, but still needed to do component value calculations in the schematic and finishing touches on the PCB. That was about April last year. Then for multiple reasons I was simply unable to spend any time at all on the project, hence it seemed to be dead for 11 months. (There used to be an update on my blog that the project was still alive but it looks like I lost it when I had to restore the site from backup recently.)

Actually, I just started last month to work on the project with a fresh look. I like to do things thoroughly which can take a bit of time. For example I spend at least a day trying to understand how safety standards relate to clearances on the PCB and if I could use a TO-220 package for the triac without violating said standards.
In the past I did consider writing blog posts on the design so far, but I found that I’m not the person to put something out there that I haven’t tested myself yet. Also writing those posts takes time off the design time, so it’s either one or the other. In any case, the design as it was (like at the time of the rendering of the PCB I uploaded) has a few flaws that make me not want to share those design files. I might have generated too much expectation at the time by showing off a PCB of an unfinished schematic.

Design
The reason for doing this redesign is most of all to learn about everything involved, not just to get it done. So I went into things like EMC standards, safety standards, triac snubber design, auto-zero opamp input current bias, thermocouple step response times and control loop design. For me the reasoning why a design is done the way it is, is at least as important as the design itself.

As the design is now, it has the following parts:
- Mains powered heater driver.
- Mains zero-cross detection (to sample ADC and run control loop at 100/120Hz).
- Linear DC fan driver switched on/off by the microcontroller. (PWM is unfeasible in this design for several reasons in my view.)
- Fan stall detection: this gives feedback whether fan is indeed running.
- (Proper) Thermocouple amplifier with over-temperature comparator in hardware.
- Hardware logic to make sure the heater does not turn on if there is a fault with either the fan or temperature. This is separate from the MCU in case firmware gets this wrong for whatever reason.
- The microcontroller and user interface.

For the microcontroller I went with an NXP (Freescale) Kinetis 5V part. It's not Arduino but this is one I'm familiar with and have the tools for. (Actually when I first started out with microcontrollers I had to go into a big ARM with no prior knowledge. So I bypassed the classic learning path with PICs and AVRs, and Arduino came only a few years later when I was coding for a then new STM32 ARM M4.)
Since so many people are familiar with Arduino I am thinking of doing a second design with a 5V AVR, but for now that'll have to wait until the first design is done.

Status
I do have a schematic for almost all the circuits but it is incomplete and I’ve found mistakes. So right now I’m revisiting all the parts of the schematic. The fan driver and the thermocouple amplifier are done right now.
I decided not to put everything on one PCB on the first go, but rather have a separate proto PCB for each sub-circuit. This makes testing each part easier I think. However I want to order the complete BOM in one go, so that’ll have to wait until I have everything done.

So there you have it.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on March 23, 2017, 07:18:02 pm
Thanks for the history and update. Looking forward to following the project.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on March 27, 2017, 06:04:52 pm
Same here 😆
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: cinealfa on April 09, 2017, 05:08:02 am
Quote
Do you still have a conversion PCB from MK1841D3 left which you could send me without components via letter to germany? How much will it cost? I want to replace my handmade prototype board with a professional on

 I'll check it out  and let you know.
I would like one as well, Sent you a PM
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: sprok on April 17, 2017, 12:04:37 am
.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Strada916 on April 17, 2017, 06:05:44 am
Has anyone determined what differences there are, if any, between the 220V and 110V versions?

I'm looking around and some of the 220V models look better but I need 110V and don't know how hard it would be to switch. The power cord is obviously different but that's very easy to change. The killer problem would be if the heater core is designed for a specific voltage.
Most likely different transformer and heater element.

Sent from my SM-G900I using Tapatalk

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Barm on April 20, 2017, 05:21:56 pm
I have discovered a newer version of 858D mainboard (from Aliexpress seller).

858D06.PCB
2016.09.29

The main differences from 858D04 versions are:
1) SMD components design and, as a result - a different PCB layout
2) Heatsink on TIP122
3) controller MK1840D3 (could not find info, is it different from MK1841D3

I have not tested yet, will check on a next week.

UPD.
Looks like the same board as here (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1157534/#msg1157534)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on April 21, 2017, 04:42:59 am
You brought the bare pcb for or which station?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Barm on April 21, 2017, 05:34:22 am
You brought the bare pcb for or which station?
Just PCB for 15 USD. All I've found is only one seller on Ali who sells 858D boards.
I cant rely on a product and model names, because I believe that most of the factories in china just randomly selects a product names, model names, PCB versions, production batches, quality checks, etc.  :)

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on April 21, 2017, 08:04:13 am
Atten and Yihua are actually real manufacturers that make soldering and hot air stations such as the 858Ds. If you can't find the factory or website for a brand it's probably another product rebranded or something generic. There is also apparently a counterfeit problem even with Chinese brands.

http://www.atten.com/ (http://www.atten.com/)
http://yihua-gz.com/ (http://yihua-gz.com/)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Barm on April 21, 2017, 12:59:41 pm
Shock, of course, I know those brands exists.
But it's hard to rely on Aliexpress sellers because selling of a refactored, refurbished and rebranded stuff is a very common, even with a high rated sellers.
Buyers reviews is not a reliable source of information too. In my case - I've received a PCB different from described and reviewed by buyers.
Anyway, I will test this board as soon as I receive my new fan/heater wand. I hope everything will be fine.

So, cooler is marked as 0.2A. How much the main board consumes?
Is 0.3A of 220V/9V/24V transformer enough?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on April 22, 2017, 03:13:00 am
I just got my YouYue 858D+ station from Aliexpress and did a teardown. The usual tomfoolery.

The wand, base, and box are all labelled "110V" but I found a (cracked) 220V heating element in it. Some math and I get 170W of heat instead of 610W!
A spare heater came free with the unit. 110V 19.8 \$\Omega\$ (610W), 220V 71.6 \$\Omega\$ (675W). I haven't installed it yet, as the heater has heatshrink tubing on the end, not silicone like the present element.

Power transformer is labelled "220V" but is OK on 110VAC.

858D06.PCB 2016.09.29 with MK1840D3 MCU.

I'm drawing a schematic and figured out the hardware, it's pretty basic.

Anyone with 110V version willing to check their heater resistance, see if my numbers are correct.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on April 24, 2017, 03:34:52 am
Here is the 858D hand wand schematic and pic showing the heating elements 110V/220V.

A 220V heating element works fine on 110V but struggles to get past 350C. Still struggling with Aliexpress vendor to get this looked after.

The safety ground is a real PITA, had to use silver solder and flux on the stainless steel tube.
Nothing else worked. I could not drill a hole to bolt on a crimp connector, it's military grade, lol.

*** UPDATED PINOUT, sorry had male/female flipped 2017-05-08
*** CORRECTED pic posted
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on April 24, 2017, 08:29:41 pm
Aliexpress sometimes makes Ebay look like a trustworthy marketplace.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Experimenter on April 25, 2017, 06:16:42 pm
Hi All,

I just got my Youyue 858D+. At the very first glance, it looks quite Ok for such a cheap device. I plan to go for a custom firmware by Madworm, so the first thing I checked was the MCU type. Surprisingly, it is something marked MK1840 C1Z81706. I'm still studying this thread, but so far I didn't see a mention of this specific chip. I see people here discussing adapters to replace MK1841 with an Atmega. But nothing regarding MK1840. I couldn't find a datasheet for the 1840 either...

I will take a closer look at it in the next days. If there's no working solution for my particular chip, I'll probably look into designing a full new board. I'd be happy to join someone already working on this, too!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on April 26, 2017, 02:55:34 am
Looking through this thread, I didn't see 858D+ MCU adapter boards for MK1840/41->AVR AtMega168/328.
I was going to lay out an adapter board but I'm kinda lazy and didn't see the fan speed feedback helping much in performance.

YouYue PCB 856D06.PCB '2016.09.29' does not have much room on the right due to the TIP122 heatsink. My MCU is marked MK1840D3 C1Z81708.

Here's my pic of the I/O assignments for the stock MK1840/41 MCU and madworm's 858D+ firmware V1.46; member raihei added a beeper and features calling it his "V1.47" firmware but I'm not sure where it can be found.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Experimenter on April 26, 2017, 05:07:44 am
Looking through this thread, I didn't see 858D+ MCU adapter boards for MK1840/41->AVR AtMega168/328.
I saw several boards shown and discussed.

One of them is the board by GiantGnome:
https://oshpark.com/shared_projects/vLy9R74P (https://oshpark.com/shared_projects/vLy9R74P)

The other one is the board by wguibas (I think this is the latest version):
https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg888729/#msg888729 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg888729/#msg888729)

They both are for MK1841D3. I'm not yet sure whether MK1840 is the same.

Quote from: floobydust
Here's my pic of the I/O assignments for the stock MK1840/41 MCU and madworm's 858D+ firmware V1.46;
Thanks! I'll try to compare it to whatever my MCU has ...

Quote from: floobydust
member raihei added a beeper and features calling it his "V1.47" firmware but I'm not sure where it can be found.
Yep, I saw a mention of that in the recent posts. So far I'm reading the messages from about 1 year ago. I'm sure I'll reach the discussion of rahei's updated firmware soon. :)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Experimenter on April 27, 2017, 05:39:20 am
I took a closer look at the mainboard. It looks identical to this one (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1058136/#msg1058136) that came with a 1841D3. So I tend to think the 1840 and 1841 are basically the same thing...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bwack on April 30, 2017, 02:57:10 am
My unit just came in today from .....

(http://i.imgur.com/fAE7Nf4m.jpg) (http://imgur.com/fAE7Nf4.jpg)

(http://i.imgur.com/dwvFpuYm.jpg) (http://imgur.com/dwvFpuY.jpg)

(http://i.imgur.com/ZxDS6Ccm.jpg) (http://imgur.com/ZxDS6Cc.jpg)

PCB labeled with 2015.08.21
Controller MK1841D3

(http://i.imgur.com/0kh5d1Wm.jpg) (http://imgur.com/0kh5d1W.jpg)


Actually it is labeled 858D04.PCB also. I have the exact same one (seemingly, but not quite), but its called Atten 858D+. At first glance it looks very much like wguibas' pcb in the kaleep. I believe his was 858D06.PCB.

I have received and soldered up GiantGnomes PCB (smd atmega328p) ordered from OSH Park. Got the MCU programmed. Failed at fan speed. Changed FW to ignore it. Then it failed at temp err ('C err). At all times I had the heater disconnected for safety. The pinout on the adapter is not the same. Example, fan speed (voltage) is measured at ADC5, and ADC5 on the adapter is routed to a .. resistor ?
The display works fine, and so does the FAN_ON signal.

I found the fault. This PCB does not have a reference voltage 2.5V. In the arduino code O added a define for internal reference, and it passes the first software trap (*C err). Lift the handle and holly batman the values rise quickly then drop to 70 or something.. lol

858D04.PCB 2014.06.09  pinout
1 GND
2 DISP3
3 DISP2
4 REEDSWITCH
5 dp
6 HEATER
7 DISP1
8 SW0
9 SW1
10 FAN ON
11 ADC0 (Temp)
12 NC
13 b
14 f
15 a
16 e
17 d
18 c
19 NC ?
20 VCC

Note that there is no ADC reference here.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bwack on April 30, 2017, 02:21:12 pm
After extensively checking my 858D04.PCB 2014.06.09 against the adapter (atmega328 smd to MK1841D3) and FW (madworm 1.46), the difference is

My board does not have external 2.5V reference. The FW code uses that. So if I change to internal in Arduino, then I get 1.1V ref. Lol, will try soldering up a 2.5V TL431 circuit. :)

A schematic would be nice of these adapters :)

I'm planning to do a video of this modding. I've already done a video about this thread here: https://www.youtube.com/watch?v=HUlcttWA_U0 (https://www.youtube.com/watch?v=HUlcttWA_U0)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on May 01, 2017, 12:42:46 am
858D04.PCB is all through-hole and 858D06.PCB is mainly surface-mount.
Comparing their schematics: improved thermocouple filtering, heatsink added to fan speed TIP122 *totally needed!

I too could not find the schematics of the MCU adapters, but realized they are basic. All use resistors or trimpot to make the 2.5V A/D reference- which isn't the greatest because the 7805 drift affects temperature readings.

I'm planning a 858D06.PCB MCU adapter board that clears the heatsink, uses SOT-23 2.5V reference IC, AVR328P TQFP, serial debug pins, lower noise A/D Vcc.
The fan-speed and fan-current circuit I am leaving out because I don't see a payoff. Changing nozzles changes the fan curve and process gain (PID) settings, so I would be ok with a few degrees slop and simpler hardware. Fan fail detect is instead done in firmware, from my tests with the stock MCU.

For the analog scaling, measured my 858D06.PCB (with MK1840D3) readout is 500°C with 2.44VDC at the MCU pin.
It's not 2.5V; they left some headroom for over-temp and open-thermocouple detection.
My trimpot CAL came as gain of 96.6 although I am seeing the circuit ends up with a gain of 89.1 due to crappy filter leading to the A/D. It's not the greatest thermocouple to A/D circuit.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bwack on May 01, 2017, 11:36:52 am
858D04.PCB is all through-hole and 858D06.PCB is mainly surface-mount.
Comparing their schematics: improved thermocouple filtering, heatsink added to fan speed TIP122 *totally needed!

I too could not find the schematics of the MCU adapters, but realized they are basic. All use resistors or trimpot to make the 2.5V A/D reference- which isn't the greatest because the 7805 drift affects temperature readings.

I figured out something regarding the smd atmega328p/mk1841d3 board . The free solder pads are for dividing vdd in two to get 2.5V. I added a TL431 as 2.5V powered through two low pass filter like I've seen in some 858D models. (look up heartoftechnology's schematic).

Quote
I'm planning a 858D06.PCB MCU adapter board that clears the heatsink, uses SOT-23 2.5V reference IC, AVR328P TQFP, serial debug pins, lower noise A/D Vcc.
The fan-speed and fan-current circuit I am leaving out because I don't see a payoff. Changing nozzles changes the fan curve and process gain (PID) settings, so I would be ok with a few degrees slop and simpler hardware. Fan fail detect is instead done in firmware, from my tests with the stock MCU.

For the analog scaling, measured my 858D06.PCB (with MK1840D3) readout is 500°C with 2.44VDC at the MCU pin.
It's not 2.5V; they left some headroom for over-temp and open-thermocouple detection.
My trimpot CAL came as gain of 96.6 although I am seeing the circuit ends up with a gain of 89.1 due to crappy filter leading to the A/D. It's not the greatest thermocouple to A/D circuit.

speaking of gain and analog scaling, there is no adjustment for gain in the config of madworm/maugsburger's firmware. wguibas did an attempt to calibrate his station by doing this to the firmware:

Quote from: wguibas
temp_inst = (analogRead(A0)/1.9) + temp_offset_corr.value;   // approx. temp in °C

Putting this 1.9 in a config parameter would be great. I'll see what I can do with the fw. I have similar voltages on the ADC0 mcu pin versus temperature.

858D04.PCB schematics, Alex made it :) : http://poormanelectronics.blogspot.no/2016/08/schematic-and-teardown-of-baku-858d-smd.html (http://poormanelectronics.blogspot.no/2016/08/schematic-and-teardown-of-baku-858d-smd.html)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bwack on May 02, 2017, 05:56:42 pm
I too could not find the schematics of the MCU adapters, but realized they are basic. All use resistors or trimpot to make the 2.5V A/D reference- which isn't the greatest because the 7805 drift affects temperature readings.

If you start coding, maybe this will help. I sketched this pinout of the adapter showing signals and amega328p's pin names:

(http://i.imgur.com/8sFaTIW.jpg)
Note that DISP3, DISP2 and DISP1 is incorrect. See DIG0,1,2 on the right side. Those are correct. FANON should say FANON_N. etc.

My progress so far. Took two setpoints and measured temp. Calculated offset (39) and gain (0.42) from those points, then put that into the fw. Helped a lot. From earlier in the thread, madworm says that the fw assumes that the adc values are already in Celsius.
https://www.youtube.com/watch?v=fcmuqZVv0uU (https://www.youtube.com/watch?v=fcmuqZVv0uU)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Experimenter on May 03, 2017, 10:42:48 am
I would like to build an adapter board with BLDC circuit on it.
I also plan to use TL431 instead of the resistors divider for the 2.5v Aref on ATmega.

There's one thing I don't understand regarding BLDC part. How is this supposed to be setup:

(http://rcgear.ru/files/858_bldc_vref.jpg)

I mean, do we really need these jumpers, or this part can be simplified?

P.S. I'm designing this board in Eagle and will post it here, if anyone is interested.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: esalimster on May 04, 2017, 10:58:40 pm
Hi , brother do you have the schematics ??
i don t know any circuit component value of this board , i appreciate your help .
i bought your circuit boards in OSH park .
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Experimenter on May 05, 2017, 08:37:19 pm
If you're looking for schematics of the adapter board, check out this post (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg904746/#msg904746). There's a .pdf attached, and it was reported later on this schematics is Ok.

I'm making my version based on this one, but I didn't have much time to work on it yet. I hope to have more progress in the next few days...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on May 06, 2017, 10:23:49 pm
The MK1840 (858D06.PCB) and MK1841 (858D04.PCB) are the same as far as MCU adapter PCB's go; same pinout.

Posting a draft schematic of the MCU adapter PCB I am working on, just trying to keep errors to a minimum. Everyone please review and comment and I will keep this thread updated with it.

One MCU adapter board has a PCB layout error with the left & right digits swapped. I definitely have the left digit going to MCU pin2, I am calling this CA1 common anode 1 per the LED datasheet. {bwack seg g is pin 19}.
madworm has serial debug ability in his F/W (but need to disable LED display) so I left PCB pads to connect for that.

TL431's (http://www.ti.com/lit/ds/symlink/tl431.pdf) are unstable with certain capacitance, and all need at least a mA, for now C3 is DNP.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on May 06, 2017, 10:58:05 pm
could you use LM4040 instead of TL431??
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Experimenter on May 07, 2017, 08:14:00 pm
floobydust, my schematics is about the same. Yours have better comments and proper pin markings! :)

Did you consider adding BLDC circuit (http://blog.spitzenpfeil.org/wordpress/2015/10/23/youyue-858d-hotair-station-bldc-fan-speed-mod/) to this board as well?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bwack on May 07, 2017, 10:47:58 pm
floobydust, thanks. Regarding numbers and names on atmega328p. Stick to pin-names. Pin numbers changes with package type (TQFP, PDIP etc). Seems ok the draft you have now. You noticed that CA1 and CA3 are swapped. To me it doesn't matter what reference you have or renamed alias you use, as long as i see the port name goes to the pin number on the mk1841d3 :) Too many variables, and the giantgnome 328p-tqfp adapter works so I stick to that as reference.
Title: Sensing fan speed with motor current
Post by: floobydust on May 09, 2017, 04:51:17 am
Sensing fan speed - Fan motor current is a terrible waveform. It has a spike that changes amplitude and pulse-width as you vary fan voltage. Running it through the usual low-pass filter/differentiator/comparator etc. and all circuits get mixed up adding spurious pulses at certain fan speeds. See attached scope traces. Note the Tektronix gets it (freq) wrong too  |O

I'm not convinced knowing fan speed will make this hot air station work better. Why? You still don't know air nozzle size, so the pressure drop and (fan) mass air flow are unknown.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on May 09, 2017, 05:47:54 am
That looks familiar...

Maybe your circuit could be tweaked.

Some images & app note:

https://github.com/madworm/Youyue-858D-plus-FAN-speed-mod/tree/master/Docs
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on May 09, 2017, 05:51:46 am
Not pretty & a bit too much variation with fan speed. I agree 😆
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on May 09, 2017, 12:13:34 pm
have you looked closely at the fan?

a lot of 2wire fans actually have the tacho circuit, but no wire soldered to the pad.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Experimenter on May 09, 2017, 03:04:14 pm
The fan in mine is marked CHA5024SX-15B and doesn't seem to have a tachometer pad.

Perhaps, it could be replaced with something of about the same size, coming with the tacho wire (or a pad)?


EDIT:
Is it that easy to add an RPM output to a 2-wire fan? (found somewhere on the Internet (https://arstechnica.com/civis/viewtopic.php?f=7&t=1059616))
Quote
The tacho wire needs to be connected at one of the ends of the coil-pairs. The two pairs have a common wire (you can see this clearly)...you should see three connections coming from the coil. You need one of the other two, not the common one. Solder a wire to the coil-wire and close up the fan again. Then solder a common purpose diode like the 1N4148 or 1N914 to the third wire with it's kathode to the fan side, it's anode is your third wire connection.

(I didn't try this myself)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on May 09, 2017, 09:28:57 pm
The fan has no tachometer output and even then no spare wire exists in the wand cable to bring the signal back.

madworm I tried the circuit here (http://blog.spitzenpfeil.org/wordpress/2015/10/23/youyue-858d-hotair-station-bldc-fan-speed-mod/) but it was delicate. I needed a lower reference (+27mV vs +71mV) to detect at lower fan speeds, but then it extra-pulsed at certain higher speeds. Increasing threshold would stop extra-pulsing, but then it would cut out at lower fan speeds. It would be possible to simply debounce the fan speed signal in firmware, but I have not seen how the code works.

I took a try and came up a circuit that seems OK. Here is my BLDC fan-speed detect circuit that works well enough.  No trimpots and works on all BLDC fans I have lying around too. I worried about chatter from the edge-detector at zero signal, but the op-amp offset currents/voltages hold it at bay. At rest, the output is high.
From 7-24VDC I measure about 200-475Hz with 700Hz max.  My Youyue 858D+ can dish out 9-32VDC to the fan, which is crazy high.

So I could add this circuit to the PCB I'm working on. Just trying to find room for a bigger PCB. Along the top is the TRIAC heatsink, the right has the TIP122 heatsink, a bit limited and I'm not sure older 858D04.PCB could be accommodated.

Thanks stj I changed to LM4040 (TL431 also works with jumper and resistor change). Some LM4040 $8 and some $0.50 lol
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on May 12, 2017, 01:54:18 am
Finished a PCB layout for the 858D06.PCB MCU adapter, including the fan speed sense and buzzer option, and LM4040 reference for the A/D.
Here is schematic, PCB etc. for any feedback.

I have to make sure the board fits. If it doesn't then maybe have to use a stacked daughter board for the fan speed sense circuit.

When I get a chance, I'll check for layout errors and get a proto made.
Not a lot of room, had to trash the silkscreen clearances and use 0.3mm traces but got a decent ground pour.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: flodo on May 12, 2017, 08:03:06 am
Hey Guys!
I ordered a UVISTAR 858D, the PCB is the one labeled with 858D06 and SMD components.
The installed µc is a MK1840D3.

@all: thank you for sharing your designs!

@floobydust: Thank you for the efforts! If I can help you in any way - let me know! I would appreciate it!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bwack on May 12, 2017, 02:43:39 pm
Floobydust, check your schematics again regarding PB7, PB6 and PB0.

Using GiantGnome's schematic (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg904746/#msg904746) as reference, because I have this board, and it works for me:

MCU pinnameMK1841D3 pin no.
PB07
PB62
PB73
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: flodo on May 12, 2017, 05:33:28 pm
bwack is right I guess... I can confirm the following:

MK2 is PB0, but should be PB6 according to giantgnome
MK3 is PB6, but should be PB0                 - " -

PB7 looks right to me!

btw, if you are going make some prototypes: I am definitely interested, I would buy one  :-+

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on May 13, 2017, 06:31:49 am
Thanks everyone for looking at the Rev. A sch and pcb and giving feedback. I corrected the LED digits (misread the F/W assignments) so PCB Rev. B now.
--------------------------------------------------------------------------------------------
I found another problem- two issues to resolve surrounding fan speed signal. I didn't pay enough attention to sensing fan speed, how it is presently done.

I was planning to get fan speed into the MCU as a digital signal, and measure frequency on the pin to calculate RPM.
But I see it is presently an analog voltage.

There are two possible uses for fan speed.
One is for safety, to shut heat off immediately if the fan is dead and not overheat the wand.
Two, is for better PID control.

The V1.46 firmware right now (as I understand it) has fan movement strictly a safety test feature- using the fan current sense mod:
fan_current = analogRead(A2);

OR just looking at voltage applied to the fan:
fan_speed = analogRead(A5);

with high and low limits in EEPROM.


For fan safety, the MK1840D3 firmware looks at the "D" term in the PID variables. I did tests to find this.
If the heater is on, temperature should rise at a base rate because airflow is coupling heat to the thermocouple.

If the heater is on, but no fan airflow, temperature reading rises at a much slower rate (until the wand is on fire).
So firmware can tell if the fan is working by looking at the "D" term or rate of temperature rise.


I was approaching the fan speed differently, thinking and designing to model fan airflow.

If you correlate fan speed with fan voltage or current you can tell the fan's load and model mass airflow.
Different nozzles change the 'system gain' and high-end hot air controllers ask you to input the nozzle size!
This is because the PID gains are affected, unique for each nozzle.
Do we want this kind of accuracy?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: flodo on May 14, 2017, 10:10:44 am
Quote
I found another problem- two issues to resolve surrounding fan speed signal. I didn't pay enough attention to sensing fan speed, how it is presently done. I was planning to get fan speed into the MCU as a digital signal, and measure frequency on the pin to calculate RPM.
But I see it is presently an analog voltage.

By "presently" you refer to other users which modified the 858, right?
Is it a problem if you solve it in another way? Is it more effort?

Quote
Different nozzles change the 'system gain' and high-end hot air controllers ask you to input the nozzle size!
This is because the PID gains are affected, unique for each nozzle.
Do we want this kind of accuracy?

As I understand it:
The upside would be "a better regulation" and the downside "you have to select the mounted nozzle" - is that correct?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Experimenter on May 14, 2017, 09:52:25 pm
If I understand it correctly, the new features like nozzle size selection will require corresponding support in firmware, which is currently not there. It will also add a layer of complexity (what happens if a nozzle size is incorrect? how wrong the readings will be? may it cause a damage to the wand?).

On the other hand, I prefer the hardware to offer maximum features. So that if there's a need in the future, a software support can be added without the need to modify hardware (whenever possible). So I would vote for the better accuracy option.

BTW, floobydust, if you plan to offer these boards for sale - count me in for at least one!


Oh... A comment regarding the adapter board itself: instead of having the beeper connector, I would prefer the beeper to be soldered directly onto the board. It shouldn't take much more space than the connector itself, but will look nicer (in my opinion).
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: flodo on May 15, 2017, 12:43:42 pm
@GiantGnome:
I ordered your pcb from OSHpark, thanks for your efforts!
The part list - according to the schematic (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg904576/#msg904576 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg904576/#msg904576)) - looks like:

C1   10uF electrolytic
C2   100nF
C3   100nF
C4   100nF
C5   100nF

R1   10k
R2   10k 100k
R3   100k 10k
R4   10k
R5   10k

Is there anywhere a more detailed list? I would need the dimensions to order the parts :)


UPDATE!!!! R2 and R3 are confused on the schematic/board! Install the 100k at the pads labeled R2!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: shotgun on May 25, 2017, 10:30:18 pm
Tell me please the value of the transistor q2 on the board 858d06.pcb And if you can make a photo
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on May 26, 2017, 01:59:04 am
This is the stock fan-speed control schematic I have. I have to check the zener voltage measures on mine.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bwack on May 27, 2017, 12:30:15 am
I've played with the Madworm FW and added a CAL menu next to the CFG menu.
- Added a CAL menu which allows you to change five (adc,temp) pairs.
- Added a function piecewise_map() which uses those five pairs to map (convert) adc values into temp values.
- Averaging of the displayed adc value. You can use this to make pairs of your temp measurements and displayed adc values.
(if CFG's ADC parameter is set to 1 you get the adc on the display, and it used to be so fast and noisy)

I hade good results with this calibration scheme using this piecewise linear interpolation.
I made a video. I'll post the code soon. Shall I fork Madworms Github repository.. ?

https://www.youtube.com/watch?v=FgPHER2A-pM (https://www.youtube.com/watch?v=FgPHER2A-pM)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on May 27, 2017, 06:50:35 am
You can create a merge request as well.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bwack on May 28, 2017, 02:27:26 pm
You can create a merge request as well.

Is it the same as using the Pull Request ? (noobie here)
I forked and added my code over here: https://github.com/bwack/Youyue-858D-plus

Hans.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: madworm on May 28, 2017, 02:32:50 pm
On github you can initiate a "pull request" for the repo you did a fork off.

When aporoved, your code would be integrated into my repo.

Not sure if you want that. From a user's perspective, it might be good to keep it in one place.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on May 28, 2017, 05:47:08 pm
i just ordered an 858 to get in on this.  :-+

is there any type of roadmap, or is it just a matter of doing stuff that gets thought up?

my plan is to draw a complete schematic and try to dump the original firmware ( i have serious programming equipment)
then to make a sub board with an AVR or ARM cpu and extra IO headers and get it working with the basics.

after that - maybe add stuff  :-/O
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: knotlogic on May 29, 2017, 06:19:31 am
Does anyone have any experience with the Yihua branded versions of these systems?  I'm thinking of picking up one of these units.

Oddly, I've found a unit on aliexpress where you have to specify whether you're ordering the 110 V, 220 V, 230 V or 240 V version of the system.  As far as I can tell, they do sell spare heater elements which come either as 110 V or 220 V, but I can't imagine what difference the 230 V or 240V options would make.  Maybe their power supply for the uC has a very narrow input range?

Edit: Typo.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: dorin on May 29, 2017, 07:00:04 am
220 V, 230 V or 240 V are all just variations within the tolerances of the same European 50Hz system.
Some devices are more sensitive than others and might require a specific of the 3 voltages, but I doubt it is the case of this station given that the heater has active regulation.
Nevertheless, the difference between 110 and 220 V gives a power ratio of 4 and this definitely requires different heaters or transformers.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: knotlogic on May 29, 2017, 08:18:18 am
Yes, and all that makes me wonder.  After all, if there are so many corners cut in the construction of the station to begin with, I can't imagine that they would go to the trouble to have different stations for 220 / 230 / 240 V.

They're cheap.  But not cheap enough that I would buy more than one for comparison... ;D

Edit: 230 V, not 2230 V.  Doh!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on May 29, 2017, 11:59:51 am
it may just relate to the type of plug on the cable.

240v is u.k., 230v is Europe / schuko for example.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on May 30, 2017, 03:04:37 am
i just ordered an 858 to get in on this.  :-+

is there any type of roadmap, or is it just a matter of doing stuff that gets thought up?

my plan is to draw a complete schematic and try to dump the original firmware ( i have serious programming equipment)
then to make a sub board with an AVR or ARM cpu and extra IO headers and get it working with the basics.

after that - maybe add stuff  :-/O

The schematic has been conquered but the original MCU is largely unknown.  It's socketed (=no ICSP) but no idea what MCU core to disassemble. I think 2KB codespace and better A/D than the AVR. Even then, it's a fairly basic controller. Right now, people are doing their own thing for mods.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Shock on May 30, 2017, 09:45:57 pm
i just ordered an 858 to get in on this.  :-+

is there any type of roadmap, or is it just a matter of doing stuff that gets thought up?

my plan is to draw a complete schematic and try to dump the original firmware ( i have serious programming equipment)
then to make a sub board with an AVR or ARM cpu and extra IO headers and get it working with the basics.

after that - maybe add stuff  :-/O

I'd stick to AVR because this is an easy mod and why make it harder or more confusing for others to follow you?

Dumping the original firmware for your specific hot air station may be of limited use to others, unless it offers insights. Already superior featured custom code has been written by Madworm and others that have contributed. Look at bwack's video a few posts ago for instance.

Schematics for the Baku has already been done (http://poormanelectronics.blogspot.com.au/2016/08/schematic-and-teardown-of-baku-858d-smd.html), this could save you a bit of work if it's similar to yours. The ultimate for me would being able to whip one up on vero or perfboard.

The moment it starts to become expensive to build or I have to drill holes in the faceplate etc I lose interest, uploading new code is free.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on May 30, 2017, 10:11:25 pm
the main thing i want to do is replace the led display with an LCD or OLED so i can display set temperature, current temperature, and status.
like my soldering station has.  :-+

as a bonus, it would be a serial display instead of the current 11 outputs.
so it free's some pins for future use.

maybe later add some temperature presets for different jobs.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on May 30, 2017, 11:14:26 pm
I agree the 7-segment LED display is limited.

There is a high-end controller but kept local to china. We capitalists only get the low cost products  :o
It can do a heat-profile run, also control a soldering iron and pumps. It has a dual OLED, ARM-core MCU.


Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on May 31, 2017, 12:15:04 am
yes! 8)

now THAT is the kind of thing i had in mind!  :box:
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on May 31, 2017, 02:34:19 am
I think changing the 858D+ to OLED has been looked at.
Because the OLED has to be mounted on the backside, there's mains traces under/near it, not much flexibility to mount it and OLED's you buy already are on an PCB (unless we go FPC), so it's a bit of a sandwich. Present ATmega328 pin assignments have the SPI pins going to switches, would have to be moved.

It seems to evolve into making an entire new PCB for the hot air station. Christe4nM with Heart of Technology was working on it but LED display. (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1167574/#msg1167574)

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: knotlogic on May 31, 2017, 03:24:06 am
I agree the 7-segment LED display is limited.

There is a high-end controller but kept local to china. We capitalists only get the low cost products  :o
It can do a heat-profile run, also control a soldering iron and pumps. It has a dual OLED, ARM-core MCU.

I did a search for that, and it appears to come from Russia (or similar).  ;D  Nothing stopping anyone from ordering it, except maybe customs.

Looks like that particular model is for a dual handpiece station, hence the two knobs and screens.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: knotlogic on May 31, 2017, 03:30:23 am
I think changing the 858D+ to OLED has been looked at.
Because the OLED has to be mounted on the backside, there's mains traces under/near it, not much flexibility to mount it and OLED's you buy already are on an PCB (unless we go FPC), so it's a bit of a sandwich. Present ATmega328 pin assignments have the SPI pins going to switches, would have to be moved.

It seems to evolve into making an entire new PCB for the hot air station. Christe4nM with Heart of Technology was working on it but LED display. (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1167574/#msg1167574)

Slightly OT, but I just bought one of those OLED modules.  Haven't tested it properly yet, but it appears to have a linear reg to supply the 2.8 V(!) Vcc for the logic, but no level translator for the actual I/O pins!  Hopefully they're properly 5 V tolerant, but I'd probably not use the PCB the modules come with.  The actual driver IC is mounted on the FPC.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on May 31, 2017, 05:44:42 am
Most 128x64 OLED controllers are SSD1306 (http://www.solomon-systech.com/en/product/advanced-display/oled-display-driver-ic/) and 1.7-3.3V logic, so level-translation needed to interface to 5V AVR Arduino etc. Check your controller's datasheets.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: knotlogic on May 31, 2017, 05:55:47 am
I did.  The ones I've seen say 2.8 V for logic and 15 V for display power.  Sellers are less upfront about those details....
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on May 31, 2017, 11:58:32 am
buttons got mentioned on the spi bus.

i would re-route them to the free'd pins from the old display.
i was thinking on a rotary encoder to replace the pot anyway.

i'm an electronics engineer, not a metal worker - i want to be able to use the front panel as it is.
so any display needs to pretty-much fit the existing window, and replacing the pot with an encoder effectivly means i also have 3 buttons.
 8)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bwack on June 03, 2017, 02:19:45 am
Here is how to calibrate the 858D with the new FW changes that I've appended to madworm/magsburgers FW. Thought I'd make a shorter video about calibration only. https://www.youtube.com/watch?v=rYRtZt2BjcQ (https://www.youtube.com/watch?v=rYRtZt2BjcQ)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: pmayer on June 17, 2017, 08:57:53 pm
Hi guys, I'm new to the forum.

Thank you all for your hard work and contributions - wow!

I've bought the Uvistar 858D+ which PCB is labeled 858D06.PCB, 2016.09.29, so the SMD version with MK1840D3 MCU, as already stated here. As I've read you can use madworms firmware with this if you build the adaptor for the ATMega168/328.

@floobydust: Do you have schematics of the Rev.B board available to order at OSHpark or somewhere else? Is there already a BOM so I can source the parts? If not and you want to sell the board manufactured, count me in!

Cheers,
Patrik
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: flodo on June 26, 2017, 09:03:20 am
i'm on the uvistar too (which comes with the v06 version of the pcb), i already ordered the adapter-board by giantgnome, they arived and i soldered and flashed everything now.

my problem is, i don't know if i have to cut some traces and if - which. also, the fan speed wire - where should i solder it to? the board looks different from the one which wguibas refers to (v04)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Geoff_S on July 17, 2017, 12:43:04 am
Anyone have a source for the adapter boards to suit Samsung S3F94C4EZZ ic's ?  I PM'ed wguibas a while ago but haven't heard back from him, and he seems not to have been active on this forum for a few months.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bwack on July 17, 2017, 01:07:21 am
Anyone have a source for the adapter boards to suit Samsung S3F94C4EZZ ic's ?  I PM'ed wguibas a while ago but haven't heard back from him, and he seems not to have been active on this forum for a few months.
Tried the attachment under this post: https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg782035/#msg782035 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg782035/#msg782035)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on July 19, 2017, 01:46:18 am
so i have recieved the cheapest unit yet!
http://www.ebay.co.uk/itm/181783334716 (http://www.ebay.co.uk/itm/181783334716)

i will rip it open for photo's etc by the weekend.

what i can say from a quick look to make sure it was wired safely.
the mains cable is captive - saving the cost of an inlet.  ::)
the pcb is different from any in this thread - the mcu is even mounted vertically.
the mcu is 20pin and looks unmarked!!!  :wtf:

so i think the first step is to draw up a schematic of atleast where all the mcu pins go.
also, i'm thinking of using an arduino like this:
http://www.ebay.co.uk/itm/191773759569 (http://www.ebay.co.uk/itm/191773759569)
with an adapter under it - it just makes sense because it's cheap and ready built.
also good for quick changes like adding logging, extra displays or inputs etc.
:)

time for some of this:  :-/O   and some of this:  :popcorn:
and hopefully none of this:  :horse:  lol
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: carpin on July 21, 2017, 10:55:36 am
cheapest unit yet! ?

This is the cheapest unit.
https://www.aliexpress.com/item/2015-Brand-NEW-Hot-858D-220V-air-gun-soldering-station-iron-tool-solder-welding-60W-ESD/32408394179.html (https://www.aliexpress.com/item/2015-Brand-NEW-Hot-858D-220V-air-gun-soldering-station-iron-tool-solder-welding-60W-ESD/32408394179.html)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Monkeh on July 21, 2017, 12:47:22 pm
cheapest unit yet! ?

This is the cheapest unit.
https://www.aliexpress.com/item/2015-Brand-NEW-Hot-858D-220V-air-gun-soldering-station-iron-tool-solder-welding-60W-ESD/32408394179.html (https://www.aliexpress.com/item/2015-Brand-NEW-Hot-858D-220V-air-gun-soldering-station-iron-tool-solder-welding-60W-ESD/32408394179.html)

... except that's more expensive.

Math is haaaard.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on July 21, 2017, 02:18:31 pm
 :-DD
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: darkfox on August 14, 2017, 10:22:47 am
Try this. I've swapped the pins for up-button and reed-switch. PB4 <--> PB5.

Thanks for the firmware file. This weekend i replaced Atmega8L with Atmega168pa on my SR858d. Everything went smooth :) but i am having problems with calibration.

Set Temp: 150, ADC: 118, Real Temp: 111
Set Temp: 230, ADC: 198, Real Temp: 177
Set Temp: 310, ADC: 278, Real Temp: 237

I have temparature differencies like above. How can i calibrate it ?

Thanks
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: nitroracer on August 17, 2017, 05:19:44 pm
Just out of curiosity, what is the general consensus on still doing these mods? I recently purchased one of these units off amazon and when comparing to the video of the nice Australian man reviewing the unit, these more recent models seem fairly well-built. It's 110V, no exposed wiring issues inside the gun, e.g., the most recent board version, QR code on back to check authenticity, etc... I even checked the temperature calibration out of the box and it was spot on - didn't fluctuate more than 1-2 degrees!

With all that in mind, is it worth going down this path? Even if I wanted to hack the rework station, it seems like it's going to be a pain given that there really isn't a standard to go off of.

TL;DR - 2017 version seems pretty legit if you can confirm it's authentic, so why modify the gun when I may end up exploding it with tenuous firmware update? (Not to mention I don't even own a second heat gun, which it seems would be necessary for this project...) I'd just the same expend the energy coming up with the resources to get an upgraded reflow station and avoid all this to begin with!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: netdudeuk on August 17, 2017, 06:27:27 pm
so i have recieved the cheapest unit yet!
http://www.ebay.co.uk/itm/181783334716 (http://www.ebay.co.uk/itm/181783334716)

i will rip it open for photo's etc by the weekend.

what i can say from a quick look to make sure it was wired safely.
the mains cable is captive - saving the cost of an inlet.  ::)
the pcb is different from any in this thread - the mcu is even mounted vertically.
the mcu is 20pin and looks unmarked!!!  :wtf:

so i think the first step is to draw up a schematic of atleast where all the mcu pins go.
also, i'm thinking of using an arduino like this:
http://www.ebay.co.uk/itm/191773759569 (http://www.ebay.co.uk/itm/191773759569)
with an adapter under it - it just makes sense because it's cheap and ready built.
also good for quick changes like adding logging, extra displays or inputs etc.
:)

time for some of this:  :-/O   and some of this:  :popcorn:
and hopefully none of this:  :horse:  lol

Did you get a chance to have a proper look inside ?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: mjguisado on August 26, 2017, 12:17:08 pm
Hi everyone,

in my first post let me thank you guys for share the result of all your work.

After read this forum I bought a Youyue 858D+ in Aliexpress.

I have checked the version of the motherboard; it is a 858D06.PCB 2016.09.29 with a MK1841D3 MCU.

(http://i.imgur.com/44I7jY4.jpg)

I think that it is the same version that floobydust has.

As far as I know he was working in a new version of the adaptor board but I don't know if finally it is ready and works.

I would like to be able to continue his work but I'm to novice and I'm not able to do it. Hopefully I will be able to assemble one of your design.

Best regards.


 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on August 27, 2017, 05:57:35 pm
I didn't post the PCB/schematic mods I've done, other people were doing mods and blogging about it and too many chefs in the kitchen. It's hard to get a concensus with open hardware/software projects.

I'd improved the fan-speed detect circuit (tach) and did a PCB design.
Next was changing the (madworm's) firmware and DI timer hook on his ISR, instead of the analog A/D which that circuit presently uses.

Then I thought fan-speed doesn't help, as the factory firmware infers if the fan is working by looking at slope on temperature and changing nozzles upsets the PID control anyway.
Then I thought why not just use an Arduino as the controller, then everyone can do mods.
Then I thought why not redo the entire PCB so we can have a decent display.

But Christe4nM was working on that (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1167574/#msg1167574).
So I was waiting for him to finish his work but no update since.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on August 29, 2017, 11:00:06 am
so i have recieved the cheapest unit yet!
http://www.ebay.co.uk/itm/181783334716 (http://www.ebay.co.uk/itm/181783334716)

i will rip it open for photo's etc by the weekend.

what i can say from a quick look to make sure it was wired safely.
the mains cable is captive - saving the cost of an inlet.  ::)
the pcb is different from any in this thread - the mcu is even mounted vertically.
the mcu is 20pin and looks unmarked!!!  :wtf:

so i think the first step is to draw up a schematic of atleast where all the mcu pins go.
also, i'm thinking of using an arduino like this:
http://www.ebay.co.uk/itm/191773759569 (http://www.ebay.co.uk/itm/191773759569)
with an adapter under it - it just makes sense because it's cheap and ready built.
also good for quick changes like adding logging, extra displays or inputs etc.
:)

time for some of this:  :-/O   and some of this:  :popcorn:
and hopefully none of this:  :horse:  lol

Did you get a chance to have a proper look inside ?

not yet, real life got in the way.
i used it a fair bit though.
here's a warning - dont use very fine tips - the fan wont get enough heat out.
i used an old 2.5mm nozle on it and accidentally partially melted the plastic guard area on the end of the handpiece!!  |O
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Christe4nM on August 29, 2017, 02:20:55 pm
(...)

But Christe4nM was working on that (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1167574/#msg1167574).
So I was waiting for him to finish his work but no update since.

Somehow I still can't get around to finish this project as again I struggle to find/make time to work on it. I decided to upload the draft schematic so at least people can have a look and use what they like. It's a draft so there are probably errors, oversights and there are design notes missing. So take it as it is. Find it here: https://github.com/heartoftechnology/858Dpp-Hot-Air-Rework-Station (https://github.com/heartoftechnology/858Dpp-Hot-Air-Rework-Station) under CC BY SA NC license. I think I won't really be able to answer questions: if I'd had the time I'd spend it on the project itself - my apologies beforehand for that.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: mjguisado on August 30, 2017, 06:58:24 am
Hi all and thank you for your answers.

As I have said before I haven't got the needed knowledge in order to design the motherboard, so for me it is imposible to move forward starting from your unfinished works.
So I have to wait hoping for someone that can and want to finish it.

But I have a question for @floobydust.
I understood that you are no happy enough with your current design and want to improve some topics.

But I don't know it you current design could be built and used with the current version of the custom firmware.

If would be necessary to develop something it would not be a problem for me. To develop is something that I can do.

I say that because the temperature control of my unit it's terrible and I can not use it "out-of-the-box".

Best regards.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: pigrew on September 12, 2017, 04:54:14 pm
Hello, folks. I have one of these with the main board marked "youde 858DV2++" and the microcontroller is a S3F94C4EZZ-DK94.

I've gone through the thread(s) here but I'm not clear if anyone has made an adapter for that chip yet.

Anyone in the know? Thanks.

I also unluckily ended up with this board. Has anyone reverse-engineered it? It seems even more cheap than the rest of the boards that have been discussed. It uses the a MCU marked as a S3F94C4EZZ-DK94, that does not say SAMSUNG.

Do the posted adapter boards work with this PCB? I'd really like to replace the firmware on it to prevent  overshoot.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on September 12, 2017, 05:39:43 pm
try comparing it to these:

it's a good starting point.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kPATm on September 21, 2017, 07:06:38 am
Been thinking of getting one of these. Am I correct in saying that the Youyue varient is the one to go for?

I understand that this thread was started some years ago is it possible the newer released units have no need for the custom FW or other alterations? Thanks
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on September 21, 2017, 02:45:18 pm
get the cheapest you can, because there is no way of knowing what's in them.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ncx94 on October 06, 2017, 11:36:10 am
Hi Guys,

First of all, thank you all for your great work on this little tool!

I bought one a few days ago, and it turned out to be an Hylko one... I had never heard about that one before...
Obviously, the chip is plain blank....
How can I know which one is it?
Attached is a picture of my main board..

thank you very much,

Nick
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on October 06, 2017, 12:20:50 pm
that's the one i have,
i will be looking into it probably over the weekend.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ncx94 on October 06, 2017, 12:22:45 pm
that's the one i have,
i will be looking into it probably over the weekend.

Thank you very much!
Please keep us updated :)
I'd be glad if i could mod it!

(also, if ever we find out it's a mk143XX... I might have ordered the boards before i even knew what was inside... so I'd be able to send you one without waiting for oshpark^^)

nick
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kPATm on October 06, 2017, 11:45:34 pm
I know its been mentione in the thread before but I cant seem to find it? Whats the easiest/cheapest way to flash the Atmega chips on compatible boards? Thanks
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: seasalt on October 07, 2017, 02:51:12 am
Hi everyone,

in my first post let me thank you guys for share the result of all your work.

After read this forum I bought a Youyue 858D+ in Aliexpress.

I have checked the version of the motherboard; it is a 858D06.PCB 2016.09.29 with a MK1841D3 MCU.

(http://i.imgur.com/44I7jY4.jpg)

I think that it is the same version that floobydust has.

As far as I know he was working in a new version of the adaptor board but I don't know if finally it is ready and works.

I would like to be able to continue his work but I'm to novice and I'm not able to do it. Hopefully I will be able to assemble one of your design.

Best regards.


Hi there which AliExpress seller you bought from? Link please.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on October 07, 2017, 05:37:06 am
I know its been mentione in the thread before but I cant seem to find it? Whats the easiest/cheapest way to flash the Atmega chips on compatible boards? Thanks

cheapest and also best way to flash any Atmel AVR series chip is with a USBasp like this:
http://www.ebay.co.uk/itm/272041588746 (http://www.ebay.co.uk/itm/272041588746)

and AVRdude software.
http://www.nongnu.org/avrdude/ (http://www.nongnu.org/avrdude/)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kPATm on October 07, 2017, 09:14:18 am
Thanks. Would this kit work also?

http://www.ebay.co.uk/itm/400634965525 (http://www.ebay.co.uk/itm/400634965525)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on October 07, 2017, 10:07:09 am
it's the same programmer, but your paying extra for a dev-board you cant use.
i have one of those and they are 40pin, the chip you need to program is 28pin.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kPATm on October 07, 2017, 12:08:25 pm
Does the Atmega get programmed from the actual board its on in the 858d?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on October 07, 2017, 12:40:56 pm
that's up to you.
to program the chip you need 6 wires.
most people just put a header on the board so the chip does not need to be removed.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kPATm on October 07, 2017, 03:09:01 pm
Is that Madworms board or is there something else?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on October 07, 2017, 03:14:06 pm
??
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kPATm on October 07, 2017, 05:42:54 pm
Sorry Im thinking that madworms PCB board had to be installed. Is that only for Samsung boards?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on October 07, 2017, 06:11:22 pm
i have no idea what boards have a header or space for one,
but soldering 6 wires under the chip socket is hardly difficult.  ;D
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: seasalt on October 08, 2017, 09:04:30 pm
Hi Nick,

Just want to know, where did you buy that?

Hi Guys,

First of all, thank you all for your great work on this little tool!

I bought one a few days ago, and it turned out to be an Hylko one... I had never heard about that one before...
Obviously, the chip is plain blank....
How can I know which one is it?
Attached is a picture of my main board..

thank you very much,

Nick
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ncx94 on October 09, 2017, 07:41:23 am
Hi Nick,

Just want to know, where did you buy that?

Hi Guys,

First of all, thank you all for your great work on this little tool!

I bought one a few days ago, and it turned out to be an Hylko one... I had never heard about that one before...
Obviously, the chip is plain blank....
How can I know which one is it?
Attached is a picture of my main board..

thank you very much,

Nick

Hi,

I got it on ebay, from the uk :)
Pretty damn cheap but pretty un-modable at the moment XD
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kPATm on October 09, 2017, 08:40:19 am
Did you get a chance to look into your board stj?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on October 09, 2017, 12:45:57 pm
not yet, have to do some rversing and schem' drawing for something else first.
very soon though.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: flodo on October 10, 2017, 03:36:18 pm
Since i had a hard time to read and understand the whole thread:
here is how it works for the...

UVISTAR 858D sold at Amazon.de

Supply Voltage: 230V
PCB-Version: 858D06 (Version 6, both sides are green and mainly SMD components)
Microcontroller: MK1840D3



Thank you madworm, wgujbas, giantgnome and all the others!



P.S: I still have one PCB left, I am located in Germany. Anyone interested?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: hansibull on October 13, 2017, 11:21:55 pm
Quote
P.S: I still have one PCB left, I am located in Germany. Anyone interested?

I just received a Youyue 858D+ branded hot air station in the mail and it has the exact same PCB as yours (858D06, double-sided PCB with SMD components).
I'd really like to improve it by replacing the microcontroller, and I'm very interested in your last PCB. PM sent!  ;D
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: flodo on October 15, 2017, 08:08:13 pm
My 858D is not longer shutting down when I switch it off - what the heck?!
There is definitely no continuity on the N wire when i switch it off (the on/off switch is placed at the N wire in my case).
Any ideas how that is even possible?!

edit: Okay... looks like there is a connection between N and PE somewhere in the wand!
edit2: well... i'm glad that it burnt the upper part of the isolation - which is N i guess, i've survived xD

(http://www.bilder-upload.eu/upload/0b645a-1508103439.jpg)



@hansibull: I replied

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: seasalt on October 16, 2017, 03:16:41 pm
Just bought YouYue 858D+ from Bangood, and the PCB is 858DV06 dated 2017.03.14 (both sides are green and mainly SMD components) the processor is MK1840D3, which  adapter board and firmware should I use? Please advise,
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Level42 on October 16, 2017, 04:06:25 pm
I received my Youyue 858D+ from this Aliexpress seller:

https://nl.aliexpress.com/item/700W-Hot-Air-Gun-YOUYUE-858D-220V-ESD-unlead-adjust-temperature-Soldering-Station-Welding-gun-LED/32797600905.html?spm=a2g0s.9042311.0.0.Xn24wh (https://nl.aliexpress.com/item/700W-Hot-Air-Gun-YOUYUE-858D-220V-ESD-unlead-adjust-temperature-Soldering-Station-Welding-gun-LED/32797600905.html?spm=a2g0s.9042311.0.0.Xn24wh)

I chose the "expensive" version with the extra's, figuring a spare heating element wouldn't do any harm.
Don't think all the nozzle sizes will be used but still nice to have. Also came with a tool to "scoop" chips of a PCB and some tweezers.

I had found an even cheaper 858D on Aliexpress, but it did not have the + after the D....not sure what's the difference....but the most annoying thing on that one was that the cable of the wand is fixed permanently to the base unit. Of course this saves a jack and connector but it's also not what I wanted...

It has the 858D06 PCB dated 2017.03.14 too just like Seasalt's.
Also has the MK1840D3.

I checked and measured the ground, everything OK. I did have to tighten the nuts of the transformer, they were pretty loose from transport I guess.

Seasalt, I think this is what we need:
https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1320798/#msg1320798 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1320798/#msg1320798)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: seasalt on October 16, 2017, 10:52:44 pm
I received my Youyue 858D+ from this Aliexpress seller:

https://nl.aliexpress.com/item/700W-Hot-Air-Gun-YOUYUE-858D-220V-ESD-unlead-adjust-temperature-Soldering-Station-Welding-gun-LED/32797600905.html?spm=a2g0s.9042311.0.0.Xn24wh (https://nl.aliexpress.com/item/700W-Hot-Air-Gun-YOUYUE-858D-220V-ESD-unlead-adjust-temperature-Soldering-Station-Welding-gun-LED/32797600905.html?spm=a2g0s.9042311.0.0.Xn24wh)

I chose the "expensive" version with the extra's, figuring a spare heating element wouldn't do any harm.
Don't think all the nozzle sizes will be used but still nice to have. Also came with a tool to "scoop" chips of a PCB and some tweezers.

I had found an even cheaper 858D on Aliexpress, but it did not have the + after the D....not sure what's the difference....but the most annoying thing on that one was that the cable of the wand is fixed permanently to the base unit. Of course this saves a jack and connector but it's also not what I wanted...

It has the 858D06 PCB dated 2017.03.14 too just like Seasalt's.
Also has the MK1840D3.

I checked and measured the ground, everything OK. I did have to tighten the nuts of the transformer, they were pretty loose from transport I guess.

Seasalt, I think this is what we need:
https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1320798/#msg1320798 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1320798/#msg1320798)

Thanks for your respond, yes I think Flodo's mini tutorials will work, for our model. I have 2 858Ds WEP and Youyue build quality wise, WEP still better in my case. I ordered also V6 board dated 2016.09.29 GREEN PCB SMD. TRIAC BTA12-800B with MK1840D3 controller and I will compare what difference between those 2 versions.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: carpin on October 17, 2017, 01:18:01 am
Only the 858d circuit PCB board.
https://www.aliexpress.com/store/product/220v-GORDAK-kada-850-rework-station-control-board-quick-990A-hot-air-gun-universal-circuit-board/524258_32719799789.html?spm=2114.12010615.0.0.5e4aac32Tvjvr9 (https://www.aliexpress.com/store/product/220v-GORDAK-kada-850-rework-station-control-board-quick-990A-hot-air-gun-universal-circuit-board/524258_32719799789.html?spm=2114.12010615.0.0.5e4aac32Tvjvr9)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: seasalt on October 18, 2017, 06:50:42 am
Only the 858d circuit PCB board.
https://www.aliexpress.com/store/product/220v-GORDAK-kada-850-rework-station-control-board-quick-990A-hot-air-gun-universal-circuit-board/524258_32719799789.html?spm=2114.12010615.0.0.5e4aac32Tvjvr9 (https://www.aliexpress.com/store/product/220v-GORDAK-kada-850-rework-station-control-board-quick-990A-hot-air-gun-universal-circuit-board/524258_32719799789.html?spm=2114.12010615.0.0.5e4aac32Tvjvr9)

Bought from there also, delivery 10 days to Jakarta, I requested V6 board dated 2016.09.29 GREEN PCB SMD. TRIAC BTA12-800B with MK1840D3 controller but they sent me 8585D06 dated 2017.03.04 with blank/no marking IC.

This board is the same version with my recently purchased Youyue 858D+ the only difference is Youyue 858D+ the MCU is clearly marked as an MK1840D3 not a blank IC.

Can we conclude the blank IC is an MK1840D3?

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Miwer on October 20, 2017, 09:39:05 am

I bought one a few days ago, and it turned out to be an Hylko one... I had never heard about that one before...
Obviously, the chip is plain blank....
How can I know which one is it?

that's the one i have,
i will be looking into it probably over the weekend.

Did you get a chance to look into your board stj?

Hi there,

Just wanted to throw in my 2 cents - I also have this Hylko branded 858D, and I did trace out the connections. Haven't made a schematic yet, though. It's follows the same basic principle of the others, but there are a couple of major differences worth mentioning:

About the MCU:
Well, it's 'blank', so not much of a hint there, however based on the pinout, it looks like it could be a Zilog S3 series MCU. It's not uncommon for chinese designs to use S3, and I even have a programmer lying around for these  ^-^

Anyway, none of the adapter boards I've seen in this thread matches this configuration, but I mapped out the connections between the S3 and the ATmega8 chip, based on the schematic by Christe4nM, so here's a little to start you off:
FunctionS3 pinAtmega8 pin
GND18,22
lcd b213
lcd f35
Reset_L *41 (not connected)
lcd a52
lcd e63
lcd d74
Triac drive815
Up sw919
Down sw1016
Reed sw1118
lcd dig21210
lcd dig31314
ADC Temp sense1423
lcd dig1159
Fan on/off1626
lcd dp176
lcd c1811
lcd g1912
VCC **207,20

Oddities:
* The S3 reset pin on the Hylko is connected directly to 5V VCC, however the Atmega8 reset pin is not connected, might not be needed.
** The S3 VCC pin is connected through a 1n4007 diode to VCC. Here I've mapped it directly to match the ATmega VCC pin.

I might be able to make a complete schematic based on my notes, but I may not have time before next week.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ncx94 on October 20, 2017, 09:47:44 am

I bought one a few days ago, and it turned out to be an Hylko one... I had never heard about that one before...
Obviously, the chip is plain blank....
How can I know which one is it?

that's the one i have,
i will be looking into it probably over the weekend.

Did you get a chance to look into your board stj?

Hi there,

Just wanted to throw in my 2 cents - I also have this Hylko branded 858D, and I did trace out the connections. Haven't made a schematic yet, though. It's follows the same basic principle of the others, but there are a couple of major differences worth mentioning:
  • There's no external AREF circuitry, so this might cause problems with the temperature sensing, unless adjusted in fw, or adding hw
  • There's no fan voltage feedback to the MCU - I'm not sure if this is required by madworms fw, but I notice that some of wguibas adapter board implement this on the adapter.
  • LED digits are driven by external transistors instead of directly from the MCU, but as far as I can tell, this shouldn't be a problem.

About the MCU:
Well, it's 'blank', so not much of a hint there, however based on the pinout, it looks like it could be a Zilog S3 series MCU. It's not uncommon for chinese designs to use S3, and I even have a programmer lying around for these  ^-^

Anyway, none of the adapter boards I've seen in this thread matches this configuration, but I mapped out the connections between the S3 and the ATmega8 chip, based on the schematic by Christe4nM, so here's a little to start you off:
FunctionS3 pinAtmega8 pin
GND18,22
lcd b213
lcd f35
Reset_L *41 (not connected)
lcd a52
lcd e63
lcd d74
Triac drive815
Up sw919
Down sw1016
Reed sw1118
lcd dig21210
lcd dig31314
ADC Temp sense1423
lcd dig1159
Fan on/off1626
lcd dp176
lcd c1811
lcd g1912
VCC **207,20

Oddities:
* The S3 reset pin on the Hylko is connected directly to 5V VCC, however the Atmega8 reset pin is not connected, might not be needed.
** The S3 VCC pin is connected through a 1n4007 diode to VCC. Here I've mapped it directly to match the ATmega VCC pin.

I might be able to make a complete schematic based on my notes, but I may not have time before next week.
Cooool!
Good job thank you very much
If you can make the boards that would be awesome!


Inviato dal mio A0001 utilizzando Tapatalk

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Miwer on October 20, 2017, 11:14:16 am
You just gotta love the quality of these boards.  :clap:
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ncx94 on October 22, 2017, 08:09:47 pm
Hi guys!
Just received my boards from osh parks. Mk143Xxx ones...

I won't use them so if someone in Europe wants one, just ask :)

3 available, you only pay shipping from France. Will be much quicker than ordering them from osh parks

Inviato dal mio A0001 utilizzando Tapatalk

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kPATm on October 22, 2017, 08:56:44 pm
How much are they mate?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ncx94 on October 22, 2017, 09:01:17 pm
You just pay shipping :)

Inviato dal mio A0001 utilizzando Tapatalk

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kPATm on October 22, 2017, 10:17:46 pm
I havnt even bought a 858 yet but I suppose it would come in handy if I needed the board?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ncx94 on October 23, 2017, 05:59:43 am
I havnt even bought a 858 yet but I suppose it would come in handy if I needed the board?
If you're in Europe and need to mod your future station yes. I waited about about a month to have them

Inviato dal mio A0001 utilizzando Tapatalk

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: x2net on November 02, 2017, 04:21:20 pm
Hello Everyone!

Sorry for the offtopic....
Few months ago I started designing a new, "all digital" board for this magickal chinese hot air station.
Unfortunately I'm stucked with the MAX6675 ic, and currently I have zero time and patience to figure it how to use this IC with the Atmega 88.
The code is written in CodeVision AVR.
If anyone interested to help me out, pls let me know. I will open source the sw and the board too.

https://www.youtube.com/watch?v=Fl0cs1hZWzE&t=13s (https://www.youtube.com/watch?v=Fl0cs1hZWzE&t=13s)

(Sorry for my bad english)
Cheers
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: texaspyro on November 02, 2017, 04:35:38 pm
If you update the firmware, a button click should change the setting by 1 and holding the button by 10.  Also, include a config option for degrees F.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on November 14, 2017, 05:19:18 am
Hello, folks. I have one of these with the main board marked "youde 858DV2++" and the microcontroller is a S3F94C4EZZ-DK94.

I've gone through the thread(s) here but I'm not clear if anyone has made an adapter for that chip yet.

Anyone in the know? Thanks.

I also unluckily ended up with this board. Has anyone reverse-engineered it? It seems even more cheap than the rest of the boards that have been discussed. It uses the a MCU marked as a S3F94C4EZZ-DK94, that does not say SAMSUNG.

Do the posted adapter boards work with this PCB? I'd really like to replace the firmware on it to prevent  overshoot.

I don't know what the difference is between the YOUDE 858DV2++ and the YOUDE 858DV4 boards, but they look identical on the topside.  The V4 board is dissimilar to any of the clones posted so far on this thread.  Not only does the board use a different pin assignment for the MCU, the buttons are scanned using a single ADC input.  Fixing this would require modifying both the board and the firmware.   I've noticed that a lot of the resistors have been substituted for nice round 10k resistors everywhere.  The TC amplifier ckt is different, and overall I have a feeling that the voltage range expected by the firmware for TC and fan ADC's will probably be different and need a bunch of tweaking. 

The pinout for the MCU is:
GND
LED A3
LED A1
hook switch
LED a
LED f
LED e
LED d
LED DP
LED c
button ADC
optocoupler
LED A2
temp ADC
fan control
LED b
LED g
EE SCL
EE SDA
VCC

Both buttons share a common node which is pulled to 5v with a 10k resistance.  The UP button pulls this node directly to GND, whereas the DN button pulls this node to GND via another 10k resistance.  So the state map for the sensed node is:
Inactive: 5v
UP active: 0v
DN active: 2.5v
UP+DN active: 0v
So while using the ADC to sense two buttons might be a simple change in the new firmware, the hardware can't accept a double keypress.  One could configure both buttons to act as voltage dividers with unique voltages for each of the three active cases, but there's a possible complication in the board layout.  They're using the internal connection between pins on the UP button as a board jumper to connect the fan control circuit to ground, so any modification has to take that into consideration.

(http://funkyimg.com/i/2LS5k.png) (http://funkyimg.com/i/2LS5p.png)

It should be possible to set up a divider as described if a few modifications are made.  This keeps everything within a 0-2.5v range for the ADC.

(http://funkyimg.com/i/2LS5i.png) (http://funkyimg.com/i/2LS5j.png)

I found this thread after declaring my unit to be garbage after a few uses.  Mine is badged ZENY 858D and comes with the typical backwards mains connection,  After the ground wire shorted the heater and blew the triac and traces off the board (because there's no fuse in a line-earth fault), I discovered the faked temperature display.  I know people here were complaining about overshoot, but I'm seeing 150-200C overshoot for a 300C setpoint.  I don't think I've seen anyone mentioning anything that bad.    For higher setpoints, this is pushing the heater into a temp range where I'm concerned about insulation failure.

One contributing thing is the filter cap in the TC amplifier output is 10uF.  Pulling this and replacing it with something smaller does alleviate some of the overshoot, but 120-150C is still absurd.  I don't feel like waiting two minutes for the temp to settle every time I pick the handpiece off the hook.

There is no attempt at compensation in the control.  The original firmware appears to be using a large moving average of the PV for both the display and control loops.   Once it reaches SP, it pauses the loop for about 20s or so to hide the overshoot from the user.  If no nozzle is used, the temperature will settle quickly enough for this scheme to work.  If using a nozzle or using low air, the firmware will eventually start averaging the SP with the overshoot.  This is why it appears to spontaneously skyrocket in temperature.

Personally, I don't think I'm going to try adapting this board.  I don't feel like nailing down every little difference to save what has to be the worst variant of the 858D clones.  I'll probably either build a new board specifically for the AVR, or I'll order an alibaba board (https://www.aliexpress.com/item/110V-220V-858D-8586-878D-2-IN-1-DIY-DIGITAL-SMD-BGA-HOT-AIR-GUN-REWORK/32837366832.html?ws_ab_test=searchweb0_0,searchweb201602_1_10152_10065_10151_10068_10130_10344_10345_10547_10342_10343_10546_10340_10341_10548_10545_10541_10307_10060_10155_10154_10056_10055_10539_10537_10536_10059_10534_10533_100031_10103_10102_10142_10107_10324_10325_10562_10084_10083_10561_10178_10312_10313_10314_10550_10073_10551_10552_10553_10554_10557_10558-10102_10550,searchweb201603_25,ppcSwitch_5&btsid=138ae5ae-d7d3-450f-aa97-de390d994763&algo_expid=4b262590-6a24-48b0-a5d4-1d63ab235e94-1&algo_pvid=4b262590-6a24-48b0-a5d4-1d63ab235e94) and see if it's better quality or more easily adaptable. 
Title: schematic of 858D+ with 856D06.PCB and the wand
Post by: floobydust on November 14, 2017, 08:25:31 pm
Here is the schematic I drew of the Youyue 858D+ with 856D06.PCB and the wand.

I can't remember if I previously posted it. Let me know if there are errors.
It does not show the fix for moving the on/off switch, so it actually shuts off power so no shock hazard at the wand and connector from TRIAC leakage.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on November 15, 2017, 08:49:09 am
Just to kill some time, I threw together a sloppy schematic for the YOUDE 858DV4 board found in the ZENY clone.  No attempt was made to match part identifiers to the pcb silkscreen, but values should otherwise be correct.  Most of the differences are in the TC amplifier section, the button circuit, and some values in the fan control. 

Unlike some of the other designs, the fan potentiometer is mounted off-board with a jumper.  The pot is an unmarked 10k single-gang pot (measured ~9k). 

The measured fan voltages are lower than in the 858D06 board, even though both have 24v fans.   I'm not sure how this compares to other clones or what to expect as far as the ability of the fan to run over its nominal voltage rating.  Most of the hall effect switches I've seen are rated 28v, and most fan datasheets seem to only rate the 24v fans up to 28v. 

It's worth noting that this board has no provision for a heat sink on the darlington in the fan circuit.  At a peak of ~2.5W dissipation, this part really needs a heat sink.

I still don't think I'll bother adapting this board, but if someone else wants to, I hope this helps.
EDIT: added TC output table
EDIT: corrected error in TC amp input
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on November 15, 2017, 11:44:01 am
Considering the different TC amplifier setup in the YOUDE 858DV4 board and the impact on any ADC scalings, I figured I'd measure the output at the MCU pin.  I was surprised to find it was basically the same as the other clones.  Considering the ADC range needed for the button circuit, I was kind of expecting a range >2.5v.  I guess it's just a matter of the opamp swing being limited.
This is all measured with the large nozzle in place and 100% air. 

Setpoint (C)Temperature (C)VADC (V)
-200.011
1001030.515
1501510.760
2002051.00
2502561.25
3003041.50
3503571.75
4004001.99
4504472.24

After having disassembled the unit to photograph the board, I was surprised to find that it was way out of calibration.  Turns out that the calibration trimmer is either really flaky, or the circuit is extremely sensitive to this trimmer (probably both).  Error swings >50C can be made within an imperceptibly small wiper tweak, and tapping the pot or the pcb after making an adjustment will produce another ~10C error as the pot settles mechanically.  Anyone who wants to actually use this board should probably fix this part of the circuit if they want their calibration to survive.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: progrock on November 17, 2017, 07:02:12 pm
Has anyone played around with the HFS 959D?... seemed pretty comparable with the Youyue 858D, except it claims to use PID heating (as I am understanding it, you guys are adding PID with the firmware upgrades).... didn't see this thread before ordering, otherwise, might have chosen the 858D.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on November 17, 2017, 09:33:45 pm
got a link??

be funny if you opened one and it was using this project!!!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: progrock on November 20, 2017, 07:15:50 pm
Oh man, clearly I was in need of sleep, forgot the link, haha.  Here it is on amazon (and actually a good amount cheaper than I was seeing it on ebay, plus can't beat prime shipping... and soo much easier returning something to Amazon if there are issues from the start): https://www.amazon.com/HFS-Digital-Soldering-Rework-Station/dp/B01H7SH7JE/ (https://www.amazon.com/HFS-Digital-Soldering-Rework-Station/dp/B01H7SH7JE/)

BTW, there was actually 2 reasons I went for this one instead of one of the 100 different 858D's (as I mentioned did not see this thread before ordering)... but, 1 was the PID heating... 2 was after reading a customer review that had an issue and contacted HFS (when it came to 50 different brand labels I saw on the 858D, I had no clue if any were different, and definitely had no expectations of there being any form of warranty that would actually be held.... was pretty shocking to hear that HFS was so on top of that).

That would be totally hilarious if it was an 858D utilizing the firmware found here (well, hilarious to me.... might not make the creator happy... tho would kinda vindicate his work).  I suppose it's also technically possible that they are just lying about it having PID heating, and it is just a normal 858D, but I'm hoping that's not the case.  At least from the looks of it, it't extremely similar, but maybe just a little nicer/cleaner than a lot of the 858D's I saw (though I could be imagining that, don't have the 2 in front of me to compare)... but so far so good, the unit seems to work well enough.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on November 20, 2017, 07:35:31 pm
that;s nice, it has presets - been waiting for that!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on November 22, 2017, 08:10:07 am
i saw that on amazon and thought it was too good to likely be true.  i guess if it is real, it'll solve the issue for prospective buyers, but i'm not going to buy an entire new unit to get rid of the problem I already bought; at least with an open firmware adaptation, everything is configurable.  It'll be neat to see if it's a good step forward though.  I'm so sick of inexpensive products that are crippled by some trivial flaw that saved no cost.  I just want to see someone break the trend.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: cowana on November 26, 2017, 12:19:34 pm
In need of a new hot air station, I decided to go with an 858D+ station, to give me the ability to use the excellent firmware developed in this thread.

I opted to go with a model with connectors for the mains input and hot-air gun output to give me the greatest flexibility and portability. The cheapest version on Aliexpress with these options was £28. Here's the link (https://www.aliexpress.com/item/220V-700W-YOUYUE-858D-ESD-Soldering-Station-LED-Digital-Solder-Iron-with-3-Nozzle3/1966416691.html), but I notice the price has increased to £35 since then.

Upon receiving it, the mains wiring looks to be poor; soldered connections rather than crimped, the mains switch on the neutral, random wire colours (red for earth?!), and a general poor state of assembly. I have now rewired it and fixed all these issues.

Looking at the main PCB I noticed it uses a S3F94C4EZZ-DK94 microcontroller (as many of the models in this thread do), however I haven't come across any other versions using this PCB or pin mapping. The general idea is the same, although with some differences (such as the common channels of the LED display being controlled via PNP transistors). Reverse engineering the microcontroller mapping results in the following, which does not seem to match any of the existing adapter boards:

Code: [Select]
Pinout
1 GND
2 LED_DIGIT_1
3 TRIAC DRIVE
4 REED_SWITCH
5 LED_SEG_G
6 LED_SEG_D
7 SDA / BUTTON 1
8 SCL / BUTTON 2
9 FAN DRIVE
10 NC
11 LED_SEG_DP
12 LED_SEG_E
13 LED_SEG_F
14 LED_SEG_A
15 TEMPERATURE (LPF)
16 LED_SEG_B
17 LED_DIGIT_2
18 LED_DIGIT_3
19 LED_SEG_C
20 5v

As such, I designed a new adapter board with an ATMEGA328P on it. I designed this board to have roughly the same footprint as the original DIP chip, and had it manufactured by OSH Park. The board includes an ICSP header, TL431 2.5v reference (for the ADC), and voltage divider for the fan speed measurement. SMD 2.54mm pitch headers on the underside plug into the existing chip socket.

I decided to include the TL431 voltage reference rather than a voltage divider, so the temperature readings are not affected by VCC fluctuations.

With a few small low-level modifications to the firmware (mainly related to the LED display driving), I've got a hot air station with excellent performance! After running a calibration, the temperatures are very stable, with virtually no overshoot.

I did have a significant issue with the watchdog/'RST' issue at startup, despite running the latest version (1.46) with the init1/init3 bug fixed. I tried replacing the microcontroller multiple times, including some sourced directly from Atmel - however it still went into 'RST' mode around 10% of the time on powerup. I suspect maybe the issue is related to the fact I am building the firmware within the Arduino environment rather than using AVR Studio? I decided I was happy with removing the watchdog functionality; if the chip does reset caused by the watchdog, then the gun will either be in the cradle (and the heater shouldn't get turned on), or it will be out the cradle (and thus go into the 'CRA/DLE' warning). In either case, I'll only ever have it turned on if I'm actively using it, so would spot if something went wrong in the firmware.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: x2net on November 26, 2017, 01:23:16 pm
Sorry Bro, We are using SI units only. It's easy! :)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: tablatronix on November 26, 2017, 03:35:21 pm
Word of advice, I have a yihua 858D, I had to add my own rubber feet, because the ones on it ate the finish off my desk, those feet will probably gum up over time also if i had to guess, crappy rubber.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on November 27, 2017, 03:05:38 am
Eek! I guess I should check the feet on mine.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on December 01, 2017, 05:03:15 am
Word of advice, I have a yihua 858D, I had to add my own rubber feet, because the ones on it ate the finish off my desk, those feet will probably gum up over time also if i had to guess, crappy rubber.

i didn't look at the feet, but the blower bushing in mine is that nasty black rubber that sweats acrid brown mystery oil. 
i've seriously been considering making a copy with some silicone to cut down on the smell.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kPATm on December 01, 2017, 04:27:33 pm
Just took delivery of mine today.

https://www.ebay.co.uk/itm/858D-220V-SMD-Soldering-Desoldering-Station-Hot-Air-Rework-Gun-Tool-3-Nozzles/301966004104?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649 (https://www.ebay.co.uk/itm/858D-220V-SMD-Soldering-Desoldering-Station-Hot-Air-Rework-Gun-Tool-3-Nozzles/301966004104?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649)

Had a quick look inside and it seems pretty well made. I took a pic of the board

(http://i66.tinypic.com/2lj3ui0.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ncx94 on December 01, 2017, 04:32:03 pm
Just took delivery of mine today.

https://www.ebay.co.uk/itm/858D-220V-SMD-Soldering-Desoldering-Station-Hot-Air-Rework-Gun-Tool-3-Nozzles/301966004104?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649 (https://www.ebay.co.uk/itm/858D-220V-SMD-Soldering-Desoldering-Station-Hot-Air-Rework-Gun-Tool-3-Nozzles/301966004104?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649)

Had a quick look inside and it seems pretty well made. I took a pic of the board

(http://i66.tinypic.com/2lj3ui0.jpg)
Looks like the same one I have.

nc94

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kPATm on December 01, 2017, 04:41:29 pm
Did you mod it mate. I havnt used it yet as its a birthday present from the Mrs. Need to wait :-( How does it function as standard? AND IS IT SAFE
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ncx94 on December 01, 2017, 04:45:03 pm
Did you mod it mate. I havnt used it yet as its a birthday present from the Mrs. Need to wait :-( How does it function as standard? AND IS IT SAFE
No because nothing is available yet for that one. Works great though, and mine was grounded correctly even though I wouldn't say such a pcb design could ever be safe

nc94

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kPATm on December 01, 2017, 04:49:32 pm
Dont mind about being able to mod it if it works OK. How accurate is it? I wouldnt mind a few pointers in checking its safety?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on December 05, 2017, 02:02:44 am
After condemning my YOUDE 858DV4 board in a previous post (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1348862/#msg1348862), I ordered a different board from the stated aliexpress source.  Indeed, the board I received was an 858D06 board.  To fit in the ZENY enclosure, I had to remove two of the welded pcb standoffs.  I also flipped the 3-pin header for the hook switch and TC so that it matched what I had.  To avoid having to make new buttons for the different sized switches, I removed them and surface mounted the switches from the YOUDE board. 

After running an initial calibration cycle and letting it cool back down, I tested the overshoot to compare it to the old board.  With the large nozzle and 100% air, or with the small nozzle and 50% air, overshoot for a 300C setpoint was 40-60C.  I think everyone would complain about that, but considering the original YOUDE board's firmware was causing a 150-200C overshoot, I'm rather pleased.  While it does to lock the display and simply show the SP once it's been reached, it does appear to employ some form of rate compensation behind the scenes.  All in all, it's a nice, clean double sided board.  The darlington has a heat sink, and the firmware isn't complete garbage like the YOUDE was.

While I've drawn up an adapter layout for the 858D06 in eagle, I'll probably use it as is for now.  Like I said, 50C overshoot is a far cry from 150-200C overshoot.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on December 19, 2017, 07:00:54 pm
Did you mod it mate. I havnt used it yet as its a birthday present from the Mrs. Need to wait :-( How does it function as standard? AND IS IT SAFE
No because nothing is available yet for that one. Works great though, and mine was grounded correctly even though I wouldn't say such a pcb design could ever be safe

nc94

858D06 and 04 both have scary creepage/clearance fails between mains and the low voltage side. Not a safe design.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ncx94 on December 19, 2017, 07:03:29 pm
Did you mod it mate. I havnt used it yet as its a birthday present from the Mrs. Need to wait :-( How does it function as standard? AND IS IT SAFE
No because nothing is available yet for that one. Works great though, and mine was grounded correctly even though I wouldn't say such a pcb design could ever be safe

nc94

858D06 and 04 both have scary creepage/clearance fails between mains and the low voltage side. Not a safe design.
Yes I know that's why I said such a design could never be safe ^^


nc94

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on December 21, 2017, 01:24:15 pm
considering the scope of this whole discussion, i think there's a realm of design defects that are just going to be accepted unless we go back to talking about complete board replacement.
i don't think i've seen any 858 clone layouts that were "good" in anything but a relative sense.

i'm pretty sure the worst spacing on the 06 board is in the corner.  creepage distance to the front panel standoff.
i'd be less worried about the LV system getting destroyed than having the (poorly grounded/ungrounded) enclosure energized.

having reduced those issues as much as I can with rewiring, bushings, copper removal and conformal coating
i think i'll take poor creepage distance to a low-voltage system with no exposed conductors. 
in my mind, that's safer than firmware that tries to melt the handpiece and start a fire every time you pick it up.
on a dirty board with a fan circuit that's just waiting to die -- and melt the handpiece and start a fire.

i felt i had  to point out that the 06 i got was "clean", which it was in comparison to the YOUDE 858V4
i don't think anyone ever mentions the spacing violated by having solder balls and dross stuck all over the board.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ncx94 on December 21, 2017, 01:28:13 pm
I can only agree with you on that.. I wish I had the skills to do the high power part of the pcb... The other part is easy but I don't have the knowledge to do the HV part...



nc94

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on December 21, 2017, 01:45:42 pm
Designing a safe replacement main PCB, with a decent MCU and better display, the issue is the rest of the station would remain unsafe.

The GX connector, the wand ground wiring and the wand cable- would never pass regulatory for mains use.

I run my Youyue 858D06station from a GFIC and that lowers risk enough for me.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: technogeeky on December 28, 2017, 08:17:57 am
I just wanted to check in. I got the "HFS" 959D (https://www.amazon.com/gp/product/B01H7SH7JE) model from the jolly old fat man we all know and love.

This one has the three memory buttons (CH1 CH2 CH3).

I took a peek inside and I found a green PCB with a socketed MCU. I used a NIST traceable and recently calibrated (in November) Thermapen held (with my hands, not a stable setup) about 1 inch away from the nozzle, with no attachment nozzle. I did not test at the pre-programmed 300 °C because the thermapen sharply cuts off there.

I found:

I will do a more detailed review later, with pictures and identification of the board. Some early thoughts:


Some notes about the cosmetic appearance of the unit I got:

Other than the fact that the wand unit is permanently attached, this unit may be the best starting points for these type of hot air guns -- and therefore may be the best and cheapest starting hot air unit.

Please let me know any questions or specific things you want checked out from the teardown.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on December 30, 2017, 08:02:03 am
IDK what everyone else wants, but my curiosity is to merely see if this variant breaks the trend(s) of known flaws.  It seems to some degree it's already looking above average, but I suppose I can throw down a few points of curiosity for any freshly discovered clone.  I have no idea if you even intend on bothering with figuring out pinouts or schematics, but consider it a general statement of my own general curiosity regarding this entire thread.

is the chassis/handpiece grounded?
is the switch/fuse in the phase or neutral?
is the MCU a Zilog/Samsung or can we hope for an AVR again? (not holding my breath)
does the MCU share any known pinouts (may be of interest to a prospective buyer looking to mod, but in this case, i'd assume it doesn't)
are there significant changes to the fan control and TC amp circuits? (this might influence how any mods are adapted to the board)
are the power semiconductors provided with a heat sink? (the darlington in my clone wasn't)
are there any terrible layout decisions made regarding isolation between mains & low voltage systems or mains & chassis?
what about the dynamic response; how bad is the overshoot from cold?

maybe other people expect more perfection out of a dodgy chinese appliance that smells like shredded tires, but i'm just out to see if it can perform repeatably without incinerating itself or the work.   that's enough of a challenge to start with.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: biohazrd on January 13, 2018, 04:35:33 pm
Just got mine in.

Looks like a 858D06 PCB (date 2017.03.04) with a MK1840D3 micro.

(https://i.imgur.com/rC9a3Ahl.jpg)

From what I can tell, it looks like the big changes between the D06 an the D04 PCB is the use of surface mount components for most resistors and other passives.

I saw some posts back in the thread that the MK1841D3 might be pin compatible with the MK1840D3 but no confirmation. And that this (https://oshpark.com/orders/cart) OSH park board might be the one I need, or this (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg888729/#msg888729) board that was posted in the thread.

Does anyone have any experience with this particular micro before I go forward?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on January 15, 2018, 10:37:55 am
I don't see how differences between MK1841 and MK1840 really matter here.  Pin-compatibility of the MCU doesn't mean an adapter will work correctly with a given board.  What matters is the layout of the board. 

This is the schematic and pinout for this the 06 board:
https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1349350/#msg1349350 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1349350/#msg1349350)

floobydust also posted details of an adapter specifically for the D06
https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1206460/#msg1206460 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1206460/#msg1206460)
Keep in mind that the pin assignments on the AVR correspond to the TQFP package, not the PDIP package.

I don't remember the specifics of what those other adapters went to.  The OSH park link is incomplete,
You'll basically have to look at the adapter layout and figure out what nets connect to the AVR pins. 
EDIT:  The board made by wguibas in your second link won't work for the D06 board.  Assignment of pins 2 and 7 are swapped between the D06 and whatever board he was using.  You may be able to make it work if you change pin assignments in the firmware.
EDIT AGAIN: If you want a summary of board and adapter compatibility, check here: https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1418224/#msg1418224 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1418224/#msg1418224)


These are my own notes for this board. Might want to double check your physical board, but it's easier than trying to sort through this entire thread and all the myriad incompatible bits of information:

Code: [Select]
map for MCU adaptation (D06 BOARD)
NAME ATMEGA168 MK1840D3
PB0 digit 1 14 2
PB1 triac drive 15 6
PB2 down switch 16 9
PB3 NC 17
PB4 reed switch 18 4
PB5 up switch 19 8
PB6 digit 3 9 7
PB7 digit 2 10 3
PC0 ADC temp sense 23 11
PC1 NC 24
PC2 NC 25
PC3 fan on/off 26 10
PC4 NC 27
PC5 fan sense 28 FAN SENSE CKT
PD0 A 2 15
PD1 E 3 16
PD2 D 4 17
PD3 F 5 14
PD4 DP 6 5
PD5 C 11 18
PD6 G 12 19
PD7 B 13 13
VCC 7 20
AVCC 20 20
GND 8 1
AGND 22 1
AREF external vref 21 AREF CKT
RST 1 terminate

AREF needs to be provided:
- VCC/2 divider (no supply rejection)
- LPF+TL431 or similar (e.g. LM336) (see schematic of original board (below) for example)
https://github.com/madworm/Youyue-858D-plus/blob/master/Docs/Datasheets/858D_RevEng_Schematic.pdf (https://github.com/madworm/Youyue-858D-plus/blob/master/Docs/Datasheets/858D_RevEng_Schematic.pdf)

ADAPTING THE CODE:
using TC amplifier output range for D06 board (from schematic pdf)
round([0 1.217 2.44] * 1024/2.5) = [0 498 999]
this demonstrates conversion of the full range of the pin voltage to the full range of register values
use this to adjust lines 104,105 in youyue858d.ino and the default value in the .h file (and possibly other values i missed)
by calculating the relevant intermediate register values for min/max/default, etc

the original board (and default code) assumes raw adc values are scaled to be equivalent to degrees C!
the required rescaling factor is based on amp output slope (4.88mV/K) (see schematic pdf)
4.88E-3 * 1024/2.5 = 1.9988
this scaling factor needs to be used for adjusting the calculation of temp_inst on line 197 in youyue858d.ino
Code: [Select]
temp_inst = (adc_raw / 1.9988) + temp_offset_corr.value; // approx. temp in °C
similarly, FAN SENSE needs to be provided based on whether you're measuring fan voltage or current.
the min/max register values have to be set accordingly

if measuring the fan voltage using a voltage divider:
given original version voltage divider (10k and 330R) for [9 32] volt range on Vfan (again, from the schematic pdf)
adc register value range is:  round([9 32]*330/10330 * 1024/2.5) = [118 419]

if using the current sense mod:
fan current sense mod is a 1R resistor in the ground connection for the fan
default limiting adc register values are [30 71], coresponding to [74 174] mA  (lines 155,156 in the .h file)
if the range of fan currents extends beyond these min/max values, or if a different resistor value is used, the min/max values have to be recalculated to correspond to your hardware

i don't really see that by default FAN SENSE is used for anything other than startup testing and PV snooping via the display
so i don't really see the point unless you're out to make some more complicated calculations based on the fan state.

also, all these calculations are based on an assumed 2.5v reference voltage
everything should  be adjusted based on actual AREF provided by the adapter board.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on January 15, 2018, 11:31:43 am
For the sake of completeness, I'm going to go ahead and offer my Eagle files for the 858D06 board. 
I kind of tailored it to my own use with no intention of anyone else seeing it, so idk if anyone would want it.

Caveats:
I have not had a chance to print this, so it has not yet been physically proven. 
I did not include a programming header, because I didn't want one.  I tend to just use a socket.
The layout is based on the assumption that I would print/etch/assemble it myself; it does not meet the requirements of a board house (and the silkscreen layers are garbage).
If printing/drilling this yourself, keep in mind that there are some topside pin connections that need to be made under the IC socket (if used)

Unique bits:
This adapter uses a LPF and voltage reference (LM336M) for the AREF source
There is provision for an end-of-cycle beeper (common 13mm magnetic buzzer)
The routing minimizes vias and topside connections (convenient when plated through-holes are unavailable)

(http://funkyimg.com/i/2LS5D.png) (http://funkyimg.com/i/2LS5D.png)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kelchm on January 21, 2018, 07:56:37 pm
Just received my Youyue 858D+ that I ordered from Amazon. Seems to work well and be of a decent build quality. I've also received the 858D06 board that several other users reported.

One oddity that I'll note is that the grounding wires are soldered to crimp connectors. At least they didn't tin the wire and then crimp them.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kulla on January 22, 2018, 11:54:24 am
Any of you had issue that heater is aways on?  |O
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on January 22, 2018, 04:06:24 pm
dont think so,
that was a problem with the older style with a pump in the base though.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on January 22, 2018, 06:36:54 pm
Quote from: kulla
Any of you had issue that heater is aways on?

Given how frustrating it is to do searches within threads on this forum, I'm going to just assume you're not trying to troubleshoot a modded 858 build you've mentioned prior. 

Assuming the controller isn't actively turning the heater on constantly, it's certainly possible to have a triac stuck on when it's failed.  That much is easy enough to diagnose with a multimeter while off. 

Otherwise, like my experience with the ZENY clone with the YOUDE 858DV4 board, it could simply be horrific overshoot and faked user feedback making it seem like the heater gets stuck on.    I know it sounds dumb, but it might be a good idea to actually measure and make sure the heater is drawing current when you think it is.

Finally, the worst thing I can imagine is that the unit is wired with the switch, triac, and fuse in the neutral (like they all seem to be), and for some reason the heating element shorted to the nozzle (earth).  If there is no RCD/GFCI in the branch circuit, that'd result in the heater being stuck on.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kulla on January 22, 2018, 11:09:56 pm
Tnx for tips DGM.

I got the same problem when I tried to replace original MK1840 with modded one, the heater went ballistic on me, got glowing red while fan was on. It worked before that change so I tried to put the old mc back but still the same thing happens.

I'll measure it and see if neutral is like it should be.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on January 23, 2018, 10:27:58 pm
Tnx for tips DGM.

I got the same problem when I tried to replace original MK1840 with modded one, the heater went ballistic on me, got glowing red while fan was on. It worked before that change so I tried to put the old mc back but still the same thing happens.

I'll measure it and see if neutral is like it should be.

Since I have no idea what all you did with the mod, I can't really refine what I'd recommend to troubleshoot.  That said, I don't see many ways a botched mod would directly cause the condition.  Unless there were latent faults that were unrelated (which is always a case with counterfeit semiconductors), I don't see how a misconfigured controller could damage the triac or opto alone. 

One way the controller could cause the stuck condition is if it caused the heater to be grossly overheated.  The only thing insulating the nichrome heater element from the grounded barrel/nozzle is a layer of mica paper.  The heater can certainly get hot enough to melt through the mica and short to ground.  As I've mentioned before, this condition may persist regardless of whether the triac is on or off, depending on the wiring.  I imagine there are any number of ways the controller might drive he heater to extreme temperatures: improper ADC reference voltage, missing or misplaced input from the TC amplifier, or wrong input scaling.  The default code (line 197 in youyue858d.ino) still assumes you're using the original board (not one of the newer MK1840/41-based ones).  Unless you rescaled the raw ADC value to match the response of the TC amp on your clone, it would have overheated. IDK what board you have, but I mentioned this in a blurb about the D06 board: https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1400946/#msg1400946 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1400946/#msg1400946), and I know there are other scaling factors for different clones posted here and there in this thread.

IDK if any of this conjecture is really accurate though.   Like I said, I don't know what you did in the mod or which clone species you have.  Really, at this point, this thread kind of needs a summary of all the different variants and their mappings/scalings.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on January 23, 2018, 11:57:40 pm
maybe if the triac is on too long, it cooks and shorts out.
overheating was the original problem on the pump-in-base models, the triac had no heatsink!

i'm getting ideas now, maybe a bigger heatsink or replacing the triac with an SSR bolted to the case!
that could solve the mains-isolation issue AND add zero-crossing switching.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: texaspyro on January 24, 2018, 12:11:27 am
The Pace desoldering stations over-drive the motor when you first press the vacuum switch and then decrease the pump voltage... they call it "Snap Vac".   It works really well to get a clean and thorough un-joint.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on January 24, 2018, 01:15:38 am
maybe if the triac is on too long, it cooks and shorts out.
overheating was the original problem on the pump-in-base models, the triac had no heatsink!

i'm getting ideas now, maybe a bigger heatsink or replacing the triac with an SSR bolted to the case!
that could solve the mains-isolation issue AND add zero-crossing switching.

That's kind of why I said I doubt that the triac could be caused to fail alone.  I assumed all of the clones had heat sinks on the triac.  Under that assumption, I'm pretty sure you'd end up with damage to the heater before the triac had been on for long enough to overheat.  If it doesn't have a heatsink, then I suppose that's a potential problem too.

If I were out to upgrade that, I might just use a bigger heat sink, or just switch to a non-insulated variant (so long as the heat sink has clearance and isn't connected to anything).  Since we're talking about a cheap ebay soldering tool, I'm assuming nobody would buy a Crydom for it.  Buying an ebay SSR to replace the triac/opto would just be inviting more problems, since they're the exact same counterfeit BTAxx insulated-tab triacs inside those SSR's, and you'd only be adding more thermal interfaces to the heat path.  Also, a bunch of them have input circuitry that's incapable of reliable triggering unless they're driven with >5v anyway.
http://epicbeardquest.blogspot.com/2014/10/how-to-destroy-fake-fotek-ssr.html (http://epicbeardquest.blogspot.com/2014/10/how-to-destroy-fake-fotek-ssr.html)

Changing to an inexpensive SSR wouldn't add any more isolation or ZC to the system.  All the board schematics I've seen use the MOC3041 opto, which implements the ZC functionality.  Similarly, all the schematics show the use of a BTAxx triac, which is an insulated-tab variety.  Considering that the inexpensive SSR's use the same parts, you wouldn't be getting any different isolation.  If you meant that it'd solve the isolation problem by allowing you to move all the mains-connected stuff from the PCB, I suppose that might be true.

At this point, we're basically guessing without more information.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kulla on January 24, 2018, 02:40:48 am
Tbh, I didn't do anything else than replacing controller with modded one, no fan modification, no cutted traces or anything like that. I have tested 3 different mod boards, all with the same result, heater overheating and as it happens with the original controller I know it's not mod related.

You have right about heater and triac, I had spare heater as the first one melted burning mica paper in the process and blowing the fuse when it created short. All that in very short time, before I could even react. So now the heater inside is a new one, with new mica paper as isolation and it's the same thing.

I will have to trace whole board and see what is the issue, as triac is obviously geting logic gate open. I'll put the better picture of the board later.

Tnx for help, appreciate it.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on January 24, 2018, 01:17:17 pm
Tbh, I didn't do anything else than replacing controller with modded one, no fan modification, no cutted traces or anything like that. I have tested 3 different mod boards, all with the same result, heater overheating and as it happens with the original controller I know it's not mod related.

You have right about heater and triac, I had spare heater as the first one melted burning mica paper in the process and blowing the fuse when it created short. All that in very short time, before I could even react. So now the heater inside is a new one, with new mica paper as isolation and it's the same thing.

I will have to trace whole board and see what is the issue, as triac is obviously geting logic gate open. I'll put the better picture of the board later.

Tnx for help, appreciate it.

Okay, so it's a D06 board.  I'm assuming the picture shows the original MCU reinstalled.  You say the triac is getting logic gate open; you mean the MCU is turning off the LV side of the optocoupler?  Did you verify that the triac is/isn't conducting?  I'd probably just start with an unpowered continuity test of the heater circuit to make sure everything is sane first (triac open, optocoupler output open, nothing shorted to earth). 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on January 31, 2018, 10:20:11 pm
On a slightly different note, I wonder if anyone has considered replacing the handpiece cable on their 858D.  The cable on mine was only about 30" long, making it impossible for me to swap hands or use a stand.  The PVC jacketing was stiff and always retained the kinks and folds from packaging despite my attempts to straighten it with a heat gun.  The part that unsettled me is that the conductors appear to be 24AWG, even the heater and ground conductors.  I don't know if the other clones are similar (short cable, small wire), but I wouldn't be surprised if it were yet another 'feature' of my particularly crappy clone. 

Of course, trying to buy small quantities of multiconductor cable isn't going to be easy or cheap, especially if you want mixed conductors or a more flexible jacket.  I opted to make my own cable.  I kind of doubt that anyone is going to repeat this, but I figured I'd throw this in with all the other mod info. 

The materials:

The method:

The resulting cable is supple and lays flat.  I included an extra pair of smaller conductors in case I wanted to do something in the future with airflow measurement or something ridiculous.  In retrospect, I probably could have fit another extra pair in the tubing.  The new cable is thicker, but I was able to reuse the panel bushing.  I did use some adhesive to prevent the stretchy silicone from being able to worm its way out of its restraints at either end. 

This is the whole thing reassembled.  Included is the original cable to show the wire size (see green conductor).

(http://funkyimg.com/i/2BPcX.jpg) (http://funkyimg.com/i/2BPcZ.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on January 31, 2018, 11:00:58 pm
Nice job, DGM. Yeah, a little larger but pretty close, and it lays nice and smooth.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kelchm on February 01, 2018, 06:04:12 am
With the D06 board, are there any readily available PCBs I can order from OSHPark or elsewhere to at least give me an ISP header?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 01, 2018, 07:26:42 am
With the D06 board, are there any readily available PCBs I can order from OSHPark or elsewhere to at least give me an ISP header?

I don't know whether there are such boards already shared on OSH Park's site or not.  I know there's a lot of ambiguity in the conversations throughout this thread about what's compatible with different board versions.  I touch on that at the beginning of a post a while back: https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1400946/#msg1400946 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1400946/#msg1400946) and I gave a link to an even older post from floobydust in which he gives the design package for his adapter for the D06 board.  I imagine those files could be used to have the board printed where ever you wanted. 

As to what you actually want, the wording makes it sound like maybe you only want the header to access the MK184x.  I don't know if that's easily possible, but I'm pretty sure nobody has come forth with such a board.  I think someone did for the original AVR based boards, but not the newer ones.  If you just want to do the typical AVR mod, but you want to be sure to have the ISP header, floobydust's board has one.  I'm pretty sure that the adapter I posted for the D06 is the only one in the thread that has no ISP header.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 05, 2018, 01:04:10 am
I got sick of all the ambiguity and apparent contradictions, so I spent yesterday transcribing gerbers and going through this entire thread to compile a table of known boards and adapters.  I'm only interested in the non-AVR clones (20-pin Samsung/Zilog/whatever MCU).  I have identified 7 unique board layouts and 12 adapters. Everything is in a spreadsheet with an index of reference links to posts throughout the thread wherein board examples/info are shared. Links and info are provided for all shared boards on OSH Park's site. Here is a preview of the first sheet.  I may keep updating this spreadsheet in the future.  Don't assume that the preview picture stays up to date.

EDIT: I added a section for references to AVR-based boards as well.  (no mappings yet)

(http://funkyimg.com/i/2Cfbs.png) (http://funkyimg.com/i/2Cfbv.png)

There are many points of uncertainty that come with the informality of a forum.  A lot of individual users never respond with mention of mod success or failure.  A lot of photos have board names or rev dates obscured.  There is at least one seemingly contradictory mapping given for the 858D04 board (poorman), and there is a unique mapping given for a Yihua board variant (YH858D V?), but the actual version number is never stated clearly. I've tried to make some notes to keep track of these issues.

Disregarding the one oddball D04 mapping, the 858D04 and 858D06 boards are not the same.  They differ in that the enable lines for digit 1 and digit 3 are swapped. Some D06 owners seem to be using (or were attempting to use) adapters for the D04, but nobody ever mentions this mismatch.  I'm going to assume people are just changing the pin assignments in the code.


After dredging through all this confusing ambiguity, there's one last thing I'm compelled to say. Maybe it's a bit late in this thread for a PSA, but I'm going to be a jerk and put it in giant text anyway because it drove me nuts:
STOP IDENTIFYING THE BOARD BY REFERRING TO THE MCU NUMBER
Asking "my board has a MK1840, will it work with the adapter for the MK1841?" is like asking "my car has a V6 engine.  will the windshield wipers from a V8 car fit?".  It's absurd.

If your board has any 20-pin non-AVR MCU on it, don't even bother reading the part number.  That number is of absolutely no use.  These are configurable parts; there's no justification to assume that identical parts have the same pin assignments in their firmware.  That's all moot anyway, since you're going to be replacing it. Unless you want to change a bunch of pin assignments in the new firmware, what matters is the actual PCB layout.

For example, these mutually incompatible boards were found with the same MCU marking:
YH858D V2 with S3F94C4EZZ (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg781268/#msg781268)
YH858D V7 with S3F94C4EZZ (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg873591/#msg873591)
youde 858DV4 with S3F94C4EZZ (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1348862/#msg1348862)
AF858D with S3F94C4EZZ (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1359418/#msg1359418)

and these compatible boards were found with different MCU markings:
858D06 with MK1840D3 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1349350/#msg1349350)
858D06 with MK1841D3 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1157534/#msg1157534)
858D06 with blank MCU (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1326589/#msg1326589)

Refer to your board by whatever name and revision is printed on the silkscreen, or any other attribute that unambiguously identifies the board.  Even better would be to use multiple pieces of information and/or take a good photo. 

If you run across a board that has no prior examples known, the only way to determine the pin mapping is to transcribe the board. The MCU number will not tell you.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on February 05, 2018, 02:54:22 am
Cool reference, DGM. Thanks for putting that together.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 05, 2018, 05:39:18 am
Cool reference, DGM. Thanks for putting that together.

yw
just so you know; i might keep updating the file frequently for the next day or until i stop obsessing over minutia.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: cowana on February 05, 2018, 09:48:24 am
Thanks DGM, that's an excellent summary this thread has been lacking!

The important bit you're missing from me is the name of the 'unknown name board' - as shown in the attached picture, it is marked AF858D, and dated 20161212.

In case you want to add it, the details of the adapter board I developed for this PCB are below:

The ADC scaling factor for this board when used with a 2.5v reference was 2.4 in my case.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 05, 2018, 10:27:38 am
Thanks DGM, that's an excellent summary this thread has been lacking!

The important bit you're missing from me is the name of the 'unknown name board' - as shown in the attached picture, it is marked AF858D, and dated 20161212.

In case you want to add it, the details of the adapter board I developed for this PCB are below:
  • Schematic: attached
  • PCB: https://oshpark.com/shared_projects/NQGwEEH0 (https://oshpark.com/shared_projects/NQGwEEH0)
  • Features:
    • TL431 reference
    • Vfan and current sense support
    • ISP header
    • MLF-32 ATmega package

The ADC scaling factor for this board when used with a 2.5v reference was 2.4 in my case.

holy shit!  you knew just what i wanted!  your board was a big uncomfortable mystery, and i was contemplating PM'ing you about it.  as old as this thread is, i was reluctant to bother people about old posts.  thanks.
I'll probably get this into the next update later on tonight or tomorrow (or whenever i'm sober enough to see straight again). 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on February 06, 2018, 05:40:33 am
(or whenever i'm sober enough to see straight again)

Yes, please. ;D
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 08, 2018, 04:36:37 pm
In trying to sort out conflicting information, I took a closer look at Jetiman's photos to try and transcribe what I could.
https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg873591/#msg873591 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg873591/#msg873591)

I've updated the index with my tentative conclusions, but as an aside, I noticed one thing that I thought was curious.  There appears to be no resistor on the input side of the optotriac.  All the resistors over on that edge of the board are for the calibration network, the pushbuttons, and the TC amplifier input pullup.  The LED is being driven straight from 5v and being pulled to ground with a transistor.  At ~2x its maximum allowable input current, I have to wonder how long that'll last. 

Just thought I'd throw that out there.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Miwer on February 10, 2018, 07:20:43 pm
There are many points of uncertainty that come with the informality of a forum.  A lot of individual users never respond with mention of mod success or failure. 

Hi DGM,

That's a nice overview you created there, thank you for that.
I am in fact working on an adapter board for the 858D V1.0 board (or the "Hylko" branded 858D, as I tend to call it). I have even made the first attempt with a DIY single side prototype. However I'm having problems getting the temperatures and fan speed reading correct, and I'd like to have a working version without firmware modifications if possible, though I'm not sure I can avoid it. Also the spare time I can spend on this project is limited. But when I get something going, I'll be sure to post it here.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 10, 2018, 09:02:20 pm
That's a nice overview you created there, thank you for that.
I am in fact working on an adapter board for the 858D V1.0 board (or the "Hylko" branded 858D, as I tend to call it). I have even made the first attempt with a DIY single side prototype. However I'm having problems getting the temperatures and fan speed reading correct, and I'd like to have a working version without firmware modifications if possible, though I'm not sure I can avoid it. Also the spare time I can spend on this project is limited. But when I get something going, I'll be sure to post it here.

Yeah, I'm thinking all the 20-pin clones are going to at least need ADC scalings and min/max limits changed in the firmware at the least.  Then again, I can't be sure of that.
Whenever you get something that works, I'll add it to the index. 

I'd decided to finish an aborted adapter for my "youde 858D4" board, and I kind of started throwing together adapter layouts for the other orphan boards.  Anything I put together for boards I don't have is liable to have bugs in it though.  I figured that editing a complete but unverified project file would be more convenient than starting from scratch.  Of course, it'd be better to have a known working layout, so I'd like to see whatever you come up with.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 11, 2018, 11:04:53 am
Okay, two things:  In all the disambiguation of the Yihua/WEP boards (major thanks to bitwelder), I'd started keeping notes regarding what board modifications certain boards would need.  I figured I might as well review what I have, since it seems fairly well nailed down at this point.  Also, this got me thinking that I should finish the half-baked "youde 858DV4" adapter I had started to lay out.  In the end, I came up with adapter layouts for the other orphan boards.  The board/adapter index (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1418224/#msg1418224) has been updated accordingly.  Barring any errors in my work, this should tie up most of the loose ends in this thread.

REQUIRED BOARD MODIFICATIONS
Certain boards require modification to be adaptable without major firmware changes.  While the necessity for a given mod is described, the methods given are not the only possible way to remedy the problems.  These are simply the methods implied by the specified adapter concept.

General
The firmware expects some fan status input from all boards; these modifications are not board-specific.  Each method will require some configuration of the code to select the sensing method and define/tailor the expected min/max ADC limits. 

Fan voltage sensing can simply be done at the node connected to the positive pin on the fan connector (denoted by A).  Others have recommended to connect to the positive-most end of the pot (B), though I don't see the advantage.  Where ever the sensing is done, ensure that the selected divider resistors keep the ADC voltage within safe limits.  Current sensing is done by adding a shunt resistor in the ground path of the fan and measuring voltage across it (C).   Fan speed sensing requires extra circuitry to detect commutation noise, and is not covered here. 

(http://funkyimg.com/i/2Cfaq.png)

YH858D V2, V6 (Yihua/WEP)
These boards use pins 17 & 18 for both button sensing and display element drive.  The mod required by the existing adapters (wguibas' blue adapter) is as follows:
- Traces between pins 17, 18 and the display should be cut.
- Wire should be routed between display pins 7, 10 and the adapter board.
User wguibas has posted instructions (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg811647/#msg811647) and images for adapting this board.

Additional mods: It may also be prudent to provide the TIP122 with a heat sink to keep Tj within allowable limits

YH858D V7,V8 (Yihua/WEP)
These boards use pins 12 & 13 for both button sensing and display element drive.  The mod required by the current adapter (DGM type 3) is as follows:
- Traces between pins 12, 13 and the switch resistors R24, R25 should be cut (or the resistors should be removed).
- Traces between pins 15, 16 and the unused EEPROM should be cut (or the eeprom removed).
- Wires should be routed between pins 15, 16 and the ungrounded switch nodes.
With internal pullups, switches should work as expected, and no extra flying wires to the adapter are needed.

(http://funkyimg.com/i/2Cf8w.png)

Additional mods: The optotriac appears to have no current limiting resistor.  This would put its operating current over 100mA. These inputs are only rated to about 60mA.  Consider placing a resistor here.

youde 858DV4 (ZENY, etc)
This board uses a single ADC input to sense both buttons in a manner which prohibits the use of button chords as required by the new firmware. The original post (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1348862/#msg1348862) describes the physical circuit layout and a potential mod to allow this ADC-sensing method to support chords. The current adapter (DGM type 2) uses a more conventional sensing method and requires the following modifications:
- Replace R21 with a jumper
- Remove EEPROM (or cut trace)
- Cut trace to isolate DN button from pin 11 node
- Add jumper from DN button to pin 18 or 19 (DGM adapter assumes 18)
This leaves 10k external pullup resistors in place for both buttons

(http://funkyimg.com/i/2Cf8n.png)

Additional mods: TIP122 has no heat sink.  At ~2.5W dissipation, this needs a heat sink to keep Tj within allowable limits.

ADAPTERS FOR ORPHAN BOARDS
As I've stated before, these layouts come with caveats.  These are laid out with a mind toward hand etching/drilling (wider traces, no vias under parts, no attention paid to silkscreen, etc).  They may require changes to meet what a board house would want; at the very least, you'd want to clean up the silkscreen layers if you have someone else print it.  Also, any layout I throw together without being able to test it on the appropriate board is liable to have bugs in it.  I offer these on the assumption that editing a complete but unverified project file would be more convenient than starting from scratch. Just do your due diligence and verify that it matches your actual board.  If there's an error in the adapter or the board map from which I derived it, let me know. 

I went ahead and shoehorned an ISP header on them since I'm probably the only person that doesn't want one.
The YOUDE adapter has a TQFP version, but there's really no point to using it unless those are the only parts you have.  The extra vias would only make it more difficult to drill and assemble.
I tried to make sure the adapters clear obstacles on the board, but some things (transistors, small caps) might need to be laid down depending on how tall your headers are.
These are all Eagle project files.

YOUDE 858DV4 adapter
(http://funkyimg.com/i/2Cfdp.png) (http://funkyimg.com/i/2Cf8z.png)

YH858D V7-V8 adapter
(http://funkyimg.com/i/2Cfdn.png) (http://funkyimg.com/i/2Cf8A.png)

HD858D V1.0 (Hyiko) adapter
(http://funkyimg.com/i/2Cfdj.png) (http://funkyimg.com/i/2Cf8B.png)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anishkgt on February 12, 2018, 06:45:51 pm
Any chances for the Atten 858D+. I just bought one from eBay and that seems to be a faulty one. Was hoping it would be fixed by the custom firmware mentioned in this thread but uploading it did not help, no display just the blower switches ON.

I have the PIC here in the repair thread (https://www.eevblog.com/forum/repair/new-atten-858d-received-with-faulty-display/msg1423943/#msg1423943 (https://www.eevblog.com/forum/repair/new-atten-858d-received-with-faulty-display/msg1423943/#msg1423943)) and the PCB looks almost the same.

(https://uploads.tapatalk-cdn.com/20180211/bd7ee5728ec38e2dd698e32572f206e4.jpg)
(https://uploads.tapatalk-cdn.com/20180211/f26a0301897998530e7ae7fa7da5e30e.jpg)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 12, 2018, 09:24:41 pm
Any chances for the Atten 858D+. I just bought one from eBay and that seems to be a faulty one. Was hoping it would be fixed by the custom firmware mentioned in this thread but uploading it did not help, no display just the blower switches ON.

If you think the display is faulty, pull the MCU and directly test the display in place. 
Just supply 5v to the CA pins (through the anode resistors!) and probe ground to each of the segment buses. 
Make sure it's the display before messing with trying to replace it. 
It's entirely possible to have damaged I/O sections on a MCU.
I've seen that more often than I've ever seen a dud display.

edit: if you end up having to replace it, look for something similar to the MCD4301Bx displays
10mm/0.4" char height, 12.7mm row spacing, common anode
there are probably a zillion chinese manufacturers with similar naming schemes
https://duckduckgo.com/?q=4031bs&ia=web (https://duckduckgo.com/?q=4031bs&ia=web)
so long as the row spacing and pinout match
an ebay listing:
https://www.ebay.com/itm/0-28-0-36-0-4-0-56-0-8-Red-led-Display-7-Segment-Common-Cathode-Anode-1-4-Digit/253205048535?hash=item3af4326cd7:m:mkJWKwh1lzXl37aWlZDIHDw (https://www.ebay.com/itm/0-28-0-36-0-4-0-56-0-8-Red-led-Display-7-Segment-Common-Cathode-Anode-1-4-Digit/253205048535?hash=item3af4326cd7:m:mkJWKwh1lzXl37aWlZDIHDw)

edit again: if you're using that schematic for reference, the pin numbers are wrong there.
pin 6 is unused or clipped off, but it still counts:
1 e
2 d
3 DP
4 c
5 g
6 NC
7 b
8 CA3
9 CA2
10 f
11 a
12 CA1
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anishkgt on February 12, 2018, 11:22:46 pm
What about the firmware. I will be sending it back if the seller would take it. Else I could repair the faulty display. Oh and if it’s MCU then I hope the seller takes it back and without the firmware the unit is just garbage unless I could figure out a way to upload a custom firmware on Atmega328P.

Is there a custom firmware for this model ?


Www.Georgehobby.wordpress.com

Equipments: DSO104z, Hakko FX888D, Brymen BM869s
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 12, 2018, 11:35:09 pm
i don't know about the atten units, but iif it's AVR-based, t's probably not too far from working with the firmware that's the topic of the thread. 
you'd just have to make sure the pin assignments and ADC scalings match. 
https://github.com/madworm/Youyue-858D-plus/blob/master/youyue858d.h

I've really only been paying attention to the non-AVR clones, so idk off the top of my head if there are any outstanding issues with the atten that would require code modification or otherwise make it a problem.
Maybe someone else knows.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: anishkgt on February 12, 2018, 11:51:58 pm
I've downloaded the firmware by Madworm on this forum. (https://github.com/madworm/Youyue-858D-plus (https://github.com/madworm/Youyue-858D-plus)) and not sure if i should burn the fuses ? i had uploaded the sketch via arduino but that did nothing. For the display i had been looking at these (https://www.ebay.com/itm/Digital-Tube-LED-Display-Red-7-Segment-Module-Common-Anode-Cathode-Display/272590524676?ssPageName=STRK%3AMEBIDX%3AIT&var=571707668128&_trksid=p2055119.m1438.l2649 (https://www.ebay.com/itm/Digital-Tube-LED-Display-Red-7-Segment-Module-Common-Anode-Cathode-Display/272590524676?ssPageName=STRK%3AMEBIDX%3AIT&var=571707668128&_trksid=p2055119.m1438.l2649))
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: knotlogic on February 13, 2018, 09:01:23 am
On a slightly different note, I wonder if anyone has considered replacing the handpiece cable on their 858D.  The cable on mine was only about 30" long, making it impossible for me to swap hands or use a stand.  The PVC jacketing was stiff and always retained the kinks and folds from packaging despite my attempts to straighten it with a heat gun.  The part that unsettled me is that the conductors appear to be 24AWG, even the heater and ground conductors.  I don't know if the other clones are similar (short cable, small wire), but I wouldn't be surprised if it were yet another 'feature' of my particularly crappy clone. 


I've thought about it, but had no idea where to get a suitable multicore replacement.  I'll probably try replicating what you did at some point.  Thanks!

What did you think of the quality of the eBay silicone wire?  I'm looking at getting some, but my concern is finding a quality source that sells in small (eg by the foot/meter) quantities.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 14, 2018, 12:38:07 pm
I'm kind of thinking twice about my choice of using a silicone jacket.  It's flexible and heat-resistant and all, but it has such a high coefficient of friction against everything.  It tends to drag other things off the bench.  It would probably be a lot easier to use/assemble if you used some braided wire loom instead, but you'd give up the heat resistance. 

The ebay silicone wire is like any wire on ebay.  You have to gamble.  You might get PVC insulated wire; you might get steel wire.  The last few times I've used this source, but nothing is sure to last forever:
https://www.ebay.com/itm/Flexible-Stranded-Silicone-Rubber-Cable-28-26-24-22-20-18-16-14-12-10-8AWG-BS1/263048836899?ssPageName=STRK%3AMEBIDX%3AIT&var=562051445968&_trksid=p2057872.m2749.l2649 (https://www.ebay.com/itm/Flexible-Stranded-Silicone-Rubber-Cable-28-26-24-22-20-18-16-14-12-10-8AWG-BS1/263048836899?ssPageName=STRK%3AMEBIDX%3AIT&var=562051445968&_trksid=p2057872.m2749.l2649)
The wire there seems to be okay.  As far as only ordering what you need, I've found that this stuff is great for making jumpers and test leads anyway, so the excess is always welcome as far as I'm concerned.

This was the tubing:
https://www.ebay.com/itm/2M-Clear-Translucent-Food-Grade-Silicone-Tubing-Milk-Hose-Pipe-6x8mm-Q7M4/122613669781?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649 (https://www.ebay.com/itm/2M-Clear-Translucent-Food-Grade-Silicone-Tubing-Milk-Hose-Pipe-6x8mm-Q7M4/122613669781?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649)
But there's also this stuff I was thinking about:
https://www.ebay.com/itm/ALL-SIZES-1-FT-100-FT-Black-Expandable-Wire-Cable-Sleeving-Braided-Tubing-LOT/222303786890?hash=item33c256978a:m:m15OUGA3MPjLlj3OHeEVxkQ:sc:USPSFirstClass!62272!US!-1 (https://www.ebay.com/itm/ALL-SIZES-1-FT-100-FT-Black-Expandable-Wire-Cable-Sleeving-Braided-Tubing-LOT/222303786890?hash=item33c256978a:m:m15OUGA3MPjLlj3OHeEVxkQ:sc:USPSFirstClass!62272!US!-1)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 14, 2018, 06:11:31 pm
I'm sure there's some information about fuse settings somewhere in the past 600+ posts in this thread.  I'm only going to do so much to play encyclopedia here.
Off the top of my head, I remember this post:
https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1320798/?topicseen#msg1320798 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1320798/?topicseen#msg1320798)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: knotlogic on February 18, 2018, 02:22:11 pm
I'm kind of thinking twice about my choice of using a silicone jacket.  It's flexible and heat-resistant and all, but it has such a high coefficient of friction against everything.  It tends to drag other things off the bench.  It would probably be a lot easier to use/assemble if you used some braided wire loom instead, but you'd give up the heat resistance. 


Guess it's a trade off?  I have a Metcal, and I think the lead on the handpiece is silicone.  It is rather grippy, but not so much that it's awkward to use.

If you're considering braided sleeving, you could look at Techflex.  They have a lot of types, and I got some stuff that's very soft and supple. (Can't remember if it's monofilament or multifilament or something else.)  In contrast I picked up some other stuff from a audio parts seller, and it was very stiff.

This is the eBay store I got my Techflex from (no relation ;)):

http://stores.ebay.com/FURRYLETTERS?_rdc=1 (http://stores.ebay.com/FURRYLETTERS?_rdc=1)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitwelder on February 18, 2018, 04:02:54 pm
All in all, why there are so many h/w variations of this desoldering tool?
I tried to follow the design of the various versions, but I did not notice a clear 'evolution' path, neither in features nor in BOM count reduction.
If there is no advantage why not just copy the project as-is?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 18, 2018, 05:45:50 pm
Guess it's a trade off?  I have a Metcal, and I think the lead on the handpiece is silicone.  It is rather grippy, but not so much that it's awkward to use.

I think you're right in that regard; a lot of the other silicone jacketed tool leads I've used aren't this bad.  Some are even quite slippery.  The tubing I got (and really all the silicone tubing I've ever used) is a lot grippier, especially against itself and even the other silicone leads which aren't as grippy themselves.  I don't know if there are special formulation or finishing differences between the materials, but I haven't had high expectations of being able to find another tubing product that had significantly different surface characteristics.  It's not exactly a figure of merit for the application as a tubing.  Of course, I didn't consider buying anything that was significantly more expensive, so I maybe I'm just missing something.  I suppose one could just order some shorter bits of different tubing as samples.

I suppose an intermediate solution would be to use the silicone jacket for flexibility and density, and just put some sleeving over it in the area where it tends to rub on the other things.

EDIT: dammit.  I looked at that the sheen of that techflex, and I just realized that I actually have almost 500' of hollow-braided nylon support strand.  That's not exactly intended as sleeving, but it's just the right size and I bet it would've worked just fine. 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 18, 2018, 06:31:48 pm
All in all, why there are so many h/w variations of this desoldering tool?
I tried to follow the design of the various versions, but I did not notice a clear 'evolution' path, neither in features nor in BOM count reduction.
If there is no advantage why not just copy the project as-is?

Idk really.  I  can see there are similarities within a given manufacturer's designs (like the Yihua/WEP boards), and it seems some of the other boards are also manufacturer/brand specific (the Hyiko), but I don't know the driving motive to redesign.  I kind of figure everyone would just copy what's existing, and you'd see varied evolution from one source with variation dependent on available parts, cost, etc.  Maybe certain outfits do take some interest in at least trying to do their own design work.  Still, a progression of copy/paste designs may well have been able to yield something better by now.

I can see why the YH858DVx  and the YOUDE boards use odd button sensing; for some reason they decided to use SDA/SCK lines as single-duty and ran out of I/O pins.  The Yihua is based on early 20-pin clone designs, so maybe nobody else had done it differently at the time.  I could see why someone might redesign the TC amp to something based on the LM358 instead of the original part, but then I can't see why someone would just randomly adjust the resistor values in the fan driver circuit.  I could see why someone would do a board redesign to make use of cheap smt chip parts, and I could see why they might omit the recurring cost of isolation routing, but why not spend an extra ten minutes to clean up the spacing in the layout itself?   I can even see why they used the handpiece connector that they did.  Those radio connectors are ubiquitous and absurdly cheap.  I don't consider the connector to be anything other than a means to conveniently replace the handpiece.  Consulting common sense over standards, it seems no more a hazard than a lamp socket.  They'll roll with that.

That said, I imagine there are a lot of the unfortunately typical conflicts of interest at play in the timeline of a given design that might drive apparently bad design choices just as much as mere inexperience or oversight.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on February 18, 2018, 11:30:31 pm
All in all, why there are so many h/w variations of this desoldering tool?
I tried to follow the design of the various versions, but I did not notice a clear 'evolution' path, neither in features nor in BOM count reduction.
If there is no advantage why not just copy the project as-is?

Perhaps it's not so much an actual advantage than a perceived advantage (or differentiation). "No, this is not a copy. It's our own design and 'better.' So, you should buy ours instead of that copycat version."
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on February 19, 2018, 01:37:03 am
Perhaps it's not so much an actual advantage than a perceived advantage (or differentiation). "No, this is not a copy. It's our own design and 'better.' So, you should buy ours instead of that copycat version."

I understand the pestilence of marketing and the importance of appearance over substance, but I still don't see that it explains the internals.  Sure, everyone has their own little badges on the outside, but considering the clones are pretty much identical externally, it seems a bit weak in terms of effort to differentiate appearances.  Nobody markets their particular clone based on differentiation of its internals, and yet there's more differences inside than outside.  It seems to me that everyone wants their product to look like some archetypal 858D.  In that sense, I'd say the internals differ since there's no need to make them maintain a common appearance if nobody sees them.

Then again, it's kind of curious that some do specify the microcontroller branding.  Still, that much might not even be an actual feature claim, but an attempt to avoid complaints from people that bought it expecting an AVR.  Who knows.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on March 10, 2018, 11:13:53 am
Over the development of these mods, there have been a handful of approaches to measuring the fan speed.  Though I don't know what the original Youyue firmware did with it, most of these seem aimed toward using the fan speed only as a safety interlock, but I'm pretty sure I recall at least a mention of actively adjusting PID parameters or otherwise adapting the control to the variable physical system (e.g. nozzle changes).  I'd like to know if there really is much desire to use the fan speed information in this way, or whether the standing assumption is that fan rpm is sufficient toward such a goal.

I ask because I'm fairly certain that the trivially measurable quantities (voltage, current, power, speed) aren't really appropriate as a proxy for mass flow information.  I'm also curious to know if nozzle changes and blocked inlet/outlet conditions are unambiguously detectable without more involved modification.

I suppose measuring anything more would require electrical access to the handpiece, but I've demonstrated that cable replacement isn't prohibitively difficult and may have practical benefits of its own.  I've been playing with the idea of a MAF sensor of sorts to directly detect the flow.  I would figure that flow data would better fill the role, whether for the purpose of a safety interlock or some part of heater control.  It all depends whether anyone would consider going to such lengths. I suppose it also depends whether my half-baked idea has any better practical accuracy than inferring mass flow from fan speed, but I shouldn't get ahead of myself.

So any thoughts?  Interlock only or active control adjustment?  Too much work for what it's worth?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on March 11, 2018, 11:51:32 pm
Fan speed is not monitored on the station.

For more precise temperature control it is of limited use, as your nozzle size and proximity to the PCB affect flow rate and these are unknowns to the firmware.
People wanting sub-degree accuracy I think it's unnecessary IMHO because the wand position is all over the place.

You could model the fan curve, looking at its datasheet and knowing RPM, to model mass flow but the nozzle size would be tough to infer. You could do a self-learn, and compare fan voltage and resulting RPM to estimate torque.

I reliably sensed fan speed via commutation-current (no need to access wand) in this post: https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1204635/#msg1204635 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1204635/#msg1204635)
But I found you need another MCU timer channel to get RPM, so I abandonded it as the AVR Mega328 would have to change to the newer '328PB (http://www.microchip.com/wwwproducts/en/ATmega328PB#documents) which has more timers.

Fan speed for safety, the original firmware does look at rate of temperature rise (slope), to infer if the fan is not working. If temp climbs too fast, you know the fan is pooched or blocked. This seems to work well enough.


Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on March 12, 2018, 12:37:32 pm
Well, as far as accuracy goes, so long as there's an I term in the control, flow information shouldn't have any impact on steady state accuracy.  If you meant that the board temp is immeasurable, yeah I wasn't trying to extrapolate surface temps based on flow or anything like that.   I was thinking mostly for adjusting dynamic response.   I'll accept that it's probably unnecessary, but that's kind of a theme here. 

I didn't notice that bit about temp slope sensing.  That would detect blocked inlet/outlet conditions, which is something that voltage/current/speed methods can't sense.  That actually seems entirely sufficient.  If the firmware can already safety-check using temp slope, and nobody is using the fan speed for dynamics, what's the point of sensing it at all?  Is this redundancy or just an artifact of prior methods that were abandoned?

I still hold that direct flow sensing could be done for the purpose of the aforementioned control parameter adjustment -- for whatever marginal benefit that might be.  I was kind of under the impression that tan speed was actually being used for something.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on March 12, 2018, 04:43:52 pm
maybe an external "calibration" sensor would be good,
you point the wand at it after changing nozzles or fan speed and the software uses it to create an offset for the original internal sensor???
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on March 13, 2018, 02:20:25 pm
I hadn't really thought of that approach.  It seems simple to implement, but it'd require explicit interaction to recal after speed/nozzle changes though.  I don't see an easy in-process method to extrapolate temperature beyond the nozzle.  Some hot air stations allow the thermocouple to be repositioned to minimize offset.  I've had the heater apart, but I don't think anyone here would be too willing to modify the heater to get an adjustable probe.

Myself, I'm not terribly interested in anything beyond the nozzle.  It's an arbitrary thermal system.  What matters are the temperature of immeasurable components that will heat at different rates.  I expect the station to just be a consistent and stable heat source; managing heat external to the tool is a matter of user experience and judgement -- or better equipment when required. 

I was thinking of using a compensated thermal anemometer as a mass flow sensor in the handpiece.  I was after optimizing control dynamics, but I don't know if mass flow information would be of any use in projecting temperature.  I don't really think so. 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: mjguisado on March 17, 2018, 09:30:56 am
Hi all, maybe the best approach is to have an external thermocouple measuring the temperature in the area that is being heated. This would provided to the PID algorithm the required feedback. And maybe it's could be directly connected to the input where the current thermocouple is connected in the different boards.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on March 17, 2018, 11:11:14 am
the *real* answer is to move the thermocouple into the nozzle, but i cant see any easy way to mechanically do that!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on March 18, 2018, 11:10:08 pm
Hi all, maybe the best approach is to have an external thermocouple measuring the temperature in the area that is being heated. This would provided to the PID algorithm the required feedback. And maybe it's could be directly connected to the input where the current thermocouple is connected in the different boards.

While using a secondary temp input to allow some sort of component/region temperature limiting might be nice, it might not be worth the setup unless you're doing something like a single large component. 
One thing for sure, you wouldn't want to replace the original TC input with a board mounted TC. If you did that, the thing would burn the heater out the moment you moved it away from the board.  I suppose maybe you could switch to an external TC if you had everything in a fixture or something, but you'd have to be mindful to not let it lose feedback.

As far as adjusting the TC position further into the nozzle, It might be possible if you were to machine a clamp bushing to hold a sleeved TC into the end of the heater shell.  Of course, you'd have to probably grind out the cement that holds the original TC into the heater support. Seems like a lot of work for a minor gain.  Using a sleeved thermocouple means you'll probably have slower response time too.  I know I said mass flow probably wouldn't be very good for projecting temperature estimates beyond the position of the stock TC, but it'd probably require less work to attempt ... at least less of the kind of work most people are going to be reluctant to try.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: LeonR on April 11, 2018, 12:48:44 pm
This topic is quite big and I still couldn't figure one thing out: Does the "maker" (or labeller) of those 858 stations make any difference quality-wise? I'm looking for a hot air station with basic features but I'd love to have it in a good working condition outta the box without messing with it (be it inverted cables, no grounding, inadequate internal wiring, etc). From the myriad of options, does any of them stand above?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on April 12, 2018, 03:31:16 pm
Generally speaking, it's hard to say because they tend to change over time. Perhaps someone who had bought one recently and had a good experience can post which one they got and from which vendor. That'd at least increase your odds of getting the same outcome.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on April 13, 2018, 01:37:19 am
This topic is quite big and I still couldn't figure one thing out: Does the "maker" (or labeller) of those 858 stations make any difference quality-wise? I'm looking for a hot air station with basic features but I'd love to have it in a good working condition outta the box without messing with it (be it inverted cables, no grounding, inadequate internal wiring, etc). From the myriad of options, does any of them stand above?

I don't know about one that stands above, but I can think of one that stands below...

As far as I recall, the chassis wiring flaws are basically universal among brands; expect to at least safety check anything you buy if you're the critical type.  As far as firmware and quality of the PCB assembly, any model based on the 858D06 board (e.g. newer YOUYUE 858D+, UVISTAR 858D) are probably among the better & more common sorts.  I still stand by my declaration that the Zeny branded units are essentially defective.  I don't know how much variation there really is in handpiece assembly quality.  I'm willing to bet those are basically all the same. 

bitseeker is pretty much right.  All this information comes with no assurances that the manufacturers won't change something.  For my own research, I didn't consider branding to be really meaningful.  Ultimately it's the internals that are the deciding factor.  It's the relationship between observable attributes and useful attributes that is impermanent, so be careful. 

As far as trying to navigate this giant mess of a thread, the spreadsheet in this post (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1418224/#msg1418224) has an index of all the posts used as examples of each board type.  This way, you can find photos of internals of all the different kinds and make your own choice.   The index is as comprehensive as I could manage, and includes all board photos I could find on the web.  Some of the references do mention where they bought their unit, so that might help too.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: brainwash on April 15, 2018, 11:58:25 pm
Just to be clear on newbies (myself being one), absolute temperature control means nothing. People with experience on one tool can easily do BGA or SDRAM without breaking a sweat. They are ALL a few degrees off, with overshoot, undershoot and other problems. But you can see all the professionals on YouTube doing an iPhone chip exchange/upgrade without any issues.
The key is practice and knowing your tool, while avoiding insurmountable challenges (for example a PS3 GPU).
Saying this as I've been able to work ok for a few years with an un-modded unit, recently got a slightly better one as a present. The learning curve is almost as day zero, regardless of feature.

My point is: practice from day 1, so you can be secure when you actually need to use it for something. +/- 15C will hardly make a difference compared to the way you handle your parts and wand.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on April 16, 2018, 06:47:31 am
Just to be clear on newbies (myself being one), absolute temperature control means nothing.
...
My point is: practice from day 1, so you can be secure when you actually need to use it for something. +/- 15C will hardly make a difference compared to the way you handle your parts and wand.

Yeah, pretty much.  Practice makes up for a lot.  Disassemble and reassemble an old motherboard a few times to get comfortable with it.  A few mm distance will change target temperature just as much as a minor calibration error would.  A few degrees offset or in overshoot isn't even really noticeable in most cases.  A few hundred degrees like my Zeny? That's something to avoid from the outset. 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: a.ekholm on April 26, 2018, 06:07:37 am
Hi! I'm interested in the Atten hot air station and stumbeld uppon this thread and tryed to get a Picture of this soldering station is worth the money or if there is better soldering station for the Money with working PID? If the atten or simular is the key, can someone Point to "the right one" in EU so i could buy the right stuff.. Thanks /Andreas
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on April 28, 2018, 10:38:46 am
If you're asking about an Atten specifically, I'm going to assume you're doing so because you saw an old review of one.   As far as I recall, and someone can correct me if I'm wrong, the Atten units like you see reviewed on EEVBlog are not what you'll find currently.  Those units from 2010-2011 were based around an AVR microcontroller.  The last Attens I have record of internals are from 2016.  Those newer ones are based on the 858D04 board with a different microcontroller.  I don't know if they're still shipping with that board or whether they're shipping with the newer 858D06 board.  Then again, maybe these newer examples aren't legit Atten units.

If my assumptions are correct, a current Atten is likely going to be identical internally to the Youyue, Uvistar & others.  Among the 858D clones, it's probably going to be one of the better ones, but they all have the same problems you'll need to be aware of.  Refer to my comments a few posts back.  As far as picking "the right one", that's up to you.  I'm just commenting to make sure your expectations aren't being based entirely on old information. 

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on April 28, 2018, 12:38:02 pm
I went to try finding newer examples of Atten internals and I found something interesting.  There appears to be a new kid on the block -- at least new to me.  The most interesting part is that it's an AVR-based design and the firmware behavior appears similar to the older Atten units.  The board is entirely different than anything else in this thread.  Because the panel layout is different, it should be easy to identify, and there's less uncertainty of the board type within.  None of the other boards would even fit.

https://www.youtube.com/watch?v=Iv4jJSU6D8w (https://www.youtube.com/watch?v=Iv4jJSU6D8w)
https://www.youtube.com/watch?v=jBCJTLOYdVM (https://www.youtube.com/watch?v=jBCJTLOYdVM)

aliexpress turns up results for "mypovos 858d"

I had avoided looking for references on YT because it's basically impossible to do it effectively on a <1Mbit network connection.  It's incredibly slow to skim videos, and at 240p, you can't see board marks or anything relevant.  I may see if there are other bits to add to the index, but don't count on it.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: HotAir on May 30, 2018, 07:44:14 am
Hello!
Got this one today, attached photos of PCB, as DGM said above, it's AVR based, and also it looks like have a different heater element.

I don't have a thermal couple to check how accurate is, but I had seen one comment in Aliexpress, some one says it's accurate, and as you can see it does not have a calibration.

Bought it for about 30€, I was able to take the Youyue 858D+ for the same money. So what do you think, it is have advantages to taking this instead of Youyue 858D+?
In case if it will be inaccurate, the custom firmware can be modified and loaded for it also, right?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gabse on June 01, 2018, 07:32:50 pm
 Hey Guys,
I have a hacked 858D station an I am pretty happy with it. The station needs quite long to cool down if the fan speed limited (specially with the small nozzle), so I worked out a hack to make the speed switchable via Software. The Trick is to add a Transistor which shorts the potentiometer slider pin to ground. I used a BC547B, because I had it around, but any NPN Transistor should work. The current through the Transistor and the potentiometer bias resistor is about 5mA Which are 125mW on the Resistor.
(https://cdn.instructables.com/FPL/F1ZF/JHUTTMCZ/FPLF1ZFJHUTTMCZ.SQUARE3.jpg)
(https://cdn.instructables.com/ORIG/F1E/MR3L/JHUTULZO/F1EMR3LJHUTULZO.jpg)
(https://cdn.instructables.com/F0E/NPO0/JHUTTMCY/F0ENPO0JHUTTMCY.SQUARE3.jpg)
On the Microcontroller side I used the until now unused PB3 (MOSI) Pin, because it should be easy accessible on most adapter boards. It is switched on when the hot hand piece is put in the cradle and also in Fan Test mode to get a accurate reference. I also improved the Handpiece-not-in-cradle-mode, because I think this way it saves some time on startup. Software is available on my GitHub page (https://github.com/Gabse/Youyue-858D-plus) and  will hopefully be merged to madworms Page.
Cheers,
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on June 03, 2018, 02:20:14 am
Hello!
Got this one today, attached photos of PCB, as DGM said above, it's AVR based, and also it looks like have a different heater element.

I don't have a thermal couple to check how accurate is, but I had seen one comment in Aliexpress, some one says it's accurate, and as you can see it does not have a calibration.

Bought it for about 30€, I was able to take the Youyue 858D+ for the same money. So what do you think, it is have advantages to taking this instead of Youyue 858D+?
In case if it will be inaccurate, the custom firmware can be modified and loaded for it also, right?

I didn't notice that this variant had no cal pot.  I wonder what the tolerance stackup is with all the resistors in the TC amp.  Maybe it's not a terribly big deal, but I haven't gone back to the schematic to check ... or checked this board against other AVR 858D schematics.  The worst-case scenario would just require calibration in firmware.  I suppose I should start adding AVR-based 858D maps to the board index, shouldn't I? 

So long as it functions well, I don't know why you couldn't use the alternative firmware.  It might take some remapping of the IO pins, but that's simple enough.   I suppose the big advantage that you get with AVR versions in general is the ability to drop a new MCU in the thing.  All the 20-pin types (like the 858D06 board in the current Youyue) need an adapter board of some sort.

If you do decide to try the alternative firmware and care to share your pin mapping, I'll gladly add it to the index. 

Hey Guys,
I have a hacked 858D station an I am pretty happy with it. The station needs quite long to cool down if the fan speed limited (specially with the small nozzle), so I worked out a hack to make the speed switchable via Software. The Trick is to add a Transistor which shorts the potentiometer slider pin to ground. I used a BC547B, because I had it around, but any NPN Transistor should work. The current through the Transistor and the potentiometer bias resistor is about 5mA Which are 125mW on the Resistor.

On the Microcontroller side I used the until now unused PB3 (MOSI) Pin, because it should be easy accessible on most adapter boards. It is switched on when the hot hand piece is put in the cradle and also in Fan Test mode to get a accurate reference. I also improved the Handpiece-not-in-cradle-mode, because I think this way it saves some time on startup. Software is available on my GitHub page (https://github.com/Gabse/Youyue-858D-plus) and  will hopefully be merged to madworms Page.
Cheers,

I'd thought about that too, but I was kind of thinking that it could just be done in hardware.  I kind of figured it would suffice to pull the wiper down whenever the optotriac drive was inactive.  The only issue would be that you'd need some sort of delay to keep the mod inactive during normal heater switching operation.  I suppose a diode, cap, mosfet and a resistor would suffice.  If overshoot causes a long enough off-time to trigger the mod, it would likely only improve overall settling time. 

Of course, my entire approach would be problematic if you wanted to implement a blower-only mode with controllable speed.  Control through firmware is ultimately more flexible.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: HotAir on June 03, 2018, 04:15:39 pm
Hm, in the Chinese manual which came with it, there is mention about temperature calibration(photo attached), here what I translated with google translate

"1, in the welding state, measure the actual temperature value, and record
2. In the welding state, the colleague presses the “▲” and “▼” keys to display “CAL”, when the release shows three small dots below the displayed value, Immediately enter the measured temperature (performed within three seconds). After the correct input, press the "▲" and "▼" keys simultaneously to display the "CAL" temperature calibration."

I have tried this method, however it does not work, strange...  :-// I will try to ask other peoples in youtube, if their station can be calibrated, so to understand, if all those models can't be calibrated or just mine have an issue.

Few days ago ordered a thermometer with thermocouple, in few weeks it should arrive, then I'll test how accurate is that 858D
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Gabse on June 04, 2018, 04:55:59 am
I'd thought about that too, but I was kind of thinking that it could just be done in hardware.  I kind of figured it would suffice to pull the wiper down whenever the optotriac drive was inactive.

You could use the reed switch signal to switch the transistor every time the heater is in the cradle. That should work too, the only downsides are, it doesn’t work in Fan test mode, and if the heater is switched on all the time due to a broken TRIAC.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on June 04, 2018, 08:09:56 am
You could use the reed switch signal to switch the transistor every time the heater is in the cradle. That should work too, the only downsides are, it doesn’t work in Fan test mode, and if the heater is switched on all the time due to a broken TRIAC.

Oh, the reed switch.. /me facepalms
but really, not much protects against the inevitable stuck triac in these designs.

From my experience incinerating ebay SSR's and BTA26-800's by the dozen, I kind of learned to regard chinese triacs as a pending failure.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: HotAir on June 18, 2018, 06:41:10 pm
I asked on youtube some peoples with same station, they said the calibration on their station is also does not working.

However, today I received my thermometer with thermocouple, did some quick tests, and found out that when I hold the thermocouple very close to the nozzle, almost inside, then the temperature is very accurate, like about 0 - 10 °C difference.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on June 21, 2018, 02:50:16 am
As far as i'm concerned, that's good news. 

The offset between the internal thermocouple and an external thermocouple is going to vary with distance, fan speed, and nozzle size.  Trying to cal for somewhere significantly beyond the end of the nozzle is going to be fairly pointless unless you never change the nozzle or fan speed.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: fordson on July 07, 2018, 03:02:16 pm
Hi forum ,


I also have the HD 858d v1.0 mainboard with the unlabeled processor.

I tried to understand all info given in this tread , but i am i kind of lost ...............( mus tbe age ).

Is there already an adapterboard available which has been tested by someone ??  ( i have downloaded the eagle files already )
What is the result of this ?? , is it working with the custom firmware ?? ( also downloaded ) .


any help highly appreciated .




fordson


Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bwack on July 07, 2018, 09:05:44 pm
fordson, at least the HD 858d v1.0 board is in the index two pages back in this thread.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: fordson on July 08, 2018, 01:16:43 pm
Yep , i have already downloaded all files i could find related to the HD858D v 1.0 .

But...................is there already someone out there who has managed to get it modded and working .

unfortunately i am a bit rusty in reverse-engineering  :scared:






As aliexpress is selling them by the thousands ...................


Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on July 12, 2018, 09:34:43 pm
I only made the adapter layouts, but I do not have the boards to test them on.  You can always try to contact one of the members who have the Hyiko 858D's and ask them if they've pursued the mod.  IIRC, Miwer had expressed interest at least. 

https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1317403/#msg1317403 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1317403/#msg1317403)
https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1328274/#msg1328274 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1328274/#msg1328274)
https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1364083/#msg1364083 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1364083/#msg1364083)
these links are in the reference index (I added yours)

If you are comfortable with making the adapter and programming the AVR, tailoring and debugging isn't that much more..
Sanity check the layout before you make the adapter.   Go over your board and make sure that the pin map in the index and eagle files matches what you see.
You'll also need the DMM to measure the voltage on the ADC so that you can calculate the ADC scaling for the TC.
I mentioned this in a post a few pages back, or there's a sheet in the index spreadsheet for calculating the scaling factors.

If you're worried about the risks associated with the heater control, just disconnect the heater from the board until you're sure the code appears to be working. 
You could probably even use a heat source (lighter or something) on the TC to demonstrate that the ADC is working and that the firmware turns the heater off.
That way you won't have to worry about roasting the heater if there's an issue with the code.
I don't think there's any checks in the code that would make such a test problematic (someone can correct me)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Miwer on August 02, 2018, 08:33:47 am
You'll also need the DMM to measure the voltage on the ADC so that you can calculate the ADC scaling for the TC.
I mentioned this in a post a few pages back, or there's a sheet in the index spreadsheet for calculating the scaling factors.

Just adding a lille note on this.
I did actually make an adapter board for the Hylko model, but the temperature afterwards was all wrong of course. I wanted to use the firmware without modifications, but that require that I match the ADC input voltage range to the original adapter, and it was a bit harder to tune in, than I anticipated.

The problem with the Hylko model and the 858D-1.0 board is, that the unlabelled chip has no dedicated input for ADC reference voltage. If the chip is indeed a Zilog S3F94C8 (or equivalent chip), then the ADC reference voltage is fixed on VCC (so no need to measure it).

However, VCC is all over the shop, since this clone is so poorly designed. It's very hard to tune the temperature properly. I'm seeing VCC voltage drops and noise, whenever the hand piece fan is running, so I suspect the transformer is simply not big enough to handle the load, which is probably why the designers choose to put the IC after a diode with another capacitor, causing the chip to run at 4.3V instead of 5V. Not that it helps, since the caps are shitty quality anyway. I tried swapping some of them, and got a more stable power rail, but could still not adjust the temperature properly, and I have just not worked on it since last time I posted.
I probably should have another look at it, since at the moment it's just sitting on the bench. :D

/Miwer
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: borngborn on August 25, 2018, 10:34:39 am
So i unluckily got a youde858dv4 should i order a whole new station or order a new pcb

Sent from my SM-N950U using Tapatalk

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Tracker on August 25, 2018, 10:58:15 am
Hi Guys,
I'm a bit late to this party but hoping to catch up  :-+

I ordered my 858D before realizing this thread existed.
Unfortunately I have ended up with a Hylko model, it was cheapest on fleabay so perhaps that's a clue.

Its got the V1.0 board, just like the images posted by fordson above.

Alternatives I can see on the UK Fleebay are these:

eBay auction: #283105542186 TAIKO with additional sockets/plugs front and rear.

eBay auction: #253281029627 ANSAI with a rear mains socket and looks like a 1/4" jack at the rear , no idea whats that for.

eBay auction: #163017135315 WER

Is there point is trying one of these for a more suitable control board?

Thanks.
Tracker








Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Tracker on August 26, 2018, 07:14:40 pm
Just took delivery of mine today.

https://www.ebay.co.uk/itm/858D-220V-SMD-Soldering-Desoldering-Station-Hot-Air-Rework-Gun-Tool-3-Nozzles/301966004104?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649 (https://www.ebay.co.uk/itm/858D-220V-SMD-Soldering-Desoldering-Station-Hot-Air-Rework-Gun-Tool-3-Nozzles/301966004104?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649)

Had a quick look inside and it seems pretty well made. I took a pic of the board

(http://i66.tinypic.com/2lj3ui0.jpg)
Looks like the same one I have.

nc94

Same board here.
I did some front pot calibration with a K-type Thermocouple and found the overshoot was not too bad.
Also found the results were more stable after a burn-in period, i.e. ran it at 400 for a 5 minutes, then perform the pot calibration.
Overshoot was about 5 to 10 degrees when heating upwards.


Low air flow (2 on dial)
100 set = avg 103 measured
200 set= avg 202 measured
300 set = avg 298 measured
400 set = avg 402 measured

Mid air flow (4.5 on dial) :
100 set = avg 97 measured
200 set= avg 194 measured
300 set = avg 298 measured , pot calibration point
400 set = avg 425 measured

High airflow (7 on dial)
100 set = avg 99 measured
200 set= avg 206 measured
300 set = avg 315 measured
400 set = avg 440 measured , largest error measured


Note, tests performed ramping the temp upwards, i.e. 100, 200 300 etc. The reverse (400, 300, 200 etc) produced odd unstable results, probably due to the heater handle having thermal mass and holding heat.

So not too bad, better than I was expecting.
PS, nosel was the middle one, about 8mm wide.

Tracker
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ncx94 on August 26, 2018, 07:16:10 pm
Just took delivery of mine today.

https://www.ebay.co.uk/itm/858D-220V-SMD-Soldering-Desoldering-Station-Hot-Air-Rework-Gun-Tool-3-Nozzles/301966004104?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649 (https://www.ebay.co.uk/itm/858D-220V-SMD-Soldering-Desoldering-Station-Hot-Air-Rework-Gun-Tool-3-Nozzles/301966004104?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649)

Had a quick look inside and it seems pretty well made. I took a pic of the board

(http://i66.tinypic.com/2lj3ui0.jpg)
Looks like the same one I have.

nc94

Same board here.
I did some front pot calibration with a K-type Thermocouple and found the overshoot was not too bad.
Also found the results were more stable after a burn-in period, i.e. ran it at 400 for a 5 minutes, then perform the pot calibration.
Overshoot was about 5 to 10 degrees when heating upwards.


Low air flow (2 on dial)
100 set = avg 103 measured
200 set= avg 202 measured
300 set = avg 298 measured
400 set = avg 402 measured

Mid air flow (4.5 on dial) :
100 set = avg 97 measured
200 set= avg 194 measured
300 set = avg 298 measured , pot calibration point
400 set = avg 425 measured

High airflow (7 on dial)
100 set = avg 99 measured
200 set= avg 206 measured
300 set = avg 315 measured
400 set = avg 440 measured , largest error measured


Note, tests performed ramping the temp upwards, i.e. 100, 200 300 etc. The reverse (400, 300, 200 etc) produced odd unstable results, probably due to the heater handle having thermal mass and holding heat.

So not too bad, better than I was expecting.
PS, nosel was the middle one, about 8mm wide.

Tracker
I found that this unit is pretty good after all. It has a lot of the safety features working in it's stock form :)

nc94

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Tracker on August 27, 2018, 08:11:40 pm
Agreed, the 'HYLKO' I received had good grounding to the heat shroud via a central PCB standoff.
I didn't need to make any changes other than to add an IEC socket at the rear for convenience since most of my bench uses IEC power cables.

cheers
Tracker

 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: borngborn on August 29, 2018, 10:49:29 pm
So i threw away the youdev4 and got the Youyue 858d06 is their a board made for this one

Sent from my SM-N950U using Tapatalk

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Fleetz on August 29, 2018, 11:41:02 pm
Hello!
Got this one today, attached photos of PCB, as DGM said above, it's AVR based, and also it looks like have a different heater element.

I don't have a thermal couple to check how accurate is, but I had seen one comment in Aliexpress, some one says it's accurate, and as you can see it does not have a calibration.

Bought it for about 30€, I was able to take the Youyue 858D+ for the same money. So what do you think, it is have advantages to taking this instead of Youyue 858D+?
In case if it will be inaccurate, the custom firmware can be modified and loaded for it also, right?

What make and model is the one you bought? Did you get this from Aliexpress?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Fleetz on August 30, 2018, 05:40:37 pm
Hello!
Got this one today, attached photos of PCB, as DGM said above, it's AVR based, and also it looks like have a different heater element.

I don't have a thermal couple to check how accurate is, but I had seen one comment in Aliexpress, some one says it's accurate, and as you can see it does not have a calibration.

Bought it for about 30€, I was able to take the Youyue 858D+ for the same money. So what do you think, it is have advantages to taking this instead of Youyue 858D+?
In case if it will be inaccurate, the custom firmware can be modified and loaded for it also, right?

Anyone know what make/model this is that member HotAir is referring to?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Fleetz on September 02, 2018, 12:23:28 pm
Hello!
Got this one today, attached photos of PCB, as DGM said above, it's AVR based, and also it looks like have a different heater element.

I don't have a thermal couple to check how accurate is, but I had seen one comment in Aliexpress, some one says it's accurate, and as you can see it does not have a calibration.

Bought it for about 30€, I was able to take the Youyue 858D+ for the same money. So what do you think, it is have advantages to taking this instead of Youyue 858D+?
In case if it will be inaccurate, the custom firmware can be modified and loaded for it also, right?

Are these photos of a Youyue 858D+ ?

How have you found it’s performance?

Which supplier did you purchase from?

Cheers...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Fleetz on September 03, 2018, 01:06:25 pm
Hello!
Got this one today, attached photos of PCB, as DGM said above, it's AVR based, and also it looks like have a different heater element.

I don't have a thermal couple to check how accurate is, but I had seen one comment in Aliexpress, some one says it's accurate, and as you can see it does not have a calibration.

Bought it for about 30€, I was able to take the Youyue 858D+ for the same money. So what do you think, it is have advantages to taking this instead of Youyue 858D+?
In case if it will be inaccurate, the custom firmware can be modified and loaded for it also, right?

Are these photos of a Youyue 858D+ ?

How have you found it’s performance?

Which supplier did you purchase from?

Cheers...

I reached out and asked a couple Aliexpress suppliers of YouYue 858D+ what version boards/MCU they were supplying. Basically was told they have no control it could be either the single sided or double side and could be Atmel or Samsung MCU. “If it matters to you please don’t buy”

Pig in a poke...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on September 03, 2018, 04:25:21 pm
“If it matters to you please don’t buy”

That's got to be the best answer (or caveat emptor) I've heard from an AliExpress or eBay vendor. Since most sell a cornucopia of products, they usually don't know the specifics of any particular one (surprisingly this one apparently knows a bit) and are at the mercy of whatever gets shipped to them or that they happen to pick up from the market at the time.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Fleetz on September 04, 2018, 12:36:04 am
Is there a differences in features and or functions between the 858D and 858D+ models?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Nisei on September 14, 2018, 01:46:14 pm
I've just received an unbranded 858D+ from AliExpress (shipped from Germany).
It has plastic front and back panels and the temperature goes up to 500 degrees.
Does anyone know anything about this clone?

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on September 14, 2018, 11:47:11 pm
Looks like all the others. Same enclosure. Different color. You'll have to open it up and post pics to find out more about it.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Nisei on September 15, 2018, 09:20:02 am
Yeah I only took a quick pic to show it goes up to 500 degrees.
Here's the board. As you can see there's nothing printed on the IC.
Any idea what it may be? I was expecting a Kaleep branded one since that seems to be the only black front panel version around but it turned out to be unbranded.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on September 15, 2018, 05:19:45 pm
Yeah, even the vendors don't know what they're going to get. One was smart enough to say that if a particular internal design is important to you, don't purchase this product.

I'm not able to tell immediately which IC that is since there have been several 20-pin microcontrollers discussed here. Maybe someone more familiar with them will be able to chime in with more info. However, it's definitely not an ATmega328p (32 28 pins) as used in the early models.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Fleetz on September 15, 2018, 06:15:02 pm
However, it's definitely not an ATmega328p (32 pins) as used in the early models.

ATmega328P has 28 pins...

Yes I was told by an Aliexpress seller if you are definitely wanting a 858D+ with an Atmel processor then buy somewhere else.

Can’t seem to find a brand that has any reasonable certainty of Atmel inside. Buying a YouYoe brand is no guarantee as I have seen a number of different processors used.

If anyone has recently bought a 858D+ from Aliexpress or eBay that has an Atmel that can be tweaked would appreciate letting me know.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on September 15, 2018, 06:34:52 pm
Apparently, some part of my brain was thinking about the TQFP version. D'oh! Corrected my post. Thanks, Fleetz.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Nisei on September 15, 2018, 09:14:30 pm
Page 24 of this thread.
Almost sure it's an MK1840D3
But thanks for the replies.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stan23 on September 20, 2018, 01:16:16 pm
PCB-Version: 858D06 (Version 6, both sides are green and mainly SMD components)
Microcontroller: MK1840D3

Build or order the adapter PCB designed by GiantGnome/wgujbas
This is necessary because madworms firmware is designed for the YouYue-Version, which uses an ATMEL micro controller.
The one which is installed on the UVISTAR (MK1840D3) is something like a SAMSUNG clone.
Both uC's aren't pin-compatible, hence we need an adapter. Furthermore, the YouYue-PCB-Version is reporting the fan speed to the micro controller, the ones with an SAMSUNG or MK184... uC are not, therefore we need to place additional components on the adapter (for reading out the fan speed, giantgnome and wgujbas are using simple voltage dividers to extrapolate from the FAN-Voltage - which is set by the potentiometer - to the FAN-Speed)


Giantgnome postet his PCB here (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg904746/#msg904746)
You can simply order a bunch of three pcb's for 5$ here (https://oshpark.com/projects/vLy9R74P) (includes shipping worldwide!)

I also have two PCBs left, and I'm located in Germany as well. Anyone interested?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Fleetz on September 24, 2018, 08:02:34 am
Seems like it is a bit like Russian Roulette with what device, what board etc when it come to buying these things.

Is the a brand/model and or Aliexpress supplier that at least you know that your getting a unit that can be modified albeit with an adapter PCB? Or at least a unit that was prchased recently where there might be a chance that the same unit that is modifiable?

Cheers... 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Nprod on September 24, 2018, 04:47:37 pm
I've just received an unbranded 858D+ from AliExpress (shipped from Germany).
It has plastic front and back panels and the temperature goes up to 500 degrees.
Does anyone know anything about this clone?

This looks a lot like the "Kaleep" 858D which was only sold in Germany, except without the Kaleep  :) It should be a MK1840D3 board that needs an adapter for the Atmega and the usual fixes.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Fleetz on September 26, 2018, 06:34:40 pm
Just bought a YouYue 858D+ from Aliexpress going by some of the feedback from other purchasers it looks likely to have the 20pin Samsung MCU, but I will just have to wait and see.

https://www.aliexpress.com/item/Hot-Air-Gun-700W-UYUE-858D-ESD-Soldering-Station-LED-Digital-Heat-Gun-Desoldering-Station-Upgrade/32657929118.html?spm=a2g0s.9042311.0.0.5ef54c4dHmBwEN (https://www.aliexpress.com/item/Hot-Air-Gun-700W-UYUE-858D-ESD-Soldering-Station-LED-Digital-Heat-Gun-Desoldering-Station-Upgrade/32657929118.html?spm=a2g0s.9042311.0.0.5ef54c4dHmBwEN)

Hopefully I will be able to modify it with one of the conversion boards the some of the members here have kindly made available via Oshpark.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: HotAir on September 27, 2018, 03:37:26 pm
Hello!
Got this one today, attached photos of PCB, as DGM said above, it's AVR based, and also it looks like have a different heater element.

I don't have a thermal couple to check how accurate is, but I had seen one comment in Aliexpress, some one says it's accurate, and as you can see it does not have a calibration.

Bought it for about 30€, I was able to take the Youyue 858D+ for the same money. So what do you think, it is have advantages to taking this instead of Youyue 858D+?
In case if it will be inaccurate, the custom firmware can be modified and loaded for it also, right?

What make and model is the one you bought? Did you get this from Aliexpress?

Hi, sorry for late answer  :)
Yes I bought it from Aliexpress.
It's the model that shows DGM above my first message (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1502434/#msg1502434), and as you seen it have Atmega chip(28 pins).

As I see now on Aliexpress many sellers already sell it.
Here the >>link<< (https://www.aliexpress.com/item/Hot-Air-Gun-858D-700W-BGA-Rework-Solder-Station-Soldering-Heat-Air-Gun-Station-220V-110V/32818260663.html) from the seller that I bought, it was the cheapest then, but now, I can find few € cheaper from another seller :D

And also, this model supposed to have a calibration mode, which is activated by pressing two buttons together, i mentioned about it >>here<< (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1584391/#msg1584391) however this function does not work!!!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wvoider on October 07, 2018, 10:57:56 pm
Hi everybody, I'm considering buying this 858D clone

(https://www.rcscomponents.kiev.ua/modules/Asers_Shop/images/productimages/sm858d.jpg)

The price is more or less aligned with the other 858D clones, and the reason I like it is the solid extruded aluminum chassis. Apparently this is its board:

(https://i6.otzovik.com/2018/01/12/5889659/img/9069157_b.jpeg)

What do you think about it, quality-wise? It seems a strange mix: a nice smd Atmega microcontroller surrounded by those lifted resistors. I wonder why the mounted them like that: is it a way to dissipate heat?

I see a ground wire going to the DIN connector, but no yellow/green wire going to the board...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on October 08, 2018, 12:10:54 am
Welcome to the forum, wvoider.

You'll only know what you're going to get when you receive it. There's no guarantee what's inside. Even the name on the front panel could be different or blank.

Regarding the flying resistors, those are power resistors and they can get warm to hot. By mounting them above the board, it aids heat dissipation and prevents scorching the PCB.

Oh, and with regard to the color of wires, they're not guaranteed to correspond with anything in particular, either. Trace them out to see where they go and, hence, what they're for.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: wvoider on October 08, 2018, 08:35:33 am
Thanks bitseeker,

I have asked the (German) seller and the station will be exactly like the one pictured, at least for what concerns the chassis and the front panel.

On the flying resistors: perhaps they're hi-pot resistors (on the 230V line to the heating element), and the distance from the PCB is to isolate them from the underlying paths. But as you say, I won't know what's inside until I open it.

I  wonder if "original" Atten 858s are to be considered of higher quality...
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on October 08, 2018, 04:06:26 pm
Yeah, not sure. This device has been replicated many times and ways over the years. I have one that has both hot air and a soldering iron...same basic enclosure with some extra controls.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Fleetz on October 15, 2018, 06:25:42 am
Looks like I am screwed modding the unit I just bought has a unbranded and no part number 20 pin SOIC controller.

YouYue 858D+
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on October 15, 2018, 06:58:08 am
It depends how ambitious you are to mod it. You could still adapt the SOIC footprint by doing something like this: http://www.epboard.com/eproducts/protoadapter3.htm (http://www.epboard.com/eproducts/protoadapter3.htm)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on October 16, 2018, 11:59:56 am
that looks like a great way to rip the pads off the board!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on October 16, 2018, 11:12:44 pm
Wee! :-/O
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stan23 on October 18, 2018, 12:58:42 pm
PCB-Version: 858D06 (Version 6, both sides are green and mainly SMD components)

Hi,
few days ago I used my 858 for the first time, and while setting the temperature to somewhere around 400°C, after maybe 2 minutes the metal part of the handle starting glowing red-orange.
I reduced the heat and let it cool down, and when I tried to heat it up the second time a few minutes later, the safety fuse (RCD) tripped soon.

It looks like a part of the heat element and the mica paper melted,  and there was a short to the metal part.

Anyone have faced this earlier?
Unfortunately I have no spare mica paper, and shipping from China will still take more than a month.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bson on October 18, 2018, 01:25:22 pm
few days ago I used my 858 for the first time, and while setting the temperature to somewhere around 400°C, after maybe 2 minutes the metal part of the handle starting glowing red-orange.
I usually reflow leaded solder paste with mine at 225˚C for my typical 2 or 4 layer boards.  I have no idea what that is in actual temperature, and it's simply based on what's needed.  If I need more I'll turn it up to 240 or 250.  400˚C sounds insanely hot and is likely to be considerably above that.  Leader solder has a melting point around 190˚C.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stan23 on October 18, 2018, 01:45:22 pm
Actually I wanted to unsolder a 2 mm pitch pinheader, and the unleaded tin didn't melt with lower temperatures.

I agree that the temperature is pretty high, and next time I'll use my classic soldering iron for that kind of tasks.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on October 18, 2018, 10:10:23 pm
dont go over 370 or you can melt the plastic housing.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: maximilliangreat on November 05, 2018, 10:31:26 am
The future has arrived,

(https://i.imgur.com/90dallt.jpg)

it's all smd baby :)

Hi All!
Just received 858d.
And it something new, so I decided to share.


(https://i.imgur.com/rtqw0Z6.jpg)

My favorite brand :)




(https://i.imgur.com/oBTlm5Z.jpg)

This connector is unpopulated.  At least 3 pins connected directly to the MCU.


Board says

LST1703
V1.0
2017.12.12

MCU says (if I read correctly, it's kinda blury)

Eastsoft
HR7P166FGTF
GP42EFN003




I'm newbie at electronics, so I have a question.
Unit arrived a little bit damaged, I noticed dent about 25-35% of diametr on capacistor. (hard to see on photo)
Is it OK or shoul I replace capacistor? And if yes, should I use LowESR/LowImp  or ordinary capacistors is OK?

(https://i.imgur.com/bEBpGQG.jpg)


Here other images https://imgur.com/a/79UNtdd



P.S. As I lot of people asks me in PM (they got same station without capacitor) - it's 50V 47uf 105C capacitor.  Hope that helps :)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on November 06, 2018, 12:48:06 am
Welcome to the forum, maximilliangreat. Thanks for the teardown of the new version. It's cool to see how modern it has become.

As for the capacitor, it looks like it's just filtering the power rail for the fan. So, unless you notice some problem with the air flow, I wouldn't worry about it. Of course, if it bothers you, go ahead and change it. Any 105°C cap of the same capacitance and the same or greater voltage rating will work. Be sure to install it in the same orientation, too.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Magiciaen on November 18, 2018, 11:25:01 am
I have an Atten 858D+ with Holtek uC, and came across this adaptor board for installing an Atmega 168/328. I thought it might be useful for some folks:

https://oshpark.com/profiles/cn

I rebuilt my unit with high quality components, including the handpiece, which uses an ebm-papst fan with tach output (it has greater air displacement as an added benefit). Attached is my progress thus far. Instead of installing this adaptor board though, I've decided to make an entirely new board for the whole unit with OLED display. The tach wire needs some signal conditioning circuitry in any case. I'll post all the schematics and code over here when I'm done.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on November 19, 2018, 02:20:26 am
A complete replacement PCB with OLED. That sounds interesting. Looking forward to seeing the results.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Magiciaen on November 20, 2018, 02:30:09 pm
A couple of things I was thinking of:

1) Fan control - it's straightforward to implement a rotary encoder to control the fan speed, but I'm not sure it's really a benefit. PWM of the fan would eventually damage it, so you'd be controlling a digital potentiometer like the AD5290, which would directly replace the pot in the existing circuit. Those kinds of digi pots have current limits to them though, about 5mA continuous. The 2N3904 in the circuit sees about 3mA from the potentiometer at the minimum setting, so that's ok. With a digital pot you can directly switch the fan to max for cooldown, but as others have already done here, you could just short out the potentiometer with a transistor. I'd like a push button 'mode' switch integrated into the rotary encoder, but you can also get potentiometers with those kind of momentary switches. What route do you think is best? One way or the other doesn't really affect the design/build time.

2) Bistable power relay - will definitely integrate one of these to cut off the heater from the mains when in standby and in any kind of fault.

3) I might replace the heating element with the one from the Quick 861DA, which is 1300W apparently. It will fit into the 858D handpiece with a bit of modification. The ebm-papst fan delivers over 200 lpm at at the maximum setting, so potentially, this thing could have the performance of the Quick, and you'd have access to all the different nozzles.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: bitseeker on November 21, 2018, 04:10:54 am
Bistable relay, as in latching in both on and off positions? I'd probably opt for a normal one so that the relay can't get stuck in the on position (e.g., if the controller dies).
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Magiciaen on November 21, 2018, 10:50:42 am
That's a very good point, thanks. Have decided to go ahead with the rotary encoder, as it can also be used for scrolling through menus. The whole circuit is going to be a lot more elegant than it was before I hope. A summary of the features:

- 18F4550 uC
- 128x64 OLED display
- Rotary encoder with pushbutton
- AD5290 digi pot
- MAX31855 thermocouple converter (replaces old op-amp circuit)
- Better power supply solution (30 VAC toroidal transformer -> 28 VDC -> 12.5V DC-DC converter -> 5V DC -> -5V charge pump)
- Fan tachometer measurement + Fan voltage from ebm-papst fan (display of 1->8 pot setting, lpm, rpm and voltage)
- 4-layer board with proper isolation slots
- Proper mains design, with non-latching relay isolation, good heatsinking
- LED indicator and cradle override switch on handle

The code will be directly based off the exceptional PD/PID control and safety features written and worked out by madworm and others here.

Hopefully, it won't end up costing the same as an 861D  :P
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: oolloo on November 30, 2018, 12:16:55 pm
That Samsung matches the pinout for power/gnd, and the fact that pin 4 is input-only also matches how it's used in the circuit. ADC is also available on the right pins.

A little more searching on the Internet about how to read/write those MCUs (the phrase "tool mode" in particular) lead to a forum about programmable remote controls (http://xxx.hifi-remote.com/forums/viewtopic.php?t=12482&postdays=0&postorder=asc&&start=45), and eventually a patent (http://www.freepatentsonline.com/6839774.pdf) and programming software and utilities (http://www.cnatech.com/download.htm) (written in Visual Basic, it seems) for them... anyone want to do some more RE'ing with all this info? ;)

I just received one 4 years after you guys off amazon, its chip is 20 pin samsung s3f94c4ezz-dk94

is this one that can use the board directly or do I have to snip this and add that and solder a trace?it says Sigma R700  smd rework station greek sigma symbol logo , came in a fancy card board box plastic foam inside for compartments, unfortunately gun wasn't wrapped some fingerprints and micro scratches, gun wire attached to case not removable, same gun with fan inbuilt.

I opened it to find the samsung and 2 other chips the samsung is in a socket, the other 2 are soldered on.

they are :
board id IC2
 8 pin
 mounted vertical parallel to 20 pin with markings:
ATMLU442
02C  M   B
4X0437D


next chip also 8pin
mounted horizontal
board ID IC 3
texas instruments
79W0G1FE3      hard to make out last 3 digits
LM358P


I've not powered it on yet looking for the checking grounding etc you-tube.,   

also the gun harness and fuse as well as power are held in with white hot glue, none of it is stuck to case all 3 points rotate,with resistance.

I had read this site before ordering, and was hoping for the Atmel, as it says its a direct replace right?

I was also hoping that these Chinese factories (as they often do) implemented the mods mentioned here, obvi because they're pirates.  certainly the description on amazon seemed to match.

how can i secure these 3 through-hole ? 
add more glue?
remelt glue?
use the station on itself?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stj on November 30, 2018, 01:18:58 pm
if your really safety concious,

use 2 relays for the heater,
wired in series - one using the normally open contacts and the other using normally closed.
and have feedback from both.

this is how gas valves are switched in professional boilers.
if the computer crashes or the buffer fails and all outputs go high OR low the output is off,
and if either fails directly, the feedback detects it and the mcu shuts it all down.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: oolloo on November 30, 2018, 10:09:00 pm
Anyone have a source for the adapter boards to suit Samsung S3F94C4EZZ ic's ?  I PM'ed wguibas a while ago but haven't heard back from him, and he seems not to have been active on this forum for a few months.
Tried the attachment under this post: https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg782035/#msg782035 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg782035/#msg782035)

What worked for you?

 I have a clone called Sigma R700 from Amazon, looks nice (no rear bezel, only front)
has the same samsung chip as yours. 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Magiciaen on December 01, 2018, 01:54:03 am
Thanks for teaching me! Fantastic idea, I'll definitely put this in!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: steve1515 on December 09, 2018, 02:27:38 am
Thanks DGM, that's an excellent summary this thread has been lacking!

The important bit you're missing from me is the name of the 'unknown name board' - as shown in the attached picture, it is marked AF858D, and dated 20161212.

In case you want to add it, the details of the adapter board I developed for this PCB are below:
  • Schematic: attached
  • PCB: https://oshpark.com/shared_projects/NQGwEEH0 (https://oshpark.com/shared_projects/NQGwEEH0)
  • Features:
    • TL431 reference
    • Vfan and current sense support
    • ISP header
    • MLF-32 ATmega package

The ADC scaling factor for this board when used with a 2.5v reference was 2.4 in my case.

I just got one of these 120V rework stations from Amazon and it came with one of the AF858D boards with date code 20161212 just like yours. I want to mod it using your mod board, but I was hoping you could provide your firmware with edits that you made a long with a list of parts that you used. Would you by any chance be able to post it up here?

Thanks!  :)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: steve1515 on December 14, 2018, 03:24:37 am
Thanks everyone for looking at the Rev. A sch and pcb and giving feedback. I corrected the LED digits (misread the F/W assignments) so PCB Rev. B now....

Hi floobydust. Could you please post your latest PCB revision schematic? I was able to find your Rev A linked, but I couldn't find B even though you mentioned it.

Thanks! :)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on December 14, 2018, 05:23:27 am
I had already updated the 858D+ station schematic I drew with the LED digits fixed, so it should already be the 'Rev. B' as I was calling it. Reposting it here.
Note Line and Neutral were reversed (at the switch) in the unit as I received it, so turning it off meant hazardous live was still present at the hand wand and connector from triac leakage.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: steve1515 on December 14, 2018, 01:40:36 pm
Thanks. I did notice that one, but I was referring to the one for your adapter board. I see rev A here: https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1206460/#msg1206460 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1206460/#msg1206460)

Sorry I should have been more clear. I was looking for the Rev B of the adapter PCB or what ever was the latest. Would you be able to post that?

Thanks  :)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on December 15, 2018, 02:35:10 am
I was trying the Mega328PB and interrupt-driven tachometer for the fan and then I thought why not just use a Arduino Nano and then the project was all over the place.
What sections would you like to look at, I can dig for that.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: steve1515 on December 15, 2018, 03:49:56 am
I was wanting to look at the BLDC fan-speed detect circuit that you ended up going with. It may be what you have in Rev A and if so, then I'm all set. I wasn't sure if you had any updates though.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on December 17, 2018, 10:14:25 pm
This tach circuit works very well. But it needs a MCU timer/counter or an interrupt becuase of the 1/F relationship to RPM.
The fan curve has RPM/speed and airflow as a complex relationship that is non-linear.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: steve1515 on December 18, 2018, 12:31:06 am
This tach circuit works very well. But it needs a MCU timer/counter or an interrupt becuase of the 1/F relationship to RPM.
The fan curve has RPM/speed and airflow as a complex relationship that is non-linear.

Hmm. Ok. I was thinking that I was going to read the output of the circuit as a voltage on the ADC. I suppose it would make sense to count the pulses. But that confuses me a little... Madworm's original circuit also pulses, but is read on the ADC.

I suppose that the ADC would show higher voltage if more pulses are seen during it's sample period??

Is there any issue with just reading the voltage at the ADC vs counting the pulses?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Magiciaen on December 18, 2018, 08:30:42 pm
This will probably be of limited interest to everyone, but I've knocked up my own version of the 858D. The board fits in the existing case, and uses the same transformer, but has OLED display and rotary encoder control. The thermocouple is measured with a MAX31855. It also has an accurate tachometer circuit. I used a EBM-Papst RLF 35-8/14 N fan in my unit, that I bought 'new' off eBay. It had a tachometer wire, but apparently they aren't sold with one ordinarily. It seemed the fan was opened and a wire was tacked on to some transistor in there. The output from the fan is only 50mV or so, but my breadboarded circuit gave spot on measurements of rpm. The handpiece definitely has to be rewired to work with the circuit, since I needed to connect PE to ground, and the thermocouple is no longer connected to ground. The MAX31855 tests the thermocouple before using it, and it shouldn't be connected to ground for that testing procedure to work. Per stj's excellent suggestion, there are two complementary non-latched isolation relays. In all, the circuit should make the 858D a lot safer and more fun to use, in addition to it being a lot more accurate. It should be able to drive the heater from a Quick 861DA, so that can be retrofitted to the handpiece if one wants more power:

https://www.somersetsolders.com/quick-861da-replacement-element/p657 (https://www.somersetsolders.com/quick-861da-replacement-element/p657)

I've almost finished routing the PCB, and after I've built it, I guess the real fun will start with programming the software. I'll post the entire project with code, schematics, CAD files when it gets done. It's definitely possible to cheap out on parts and build it on a budget, although that isn't what I've done. My brother bought me my 858D as a birthday present, not realising the shocking state of its insides. Rather than throw it away, I decided to make this circuit, as I am a sentimental chap.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on December 18, 2018, 09:07:07 pm
One big problem with the 858D+ is AC mains noise on the thermocouple signal.
The hand-wand cable has the thermocouple conductors (mV) right next to the heating element conductors (100's V).

I don't have success with Maxim thermocouple IC's like MAX31855  (https://datasheets.maximintegrated.com/en/ds/MAX31855.pdf) and older MAX6675.
They float the thermocouple in order to do fault detection and you get false faults due to RF pickup or mains hum.
Ensure you have ferrite beads/common-mode choke and RF caps at the TC inputs in your design. A nearby cell phone causes readings to go all over the place.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Magiciaen on December 18, 2018, 09:13:58 pm
Really good tips, many thanks! Will definitely add these.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on December 18, 2018, 09:17:02 pm
This tach circuit works very well. But it needs a MCU timer/counter or an interrupt becuase of the 1/F relationship to RPM.
The fan curve has RPM/speed and airflow as a complex relationship that is non-linear.

Hmm. Ok. I was thinking that I was going to read the output of the circuit as a voltage on the ADC. I suppose it would make sense to count the pulses. But that confuses me a little... Madworm's original circuit also pulses, but is read on the ADC.

I suppose that the ADC would show higher voltage if more pulses are seen during it's sample period??

Is there any issue with just reading the voltage at the ADC vs counting the pulses?

The "data slicer" I use to pick off fan speed, gives a pulse-width and frequency that changes with the fan speed.
I didn't try turning it into an average DC signal for an A/D.

I found that fan speed is not so useful....
For safety, the temperature climbs very fast if the fan is not working. The original 858D+ firmware looks at this rate of change and will shut down if it climbs too quickly. Take a look at the derivative of temperature term.
You could take fan speed and model airflow for super precise control, but as I said earlier you still don't know what nozzle (restriction) is being used. Each nozzle could get characterized and put on a menu. But you still could be close/far away from the part being heated, so end temperature is not precise here.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Magiciaen on December 18, 2018, 09:48:13 pm
The "data slicer" I use to pick off fan speed, gives a pulse-width and frequency that changes with the fan speed.
I didn't try turning it into an average DC signal for an A/D.

I found that fan speed is not so useful....
For safety, the temperature climbs very fast if the fan is not working. The original 858D+ firmware looks at this rate of change and will shut down if it climbs too quickly. Take a look at the derivative of temperature term.
You could take fan speed and model airflow for super precise control, but as I said earlier you still don't know what nozzle (restriction) is being used. Each nozzle could get characterized and put on a menu. But you still could be close/far away from the part being heated, so end temperature is not precise here.


That's a really interesting topic. Since I'm able to measure rpm, fan voltage and temperature derivative, together you should be able to characterise nozzle restriction. The fan voltage vs rpm curve would yield different flow (lpm) along the curve at different backpressures. I think the voltage vs rpm curve itself would also change with backpressure. As the temperature derivative would modulate with flow, all together you should be able to deterimine backpressure, and hence nozzle size. You wouldn't need to enter the nozzle size manually I'd imagine.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on December 20, 2018, 04:31:24 am
That's a really interesting topic. Since I'm able to measure rpm, fan voltage and temperature derivative, together you should be able to characterise nozzle restriction. The fan voltage vs rpm curve would yield different flow (lpm) along the curve at different backpressures. I think the voltage vs rpm curve itself would also change with backpressure. As the temperature derivative would modulate with flow, all together you should be able to deterimine backpressure, and hence nozzle size. You wouldn't need to enter the nozzle size manually I'd imagine.

This is similar to a tangent I wasted a bunch of time thinking about:
https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1448669/#msg1448669 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1448669/#msg1448669)

I had intended to simply design a thermistor anemometer for getting mass flow information.  Like I said in the post, I'm pretty sure that between power and RPM, there isn't enough information to unambiguously derive mass flow.  If pressure were measurable in-process, things might be different, but that's not really an option.  I got a spare blower to experimentally verify that claim, but I never did. 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Magiciaen on December 20, 2018, 07:53:31 am
One big problem with the 858D+ is AC mains noise on the thermocouple signal.
The hand-wand cable has the thermocouple conductors (mV) right next to the heating element conductors (100's V).

I already replaced the cable for my wand to a screened 20AWG version, as the original cable isn't safe. It was probably 26AWG if I remember. My cable is 8.1mm in diameter, which is at the upper limit of practicality, but this sort of cable would be the ideal solution:

https://www.conrad-electronic.co.uk/ce/en/product/486018/CPC-2-2xdata-1xpower-720045000-Kabeltronik (https://www.conrad-electronic.co.uk/ce/en/product/486018/CPC-2-2xdata-1xpower-720045000-Kabeltronik)

Separate mains and data sections, with screening for the data lines. A bit too thick at 12mm. But then again, the cable on a hot air station with blower in the main unit is about that thickness.

Thanks again for your heads up about the noise issue, I've now added a filter I designed and simulated, and it seems to work virtually at least. (Two common mode chokes for low and high RF bands, ferrite beads for differential noise, cascaded 1uF X2Y capacitors with matched series resistors, 10nF X2Y capacitor, and biasing of the floating signal lines between 3.3V and ground using 1M resistors.) Some practical testing will definitely be needed to see what works.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Magiciaen on December 25, 2018, 11:41:26 pm
I've finished my design and PCB, and have sent it off for fabrication. I'll get it built in the next few weeks and will test it out thoroughly.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: steve1515 on December 26, 2018, 04:51:04 pm
I have been looking at the thermocouple amplifier circuit that comes with the 858D and I have what may be a stupid question...
In order to get temperature from a thermocouple, don't you need to know the temperature of the cold junction? I don't see anything that reads cold junction temperature in the circuit. It looks like they are just amplifying the thermocouple voltage but without compensation how could this voltage mean anything?

Can someone enlighten me on what I'm missing? I'm not seeing how this works to get absolute temperature at the thermocouple.
 :-//

EDIT: Added a picture of the example circuit (By: floobydust)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: floobydust on December 27, 2018, 07:19:56 am
There is no cold-junction compensation, it's not going to move around much compared to the hot air temp. I think it's a cost savings.
Just assume 25°C and the pcb/lab temperature might move around from 20°-30°C which is a few degrees error at most.

A quick look at the PCB, I don't see connector X1 or X3 pads having enough clearance to the surrounding pour. Hard to tell with OSH Park purple.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Magiciaen on December 27, 2018, 07:36:06 am
You're right, it's a good idea to increase the clearance for all the mains components. I didn't think to do that. Will add that in for sure.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Nighthawk on December 30, 2018, 02:19:22 pm
Hey guys,

I am kinda new here and I need a bit of help... I want to buy myself a hotair station, nothing fancy, just something "good" and cheap to do the job since I am a student  :D

I was looking intro 858D+ stations and I noticed there is a lot of different brands (variants??) on the market.

Whcih is the one I am after and is it possible to get it in EU?

Regards
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Magiciaen on December 30, 2018, 08:25:17 pm
Hi Nighthawk,

I think an 858D will probably fit the bill for you. The problem with getting one is you never know what you're going to get. In that there are a cacophony of slightly different designs on the market, with the same basic handpiece and general architecture. Even a particular 'brand name' if you can call them that, will sell units with completely different guts in the thing at different points in time. Unfortunately, vendors who sell these units can't tell you for certain what variant of boards are in them. Going through this thread, you'll see folks have made mod boards for particular 858D circuit board variants to implement Madworm's mod, but you don't really know for certain what type of circuit board you'll be getting in the 858D you order. I'd highly recommend Madworm's hack if you do get one and can implement it.

My own suggestion is to get one of the 858D's from RS Online in the UK. A problem with many of the 858D's sold is the atrocious mains wiring and grounding. I think you're a lot less likely to get something in that state from an RS Pro branded unit (but I'd still open it up and check, no matter where you get one from).

https://uk.rs-online.com/web/p/soldering-stations/1244133/

They go on sale there for 60 GBP if you're patient.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Nighthawk on December 30, 2018, 09:02:06 pm
thanks for your responce @Magiciaen

I was reading about the grounding issues and problems with wiring.

The first thing I am going to do when I get the station is to open in up and check for errors... in any case I am going to change the fuse and its housing... add the extra line between PCB and transformer...

I think I am going to order it from Aliexpress for 40€ (germany):
https://www.aliexpress.com/item/Hot-Air-Gun-700W-UYUE-858D-ESD-Soldering-Station-LED-Digital-Heat-Gun-Desoldering-Station-Upgrade/32657929118.html?spm=2114.search0104.3.9.ab3e5bc2LAwRSy&ws_ab_test=searchweb0_0,searchweb201602_3_10065_10068_319_317_10696_10084_453_454_10083_10618_10304_10307_10820_10821_10301_538_537_536_10059_10884_10887_100031_321_322_10103,searchweb201603_51,ppcSwitch_0&algo_expid=730c3e65-b8cd-4315-af5b-38075a635199-1&algo_pvid=730c3e65-b8cd-4315-af5b-38075a635199 (https://www.aliexpress.com/item/Hot-Air-Gun-700W-UYUE-858D-ESD-Soldering-Station-LED-Digital-Heat-Gun-Desoldering-Station-Upgrade/32657929118.html?spm=2114.search0104.3.9.ab3e5bc2LAwRSy&ws_ab_test=searchweb0_0,searchweb201602_3_10065_10068_319_317_10696_10084_453_454_10083_10618_10304_10307_10820_10821_10301_538_537_536_10059_10884_10887_100031_321_322_10103,searchweb201603_51,ppcSwitch_0&algo_expid=730c3e65-b8cd-4315-af5b-38075a635199-1&algo_pvid=730c3e65-b8cd-4315-af5b-38075a635199)

The seller has a lot of orders and I think it's the cheapest out there (in EU). It's not like I need this station every day, but for occasional use I think it will be more than OK!



Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: cowana on December 31, 2018, 04:19:26 pm
Just be aware that on the designs using a connector for the handpiece, they tend to use a male connector on the station side (for cost reasons).

This means that if the station is plugged in but the handpiece disconnected, there could be exposed mains on these pins - watch out for that whenever using the station!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Nighthawk on December 31, 2018, 04:32:18 pm
Thank you for this warning.

Do you think it's better to go after this one ?

https://www.amazon.de/L%C3%B6tstation-Entl%C3%B6tstation-Temperatur-Anzeige-100-450%C2%B0C-Hei%C3%9Fluftf%C3%B6hn-Mundst%C3%BCcke/dp/B07D75F48L/ref=sr_1_1_sspa?ie=UTF8&qid=1546273738&sr=8-1-spons&keywords=858D&psc=1 (https://www.amazon.de/L%C3%B6tstation-Entl%C3%B6tstation-Temperatur-Anzeige-100-450%C2%B0C-Hei%C3%9Fluftf%C3%B6hn-Mundst%C3%BCcke/dp/B07D75F48L/ref=sr_1_1_sspa?ie=UTF8&qid=1546273738&sr=8-1-spons&keywords=858D&psc=1)

I mean, I am not a stupid person, I won't touch the exposed pins, but in case someone else will use the station?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Nighthawk on January 10, 2019, 08:32:46 pm
Hey,

Today I got my 858. I ordered it from here (from warehouse in germany):
https://www.aliexpress.com/item/Hot-Air-Gun-700W-UYUE-858D-ESD-Soldering-Station-LED-Digital-Heat-Gun-Desoldering-Station-Upgrade/32657929118.html?spm=a2g0s.9042311.0.0.11ae4c4dDi3scD (https://www.aliexpress.com/item/Hot-Air-Gun-700W-UYUE-858D-ESD-Soldering-Station-LED-Digital-Heat-Gun-Desoldering-Station-Upgrade/32657929118.html?spm=a2g0s.9042311.0.0.11ae4c4dDi3scD)

I got 858D06.PCB 2017.03.14 with MK1840D3 MCU.

(https://i.imgur.com/7EUIYqH.jpg)


Looks like I will need floobydusts adapter. Did he share his project somewhere or is it possible to get a PCB from somewhere ?








Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: stan23 on January 10, 2019, 08:47:50 pm
PCB-Version: 858D06 (Version 6, both sides are green and mainly SMD components)
Microcontroller: MK1840D3

Build or order the adapter PCB designed by GiantGnome/wgujbas
This is necessary because madworms firmware is designed for the YouYue-Version, which uses an ATMEL micro controller.
The one which is installed on the UVISTAR (MK1840D3) is something like a SAMSUNG clone.
Both uC's aren't pin-compatible, hence we need an adapter. Furthermore, the YouYue-PCB-Version is reporting the fan speed to the micro controller, the ones with an SAMSUNG or MK184... uC are not, therefore we need to place additional components on the adapter (for reading out the fan speed, giantgnome and wgujbas are using simple voltage dividers to extrapolate from the FAN-Voltage - which is set by the potentiometer - to the FAN-Speed)


Giantgnome postet his PCB here (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg904746/#msg904746)
You can simply order a bunch of three pcb's for 5$ here (https://oshpark.com/projects/vLy9R74P) (includes shipping worldwide!)

I also have two PCBs left, and I'm located in Germany as well. Anyone interested?
I still have 2 left.
PN?

EDIT: not sure if shipping from Germany to Slovenia is more expensive than the PCBs incl. shipping from OSHpark directly  :-//
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Nighthawk on January 10, 2019, 09:13:49 pm
Hey,

This adapter is compatible with 858D06 & MK1840D3 right ?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: emocabras on January 17, 2019, 02:17:00 pm
hello; help me

my card is af858d cpu samsung s3f94c4ezz-dk94 I used mod cowana with reference tl 431 2.5v.

I succeed with calibration (  temp_offset_corr  )   to set correct actual temperature and display temperature.

if increase temperature to 500 the display will show maximum 466 with heating indication always access.

I verified that at 466 c ° the value adc is 999.

how can I calibrate so as not to overheat.


firmware  original madworm:




#ifdef DEBUG
      int32_t start_time = micros();
#endif
      static int16_t temp_inst = 0;
      static int32_t temp_accu = 0;
      static int16_t temp_average = 0;
      static int16_t temp_average_previous = 0;

      static int32_t button_input_time = 0;

      static int16_t heater_ctr = 0;
      static int16_t heater_duty_cycle = 0;
      static int16_t error = 0;
      static int32_t error_accu = 0;
      static int16_t velocity = 0;
      static float PID_drive = 0;

      static uint8_t temp_setpoint_saved = 1;
      static int32_t temp_setpoint_saved_time = 0;

      static uint32_t heater_start_time = 0;

      uint16_t adc_raw = analogRead(A0);   // need raw value later, store it here and avoid 2nd ADC read

      temp_inst = adc_raw + temp_offset_corr.value;   // approx. temp in °C

      if (temp_inst < 0) {
         temp_inst = 0;

firware mod cowana:


#ifdef DEBUG
    int32_t start_time = micros();
#endif
    static int16_t temp_inst = 0;
    static int32_t temp_accu = 0;
    static int16_t temp_average = 0;
    static int16_t temp_average_previous = 0;

    static int32_t button_input_time = 0;

    static int16_t heater_ctr = 0;
    static int16_t heater_duty_cycle = 0;
    static int16_t error = 0;
    static int32_t error_accu = 0;
    static int16_t velocity = 0;
    static float PID_drive = 0;

    static uint8_t temp_setpoint_saved = 1;
    static int32_t temp_setpoint_saved_time = 0;

    static uint32_t heater_start_time = 0;

    uint16_t adc_raw = analogRead(A0);  // need raw value later, store it here and avoid 2nd ADC read

   // tempRawAdc += adc_raw;  //for the raw adc average

    temp_inst = (adc_raw / 2.498) + temp_offset_corr.value; // approx. temp in °C

    if (temp_inst < 0) {
      temp_inst = 0;


thanks



Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: emocabras on January 18, 2019, 06:52:20 pm
I have set

temp_inst = (adc_raw / 1.9988) + temp_offset_corr.value; // approx. temp in ° C

now to be 999 with 500 ° temperature

be correct procedure?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Nighthawk on January 20, 2019, 09:02:47 pm
@Stan23

Thank you for your help and PCB.

I can't PM you, because you have a full inbox :)

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Mortymore on March 16, 2019, 06:11:42 pm
Bought a 858D+ at Amazon.de (https://www.amazon.de/gp/product/B07NKCNTW7/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1)

Besides the fact that it has no brand, the reference on the controller chip was erased, and it's SMD (20 pin).

The manual, in english, has no reference to brands and it's probably just a translation of the manual that most have in chinese.

Searched the forum for some intel, but seems that I have something slightly different here, since not even for the PCB I could found a similar reference, being mine 858D.PCB (so, no revision) and dated 2018.05.02

I was expecting though, that the controller was a MK184x, but after just looking for the connections to power supply, found that the GND is on pin6 and Vcc (5v) on pin 15. For what I found so far, seems that it can't be a MK or a S3. I didn't trace the board any further, since I assume that all connection will be similar to other boards, just routed to different pins on the chip since it seems that it's not pin compatible with the traditional ones.

The main components on this PCB are:
EL3041 (triac optocoupler)
BTA12 (triac)
24C02 (serial EEPROM)
OP07C (op.amp)
DB107 (bridge rectifier)
7805 (volt regulator)
TIP122 (Darlington NPN)
?????? (20 pin SMD controller)

Any idea of what controller it may be?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: lpg on May 01, 2019, 11:16:12 am
@Mortymore
also here in AUT - bought this one from AMA**:  UVISTAR 858D   (https://www.amazon.de/L%C3%B6tstation-Entl%C3%B6tstation-Temperatur-Anzeige-100-450%C2%B0C-Hei%C3%9Fluftf%C3%B6hn-Mundst%C3%BCcke/dp/B07D75F48L/ref=sr_1_2?__mk_de_DE=%C3%85M%C3%85%C5%BD%C3%95%C3%91&keywords=858d%2B&qid=1556532534&s=gateway&sr=8-2)

So after some quick measurements its appears that the PCB is the same as yours (858D.PCB (so, no revision) and dated 2018.05.02).
The "unmarked" uP is also a 20p SOIC - as all the other versions MK1840xxx - but the pins won’t match at all.

So the pinout was traces as following table:


Code: [Select]
AVR   Disc.       Print ref. 02.05.2018     MK18xxx
PC5   FAN                    Speed Pot. Pin @ R11
PC3   FAN                  5                   MK_10
PC0   ADC Thermo          9                   MK_11
PB1   Triac                  4                   MK_6

PB0   7-seg dig0           1                   MK_7
PB7   7-seg dig1           2                   MK_3
PB6   7-seg dig2           3                   MK_2

PD0   7-seg top         18                 MK_15
PD1   7-seg bot left    11                 MK_16
PD2   7-seg bot         13                 MK_17
PD3   7-seg top left    19                 MK_14
PD4   7-seg dot         14                 MK_5
PD5   7-seg bot right 16                 MK_18
PD6   7-seg middle         17                 MK_19
PD7   7-seg top right 20                 MK_13

PB5   SW up             8                   MK_8
PB2   SW down     7                   MK_9
PB4   reed             12                 MK_4

VCC                   15                 MK_20
GND                   6                   MK_1

According to the firmware from

Code: [Select]
* This is a custom firmware for my 'Youyue 858D+' hot-air soldering station.
 * It may or may not be useful to you, always double check if you use it.
 *
 * V1.47 (based on original V1.46)
 * 2016    - RaiHei
 * 2015/16 - Robert Spitzenpfeil
 * 2015    - Moritz Augsburger
 *
 * License: GNU GPL v2

I won’t remember the web location from the original files (any help appreciated)  - but you need the V1.47 due to some hardware changes at the heater/thermal calculation. I'll attach the binary’s here as well for the 328P and 168P.
Code: [Select]
AVR fuses:
lfuse:w:0xE2
hfuse:w:0xDF
efuse:w:0xFD

I also have made a PCB back then in 2017 for my first 858+ - these would come handy here :-+
So i glued some spacers on the board - put the old mod-PCB on top and run some wires down to the original 20p SOIC.
Upload the code - tested it with the lab supply (5V) after the 7805 - it worked perfectly.

I tested it beforehand with a incandescent bulb to see what the triac is doing.

All done - connected it back together and we are good to go with the calibration. (Press the two buttons at the same time)
The "TPL" parameter has to be changed from 10 to some ware between 18 and 21 - depends on the gun/heater and the calibration process.
 
So far - thats it.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Mortymore on May 01, 2019, 12:22:10 pm
@ lpg

Welcome to the forum!

Fantastic job you have done, and thanks for sharing it!  :clap:

Suppose I have to put my hands on the guts of my 858D+ one of this days, thanks to you.  :-/O

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ride_bmx_mhell on June 01, 2019, 11:06:55 am
i bought yihua858d recently,i want t try custom firmware to this unit but it has different layout and components.
i found a
s3f94c4ezz-dk94 microcontroller chip
7805 smd vreg
tip122
lm358
bta16 triac
3401 isolator
..need pointers where to start?
 :-//
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Jatz on June 08, 2019, 01:11:30 pm
I've just received an 858D and was pretty disappointed to find it has the same mystery 20 pin SOIC as reported by Mortymore and lpg.

The date code on mine is even older than theirs (2018.05.02), mine is apparently from 2017.09.23! Board label is simply 858D.PCB with no revision identified.

(https://i.ibb.co/GF06BRw/858d-board-compressed.jpg)

I was hoping/expecting the brains to be in a DIP package. Bit of a recursion problem for hacking at it since the unit itself was a purchase made to train myself on surface mount work too.  |O Weighing up options now.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: lpg on June 11, 2019, 12:28:25 pm
Hi together!
finally I managed this to get up and running.
There is a serious design "difference" in the 20Pin SOIC version.
The heater control signal to the MOC3041 is now driven from an additional transistor (Q5). So every custom firmware from the past would most likely kill the heater right after power up!

I desoldered the driver transistor Q5 and replaced the combination R14,Q5 with roughly 500R of total resistance.
Now I can user the Firmware as described earlier
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Atanas79 on June 11, 2019, 07:12:46 pm
Hello
I got a different board than the ones shown.
It uses MCU HR7P169 .
Anybody can help how can i connect this MCU  to the computer and read the code to have it in the future

Chips using in this device :

Upper left -> Eastsoft HR7P169BFGTF

Upper right  -> F7103

in the middle on pcb -> LM358

in the  below the transformer -> PN8370

Using moc3023  who the control bta12/800A

Power direct from AC 230v / 50 Hz
 
https://ibb.co/jV34VTm (https://ibb.co/jV34VTm)
https://ibb.co/gPWNKGP (https://ibb.co/gPWNKGP)
https://ibb.co/nn9Dmv5 (https://ibb.co/nn9Dmv5)


Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: colourspace on July 08, 2019, 02:59:59 am
Newbie here. Just received my 858D clone from Amazon branded as the "YAOGONG YG 858D" and popped it open. I'm still reading through the thread, but it looks like this one has a PCB revision that hasn't been cataloged yet. I thought I'd share some pictures and info.

PCB: 858DA.PCB
DATE: 2017.11.13

My initial safety checkout revealed that the tip was grounded to mains ground, but there was an issue with the fuse. IEC to NEMA adapter had the L and N wires switched, meaning that the fuse was on N instead of L. I replaced it with a proper adapter and swapped the connections to the board. I'm still doing my research on 858D safety and mods so I imagine there will be some future changes as well.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: netdudeuk on July 09, 2019, 08:29:55 am
Does that through hole joint near R21 need reflowing ?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: torjdrez on July 10, 2019, 04:42:06 am
Hi Madworm.. I Have a 4 in 1 Station Baku BK-862D++ it has IRDA Top heater, IRDA Preheater, Soldering Iron and HOT Air Station.

Recently i tried to replace malfunction pot for IRDA Top Heater.. the control board are integrated like picture 2..
as careless i'm and bad design the wire plug for the 5v supply and switch for Hot air station are identical, i missplace the 5v to the switch side that shoot 5v directly to avr pin SCK ATMEGA8L-8AU.. Now the Hot air controller are dead.. i tried to isp backup the firmware but the chip are not detected,

my beg is can you tell me how to change the  pin assignment of you custom firmware, as i trace the design of my station unit.. the used components are almost identical, except the input are using rotary encoder..
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: torjdrez on July 12, 2019, 03:15:26 pm
Can any one help me to guide which file should i modified to change the pin assignment.. i tried the *. ino file but still not work.. i'm totaly newbie to arduino or avr programing.. any help will be very appreciated..
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on July 13, 2019, 09:53:21 am
I updated the index to include references and items for some of tne new layouts

S3F94C4EZZ MCU
YH858D V11 - no map

SMT MCU (not pin-compatible with MK184x)
858D.PCB - map
858DA.PCB - partial map (this may be compatible with 858D.PCB)

HR7P16x MCU
KSD858DP - partial map
LST1703 - no map
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Atanas79 on July 25, 2019, 05:42:26 am
How Chinese technicians record the program in the chip HR7P169 :)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: jmbinette on August 16, 2019, 03:46:10 pm
Anyone have a source for the adapter boards to suit Samsung S3F94C4EZZ ic's ?  I PM'ed wguibas a while ago but haven't heard back from him, and he seems not to have been active on this forum for a few months.
Tried the attachment under this post: https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg782035/#msg782035 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg782035/#msg782035)

What worked for you?

 I have a clone called Sigma R700 from Amazon, looks nice (no rear bezel, only front)
has the same samsung chip as yours.

Hi,

I don't want to hijack this thread but I got the same unit as @oolloo

Would you mind have a look at my latest post and tell me what you think ?
https://www.badcaps.net/forum/showpost.php?p=910415&postcount=15 (https://www.badcaps.net/forum/showpost.php?p=910415&postcount=15)

Thanks !
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ebastler on September 03, 2019, 06:40:28 pm
Got my new "Youyue 858D+" today, after I couldn't convince myself to spend several times its price for a better hot-air station. While I had obviously been prepared by this and other threads, I am a bit disappointed with the build quality.

I had bought the "luxury" version with proper IEC socket in the back and jack/plug for the handpiece connection, hoping that this version has not been value-engineered to death. (My death, potentially... ;))  But the safety ground connections are flimsy to non-existent, and the soldering quality leaves a lot to be desired.

Given that I will need to spend some time with this unit to get it in shape, I thought I might as well look into modding the firmware and sensor. But I fail in step 1: How do I figure out which board version I have, and which adapter I might need?

I have found DGM's list of boards and adapters (many thanks for that!). But my board version, labelled "858D.PCB 2018.05.02", does not seem to be listed. It has an unlabelled processor in an SOIC package. Where do I go from here? Many thanks for helpful hints!
Title: KKMoon 858D - reverse engineering
Post by: Tig3rch3n on September 27, 2019, 01:57:22 pm
Hey ho Guys,

I recently bought one of those newer ish style 858D’s Branded “KKMoon 858D”
@Hotair Posted about I a couple of months ago but nothing seems to happen in between.

My Device is mentioned https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1575175/#msg1575175 (https://www.eevblog.com/forum/reviews/youyue-858d-some-reverse-engineering-custom-firmware/msg1575175/#msg1575175) and in DGM’s Reference Document Line 149 to 151.
My guess is they are all Identical internally but who knows.

The PCB has the Printing “FED REV1.6” and “PCB000033” on it.

I have figured out most of the Pinouts, missing is “ADC temp sense” and “fan sense (input)”

One issue I have is, the Triac/Opto-Cop.
I think it is >Off on Pin high< instead of >On on Pin high<

And I’m not sure about the two missing pins U_u Temp and Fan sense  |O
I'll Post some High-Res Images and my crude Schematics later :P

Cheerse
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Tig3rch3n on October 03, 2019, 10:23:02 pm
and Round 2 for the Images
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: radiolistener on October 03, 2019, 11:10:35 pm
I bought a new 700W 858D, it has EASTSOFT HR7P169 chip. Unfortunately seller didn't provided any manual.
I didn't tried to remove front panel, but it looks exactly the same as these with KSD858DP marking.

Does anyone have idea on how to calibrate it?

When I tried to power on with pressed left button it enters in some engineering mode and prompts to enter some value. Any idea what it means?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: junkman77 on October 04, 2019, 07:02:55 pm
I saw your board on oshpark https://oshpark.com/shared_projects/NQGwEEH0 and it should fit my hot air station exactly (same board and date code).
Do you have a parts list or BOM for it?

FYI, the brand on mine is TXINLEI and i got it off Amazon a couple of weeks ago.

Thanks!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: cowana on October 14, 2019, 09:11:19 pm
I saw your board on oshpark https://oshpark.com/shared_projects/NQGwEEH0 and it should fit my hot air station exactly (same board and date code).
Do you have a parts list or BOM for it?

FYI, the brand on mine is TXINLEI and i got it off Amazon a couple of weeks ago.

Thanks!

Please see the schematic attached to reply #613 (04-02-2018, 22:48:24) for component info.

The 0.1" headers are standard SMD headers from Samtec (or equivalent)
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: fcs on October 21, 2019, 10:27:35 pm
Hi,

I own the same KKMOON 858D hot-air station as in Reply #755, it was just one of the cheaper ones I found at ebay and had a spare heater unit included.
It is my first hot-air tool, I don't really have any experience using or comparing these, but I had a look inside because I've read some stories about bad wiring. It looks to be the same version as shown on the photos.

I did not find any terrible mistakes, and the station works for my (for now) limited use.

I don't know if this firmware update is needed, the station seems to show the setpoint temperature while you are using the buttons, but then switches to a measured value. It just shows a quick temperature raise with a hard stop at the selected temperature (without any overshoot, maybe it is lying). I don't have any other way of measuring and comparing the temperature. The single page manual doesn't mention any calibration procedure.

But if you are looking for an Atmel ATMega based station this one can be recognized even on crappy ebay pictures just by the button placement.

If i'm bored i might have a closer look at the insides and maybe play around with this possible new firmware, what is still missing to adapt and build it for this hardware? Just the different pinout? or a full ciruit trace?

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: fcs on November 17, 2019, 02:45:34 pm
I had some time to play around with the KKMoon 858D and was able to get the alternate firmware running on this hardware.

This is still a work in progress, I do not own a thermometer to measure the air temperatures and so can't check if the displayed temperatures are even close to correct.

The heater control parameters are unchanged from the older settings for the Youyue hardware and could use some tuning, at the moment there is some overshoot in temperature control.

The adapted firmware can be found on github:
https://github.com/fsteinhardt/KKMoon-858D
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Atanas79 on December 02, 2019, 09:32:39 pm
I bought a new 700W 858D, it has EASTSOFT HR7P169 chip. Unfortunately seller didn't provided any manual.
I didn't tried to remove front panel, but it looks exactly the same as these with KSD858DP marking.

Does anyone have idea on how to calibrate it?

When I tried to power on with pressed left button it enters in some engineering mode and prompts to enter some value. Any idea what it means?

For Calibrate
https://www.youtube.com/watch?v=7A6Nm6zJaas (https://www.youtube.com/watch?v=7A6Nm6zJaas)

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: sunrisedx on January 23, 2020, 02:40:52 pm
Hi, I bought the 858d+, does it support firmware?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: hellzakk on March 07, 2020, 05:00:57 pm
Hi together!
finally I managed this to get up and running.
There is a serious design "difference" in the 20Pin SOIC version.
The heater control signal to the MOC3041 is now driven from an additional transistor (Q5). So every custom firmware from the past would most likely kill the heater right after power up!

I desoldered the driver transistor Q5 and replaced the combination R14,Q5 with roughly 500R of total resistance.
Now I can user the Firmware as described earlier

Hi all, it's write 500R but the pic show 2 x 240 smd resistor so 2 x 24 ohm... whats the correct value 500 ohm or 50 ohm?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: h3llb3nt on April 04, 2020, 09:07:29 pm
been trying to get my zeny unit working for about a month now with only frustration.

i have had the DGM version 2 board made as that was what was on the board mod matrix. I populated it with all of the components, made the button trace cut modifications so both buttons can be pressed simultaneously, and attached a wire from the fan positive connection to the fan_sense pad of the DGM board.

i hook everything back up and i get two things:
1) all text on the display is backwards. the firmware displays 641 instead of 146. and then
2) i get FAN SPD (backwards of course).

i cannot enter setup by long pressing both buttons even though i believe i have done the mod properly.

if i restart with the wand out of the cradle i get the cradle warning (backwards) and then if i replace it i go right back to fan spd.

anyone have any ideas? just about ready to throw things thing into a volcano.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: DGM on April 06, 2020, 11:57:54 am
I'm not sure how the digit order got backwards, but I did say that they were untested layouts... 
Whether it's a difference in the boards/firmware, or if it's some dumb mistake of mine, you should just be able to change those outputs in the firmware so that they're in the right order. 

just look for these lines in the header file:
#define DIG0_ON ( PORTB |= _BV(PB0) )
#define DIG1_ON ( PORTB |= _BV(PB7) )
#define DIG2_ON ( PORTB |= _BV(PB6) )
and edit them accordingly

As to why the button chords don't work, I'm not sure.  Do the buttons individually work?  I don't remember much about the required mods, but iirc, there was more than one way of doing it. 
The fan speed thing probably just needs the scaling factor or the threshold values set in the firmware.  I think one of the spreadsheet pages has notes on setting that.  I suppose you could just disable it in the firmware just the same.  I was under the impression that the fan speed sensing was disabled by default. 

In case you haven't noticed, I really don't keep up with this thread any more.  Sorry about that.
I wish I had a volcano.  Hell, I'd settle for a tall cliff with pointy rocks at the bottom.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: h3llb3nt on April 06, 2020, 01:00:36 pm
yeah i know its an untested layout. i knew they probably wouldn't be perfect...

i did try to edit those DIGx definitions (reversing them so that PB0 was PB6 and vice-a-versa) but that didn't seem to help... and i would have thought that would have done it. i actually tried that before i wrote my plea for assistance.

buttons did work before any mods. i supposed i could put the original micro controller back in and undo all the stuff to get it back to stock and see if that setup works again.

oh well. i think i'm about ready to throw in the towel. i do appreciate your help.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: decayed.cell on April 30, 2020, 08:16:50 am
Thanks DGM, that's an excellent summary this thread has been lacking!

The important bit you're missing from me is the name of the 'unknown name board' - as shown in the attached picture, it is marked AF858D, and dated 20161212.

In case you want to add it, the details of the adapter board I developed for this PCB are below:
  • Schematic: attached
  • PCB: https://oshpark.com/shared_projects/NQGwEEH0 (https://oshpark.com/shared_projects/NQGwEEH0)
  • Features:
    • TL431 reference
    • Vfan and current sense support
    • ISP header
    • MLF-32 ATmega package

The ADC scaling factor for this board when used with a 2.5v reference was 2.4 in my case.

Thanks for this, and thanks for making it open source. I got this printed out and soldered up. But when I plug it into the hot air station it briefly fires up the gun, shows AAA on the display and then 888 and then doesn't work. The ATMEGA programs successfully with all the fuse bits. Do you think this would be a faulty ATMEGA or a problem with my soldering somewhere
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ishergin on June 05, 2020, 10:07:15 pm
Hi, I bought the 858d+, does it support firmware?

I've bought the same model, but I've issue with fan speed control after 300C. I can't set low fan speed after temperature settings above 300C (the fan speen increases significantly).
Does anyone have a similar issue?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: dlkeng on August 13, 2020, 08:39:48 pm
I recently purchased an 858D from eBay labeled Persder-858D.

This 858D appears very similar to other 858D's, except that the temperature setting and fan speed controls are in the opposite order on the front panel and the temperature calibration potentiometer is not accessible via the front panel. The unit I received was in fairly good condition except that the AC power cord was mis-wired with the hot and neutral swapped. The main circuit board was quite dirty but was reasonably well constructed. The chassis ground wire to the hot air handle was poorly connected as well.

Anyway, I reverse-engineered the schematics for the unit and have put them on my github at: https://github.com/dlkeng/Persder-858D
(also attached)

The microcontroller (MCU) used in the Persder-858D has no markings but is a 20-pin DIP device (in a socket) that appears to be connected the same as the MK1841D3 MCU used in the Baku 8585D.

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: necessaryevil on November 08, 2020, 09:35:50 pm
I recently purchased an 858D from eBay labeled Persder-858D.
The unit I received was in fairly good condition except that the AC power cord was mis-wired with the hot and neutral swapped. The main circuit board was quite dirty but was reasonably well constructed. The chassis ground wire to the hot air handle was poorly connected as well.

Anyway, I reverse-engineered the schematics for the unit and have put them on my github at: https://github.com/dlkeng/Persder-858D
(also attached)
[...]
Great job. I wouldn't worry to much about the phase and neutral being swapped, a lot (most?) countries have reversible plugs, some countries have split phase.
I'm going  to buy one and I'm very happy with this thread. I'll spend some time reading so I'll find an easy to hack 220v unit.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: necessaryevil on November 10, 2020, 04:00:39 pm
I have found that cheap spare pcb's are available. Ideal for a mod, it's always possible to go back. I don't know which versions of the boards are sold, maybe anyone knows?: https://www.aliexpress.com/w/wholesale-pcb-858d.html?seoChannel=wholesale&trafficChannel=seo&d=y&SearchText=pcb+858d&ltype=wholesale&SortType=price_asc&groupsort=1&CatId=0&page=1 (https://www.aliexpress.com/w/wholesale-pcb-858d.html?seoChannel=wholesale&trafficChannel=seo&d=y&SearchText=pcb+858d&ltype=wholesale&SortType=price_asc&groupsort=1&CatId=0&page=1)

//edit
I bought this hot air station (https://www.ebay.nl/itm/858D-220V-SMD-Soldering-Desoldering-Station-Hot-Air-Rework-Gun-Tool-3-Nozzles/264476224394?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649) and this this spare board (https://www.aliexpress.com/item/32903214068.html?spm=a2g0o.productlist.0.0.77705505nqA9HL&algo_pvid=6ec61def-f806-4555-9716-c0f74396afe2&algo_expid=6ec61def-f806-4555-9716-c0f74396afe2-1&btsid=2100bb4916051132146906834e9dc0&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_). I'm now waiting for delivery.

//edit 2
I received the 858D. I opened it up to check out the wiring, also,  I needed to replace the UK plug for an European one. I could only find one issue: the tab of the TIP122 transistor wasn't properly soldered down to the pcb, so I fixed that. It seems that I got a good clone. It uses smd parts and it even has isolation slots. Also, the software is updated.  The display now shows the actual temperature.

[attach=1]
[attach=2]

Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: sunkmail on December 25, 2020, 10:27:26 am
Hi Everyone,

Just signed up here specifically to post about this one ...

I ordered a 858D from Aliexpress and just received it.    It is Branded as a "Sumsour"


It appears to have a new PCB design that hasn't been mentioned anywhere that I can find.

    PCB Model:         KSD858DP  REV B
    PCB Date:          2020-04-22

    Assembly Date:   Oct. 2020

I've disassembled and found almost none of the problems listed for other models.

The wand doesn't have the interconnect board I've seen & has an actual connector to the heating element.  (I did get a spare with the purchase too)
The grounding seems to be firmly attached to the metal shroud as well.


The only header is labeled:  SCK SDA GND VCC RST


From an assembly standpoint, the only things that weren't ideal were:

1) Case Ground
        There is a crimped & soldered ring terminal attached to the metal case via machine screw.
           However, The paint was not removed prior to connecting.
        Continuity test did show a pretty good connection anyway, but I still corrected, just in case.


2) Power Cord (IEC)
        The internal wiring of the unit was fine.  Fuse on the proper pin and all that.
        The CABLE was wired incorrectly.   N & L switched.
               Presumably a batch of discount cables that didn't meet QC.

I didn't have another cable handy, so I haven't actually tested the unit yet, so I don't know how the firmware operates yet.
      I should be able to dig out a spare sometime soon (I hope)




I was able to quickly snap a few pics before I had to head out.
(Forgot to grab one of the front of the assembled unit)


Any ideas if the firmware can/should be updated on this one?
    (I figure at some point, they're probably just going to start using one of the custom ones anyway  ;D)
 
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: zakk on January 01, 2021, 09:00:35 am
G'day. I'm a long time lurker, first time poster  :-/O

I bought an unbranded 858D+ a while back (I believe 2019) and discovered the various mods recently. I have however come across a snag. The PCB in mine is unlike any others that I've seen listed here or the various other places. From what I can tell via a single korean blog post, it's a 2019/2020 revision but it has no identifying markings on the silk screen, bar HYQ858D.

The MCU has had it's markings removed by the manufacturer  |O but it is a 20 pin DIP IC. I've started to trace the pins out, but pin 1 is GND and 20 is VCC. I'll post more on that when I've finished.

I've attached some photos and can provide more/extra info if required.

I'm hoping that someone might know what the MCU on this version is (and I've been too dumb to find a post on it) or could provide some help.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: sunkmail on January 03, 2021, 01:03:24 am
Hi Again,

I managed to trace out all the controller connections.
      (I didn't bother with the PS components.)


It appears that the EastSoft uC, HR7P169BFGTF Chip does have ISP pins brought out the the pin header, J1.


From what I can see on @DGM 's  compatibility chart, this chip hasn't been fully traced out before, so I'm guessing there isn't a compatible version of the custom firmware yet.

I don't think replacing the controller is going to be as easy as a daughterboard going into a DIP socket....
     Does anyone have experience programming these devices?
     How hard would it be to port the custom code?

Thanks!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: cinealfa on January 11, 2021, 11:00:07 pm
I have finally assembled my MK1841D3 conversion board, and it works like a champ.  Thank you madworm for your awesome firmware, and wguibas for the MK1841D3 layout.
Now if you only included the component values.....
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: cinealfa on January 14, 2021, 11:15:40 pm
Since the original poster went Mia  and his pm box won't accept any more messages. I have found all of the relevant information Located here:
>https://hackaday.com/2017/05/25/hack-your-hot-air-station/< I do not know it if it the same individual who designed the board (I suspect not given their lack of follow up) but he provided all of the missing information that OP neglected to provide here. Hope it helps someone. It sure did me.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Miti on January 16, 2021, 09:47:52 pm
Recently I bought an almost brand new Yihua 858D on Kijiji, a site similar to Craigslist, for $55 CAD. Overall decent quality, the fuse and switch are on the live wire, the wand is properly grounded, no complains. I tried to calibrate it, it works pretty well for the temperature you calibrate at , but the other end is not really accurate. Therefore I calibrated it around 380C, the temperature that I will probably use most of the time to solder/desolder parts. Close to the lower end 200C it is lower by about 10C, and close to the upper end 450C it is higher by about 5C, so no big deal. It does overshoots when changing the temperature by about +/- 30C, but it stabilizes in about 30 seconds to a minute and is reasonably stable after that, about +/- 2 - 3C.
One issue that I found was that one wire that goes to the triac was reversed, so the triac was on the neutral line rather than live. I swapped the contacts in the connector housing as I want the heater in the wand to be at zero volts when it is in the cradle.
When I bought it I hoped that it is similar to Youyue and I can hack it, and it is but also has some differences:
1. The display is common anode.
2. The optocoupler that controls the triac is drived through an NPN transistor, rather that directly from MCU port, so the control is inverted.
3. The thermocouple amplifier (LM358) is supplied with 5V only, there's no negative voltage on the board.
4. There's no fan voltage sense to the MCU.
5. UP and DOWN buttons inputs are shared with the LED display segments B and F.

The MCU map is:

Pin     Function
1        GND
2        LED E
3        LED D
4        NC
5        LED DP
6        LED C
7        LED G
8        LED A
9        LED F shared with DOWN SW
10      LED B shared with UP SW
11      Triac Drive (positive logic)
12      REED SW
13      TC Temp
14      CON7 Pin (Not sure what this is for)
15      NC
16      FAN ON/OFF
17      DIG3 +
18      DIG2 +
19      DIG1 +
20      +5V

@ madworm
If I make an adapter from S3F94C4EZZ to Mega328P, could you help with the SW changes? Display and triac polarity is easy, I may need some help with the temperature measurement and buttons.

Thanks,
Miti
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Miti on January 16, 2021, 09:53:16 pm
More pictures.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: oskimac on January 19, 2021, 02:47:20 am
Hi, recently i bought the KSD858DP  from amazon and the desssssssssssssssssiptions said 220/110v
 but the back of the unit has a label  "input 110v~ power 700w"
should i plug to 220v? or it will blow
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ROSCH76 on January 19, 2021, 11:20:28 am
Hey guys,

any news for the KSD858DP Rev B with HR7P169BFGTF ?

greetings from germany
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: oskimac on January 19, 2021, 12:58:45 pm
Is yours 220?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: ROSCH76 on January 19, 2021, 02:40:39 pm
yes 220.

i see sunkmail already mapped out all connections. will it somehow be possible to use custom firmware on this board ?

Hi Again,

I managed to trace out all the controller connections.
      (I didn't bother with the PS components.)


It appears that the EastSoft uC, HR7P169BFGTF Chip does have ISP pins brought out the the pin header, J1.


From what I can see on @DGM 's  compatibility chart, this chip hasn't been fully traced out before, so I'm guessing there isn't a compatible version of the custom firmware yet.

I don't think replacing the controller is going to be as easy as a daughterboard going into a DIP socket....
     Does anyone have experience programming these devices?
     How hard would it be to port the custom code?

Thanks!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: TechieTX on January 22, 2021, 02:34:54 am
I just picked up a Yaogong 858D, mostly 'cos the ad showed the back of the board and I saw a DIP-20 micro.  Nope!  Bogus pic, it's got the 858D.PCB 2018.05.02 board in it.  On the plus side, it has a fused IEC connector, and it looks pretty clean at the power entry.  Some sloppy workmanship that I'd be embarrassed to have done, but I kinda expected that.  It passes a basic safety inspection.

I've been reading this thread on and off but haven't seen if anyone did an open-source bare board with an AVR micro that I can order.  I figured the folks here can't possibly do worse than the Chinese.  I googled Oshpark and only got a hit on the adapter boards, except for something from a person named Maker(something).  I didn't look that one up.  ;)  Same story on EasyEDA, same newbie.  I don't see anything here except this thread for mods.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: zakk on January 24, 2021, 09:00:51 am
I still haven't worked out what the micro on the HYQ8588D marked board is, but I have finally gotten around to tracing out and drawing up the board.

All capacitors with a " ? " in the value field are unknown (presumed to be 100nF) as I'm too lazy to remove one and measure it.
There might be a mistake or two, but it's overall accurate.

I did remove the micro and noted that the underside has " 18CNAZOB e3" printed on it, but that naturally returns zero hits on google.
Any advice on identifying it would be highly appreciated.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: Mareus on February 10, 2021, 10:46:22 am
I have found that cheap spare pcb's are available. Ideal for a mod, it's always possible to go back. I don't know which versions of the boards are sold, maybe anyone knows?: https://www.aliexpress.com/w/wholesale-pcb-858d.html?seoChannel=wholesale&trafficChannel=seo&d=y&SearchText=pcb+858d&ltype=wholesale&SortType=price_asc&groupsort=1&CatId=0&page=1 (https://www.aliexpress.com/w/wholesale-pcb-858d.html?seoChannel=wholesale&trafficChannel=seo&d=y&SearchText=pcb+858d&ltype=wholesale&SortType=price_asc&groupsort=1&CatId=0&page=1)

//edit
I bought this hot air station (https://www.ebay.nl/itm/858D-220V-SMD-Soldering-Desoldering-Station-Hot-Air-Rework-Gun-Tool-3-Nozzles/264476224394?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649) and this this spare board (https://www.aliexpress.com/item/32903214068.html?spm=a2g0o.productlist.0.0.77705505nqA9HL&algo_pvid=6ec61def-f806-4555-9716-c0f74396afe2&algo_expid=6ec61def-f806-4555-9716-c0f74396afe2-1&btsid=2100bb4916051132146906834e9dc0&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_). I'm now waiting for delivery.

//edit 2
I received the 858D. I opened it up to check out the wiring, also,  I needed to replace the UK plug for an European one. I could only find one issue: the tab of the TIP122 transistor wasn't properly soldered down to the pcb, so I fixed that. It seems that I got a good clone. It uses smd parts and it even has isolation slots. Also, the software is updated.  The display now shows the actual temperature.


I also have this "858DT.PCM" from 2020-06 in my unit. I am a little bit worried that the PCB itself is not grounded despite that 220V AC is going to the PCB. Is there any reasonable and safe way to also ground the PCB? Where should I attach a wire? Thank you very much for your help.

Best regards,
Mareus
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kelavpp on May 31, 2021, 02:00:14 pm
Hi guys! I'm professional electronics but not much in coding. So if you'd be kind, someone to CHANGE THE SKETCH for COMMON CATHODE DISPLAY, it would be very nice and helpful to me. I'm using Atmega328P. I have dozen of those displays common cathode, so I would not like to buy another one specially for this
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kelavpp on May 31, 2021, 07:17:41 pm
Hi Mareus. The power supply should be grounded to 'minus' point somewhere. Should be grounded the wand too, inside should be a wire attached to the metal part of the wand
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: greezlee on June 13, 2021, 09:48:39 am
Hy, guys!

I bought from Aliexpress a 858D digital PCB board for my heat gun control panel. (220v Digital display desoldering circuit IC pull  Heat gun control panel 858d circuit PCB board temperature control board https://a.aliexpress.com/_mNzAIc9).

The board I received is different fron the one in the Aliexpress a ounce pictures.

I don't know what is the use of the F/C Sw from the left corner. Do you know it's use? Please help me!

Many thanks!
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: sunkmail on June 13, 2021, 10:44:54 am

I don't know what is the use of the F/C Sw from the left corner. Do you know it's use? Please help me!


Just a guess -  Set display to Celsius or Fahrenheit ?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: shuum on July 18, 2021, 01:21:21 pm
Recently I bought an almost brand new Yihua 858D on Kijiji ...
If I make an adapter from S3F94C4EZZ to Mega328P, could you help with the SW changes?

i bought yihua858d recently,i want t try custom firmware to this unit but it has different layout and components.

I have the same hot air station as yours. Did you manage to convert it to use a microcontroller from ATMEL? Thnx

P.S. Or maybe you managed to find a circuit diagram for this revision (YH858D_V14)?
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: shuum on July 21, 2021, 04:00:37 am
I decided to take the first steps: adapted the original 1.46 firmware, drew a diagram and spread the board taking into account the peculiarities of YH858D_V14 (for example, I had to make a hole in the board for an electrolytic capacitor).
The circuitry of this revision of the board is very similar to this (https://disk.yandex.ru/i/H5qIwJIvoOHXBg) but not completely (more info here (https://blog.enbewe.de/posts/2018-06-21-saike-858d-original-schematic/) and here (https://blog.enbewe.de/posts/2018-06-21-saike-858d-original-schematic/))! You can read about the principles on which the FAN speed MOD works here (https://disk.yandex.ru/i/gnLtaY5_LmLmcA).
:bullshit: Because the circuit diagram of the FAN speed MOD completely repeats that of the madworm, then the mod should be configured according to its instructions (https://github.com/madworm/Youyue-858D-plus-FAN-speed-mod/blob/master/Docs/howto.txt). I'm writing code in Microchip Studio with installed plugin Visual Micro and program with AVRISP mkII with this MOD (https://forum.arduino.cc/t/add-power-to-an-atmel-avrisp-mkii/122925) (fuses here (https://disk.yandex.ru/i/bfMY550beVwAFQ)).

You can quickly and inexpensively order these boards v.1.0 here:
   https://www.pcbway.com/project/shareproject/W297402ASG6_gerber_adapter.html (https://www.pcbway.com/project/shareproject/W297402ASG6_gerber_adapter.html)
   https://www.pcbway.com/project/shareproject/W297402ASG7_Gerber_FAN_speed_MOD.html (https://www.pcbway.com/project/shareproject/W297402ASG7_Gerber_FAN_speed_MOD.html)

Because in the process of assembling and adjusting this solution, I identified some shortcomings (bugs), namely:
Then I developed the next version 1.1 of the solution, you can download full Altium 21 project: here (https://disk.yandex.ru/d/zmK1xYEIkhwr0w) (and here (https://disk.yandex.ru/d/_ZUFgDRKTWMHSw) if you don't have Altium). Attention! This version was not tested by me in hardware. I am quite satisfied with version 1.0, but maybe it will be useful to someone. Version 1.1 uses the same firmware as version 1.0.

P.S. I express my deepest gratitude to the respected @madworm (https://www.eevblog.com/forum/profile/?u=55) and @Miti (https://www.eevblog.com/forum/profile/?u=10312), because without their developments, everything would have become much more complicated.
P.P.S. I apologize for the comments in the code in Russian, but this is my native language.
Title: Re: Youyue 858D+ some reverse engineering + custom firmware
Post by: kenzo42 on September 19, 2022, 02:09:22 am
Has anyone gotten this board and successfully modded it?