Arilux_AL-LC0X icon indicating copy to clipboard operation
Arilux_AL-LC0X copied to clipboard

ESP8285

Open HydrelioxGitHub opened this issue 6 years ago • 23 comments

I've ordered a AL-LC03 on bang good. After opening it and trying to identify which pin I've to connect to flash firmware, I've noticed that the wifi chip is not a 8266 but a 8285.

Is there a way to flash a firmware with mqtt feature ?

HydrelioxGitHub avatar Sep 27 '17 22:09 HydrelioxGitHub

Hi @HydrelioxGitHub, In the Arduino IDE, try to use Tools > Boards > Generic ESP8285 Module or change Tools > Flash Mode to DOUT instead of DIO.

Sam

smrtnt avatar Oct 02 '17 16:10 smrtnt

I just got one too, wow this M2 module is tiny!

Let me know how it works out, gonna start soldering programming onto mine soon.

tablatronix avatar Oct 20 '17 02:10 tablatronix

I got mine today!. I'll take some time before the end of the week to investigate this.

smrtnt avatar Oct 20 '17 11:10 smrtnt

Thanks, do not have so much time to do some test. (And not enough skilled probably). I'm waiting for your experience feedback.

HydrelioxGitHub avatar Oct 20 '17 11:10 HydrelioxGitHub

I also received a couple of the new version of the LC01 with the 8285, and seems to have bricked two of them already :/ One doesn't respond at all, one gets extremely hot after plugging it in. The ones that still work have a really nasty coil whine, so this board is definitely not an upgrade.

This seems to be the correct pinout: #define ARILUX_RED_PIN 5 #define ARILUX_GREEN_PIN 13 #define ARILUX_BLUE_PIN 12

The LC01 now misses the transistor for the White channel, so it is unfortunately not usable for RGBW.

Other than that, it seems to work, but you need to use the connections on the chip itself since it does not have any connectors on the board, like so.

PeeVv avatar Oct 21 '17 19:10 PeeVv

Boo i guess it be easy to reflow another mosfet etc. Looks like ir could be populated or used as an extra gpio maybe. Did you test the board first or just flash stock library, if the gpios are different you could have shorted.

I would flash a gpio input test and check all the states and check resistances to rails for all gpios first.

Or just probe the heck out of it while running the shipped firmware

tablatronix avatar Oct 21 '17 23:10 tablatronix

Any news @mertenats ?

HydrelioxGitHub avatar Oct 30 '17 23:10 HydrelioxGitHub

@HydrelioxGitHub, I've had some problems soldering cables to my board and it isn't recognised by my computer yet. I'll investigate this probably this weekend.

Sam

smrtnt avatar Oct 31 '17 06:10 smrtnt

I just bought a new Magichome RGB controller. Already had one running this firmware.

It's the newer version with an ESP8285 board labeled V2.2.

I connected the cables direct to the board and flashed this firmware using the amended RGB pin numbers above and changing to generic ESP8285 in Arduino.

Everything is working great!

Philje123 avatar Nov 14 '17 22:11 Philje123

@Philje124, can you provide some pictures or video of your work (pinout) ?

HydrelioxGitHub avatar Nov 14 '17 22:11 HydrelioxGitHub

Hi. Do you mean the connections for flashing or connections to the LEDs?

Philje123 avatar Nov 14 '17 22:11 Philje123

For flashing mainly, but if you have both, I'm curious...

HydrelioxGitHub avatar Nov 14 '17 22:11 HydrelioxGitHub

For flashing I just connected the RX, TX, GND and GPIO0 as here (but obviously directly to the ESP board) https://i.imgur.com/HK225yf.jpg

Then the LED strip is just connected to the RGB connector on the board but modified the code to:

#define ARILUX_RED_PIN 5 #define ARILUX_GREEN_PIN 13 #define ARILUX_BLUE_PIN 12

Philje123 avatar Nov 14 '17 22:11 Philje123

Thanks you, I think it will be useful for my future experiments. And I hope useful for everyone else.

HydrelioxGitHub avatar Nov 14 '17 22:11 HydrelioxGitHub

Sorry for the dumb question but how did you connect to the RX/TX legs of the ESP board ? Did you solder a thin cable or you have some tool for connecting to those small legs during firmware upload? Unfortunately I received a v2.2 board recently also, and I miss the Rx/Tx pinouts on the Arilux board itself but not sure if I want to solder a cable directly to that small ESP board - I might destroy it :)

powerwade avatar Nov 14 '17 22:11 powerwade

Yes I soldered directly to the ESP board. The connection points are pretty small and I'm not the neatest solderer in the world but it got the job done:

MagicHome ESP8285 connections https://imgur.com/gallery/HZF63

Philje123 avatar Nov 14 '17 22:11 Philje123

@powerade I'm in the same case (arilux + newbie solderer) If you try and succed/fail , can you please give a feedback ?

HydrelioxGitHub avatar Nov 16 '17 12:11 HydrelioxGitHub

@HydrelioxGitHub I managed to upload the firmware on serial and now OTA works as well. Soldering wasn't that hard, but I had to figure out that I need to put some soldering iron to ESP legs first then solder the temporary wires to it. https://imgur.com/a/GWvfH Although when I atttach my 5V strip to it my device (new LC01 with 2.2v board) goes into a reboot loop. In the console I see it connects to wifi then to mqtt, subscribing to topics and publish it's state as ON. Then the LED strip blinks in blue (what color should it blink after reboot?) and it starts over with a reboot. If I detachj the LED strip then the reboot loop ends and the device stay online with no issue. I suspect something is wrong with the PINs?

I used these PINs as mentioned before

#define ARILUX_RED_PIN 5 #define ARILUX_GREEN_PIN 13 #define ARILUX_BLUE_PIN 12

Any idea what's wrong here?

powerwade avatar Nov 17 '17 22:11 powerwade

What settings did you flash with? Did you change it to "Generic ESP8285 module"?

Philje123 avatar Nov 18 '17 12:11 Philje123

I tried in Arduino IDE and PlatformIO as well. I'm using generic ESP8285 libs. As mentioned earlier the code compilation and upload was succesfull, the device connects to wifi and mqtt.

powerwade avatar Nov 18 '17 19:11 powerwade

I've tried to compile the firmware for my Al-LC03 with the ESP8685 board and the arduino ide send me an error :

Arduino : 1.8.5 (Windows 10), Carte : "Generic ESP8285 Module, 80 MHz, 115200, 1M (512K SPIFFS)"

Arilux_AL-LC0X:80: error: 'IRrecv' does not name a type

 IRrecv            irRecv(ARILUX_IR_PIN);

 ^

C:\Users\Plop\Documents\Arduino\Arilux_AL-LC0X-master\Arilux_AL-LC0X\Arilux_AL-LC0X.ino: In function 'void handleIRRemote()':

Arilux_AL-LC0X:588: error: 'decode_results' was not declared in this scope

   decode_results  results;

   ^

Arilux_AL-LC0X:588: error: expected ';' before 'results'

   decode_results  results;

                   ^

Arilux_AL-LC0X:590: error: 'irRecv' was not declared in this scope

   if (irRecv.decode(&results)) {

       ^

Arilux_AL-LC0X:590: error: 'results' was not declared in this scope

   if (irRecv.decode(&results)) {

                      ^

C:\Users\Plop\Documents\Arduino\Arilux_AL-LC0X-master\Arilux_AL-LC0X\Arilux_AL-LC0X.ino: In function 'void setup()':

Arilux_AL-LC0X:906: error: 'irRecv' was not declared in this scope

   irRecv.enableIRIn();

   ^

exit status 1
'IRrecv' does not name a type

Ce rapport pourrait être plus détaillé avec
l'option "Afficher les résultats détaillés de la compilation"
activée dans Fichier -> Préférences.

What am I missing ?

Edit : compiling is fine if I comment #define IR_REMOTE

HydrelioxGitHub avatar Dec 16 '17 17:12 HydrelioxGitHub

I've used this closed issue #25 to solve the problem ...

HydrelioxGitHub avatar Dec 18 '17 21:12 HydrelioxGitHub

Solved: i swap the Green and the Blue and now it works the pins are correct it just need to be swap. #define ARILUX_RED_PIN 5 #define ARILUX_GREEN_PIN 12 #define ARILUX_BLUE_PIN 13 Work nicely in discovery mode with home assistant.

I used this pin config as described above but the blue becomes green the red is correct and the green is off (probably wrong pin) any tips on how to find the correct io pin? #define ARILUX_RED_PIN 5 #define ARILUX_GREEN_PIN 13 #define ARILUX_BLUE_PIN 12

rizkypr avatar Feb 21 '18 09:02 rizkypr