6/26/19 – Introduction to Arduino and Circuits

Today during our lab time, we had an introduction to working with the Arduino UNO and simple circuits.

To first start using the Arduino, I made a circuit to make an LED blink. It consisted of 5V and GND wires, as well as an LED and a resistor. I then used the Arduino IDE to write some simple code to make the LED blink.

Blink code

Next, I decided I wanted to try making a motor move with the Arduino UNO. I first set up a simple circuit, similar to the LED circuit, but without a resistor. However, the motor was moving too slowly because it was only being powered by 5V, so I tried to switch to an external power system with larger voltage capabilities. This circuit with the external power system allowed the motor to spin faster with the addition of more voltage.

The external voltage system required a transistor to be added into the circuit to properly regulate the higher voltage for the 5V Arduino, so I had to rewire my circuit. I used a MOSFET N-type transistor, which is a gated system. After looking at the datasheet for the transistor, Professor Hart explained the general setup to me: Transistor diagram

Basically, the transistor has 3 pins: Drain, Gate, and Source. Since it’s an N-type transistor, the Drain pin takes in the high voltage from the external source, going through the motor. The Gate pin functions as a sort of switch: it can either be connected to 5V or 0V to let current run through the transistor to power the motor. I eventually connected the Gate pin to a digital pin on my Arduino. The Source pin then connects to both the negative side of the external power source and the GND in my Arduino. After a lot of confusion, here was my final setup: Motor circuit

Next, I used the exact same LED blinking code to make the motor switch on and off with the gated system. It worked very well, and I was even able to change the voltage while it was running!

After getting the external power source to work, Professor Hart suggested I should try using a 12V wall plugin to power my circuit. To use this plug, it required me to solder two wires onto the adaptor so it could be integrated into the circuit. I also resoldered the connections from the wires onto the motor to reinforce it. Items to solder

This was my final circuit with the 12V power source: 12V circuit

Overall, today I reinforced my circuit-making skills and learned more about transistors and soldering.