Automating a button operated device

Hello all,
I am new to the forum and I am writing for help as I am trying to implement my first project while getting familiar with all the options offered by Arduino. The project is rather simple: keeping the humidity inside a closed box in a desired range by operating feedback on an air humidity sensor and using an existing humidifier.
The point unclear to me is the best way to automate the humidifier, which is manually activated by pressing a button.
The first idea that I had was to use a small push/pull solenoid to press the button (for example Mini Push-Pull Solenoid - 5V : ID 2776 : $4.95 : Adafruit Industries, Unique & fun DIY electronics and kits). The drawback is that tis solution requires very precise positioning and any small movement might render the system unusable.
Then I saw this video How to make your Arduino push some buttons! - Tutorial - YouTube on how to make Arduino switch on and off an external device by interacting directly with its inner circuitry. This seems a much more robust approach, but in my case the difficulty is that the humidifier does not have a simple on-off switch, but a button that selects different operating modes in round robin:

  1. one press activates the humidifier for 1 hour (state 1)
  2. the second press activates it for 3 hours (state 2)
  3. the third press activates it for 6 hours (state 3)
  4. the fourth press activates it with no time limits (state 4)
  5. the fifth press switches the system off (state 0)

Ideally, I would like to operate the system only between state 0 and state 4. In practice any of the on states would work as well because I do not envision having ever to run the system for more than one hour to make it stay in range. I would like however not having to worry about the timer and what signal it is expecting to receive, but just use one on/off signal. I am not very experienced with electronics switches so I am looking for some advice on how to wire the Arduino board with the device circuitry.

Operations of the button (and of other two buttons which control led color and intensity of the humidification and in which I am not interested) are processed by a small board connected to the main board of the humidifier by 6 wires. The wires (or pins) are labeled

  1. ground
  2. fog key
  3. led key
  4. pwr key
  5. no time
  6. com

The table below shows the measured voltage of every pin (with respect to pin 1) after each press of the button

Can I conclude from this table that to switch the humidifier on and off I just need to toggle pin 5 between 5V and ground or is it too simplistic? In other words, are the 5V on pin 5 a result of the switch configuration and cannot be imposed from outside?

By accident, as I was measuring continuity between the pins with a multimeter having forgotten to unplug the humidifier from the wall, I discovered that touching pin 4 with the black probe and pin 5 with the red probe produces the same effect as a button press. In other words, keeping the black probe on pin 4 and making intermittent contact with the red probe on pin 5 (and with the multimeter in continuity mode) after 5 contacts the system goes exactly through the same sequence of states as by pressing the button. While this has all the appearance of a a-ha moment, I am not sure I understand what the a-ha is because I do not know what a multimeter does when it attempts to assess continuity between two pins that are at different voltages. From what I read, it appears that the multimeter tries to establish a flux of current from the red probe to the black probe. If that was the case, to establish that flux it has to overcome a negative voltage of -0.7V to go from state 0 to state 1, from state 1 to state 2 and from state 2 to state3, then it needs to overcome a negative voltage of -5V to go from state 3 to state 4 and finally it operates with a favorable voltage of 4.3V. when it produces a transition from state 4 to state 0. I do not understand how it can always determine a transition in such different circumstances.

Does this make any sense for someone more familiar with these electronic switches? Does it suggest how to operate the switch with Arduino?
Sorry if all this sounds rather confusing, as indeed it is such for me.

Do you have short version of the text available too?

How short would you like it?

You can simulate a button press using an optocoupler. You wire one of of the optocoupler to your microcontroller and the other side to the two sides of the button. You just have to determine which is positive and which is negative to make sure you have the polarity correct. You don't have to worry about the correct voltage to deliver and your two circuits will still be isolated from each other. And since each of these are physical buttons, finding which two leads to solder to should be easy. The great part is that the physical button should still work too. Then you could press the button locally or with your microcontroller.

2 Likes

Very creative. @ryancasler decribes a method that is conceptually identical and vastly more practical.

You may live to need your idea, though, and hacks like that… using a servo to move a valve or even a potentiometer on a device to be controlled.

Fun stuff.

a7

1 Like

Probably the best solution is the opto coupler as suggested by @ryancasle

As for your discovery with the multimeter, this probably indicates that you can do as you suggest: connect the ground from whichever Arduino you have to the ground / com on the humidifier and an output pin from the Arduino to each input that you want to control. However, my concern is that with your level of knowledge there are possible risks and sources of damage that a more experienced person would spot immediately. No, I can't tell you what these are as I don't have the thing in front of me. What powers the humidifier? Is it isolated from the mains? If not, then stop as this might be dangerous.

You also need to monitor the status of the LEDs because they will tell your program which state the humidifier is in, enabling your code to change from an undesired state to a desired state. Again, simply connecting to an input might be OK, or not.

If you break the thing experimenting is that a loss you are prepared to take?

EDIT
I suggest you place 10k resistors in series with Arduino output pins and the buttons inputs you want to connect to (not the ground / com connection) as protection against accidents.

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.