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

0 Members and 1 Guest are viewing this topic.


Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 7990
  • Country: gb
 

Offline DomesticHacks

  • Regular Contributor
  • *
  • Posts: 53
  • Country: de
    • DomesticHacks
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #27 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?
Interesting projects, tipps and tricks (in German).
DomesticHacks on YouTube: https://www.youtube.com/DomesticHacks
 

Offline madwormTopic starter

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

Offline DomesticHacks

  • Regular Contributor
  • *
  • Posts: 53
  • Country: de
    • DomesticHacks
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #29 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 ;-)
Interesting projects, tipps and tricks (in German).
DomesticHacks on YouTube: https://www.youtube.com/DomesticHacks
 

Offline madwormTopic starter

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

Offline DomesticHacks

  • Regular Contributor
  • *
  • Posts: 53
  • Country: de
    • DomesticHacks
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #31 on: February 07, 2014, 12:51:54 pm »
Isn't the adapter only required for the Atten?
Interesting projects, tipps and tricks (in German).
DomesticHacks on YouTube: https://www.youtube.com/DomesticHacks
 

Offline madwormTopic starter

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

Offline GiskardReventlov

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

Offline DomesticHacks

  • Regular Contributor
  • *
  • Posts: 53
  • Country: de
    • DomesticHacks
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #34 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)?
Interesting projects, tipps and tricks (in German).
DomesticHacks on YouTube: https://www.youtube.com/DomesticHacks
 

Offline madwormTopic starter

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

 

Offline DomesticHacks

  • Regular Contributor
  • *
  • Posts: 53
  • Country: de
    • DomesticHacks
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #36 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.
Interesting projects, tipps and tricks (in German).
DomesticHacks on YouTube: https://www.youtube.com/DomesticHacks
 

Offline madwormTopic starter

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

Offline DomesticHacks

  • Regular Contributor
  • *
  • Posts: 53
  • Country: de
    • DomesticHacks
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #38 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"?
Interesting projects, tipps and tricks (in German).
DomesticHacks on YouTube: https://www.youtube.com/DomesticHacks
 

Offline madwormTopic starter

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

Offline DomesticHacks

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

« Last Edit: February 12, 2014, 07:18:18 pm by DomesticHacks »
Interesting projects, tipps and tricks (in German).
DomesticHacks on YouTube: https://www.youtube.com/DomesticHacks
 

Offline madwormTopic starter

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

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6278
  • Country: ca
  • Non-expert
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #42 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)
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline madwormTopic starter

  • Frequent Contributor
  • **
  • Posts: 371
  • Country: de
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #43 on: February 13, 2014, 12:20:34 am »
Yes. That relies on the eeprom being wiped when flashed. Not always the case though.
 

Offline brainwash

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

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 7990
  • Country: gb
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #45 on: February 15, 2014, 01:26:05 am »
Looks like the same circuit with yet another layout and µC.
 

Offline madwormTopic starter

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

Offline DomesticHacks

  • Regular Contributor
  • *
  • Posts: 53
  • Country: de
    • DomesticHacks
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #47 on: February 17, 2014, 10:13:28 am »
I made kind of a review video on my YOUYUE (in German):




@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.

Interesting projects, tipps and tricks (in German).
DomesticHacks on YouTube: https://www.youtube.com/DomesticHacks
 

Offline brainwash

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

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: Youyue 858D+ some reverse engineering + custom firmware
« Reply #49 on: February 17, 2014, 01:19:01 pm »
did anyone come up with an new pcb on these?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf