Loading Tasmota Firmware on Armtronix Dual Dimmer mini BA001

Armtronix Dual Dimmer

In this blog we would like to show you how to install Tasmota Esp8266 firmware on Armtronix Dual dimmer BA001 using windows operating system

To load a new firmware into BA001 you will need the following hardware.

Usb to UART, FTDI convertor

Step 1

This Hardware has a Esp8266 and Atmega328 so both the controllers have to be flashed

So now lets start with Esp8266, to flash the Esp8266 you need a usb to serial convertor and the connections are shown below and you need to remove both the jumpers on J1 header.

Make sure the Armtronix Dimmer is totally disconnected from any mains power, J1 Header is used to upload the firmware to ESP or atmega through the FTDI Module.

To upload the new firmware to esp using FTDI make the following connection.

(Note that CTS is NOT DTR or RTS , some modules come without DTR or RTS, make sure that you purchase the ones that come with these two pins )

  1. Connect the RX of FTDI to TXDE (pin 3) of J1
  2. Connect the TX of FTDI to RXDE (pin 5) of J1
  3. Connect the RTS of FTDI to RTSE (pin 9) of J1
  4. Connect the DTR of FTDI to DTRE (pin 7) of J1
  5. Connect the Vcc5V of FTDI to VCC 5v (pin 1) of J1
  6. Connect the GND of FTDI to GND (pin 10) of J1

Step 2:

Now download the latest Tasmota Firmware bin file and Flash download tool for esp8266 from the below link

Tasmota bin file : http://thehackbox.org/tasmota/release/

Flash Download Tool: https://www.espressif.com/en/support/download/other-tools

Now Connect the Ftdi module to Usb and open Flash download tool and clickon Esp8266 button as shown in below fig.

After clicking on Esp8266 button another dialog box will appear as ref below fig.

When the above dialog box will appear select SPI Download tool tab and select the bin file and enter the address as 0x0000 and select the particular bin file and SPI mode must be Dout,Flash size 32Mbit and select the appropriate COM port.

Before burning the tasmota firmware you have to erase the stock firmware by clicking on Erase button and after erasing is finished click on start, wait until finished.

Now Esp8266 has been loaded with tasmota firmware now you have to burn atmega with the new firmware follow next step.

Step 3 :

So now lets burn the new code on atmega, so you will need Arduino IDE and the code with a dependent libraries

Arduino IDE : https://www.arduino.cc/en/main/software

Code : https://github.com/armtronix/Wifi-Two-Dimmer-Board/tree/master/Arduino_Code/Atmega328_two_dimmer_mini_v0.5_tasmota

Dependency Lib : https://github.com/PaulStoffregen/TimerOne

Before that you have to change the header setting, connect the ftdi as follows.

To upload the new firmware to Atmega 328p using FTDI make the following connection

  1. Connect the RX of FTDI to TXDA (pin 6) of J1
  2. Connect the TX of FTDI to RXDA (pin 4) of J1
  3. Connect the DTR of FTDI to DTRA (pin 8) of J1
  4. Connect the Vcc5V of FTDI to VCC5v (pin 1) of J1
  5. Connect the GND of FTDI to GND (pin 3)of J1

Burn the Atmega code which supports tasmota using arduino IDE and the code link is given above

before uploding in the tools menu of arudino you have to select board as Arduino uno and Click on tools tab, move mouse pointer to “Programmer: “Arduino as ISP’”, under this click on “Arduino as ISP” and select proper COM port and the click on Upload and make sure you have added TimerOne library from the above link.

Step 4 :

After programming it remove the programmer and place the jumper to its original position i.e.

  1. Connect the RXDA (pin 4) of J1 to TXDE (pin 3) of J1
  2. Connect the TXDA (pin 6) of J1 to RXDE (pin 5)of J1

As Shown in the below image.

Step 5:

So after the jumpers are placed you can turn on the device with the AC supply, After few seconds a Acces point will host with the name Armtronix or sonoff followed by last four digits representing mac address as shown in below image.

So one you will connect to the Access point, open you browser and type 192.168.4.1 and the below page will be loaded for configuration.

After entering your ssid and password click on the save button, once save button is pressed you will see the below changes

Step 5:

Once your device is configured you must find the ip address of the device by logging into your router or you can use fing app, one you know the Ip address enter it in your browser connected to the same network to which you had configured the device earlier and you will get the following

finally you have to configure the device module by clicking on configuration button.

And then on configure module

Select ARMTR Dimmer (56) from the dropdown menu and click on save and the device restarts.

And its Done!!!

The above sliders may not work as per your requirement, so follow the below commands to control the dimmer.

Tasmota commands for dimmer

I ) MQTT

  1. This will change the channel one (Dimmer one)dimmer state,Where x should be a variable from 0 to 100
mosquitto_pub -h brokerip -t cmnd/sonoff/Channel1 -m x

2. This will change the channel two (Dimmer two)dimmer state,Where x should be a variable from 0 to 100

mosquitto_pub -h brokerip -t cmnd/sonoff/Channel2 -m x

3. ON command

mosquitto_pub -h brokerip -t cmnd/sonoff/POWER -m ON

4. OFF command

mosquitto_pub -h brokerip -t cmnd/sonoff/POWER -m OFF

II) HTTP

  1. This will change the channel one (Dimmer one)dimmer state,Where x should be a variable from 0 to 100
http://Ipaddress/cm?cmnd=Channel1%20x

2. This will change the channel two (Dimmer two)dimmer state,Where x should be a variable from 0 to 100

http://Ipaddress/cm?cmnd=Channel2%20x

Leave a Reply