Author Topic: Youyue 858D+ some reverse engineering + custom firmware  (Read 423963 times)

0 Members and 2 Guests are viewing this topic.

Offline wguibas

  • Supporter
  • ****
  • Posts: 125
  • Country: us
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #150 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.



Updated with ICSP header, redownload if gotten early.
« Last Edit: October 21, 2015, 03:50:06 am by wguibas »
 

Offline wguibas

  • Supporter
  • ****
  • Posts: 125
  • Country: us
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #151 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. 

« Last Edit: October 21, 2015, 12:17:29 pm by wguibas »
 

Offline wguibas

  • Supporter
  • ****
  • Posts: 125
  • Country: us
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #152 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.   
 

Offline madwormTopic starter

  • Frequent Contributor
  • **
  • Posts: 371
  • Country: de
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #153 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.
 

Offline brainwash

  • Frequent Contributor
  • **
  • Posts: 463
  • Country: de
    • Hack Correlation
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #154 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.

 

Offline wguibas

  • Supporter
  • ****
  • Posts: 125
  • Country: us
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #155 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.
 

Offline madwormTopic starter

  • Frequent Contributor
  • **
  • Posts: 371
  • Country: de
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #156 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...
 

Offline madwormTopic starter

  • Frequent Contributor
  • **
  • Posts: 371
  • Country: de
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #157 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).
 

Offline wguibas

  • Supporter
  • ****
  • Posts: 125
  • Country: us
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #158 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?
 

Offline madwormTopic starter

  • Frequent Contributor
  • **
  • Posts: 371
  • Country: de
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #159 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.
 

Offline wguibas

  • Supporter
  • ****
  • Posts: 125
  • Country: us
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #160 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?
 

Offline wguibas

  • Supporter
  • ****
  • Posts: 125
  • Country: us
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #161 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.
 

Offline madwormTopic starter

  • Frequent Contributor
  • **
  • Posts: 371
  • Country: de
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #162 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.
 

Offline wguibas

  • Supporter
  • ****
  • Posts: 125
  • Country: us
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #163 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

« Last Edit: October 22, 2015, 03:40:11 pm by wguibas »
 

Offline wguibas

  • Supporter
  • ****
  • Posts: 125
  • Country: us
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #164 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.
   


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



 

Offline madwormTopic starter

  • Frequent Contributor
  • **
  • Posts: 371
  • Country: de
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #165 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.
 

Offline wguibas

  • Supporter
  • ****
  • Posts: 125
  • Country: us
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #166 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
« Last Edit: November 18, 2015, 11:14:41 pm by wguibas »
 

Offline timofonic

  • Frequent Contributor
  • **
  • Posts: 904
  • Country: es
  • Eternal Wannabe Geek
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #167 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?
« Last Edit: November 18, 2015, 11:54:43 pm by timofonic »
 

Offline Shock

  • Super Contributor
  • ***
  • Posts: 4278
  • Country: au
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #168 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.
Soldering/Rework: Pace ADS200, Pace MBT350
Multimeters: Fluke 189, 87V, 117, 112   >>> WANTED STUFF <<<
Oszilloskopen: Lecroy 9314, Phillips PM3065, Tektronix 2215a, 314
 

Offline krivx

  • Frequent Contributor
  • **
  • Posts: 765
  • Country: ie
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #169 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.
 

Offline wguibas

  • Supporter
  • ****
  • Posts: 125
  • Country: us
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #170 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. 





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.

 

Offline kovo

  • Newbie
  • Posts: 1
  • Country: sk
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #171 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=
 

Offline wguibas

  • Supporter
  • ****
  • Posts: 125
  • Country: us
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #172 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.






Fuse Settings in AVR studio
« Last Edit: December 01, 2015, 11:42:55 pm by wguibas »
 
The following users thanked this post: oolloo

Offline Shock

  • Super Contributor
  • ***
  • Posts: 4278
  • Country: au
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #173 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.
Soldering/Rework: Pace ADS200, Pace MBT350
Multimeters: Fluke 189, 87V, 117, 112   >>> WANTED STUFF <<<
Oszilloskopen: Lecroy 9314, Phillips PM3065, Tektronix 2215a, 314
 
The following users thanked this post: oolloo

Offline timofonic

  • Frequent Contributor
  • **
  • Posts: 904
  • Country: es
  • Eternal Wannabe Geek
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #174 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 :(
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf