Posts

Showing posts from September, 2025

Motorized Pinwheel: Using 9v battery, DC motor, and a Transistor to make a pinwheel

Image
    This project was the second one based around a motor, but instead of the accurate servo meant for specific angles, the DC servo is meant for pure spinning power, which is why we needed the extra 9v battery for the first time since starting that class. I though I would have had to make a Wal-mart run for the 9v, but I didn't realize that they actually sold them and other battery types at the campus shop at RIT, which is a good not for future reference for myself and anybody who reads this.     The main component of this project was the DC motor we used to turn the pinwheel itself. But on top of that, we used a MOSFET (transistor). A transistor is a switch of sorts, that allows large current to flow from one input if it detects a smaller charge from a second input, and will send the large current out a third pin/output. We also used a diode to control the power flow on the right side of the breadboard. A button to turn on the DC along with the a resistor to block s...

Digital Hourglass: Using millis() and tilt sensor to simulate a real hourglass!

Image
      This project was based around sand hour glasses, in which they would fill up over time so you would know how much has passed, with the most common being an hour. These can be re-set by flipping them over, and therefore resetting the timer. The parts included 6 red LED's, simulating the sand flowing with 6 intervals. Each Led was connected to a digital pin, where their values can be described as ON or OFF. They were connected to ground with a 220 ohm resistor. The tilt sensor determines when the Arduino is tilted (foolproof). The up direction means that the tilt sensor will not detect that tilting direction, so always tilt "away" from the tilt arrow direction.          Setup set the LED pins as output (2 - 7) and the pin connected to the tilt sensor as input, to tell when to reset the LED's. The if statement checks to see if the time elapsed is longer than the interval, and if it is, it turns on the next LED in line (with the led++; line), an...

Keyboard Instrument: Using a piezo and buttons to make a 4-note keyboard

Image
 This project was extremely fun cause we got to make the first project that closely related to a real life machine, and something you could play if you knew how to. Parts included the piezo, 4 buttons, and 4 total resistors of 3 strengths: 10 kilohm, 1 megohm, and 220 ohm resistors. The build had us connect a piezo to ground and digital 8 pin. Then we had to connect four buttons to positive, with them having no resistor, 220 ohm, 10 kilohm, and 1 megohm resistor respectively. They were connected to ground in series, with there being a 10 kilohm resistor connecting all of them to the A0 analog pin, so we can read the amount of "strength" of buttons being pressed. The book made us set up an buttons array with 6 integers, and the first one being equal to 2. I also set up a notes array with the values 262, 294, 330, and 349. These ints in Hz are equivalent to the notes mid C, D, E, and F. In loop, we compare the keyVal from A0 and see what value it is equivalent to with the amoun...

Light Theremin: Using a phototransistor to create noise from a Piezo.

Image
    This project had a super simple components list, just a phototransistor, a 10 kilohm resistor, and a piezo. Building the project consisted of connecting a phototransistor to the analog A0 pin and ground, and the piezo to digital 8 pin, with the resistor used connecting the phototransistor to ground. Coding the light theremin was even simpler, taking a modest 30 lines, which we hook up the input and output, and compare the value to the starting values of 1023 or 0, and edit the tone of piezo accordingly.     This project was fun in the fact we got to edit audio output for the first time, and it was a easy jumping platform into the technology. Using the phototransistor for this project was a way better way of accomplishing this type of output than the color-mixing lamp, as this was easy to control rather than 3 close together phototransistors. It was really fun to play with moving my hand closer and closer and hearing the pitch change. If I were to improve this pro...

Mood Cue: Using a potentiometer to turn a servo to where I want

Image
    This project was based around turning a servo motor a certain amount based on how we twisted a  potentiometer. This was a very simple circuit to build, with the only three big parts being the servo, potentiometer, and the capacitor. The potentiometer is connected to the A0 pin, and the servo is connected to the ~9 digital pin.      The capacitor is meant to take care of voltage dips that could occur by smoothing them out. The potentiometer reads the angle on an analog basis, which is why it is attached to the analog output. We needed to use the male header pins to connect the servo to the board, which gave me pause for a minute because I didn't realize you could move the black plastic pieces down to even out the sides.      The code for this project was super simple, just mapping the angle from the potentiometer to the servo, and changing the angle based on how much it is spun. The code also outputs the current angle based on how far the ...

Color Mixing Lamp: Using light detectors to detect change and output through RGB LED

Image
     This project was centered around using phototransistors to detect light, and their output determines how strong the RGB's in the RGB LED shine. The RGB LED is an cathode LED, where the middle left pin is the common ground pin. The phototransistors are connected to the Analog pins 0 - 2, this is so they can detect a multitude of different light levels to output to the LED. The Phototransistors are polar, so a specific pin is either positive or negative.     It was hard to control the light against the phototransistors since they were so close to each other. If I were to build this on my own recognizance, I would put the phototransistors further apart from each other so it would be easier to control how much light was going into each. Either that or find a contraption to put on each phototransistor so I could control it. The code utilized the output functions of the phototransistors as the value to input into each respective node of the RGB LED. We hooked up ...

Love-O-Meter project. Using temperature to turn on LED's

Image
 The Love-O-Meter project uses the temperature sensor and some code to turn on LED's based on how hot the sensor is. The LED's were connected to the 2 - 4 pins, and were hooked up to the sensor and made HIGH or LOW based on the "baselineTemp" of the surrounding air. As you can see in the GIF above, when my finger is away from the sensor, the temperature read is low, so the lights go down, but residually as the surrounding temp needs time to cool down. But when I put the my finger by the sensor, it goes up gradually by the same effect. I can speed up the LED's turning by touching the sensor with my finger, at which would make the sensor read my finger temp rather than the air temp, super speeding up the LED light process. The code reads the temp from the pin, and uses if, else if, and else statements in the loop function to continuesly read the temperature from the sensor. This then updates the LED's, as based on the temperature it will turn their levels to eit...

Starship Interface! Getting to know the programming side of Arduino. (Pins, time delay)

Image
 This project had us building a LED array that would act as our starship interface! This interface contained 2 red LED's and 1 green one, that when hooked up and programmed right, would act as a sort of "countdown timer" for the starship launch. The setup had us connecting the three LED's to the 3, 4, 5 pin slots, with the button being connected to the second pin slot. They were also connected to the positive and negative wire lines with resistors. The assignment also made me use this pre-cutout piece of cardboard that would sit atop the LED's and the turnon switch. Honestly the most difficult part of this project was bending the cardboard piece and the wires so they would all sit together without slipping off. I wish this project was better designed for this cardboard piece, as it kinda seems like an after thought in the mind of the book writers/engineers. We had to do our first bit of programming for this project, utilizing both the pre-given setup and loop func...

Getting to know my tools! My first Arduino project, working with Resistors, Switches, and LED's

Image
 This was my first project working with the basic tools the Arduino provides. It was broken into three parts:  - Setting up a basic switch to turn on the LED  - Setting up a parallel circuit switch to turn on the LED  - Setting up a series circuit switch to turn on the LED BASIC SWITCH: This was the easiest of the three to complete, but came with its difficulties and realizations. I have now realized that when I put my breadboard onto the Arduino stand, I glued it on backwards, so I will have to make sure to pay extra special attention to diagrams showing what to do, because half of mine will be reversed. I also didn't realized it mattered which prong of the LED was placed into which slot, which made it so my LED didn't work, and gave some confusion. But all in all, it was super simple to complete and super fun! PARALLEL SWITCH: This was the one where I realized that the wires the base Arduino gives you are not going to be color coded to pos and neg, which gave me a ...