urbanhurdler
USA
Asked
— Edited
I found this incredible motion detector cat sprayer (it keeps them off the couch), that I'm looking to use in a smoke breathing animatronic. I love it's built-in functionality. All that needs to happen is I need to hack it's current on/off switch to be able to turn it on with the EZ-B.
The switch is the little black part coming out of the green circuit board. It has three positions. Off/Sound/Spray. I'm only concerned with "Spray" and "Off".
Looking at the it, from left to right the switch goes from OFF to SOUND to SPRAY. I want to be able to trigger the SPRAY mode via the EZB. Six pins go into the switch. I've also labeled the cables coming from the 4 AAA battery pack, RED and BLACK.
What do you think? Is this doable?
Thanks, -P
Check the voltate on the pins for the switch.
I think the switch might only connect to the chip - but it's hard to see in the pic. If the switch only connects to the chip, than you should be able to connect it to the EZ-B. You'll need to prob and find which wire is for what.
The OFF position most likely keeps the terminals OPEN, so no contact is made.
The other positions would put +5 (i assume) to a pin respective to the function. And perhaps that pin connects to the IC. There may be a pull-down resistor on each of the pins in place to prevent static from confusing the IC.
Hey DJ,
Thanks for the insights. I'm trying to go about this a little differently now. Instead of worrying about the switch, I'm going to keep it turned on the whole time.
I've cut it's internal power supply, which was running off of 4 AAA batteries. I calculated that it's 4.8V of power, and instead I've replaced those with wires running into the digital ports of the EZB. Then I can just choose to turn D7 ON or OFF, to give it power.
As of right now it's not working. From the hardware page it says that EZB digital ports put out 5V. If I were to put a resistor between the +5 Digital Port, and the circuit could I make it an identical connection to the 4.8V battery pack? I've a pack of various 1/4W resistors, and have been googling Ohm's law trying to figure it out. But am a little stumped.
(additionally, I've done enough trouble shooting to know that device still works when using the 4.8V battery pack, and the EZB ports are delivering power)
Thanks, P
Scratch that. Got it working.