Capacitive touch sensors

I need a source code and hook up diagram to use the DFrobot capacitive touch sensor, in order to run a small dc motor for aproxmately 5 seconds. If you can help me with this that would be great thanx.

Sorry I forgot to mention that I have an Adruino uno microcontroller, with a DFrobot Capacitive touch sensor, and a 10A DC motor controller, I can manage to figure out how to hook it up. I’m not very good at programming, tho, so I’m looking for some assistance on a source code for the arduino to pick up the signal from the touch sensor and send it to the motor controller for a few seconds.

Hi RiX420,

Welcome to the RobotShop Forum. From what I understand, you want to connect the DFRobot Capacitive Touch sensor in such a way that is operates a DC motor for 5 seconds every time you touch it? This may be possible, but would take some design work to create the circuit. The easier way would be to use a microcontroller (can be inexpensive) and a DC motor controller. The microcontroller would read the sensor, then send a signal to the motor controller to turn for 5 seconds.

Hope this helps,

Ah,

That makes more sense now. The capacitive sensor is digital, so you need to connect:
GND to GND
Vin to 5V
Signal to a digital pin on the Arduino

Since you do not indicate which motor controller you are using, you’ll need to read through the manual to see how to connect it to your Arduino. We suggest first copying the digital button example so the LED associated with pin 13 lights up when you press the sensor. You will then write separate code to operate the motor controller for 5 seconds. The last step is to combine the code so when you press the button, it lights up LED 13 (not necessary but good for debugging) and sends the 5s signal to the controller. Unfortunately we cannot provide actual code.

Hope this helps,