A little bit of background about me, I am a master 2 embedded systems student. I’m used to work with industrial MCUs, but I am fairly new to arduino. This said I have the basic knowledge to understand most of what I am doing.
Presentation of the project :
The project was rather simple, using an arduino nano, a MPR121 capacitive touch sensor from Adafruit : (Overview | Adafruit MPR121 12-Key Capacitive Touch Sensor Breakout Tutorial | Adafruit Learning System) and a 5V relay.
I am using only 4 out of the 12 MPR121 outputs, and basically the relay switches whenever you touch ALL 4 at the same time.
I self made the relay system using the sparkfun schematic : here
I replaced the transistor by one I had under my hand : BC547C
My issue :
The projects works perfectly whenever I am powering it up with the USB 5V from the computer. But whenever I am using the Vin input, with 9V 2A or 12V 2A a strange behaviour occurs :
The transistor switches since the LED connected to show the relay state lights up, but the relay doesn’t switch. You can’t hear the switching noise from the relay either.
Weirdest thing to me is that if i am powering the Vin using a 5v 2A external power supply the system works.
My understanding :
Basically I could avoid that quite easily using a voltage regulator and supplying the arduino nano Vin with 5V. Such as a LM7805C. But it wouldn’t be the most efficient way to solve this issue for a lot of reasons.
Basically the arduino nano has a built in voltage regulator outputing 5V, so to me it should be the same as powering up using the USB, and even better since my power supplies can output a bit more current. (even though the project isn’t current hungry)
You’ll find attached a schematic of the project I’ve done as well as my code.
What have I tested :
-replacing the arduino nano by a brand new one = SAME.
-checked differents nodes using the different power sources :
Arduino 5V : 4V
Arduino relay_pin (D8) : 4V
-Power supply 9V 2A
Arduino 5V : 4,5V
Arduino relay_pin (D8) : 4,5V
You will find attached my code and a schematic of the project.
I wasn’t able to find an explanation on my own, if anyone has any idea on what’s going on i’d be pleased to hear it.
premier_jet_module_touch.ino (2.66 KB)