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

0 Members and 1 Guest are viewing this topic.

Offline tx8

  • Contributor
  • Posts: 19
  • Country: de
  • Trapped young player
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #50 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!
 
The following users thanked this post: TheNewLab

Offline madwormTopic starter

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

 

Offline madwormTopic starter

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

Offline madwormTopic starter

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

It requires a current sense resistor and a couple of comparators + little stuff.
 

Offline madwormTopic starter

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

 

Offline mos6502

  • Frequent Contributor
  • **
  • Posts: 537
  • Country: aq
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #55 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?
for(;;);
 

Offline madwormTopic starter

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

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #57 on: March 11, 2014, 12:16:29 pm »
And some of these stations doesnt have the atmel.. .
 

Offline madwormTopic starter

  • Frequent Contributor
  • **
  • Posts: 371
  • Country: de
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #58 on: March 11, 2014, 12:33:48 pm »
Which one? Surely different brand / name?
 

Offline mos6502

  • Frequent Contributor
  • **
  • Posts: 537
  • Country: aq
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #59 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.
for(;;);
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #60 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..
 

Offline madwormTopic starter

  • Frequent Contributor
  • **
  • Posts: 371
  • Country: de
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #61 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.
« Last Edit: March 11, 2014, 12:47:33 pm by madworm »
 

Offline mos6502

  • Frequent Contributor
  • **
  • Posts: 537
  • Country: aq
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #62 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.
for(;;);
 

Offline madwormTopic starter

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

Offline mos6502

  • Frequent Contributor
  • **
  • Posts: 537
  • Country: aq
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #64 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.
for(;;);
 

Offline madwormTopic starter

  • Frequent Contributor
  • **
  • Posts: 371
  • Country: de
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #65 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.
« Last Edit: March 11, 2014, 01:38:48 pm by madworm »
 

Offline tjb1

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

Offline brainwash

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

Offline tjb1

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

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8240
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #69 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...)
 

Offline GiskardReventlov

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: 00
  • How many pseudonyms do you have?
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #70 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.
 

Offline GiskardReventlov

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: 00
  • How many pseudonyms do you have?
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #71 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.
 

Offline tjb1

  • Regular Contributor
  • *
  • Posts: 146
  • Country: us
« Last Edit: March 19, 2014, 11:54:14 pm by tjb1 »
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8240
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #73 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, and eventually a patent and programming software and utilities (written in Visual Basic, it seems) for them... anyone want to do some more RE'ing with all this info? ;)
 

Offline Carrington

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: es
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #74 on: April 01, 2014, 06:17:36 pm »
MLINK H1 Pictures:
My English can be pretty bad, so suggestions are welcome. ;)
Space Weather.
Lightning & Thunderstorms in Real Time.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf