Saturday, February 1, 2025

4.1: additional electronics basics

There are several different voltage-in (positive) pins on the arduino: 3.3V, 5V, and Vin. 3.3V and 5V adjust the voltage configuration of everything to be that number, and Vin will adjust the configuration to whatever level the power source coming in is. 


There are different ways to arrange multiple batteries to achieve different voltage outcomes.


This method is called putting batteries in series:







The outcome of this series arrangement is that the two 1.5V batteries combine their power to yield 3V. 


Another method of arrangement is to put batteries in parallel







This method yields 1.5V, the same as each individual battery. The purpose of using this method would be to have the same voltage but make it last longer.


Passive components of a circuit of a circuit include resistors, capacitors, and diodes. Passive means they can only 'process' power; they aren't capable of generating it alone. 

Resistors restrict the flow of current (current is measured in amps)

Capacitors almost act like mini-batteries. A metaphor to illustrate them is having a bucket for water with a small hole in the bottom. Even if you were to pour water (current) in the bucket inconsistently, water would flow from the smaller pinhole at a constant rate. 

The resistor and the capacitor work together when the resistor slows the flow of electrons and the capacitor allows them to accumulate at a certain rate. This allows power to be given at a certain 'tempo.'

A diode stops the flow of current in one direction. An LED is an example of a diode, it stands for "light emitting diode."


We must also distinguish between two types of data.

All components of a digital data set are one option of a limited set of measurable states. For example: on/off; 0/1/2/3/4/5/6, RGB color system, etc.


The components of an analog data set are infinite in quantity and scope of possibility. 


When coding for arduino (C++) specifying the type of variable is necessary because it dictates how many bits of data you can store in the variable.

int: 16 bits of data / unsigned int: 32 bits of data (prefixing 'unsigned' eliminates negatives and doubles capacity) / bool: true or false / const: an unchanging number


Note to avoid using decimal (floating point) numbers in any of our programs because our boards can't handle the math well.


There are different types of pins on our boards

    GPIO: general purpose input/output; which is able to take in or export signal

    Analog read: pins that only intake analog data


A floating pin occurs when a pin is not attached to volts or ground.


Sometimes, when buttons are pressed, there will be multiple readings that occur even though only one press has happened. This is due to bouncing, the leveling off of power that occurs as the pin changes from a HIGH state to a LOW one. To remediate functional issues caused by this, we might account for the minuscule time frame where the bouncing occurs in our program. 


A model of bouncing:





No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

14.1 project 2 prototypes/planning

I began prototyping this week by mapping out all the individual elements I need to construct for my seed growing lamp, which has become some...