Today, I did a lot of research about transistors. There are two different groups of transistors ones that work off current and ones that work off voltage. For both, they are made up of layers of silicon called n and p layers depending upon what the silicon is mix with. The p is for positive and the n is for negative. LED’s are made from layers of this silicon. The silicon will only allow voltage to flow in one direction from n to p just like on an LED. There a two different types of current transistors npn and pnp which describes the ways the layers of silicon are laid out. Transistors are great for acting as switches or amplifying current. One great depiction a ran across in my research was about a hearing aid which used a transistor to increase the current to make the sound louder. MOSFET transistors work by voltage. MOSFET uses a metal oxide to separate the path in which current will flow until a greater voltage is applied. An important part to a transistor is the three pins which vary in name depending on whether they are voltage or current based. They are the variable, in, and out (my names for simplification across both types of transistors). Current flows in only one direction in transistors which is why I renamed them in and out. The variable pin is what is used to determine if current will flow or not. For the current to flow, the VGS (voltage between the variable and the out pins) must be greater than the Vth (voltage threshold) of the particular transistor. I did all this research to understand how I must connect my pump and power supplies together in order for a transistor to act as a switch. I tinkercaded my circuit to show how I would connect everything to an Arduino board. The following are pictures of how everything got connected. I ended up using 1 analog port and 4 digital ports. I have three LED’s on my breadboard to indicate water tank status. Additionally, the yellow device pictured below is a resistance sensor that can be used to detect how much water is present. This sensor will output numbers from 1023 all the way too 300 which we and the computer must be able to interpret. Additionally, the black and silver tower on the red board is a transistor that I mentioned above. I was able to solder this transistor, resistor, and ports to the board to create something that is a bit easier to use. However, we did not find this to be the case. Once I had soldered the board, I was trying to test the board, but we were unsure of how to plug the board into the circuit and which inputs were connected to which part of the transistor. Therefore, we did as one person called it, the bleep test. A basic connectivity test showed us which parts were connected and were able to diagram the circuit out. If you are wondering why it is called the bleep test, it is because the volt meter bleeps with the there is a path between the two nodes. Today, I was also able to test the pump which works very well and should be able to move a lot of water in very little amount of time reducing the amount of time we will need to run the pump for. I also got a chance to test the resistive sensor for values for various amounts of water present. I believe that a sensor value between 650-750 maybe even higher would indicate need for watering. I am not sure if I have mentioned this yet in my blog, but I have been doing a lot of math that I haven’t posted. From sizing of the casing of the device to sizing of resistors, math is completely necessary and fun (as long as you get it right on the first try not the 8th). To give you an example of how a resistor calculator might go, I propose the following. Begin with the fact that in a closed circuit that the voltage drops across every component must cancel out the initial voltage. Therefore, if I have a 5V power supply to supply a LED and resistor, I must know the voltage drop across the LED. Simple in fact, just plug it in and measure with a volt meter.
5V-V(drop across LED) – V(drop across resistor)=0
5V-V(drop across LED)=IR
The I or current can be found from the same guide that told you that 5V is output from a pin on an Arduino.
(5V-V(drop across LED))/I=R
Simple Math.