Hi, I have been having issue with an Arduino run circuit that is designed to be operated by activating a button which results in a piezoelectric actuator deflecting. Below are two images showing the schematics of the device. The issue we have been experiencing is that when plugging the device into one outlet the button functions as expected, but when plugged into another the device behaves as if the button is constantly depressed which results in a pulse being sent to the circuit every 30 seconds. We were concerned that we have fried the Arduino board because we did have one issue where we exceeded the voltage capacity of an older piezoelectric resulting in the piezo itself being fried. We have replaced the button thinking it was the issue as well but this has still not resolved the problem.
Of note we were only able to get the button to work after changing from pin 7 to pin 8.
Our original code is as follows but was modified to change the pulse interval to 30 seconds:
// These constants won't change:
const int RelayPulsePin = 13; // pin used to power Relay for pulse waveform (built in LED on board shows when this is toggled)
const int buttonPin = 7; // pin that the momentary switch is attached to
void setup() {
// set up the LED pins, one is for power to system while the other is for the pulse:
pinMode(RelayPulsePin, OUTPUT);
pinMode(buttonPin, INPUT);
digitalWrite(RelayPulsePin, LOW);
}
// while button is pressed, write the HIGH signal to RelayPulsePin (pin #13 on Arduino), keep HIGH for 250 msec, then write LOW; wait for 1 second, and then go back
void loop() {
// Monitor pin #7, which is connected to the pushbutton switch
if (digitalRead(buttonPin) == HIGH) {
digitalWrite(RelayPulsePin, HIGH);
delay(250);
digitalWrite(RelayPulsePin, LOW);
delay(1000);
}
}
Parts list:
Power supplySoulBay, model no. UC02U
Buck converter RioRand, model no. 3-01-0076
PotentiometerUxcell, model no. a15082600ux00775VDC
SPST relay Omron Electronics Inc-EMC Div, model no. G6L-1P DC5
Digital voltmeter display Bayite, model no. 3B002x5
Arduino microcontroller Arduino, model no. A000066
Pushbutton amazon, ASIN B0772KYPPM;
OcrtechProportional voltage boosterpiezo dot com, model no. EVB-304
Electrical terminal connector MUYI, model no. 5xSKUMY20973
Non-insulated block spade terminal (Vetco Electronics, model no. SR-SPA-1N)
Polycarbonate sheet (McMaster Carr, model no. 8574K321)
Piezoelectric actuator piezo dot com, low-throughput setup, model no. Q220-A4BR-2513YB
Enclosure LeMotech, model no. Lm201803261111
Panel mount—female jack (BixPower, model no. CNT-W4)
Header pins (Vetco Electronics, model no. VET-HEAD-SR-5
Breadboard (CircuitSpecialists, model no. WB-801)
Solderable breadboard SparkFun Electronics, model no. 12070M2.5
Nylon Hex Standoff FemaleMounting screws 2–56 model no. 92196A079
Mounting screws 4–40model no. 92196A108
22 Gauge wireRSR Electronics Inc model no. 27WK22STR25