ESP8266 Node MCU to control Glade 2 AA battery powered air freshener

Thread Starter

modfox

Joined Mar 13, 2013
4
Hi, I am looking mod my Glade air freshener to be controlled by the ESP 8266 board. I have a board, copied some code from another site, got it to light up an led via command to Alexa after discovering new devices. But, thats as far as I made it. I cannot figure out how to connect the ESP board to operate the Glade as I'd like.
Ideal solution to get rid of the timer that wastes the fragrance would be to cut the power or ground battery wire only one) and have the ESP board connect the cut wires (like a relay) for 3 seconds and then turn off. The reason for 3 seconds is it gives the Glade to initialize and go though a cycle and pretty much end up in the rest position. I think the code is good enough to work, just dont have knowldege on how to incorporate the 2.

Some youtubing shows an octocoupler might be a good solution, but it shows 2 power sources..

I typed in " Air Freshener" in the search bar, but no projects came up that is similar. Youtube also as another one with the same tiny esp2866, a lithium battery, led and maybe a resistor, but he hasn't loaded a schematic and hasn't made the followup video he mentioned a year ago.

thanks
clint
 

Toughtool

Joined Aug 11, 2008
63
This is how I interfaced the world with my ESP8266 NodeMCU. The MOSFET is good up to 60 volts Source to Drain. You didn't mention the voltage of the Glade device.
 

Thread Starter

modfox

Joined Mar 13, 2013
4
thanks for the schematic and reply, the air freshener is powered with 2 AA batteries which would be about 3v when batteries are new, so probably need a project box and power supply for the ESP board.
clint
 

Toughtool

Joined Aug 11, 2008
63
OK, the ESP8266 NodeMCU's GPIO is a 3.3 volt logic level and will sink and source current. I don't know how much current the Glade unit uses but it may be within the ESP8266-e12's GPIO outputs limit. You may be able to drive it directly from the GPIO pins. look up the specs for both devices. Notice the schematic is sourcing the current to illuminate the LEDs, and they are only there for a visual indicator of an output (1). I don't know how the MOSFET will react to such a low voltage of three volts at the Source to Drain. If the Glade unit's requirement are within the limits of the ESP8266-e12's GPIO outputs, don't use the LED and MOSFET. Note: the NodeMCU development board needs 5 volts at Vin to operate but the ESP8266-e12 is a 3.3 volt device and needs 3.3 volts at it's Vin pin. The NodeMCU development board regulates the voltage to 3.3 volts for the attached ESP8266-e12..
 
Last edited:

Thread Starter

modfox

Joined Mar 13, 2013
4
Hi, thanks for the in info. I measured the current when it activates, and its around 450ma, defiantly more than the esp8266 can do. I had a pack of 2n2222 transistors and was connected it around, its not rated up to the task, it starts to operate it, but cant push the nozzle down.
ESP8266 powered with usb cord at the moment
This was my connection: I had one of the AA batteries removed, and leads taped to battery contacts.
Positive AA battery to glade battery + terminal,
Ground AA battery to collector
Emitter to glade - terminal
ESP pin 13 to base with a resistor, not sure what value it was.
(think it was) Collector to ground on bread board to get the transistor to work., when it was on the other, emitter, it wouldn't be O.L. it would read K ohms...
I guess next step is to find a transistor that can handle .4 amp.
Thanks again for the help.
 
Top