Pages: [1]   Go Down
Author Topic: Piezo to operate a relay  (Read 301 times)
0 Members and 1 Guest are viewing this topic.
Brisbane
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I am behind B4 I start.
1) New, to the forum,
2) First experience with Arduino boards,
3) Old, retired, & mentally challenged with electronics,

My question is:
How can I get  piezo operate a small relay? on the UNO board
I would like the piezo to  operate relay to make & break  a closed 3vdc circuit.

I have looked it the Arduino Knock, but cant find anything operating a relay.
I would really appreciate if someone could give some direction. (to be honest, show me how to do it)
No Idea 
Thanks in advance
Logged

Offline Offline
Faraday Member
**
Karma: 80
Posts: 3785
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi and Welcome... Here's some direction...

I guess you've done the tutorials with LEDs before you got to knock? Or can do them now?

Here's what I'd do:

First, in the knock tutorial, where it sends "knock" to the monitor, replace that with a line that does a digitalWrite to a pin of your choice, as if to switch an LED on. In fact, switching an LED on is a good place to start with this. (Don't forget to set the pin to output first.) And you would probably want to put a delay in there to switch the LED off again... Something like that anyway.

Then, read this tutorial or any similar one to see how to switch a relay. Note that it's simply a matter of switching an Arduino output pin, as if it was an LED.

Last, rig up the relay as in that tutorial, and replace your LED with that.

Logged

Although I answer in good faith, remember always: Your Mileage May Vary.
Get me on LinkedIn: za.linkedin.com/in/jimbrownza/

Pages: [1]   Go Up
Jump to: