First off I am a noob, no experience yet with Spark Core and arduino. I understand how the code works a lot better than how the hardware works. I ordered the Spark core to use in a project where I am simply going to wire it with a momentary switch to turn on a toy. Eventually i want to turn the toy on via wifi.
Essentially I need to complete a circuit for a few milliseconds then disconnect. If someone with more experience could give me an example or push me in the right direction I’d greatly appreciate it!
The toy uses a momentary switch to initiate lights and sound on the toy. I want the switch to remain so the toy can still be used manually. When I briefly bridge the two solder points behind the switch the toy activates, however, if i maintain contact between the two points the toy does nothing.
TheRick, not knowing what voltage is on those pins, it may be best to use a small relay in parallel with the switch. However, following kennethlimcp’s line of thinking, it would help if you measured the voltage on either side of the switch but you will need to do so relative to the toy’s ground, AKA the negative side of the battery or battery pack. Come to think of it, how is the toy powered?
Sounds like the momentary switch puts signal to ground (Not necessarily High to Low).
He could test it with a NPN transistor, 1K Ohm Resistor to base of 3904; 1 solder point of switch to transistor collector and Emitter to Ground. I use 4N25 Opto Transistors for this as well.
Test it with 3.3 or 5 volts to 1K resistor momentarily to see if toy comes on. If not, switch to other solder point of switch and test.
Agreed on the relay kennethlimcp but I am concerned about isolation. Spydrop, he emitter follower is a great idea but we need to know what that thing is doing before recommending anything. My bet is on that switch going to ground!
A transistor or 4N25 Optotransistor is a whole lot smaller than a relay but, very true that it must be determined what the switch is doing in way of either simply going to ground or is it applying voltage to activate toy.
Does the toy plug in to the wall or is it battery powered? If it’s battery powered, there’s less of a chance of killing the Core (unless it’s 9v batteries). A lot of my daughters’ toys that are battery powered are between 3v and 6v, which wouldn’t kill a Core (it depends on how the batteries are wired). However, the only control I ever want to have of those toys is taking the battery out when they play it to death.
I plan to post it in project share when i have it working. I’m looking to get it to be triggered when your favorite team scores a goal. Should be a fun project.
TheRick, since you have a multimeter, can you see if either side of the switch is connected directly to the battery + side. Remove the batteries first just be be sure. This is to make sure the 5V is either straight from the battery or from the internal logic.
Your multimeter is tapping on ground and the other pin is the horizontal line
I think @AndyW gave a good idea on using a Solid State Relay, so we need:
The dashed lines is the core side and solid line is the toy side
The 1k resistor is arbitrary but i think should be enough to trigger the SSR. The input will be a Digital pin. I can tell you the resistance value to use if we choose the SSR for the project
Looks like we are good to go and you can have it running like this weekend?!