Hi Everyone,
I'm trying to replicate the functionality of the Amazon Dash Button, basically it's a single button user interface.
The functionality is the following:
- Short press, goes into operational mode
- Long press, goes into configuration mode
This circuit uses one ESP8266 wifi board, and an external circuit.
In other forum a user has replicated this functionality with the following circuit
This was his description to the circuit:
"The IRLM is the main switch and when the button is pressed, the gate of it will be pulled down through the diode (which is some kind of schottky - I forgot which, but it probably doesn't matter) and gives power to the ESP. The 'power on' line is a GPIO which does have a pull-up that's already enabled in the boot ROM of the ESP - I think it's GPIO2. This will turn on the BSH111, which will keep the power flowing. Because of the diode, when the button is released the BTN input of the ESP will get high as soon as the button is released, which is how I can detect if the button is pressed only once or is kept pressed. I can also detect a new button press to cancel whatever's going on and go back to sleep."
So my understanding is the following:
- User press the switch, VCC is brought UP, which powers on the ESP8266 that will pull up PWR ON.
- As long as the microcontroller keeps PWR ON UP, current will flow to VCC.
- BTN will be down while the user holds the switch
I'm trying to simulate this circuit on everycircuit, without success.
Here it is the simulation, the top LED is only a load on the line, the switch near the FET on the right is there to simulate PWR ON being pulled up when the lower switch is on.
So basically to test what I expect is:
- When turning on the lower switch, VCC will be UP, BTN will be DOWN
- When turning on the right switch with the lower switch on, VCC will be help UP and, BTN will still DOWN
- When turning the lower switch off and keeping the right switch on, VCC will be help UP and BTN will be UP
- When turning on both switches VCC will be down
But as you can see my simulation is not working, I've tried changing the FET's in multiple ways without success.
Someone have any clue that may help me correcting my simulation?
Thanks in advance, any help will be highly appreciated, and if you need more information just ask, I will be glad to add it here.
I'm trying to replicate the functionality of the Amazon Dash Button, basically it's a single button user interface.
The functionality is the following:
- Short press, goes into operational mode
- Long press, goes into configuration mode
This circuit uses one ESP8266 wifi board, and an external circuit.
In other forum a user has replicated this functionality with the following circuit
This was his description to the circuit:
"The IRLM is the main switch and when the button is pressed, the gate of it will be pulled down through the diode (which is some kind of schottky - I forgot which, but it probably doesn't matter) and gives power to the ESP. The 'power on' line is a GPIO which does have a pull-up that's already enabled in the boot ROM of the ESP - I think it's GPIO2. This will turn on the BSH111, which will keep the power flowing. Because of the diode, when the button is released the BTN input of the ESP will get high as soon as the button is released, which is how I can detect if the button is pressed only once or is kept pressed. I can also detect a new button press to cancel whatever's going on and go back to sleep."
So my understanding is the following:
- User press the switch, VCC is brought UP, which powers on the ESP8266 that will pull up PWR ON.
- As long as the microcontroller keeps PWR ON UP, current will flow to VCC.
- BTN will be down while the user holds the switch
I'm trying to simulate this circuit on everycircuit, without success.
Here it is the simulation, the top LED is only a load on the line, the switch near the FET on the right is there to simulate PWR ON being pulled up when the lower switch is on.
So basically to test what I expect is:
- When turning on the lower switch, VCC will be UP, BTN will be DOWN
- When turning on the right switch with the lower switch on, VCC will be help UP and, BTN will still DOWN
- When turning the lower switch off and keeping the right switch on, VCC will be help UP and BTN will be UP
- When turning on both switches VCC will be down
But as you can see my simulation is not working, I've tried changing the FET's in multiple ways without success.
Someone have any clue that may help me correcting my simulation?
Thanks in advance, any help will be highly appreciated, and if you need more information just ask, I will be glad to add it here.