Okay we now have a stress ball which sends data up to mqtt , great now i need the rest of the circuit. The next items are the heat pad and vibration motor on a ardunio to work via serial read. i already have the code for this thanks to a project i built last year . This means code is not an issue we just need to wire it.
The heat pad requires 5v in order to work, the digital pins on the ardunio are not outputting enough power in order to turn it on. So we tried the VIN slot, this turns on the heat pad. The problem now is there is no way to turn VIN on and off. So once again we turned to chris , he told us we need a relay to control the heat pad.
what is a relay though ?
"a relay is a device that uses an electromagnet to mechanically pull two connections together to complete a circuit, in the exact same way your finger mechanically pushes two contacts together in a toggle switch."(Jpoopdog, ).
we found a relay on Amazon and ordered it for next day, a advantage of being a student.
here is the one we used
http://www.amazon.co.uk/Computers/dp/B00E0NTPP4/ref=sr_1_16?ie=UTF8&qid=1447180718&sr=8-16&keywords=relay
The heat pad requires 5v in order to work, the digital pins on the ardunio are not outputting enough power in order to turn it on. So we tried the VIN slot, this turns on the heat pad. The problem now is there is no way to turn VIN on and off. So once again we turned to chris , he told us we need a relay to control the heat pad.
what is a relay though ?
"a relay is a device that uses an electromagnet to mechanically pull two connections together to complete a circuit, in the exact same way your finger mechanically pushes two contacts together in a toggle switch."(Jpoopdog, ).
we found a relay on Amazon and ordered it for next day, a advantage of being a student.
here is the one we used
http://www.amazon.co.uk/Computers/dp/B00E0NTPP4/ref=sr_1_16?ie=UTF8&qid=1447180718&sr=8-16&keywords=relay
We then found a tutorial of how to wire on in and use it, here is the link
http://www.instructables.com/id/Controlling-AC-light-using-Arduino-with-relay-modu/
After that we proceeded to make a wiring diagram for the heat pad.
http://www.instructables.com/id/Controlling-AC-light-using-Arduino-with-relay-modu/
After that we proceeded to make a wiring diagram for the heat pad.
We Build the heatpad like this to test it and it did work , then we just had to add the vibration motor into a digital pin and then to ground. You then control the vibration motor like an led you can use the pin 13 blink example in adrudion to see the vibration motor work.
Jpoopdog, ( ) How Electronic Switches Work For Noobs: Relays and Transistors . [Online] Available from: http://www.instructables.com/id/How-Electronic-Switches-Work-For-Noobs-Relays-and/ [accessed 10 November 2015]
What i have learnt :
net - the internet has got allot of the wireing information you needf includeing helpfull tips and hint.
relay- i now know how to use a relay switch
Jpoopdog, ( ) How Electronic Switches Work For Noobs: Relays and Transistors . [Online] Available from: http://www.instructables.com/id/How-Electronic-Switches-Work-For-Noobs-Relays-and/ [accessed 10 November 2015]
What i have learnt :
net - the internet has got allot of the wireing information you needf includeing helpfull tips and hint.
relay- i now know how to use a relay switch