Hello, I am familiar with coding but very new to electronics. I have a device with buttons that activate by closing the circuit, I assume. It look like this on the device: http://i.imgur.com/p7lx0Ip.png I used a breadboard and was able to trigger the device function just completing the circuit with a simple analog button. I want to trigger the same thing using the particle core. I ran though a couple of the led examples, but they are all generating current is my understanding? Is it possible to just open and close a circuit using the core? Thanks in advance.
@neversummer84, the image you provided looks like a photo-resistor that drops its resistance in the presence of light. Typically, a Core cannot “close” a circuit directly but can drive a transistor or relay to do so. If you can give more details on the “circuit” you are trying to control, we can better guide you. Do you have a schematic?
It is a thermostat button, so I’m pretty sure not a photo-resistor. A rubber button with a little disk sits on top of that and I assume just closes the circuit. This is what I was doing with the breadboard http://i.imgur.com/NN5hL3A.gif
@neversummer84, aha! So if you search the forum you’ll find that some members have been able to use a transistor or relay. Those keys use conductive rubber to complete a circuit. You can try using a standard NPN (2N3904) transistor with a 1K ohm resistor between the base and a Core pin to control it. You will need to find the “+” side of the switch to connect to the collector, with the emitter going to the other side. You could also use a FET and this article can give you some guidance.
I was able to create a NPN transistor “switch” with an LED using D0, GRN, and D6 pulsing to the base. I was also able to do the same thing with the thermostat button, using +, -, and a second - to the base. However, if I used +/- from the thermostat and pulsing D6 to the base, nothing happened. Would that be because the core and thermostat are using different voltage? Here is a picture of what I set up that isn’t working when D6 is pulsed. If I move the yellow wire over one to left, then it triggers the thermostat. http://i.imgur.com/WIxHIFN.jpg
You might be able to use an optoisolator. They have an internal LED that controls the conductance of a variable conductor, so you control them by driving the internal LED. The question is whether you can find one with characteristics that match what the thermostat expects from a button press. You also get free air-gapping between the devices, if you care.