How to activate a 1-Channel 5V relay module with output Makey Makey?

Hello,

I want to activate a 1-Channel 5V relay module with the output of a Makey Makey:

http://moreismore.bike/1-kanaal-relais-5V.jpg

Anyone knows how?

Thanks in advance, kind regards,

Otto.

Hi Otto.

You could probably use the “KEY OUT” or “MS OUT” terminals to activate your rely module. I don’t think there is a way to assign a specific key to either of those outputs though.

Hi TS-Chris,

Thanks for your reply.

Problem is that the relay circuit puts 4,5V (from the relay’s power source, 3 x AA batteries) into the Makey Makey, and the relay automatically closes the moment I connect both wires to the Makey Makey’s GND and MS_OUT.

Kind regards,

Otto.

Can you send a photo showing how you have everything connected?

http://moreismore.bike/picture_layout.jpg

Explanation:

  • The relay is powered by 3xAA batteries (black case top left), with red and black wires.

  • The Makey Makey is powered by a powerbank ( black case bottom right), with red USB cable.

  • The input wires from the relay are purple and black: if the relay is powered and purple and black are connected, the (normally open-) relay closes. And there is about 4,5V on the wires in that situation.

I want to use the Makey Makey as output so I put the purple wire to output KEY_OUT, the black wire to GND, the yellow wire to EARTH and the white wire to key G. Of course I don’t want to use key G on the keyboard but hoped to activate the relay by connecting white and yellow … with a traditional Makey Makey banana. :smiley:

But no. :frowning:

OK, thanks for the diagram.

It looks like your relay activates when the control pin is connected to ground where most of these types of relays turn on when a positive voltage is applied. Without additional circuitry, I don’t think this is going to work with your Makey Makey unfortunately. I’m afraid I don’t know exactly what circuitry you’d need since I don’t have schematics for either the Makey Makey or for your relay board but it might be as simple as a small transistor and a resistor.

I’d suggest trying to find a relay board that takes a high level input rather than a low level. We have our[ Beefcake Relay kit and that would probably work for you but you do have to solder that kit together.](https://www.sparkfun.com/products/13815)

Hi TS-Chris,

That’s too bad. Rather than change my components I’ll look for a solution like ‘small transistor and a resistor’. Anyone you know who might help me out? I couldn’t find a dedicated Makey Makey forum so I hoped to find my solution here at sparkfun.

Relay specs: https://drive.google.com/file/d/0ByfmRa … VkUm8/view

I couldn’t find a lot of information on the Makey Makey output pins, except on this very site sparkfun.com at https://learn.sparkfun.com/tutorials/ma … nced-guide:

What use is that? Well it’s a great way to trigger external objects. You could hook up an LED to those pins, and get even more blinkies! Or, you could connect a DC motor, to automate something. Or you hook it up to a 5V relay, and really get your MaKey MaKey interacting with the world.

So: who cracks the code on ‘small transistor and a resistor’? :smiley:

Kind regards,

Otto.

Hi Otto.

We used to make the Makey Makey for the company that originally developed it, but they have taken over production and have significantly changed the design. Unfortunately our old guides won’t be very useful with the new boards. (Even though they look and function the same for the end user, the way the board works internally is completely different.)

I don’t have anyone off hand I can refer you to for the transistor, but if anyone is willing to help, please chime in. :slight_smile:

By the way, even though the relay is normally closed, does it toggle when you touch one of the keys? If not, does plugging the Makey Makey into a computer change that? It could be that the Makey Makey doesn’t actually function until it has an active USB connection going. (Not just power through USB)

Hi TS-Chris,

Thanks for sharing your company’s history on Makey Makey.

There is certainly a difference between using the laptop as power source compared to the powerbank as power source: the powerbank toggles the relay on and off very quickly even when the circuit is closed, while the laptop activates the relay as default (green led on relay is on) and turns off the green led when the circuit is closed. Pressing keys on the laptop doesn’t have any effect. No clue why but good you asked.

Using a 230V to 5V USB mobile phone charger has the same effect as the powerbank.

Kind regards,

Otto.

Might a logic level shifter be a solution?

Not that I know how to implement one in this case…

There is certainly a difference between using the laptop as power source compared to the powerbank as power source:

the powerbank toggles the relay on and off very quickly even when the circuit is closed,

while the laptop activates the relay as default (green led on relay is on) and turns off the green led when the circuit is closed.

My guess is that the chip on the Makey Makey only works when it has an active USB connection established between itself and a host computer. When you connect to a power bank or a phone charger, you’re only supplying power and the IC is in some kind of loop looking for a data connection. I’m afraid I don’t know how to fix that.

Pressing keys on the laptop doesn’t have any effect. No clue why but good you asked.

By 'pressing keys' I meant activating one of the keyboard inputs on the Makey Makey. Sorry for the confusion on that!

Might a logic level shifter be a solution?

I don't see that working. You're getting an output, but it's not doing what you want it to do when you're not connected to a computer. A logic level shifter will only change the voltage of your output, not what it carries.

I think the only thing you’re going to be able to do is use some sort of computer to power the Makey so that it has the USB connection it’s looking for and live with the fact that the relay will be on by default and turn off when you press (touch) a key on the Makey Makey.

Hi TS-Chris,

Your remark ‘and live with the fact that the relay will be on by default and turn off when you press (touch) a key on the Makey Makey’ was brilliant: I changed the 230V output on the relay from NO to NC! That way, when the relay is powered with 5V, the 230V power consumer is off and switches on when I close the circuit EARTH and output G on the Makey Makey. A bit ‘quick and dirty’ but it works without any extra hardware. Except for the laptop as power source; hate that but there is perhaps a way to fix that too, tricking the Makey Makey some way it thinks the power bank is a laptop. :sunglasses:

Thanks and kind regards,

Otto.