Friday, November 15, 2019

House in scratch S4A

Tuesday, November 12,2019.


The teacher taught us to design a traffic light with arduino and taught us the commands indicated so that the program works with the board.


LEARNING: I learned to make a house applying the commands of the traffic light that the teacher taught us, I designed my house in which the rooms turn on and off respectively.

Homework: to bring programmed the house to test it with the arduin plate.

Saturday, November 09, 2019

ARDUINO BOARD

Tuesday, November 05,2019.


The professor christian gave them a brief explanation on how to use the arduino plate next to the scratch program S4A and left us an exercise to place in colpegasus on a house in scratch. 



LEARNING: I learned to program S4A with the arduino board and as I received the policy conference I learned that laws are made for the most powerful and we have to fight to change this.

photo references: https://bitacoralaurasuarezscratch.blogspot.com/2019/11/05november2019-teacher-explains-to-us.html

Saturday, November 02, 2019

Characteristics for Arduino and Scratch.

Tuesday, October 29,2019 


LEARNING:

This Tuesday the teacher showed us the different types of telephone signal sensors and plates that we are going to use for the rest of the year.

He explained the parts of the board and how it works, along with the features they have.

I learned that cell phones carry 3.3 v and others carry 1.5v. 

Homework:
  1. Electrical characteristics of arduino.
  2. Scratch characteristics for arduino.

solution :

Characteristics of arduino:

arduino_board


  • Microcontroller: ATmega328 
  • Operating voltage: 5V 
  • Input voltage (recommended): 7-12V 
  • Input voltage (limits): 6-20V 
  • Digital I/O pins: 14 (of which 6 provide PWM output)
  •  Analog input pins: 6
  •  DC current per I/O pin: 40 mA 
  • DC current for 3.3V Pin: 50 mA
  •  Flash Memory: 32 KB of which 0.5 KB used by the bootloader 
  • SRAM: 2 KB (ATmega328)
  •  EEPROM: 1 KB (ATmega328) 
  • Clock speed: 16 MHz.
Scratch Characteristics for Arduino:



Entorno del S4A
The S4A interface is very similar to Scratch 1.4 in that it is a version of it.

Interfaz de S4A


In the scenario you will see a table of pins inputs and outputs of arduino board and a drawing of it, if this is not connected will appear a message "looking for board" which will disappear when the S4A recognizes it.

Escenario inicial de S4A
scratch for arduino has several specific blocks to connect to arduino, they are in the "motion" section and are the ones that allow sending instructions to the arduino board micro-controller.
Bloques específicos de S4A

In the same way, editing objects brings with it buttons to create, draw and import arduino objects.
Edición de objetos en S4A





REFERENCES:








Saturday, October 26, 2019

ARDUINO

22 october 2019

in this class we brought abacos to the class, we solved exercises with these and professor christian explained to us different ways of doing conversions between numerical systems.

learning:
 in this class I came to understand better the numerical systems and their conversions, although there is only one that is facilitated to me and the conversion to binaries, the exercises that the professor left helped me quite a lot to develop my understanding towards them.

What is arduino?

Arduino is an open source electronics creation platform, which is based on free hardware and software, flexible and easy to use for creators and developers. This platform allows you to create different types of microcomputers from a single board to which the community of creators can give different types of use


History:

arduino was created in the IVRAE institute in 2005 by a student who wanted to avoid the bankruptcy of the school, giving sales support of plates for one euro each. The first prototype of Arduino was manufactured in the IVRAE institute. Initially it was based on a simple electrical circuit board, where a simple microcontroller was connected along with voltage resistors, in addition to the fact that only simple sensors such as LEDs or other resistors could be connected, and what's more, it still did not have the support of any programming language to manipulate it.
Some time later it was implemented programming language and was a great success worldwide.

characteristics of arduino:

Microcontroller: ATmega328
Operating Voltage: 5v
 Input Voltage (Recommended): 7 - 12 v
Digital Inputs/Outputs Pins: 14 (6 of which are PWM outputs)
Analog Input Pins: 6
Flash Memory: 32 KB (ATmega328) of which 0.5 KB is used by Bootloader.
SRAM: 2 KB (ATmega328)
EEPROM: 1 KB (ATmega328)
Clock Speed: 16 MHZ.
img01

How does it work arduino?


The Arduino is a board based on an ATMEL microcontroller. Microcontrollers are integrated circuits on which you can record instructions, which you write with the programming language you can use in the Arduino IDE environment. These instructions allow you to create programs that interact with the circuitry on the board.

The Arduino microcontroller has what is called an input interface, which is a connection where you can connect different types of peripherals to the board. The information from these peripherals that you connect will be transferred to the microcontroller, which will process the data that arrive through them.Como Funciona Arduino


Sensors that work with arduino:


ACS712 Current sensor module 20 A
This module based on Allegro MicroSystems' ACS712 integrated circuit allows you to measure the amount of current flowing through an alternating current (AC) or direct current (DC) circuit. 
BMP085 Atmospheric Pressure Sensor
Atmospheric pressure sensor BMP085. Ideal for meteorological applications and also for use as an altimeter. It has an I2C interface to communicate with the processor.l BMP085 Atmospheric Pressure Sensor allows atmospheric pressure and temperature readings through the I2C bus. As atmospheric pressure changes with altitude, this sensor can also be used as an altimeter. The sensor is delivered soldered to a PCB ready to be connected to a protoboard or perforated card.

Arduino IR Positioning Camera: 
 This infrared positioning camera can be controlled with Arduino, AVR through the I2C interface. It is capable of tracking mobile infrared points and transmitting the data to the host.  The horizontal angle of the camera is 33 degrees, while the vertical angle is 23 degrees. 

The OV7670: camera module is based on omnivision's OV7670 sensor. It is capable of generating a maximum of 30 frames per second at a resolution of 640×480 pixels (VGA).
The OV7670 is a system in chip (SoC) reason why besides being an image sensor, in its interior also we find circuits destined to the processing of the captured image, for this reason the processes of control of exposure, gamma, white balance, adjustment of saturation of color, control of tone, etc. are realized in the own chip.

DS18B20 Digital Temperature Sensor:
is a One-Wire interface device with programmable resolution of 9 bit to 12 bit capable of making measurements from -55C to 125C (+/-0.5C).
The device can operate in parasitic mode, obtaining its power from the data line, eliminating the need to provide an external power supply. 

The CNY70 sensor:
allows the detection of objects at short distance by the reflection phenomenon. Inside the plastic housing there is an infrared emitting diode and a photo transistor with filter for visible light.

REFERENCES:














Saturday, October 19, 2019

CONVERSIONS AND SIGNALS

TUESDAY, 15 OCTOBER 2019

LEARNING: 

In this class I learned how to make conversions between decimal, binary, octal and hexadecimal numbers, I learned how to use the abacus for these processes and I learned how useful it is to have an instrument of these at hand, Professor Christian taught us different methods to perform the conversions and see which one we adapted better, conversions are interesting to understand how each numerical system works.

homework:

  1. How is the conversion from analog to digital signal performed?
  2. What is the resolution?


Resolution


In computing, the concept of resolution can refer to both images on a screen or monitor, but in any case it is related to the quality of the image that is reproduced to be perceived by the human eye.

The screen resolution is defined by the number or amount that can be displayed on it. This means that more pixels, more resolution and, therefore, better image quality. This type of resolution is the product of the relationship between rows (Y) and columns (X) of the monitor.

On the other hand, image resolution also refers to the level of detail and definition that can be seen in a digital image.

This type of resolution is very highly analyzed in digital photography, since both cameras and image capture and reproduction equipment base their quality and price on the level of resolution they grant.


resolucion



Digital analog conversion resolution

En el mundo real, las señales analógicas (comunes por todos lados) varían constantemente. Estas señales pueden variar lentamente como la temperatura o muy rápidamente como una señal de audio.


What happens with analog signals is that they are very difficult to manipulate, save and then recover with accuracy. If this analog information is converted to digital information, it could be handled without problem and can be saved with great ease.

The manipulated information can then return to its original analog value, with a DAC (Digital to Analog converter).

You have to define how accurately the conversion between the analog and digital signal will be, for which the resolution that it will have will be defined. First, the maximum number of output bits (the digital output) is defined.

This data allows to determine the maximum number of combinations in the digital output. This maximum number is given by: 2n where n is the number of bits.

ADC - Digital Analog Converter - Unicrom Electronics.

The resolution is also understood as the necessary voltage (analog signal) to achieve a less significant bit change in the output (digital signal) (LSB). LSB means: Least Significant Bit. To find the resolution the formula is used: Resolution = ViFS / [2n - 1], where:

n = is the number of bits that the Digital Analog Converter has
ViFS = is the voltage to be placed at the input of the ADC converter, to obtain a maximum conversion (all outputs will be equal to “1”.

Example
If you have a 4-bit analog-to-digital converter (CAD) and the input voltage range is 0 to 15 volts. With n = 4 and ViFS = 15 Volts

CAD / ADC - Convertidor Analógico-Digital - Electrónica Unicrom




The resolution will be = ViFS / [2n -1] = 15 / [24 -1] = 15/15 = 1 volt / variation in the least significant bit. This means that a change of 1 volt at the input will cause a less significant bit (LSB) change at the output. In this case this bit is D0. See the following table.

Tabla con datos de entrada analógica y salida digital de un convertidos analógico digital - Electrónica Unicrom


https://www.definicionabc.com/tecnologia/resolucion.php
https://unicrom.com/convertidor-analogico-digital-cad-adc/

Wednesday, October 09, 2019

WEEK LOST OF INFORMATICS CLASSES.

October 1, 2019

 

 there was no computer class due to different school and external activities that influenced it.

october 8, 2019

the next week of October we were on vacation, we didn't have class either.




Sunday, September 29, 2019

Analog, Digital signals and the Number Systems.

September 24th, 2019

LEARNING: in this class I learned that are the analog signals, digital and the different types of numerical systems that exist, likewise I learned to use each one and how it will serve me when we start to see more complicated programming languages, I hope in this period to learn more about computing and that I serve for my life more.


EXPLANATION : in class, our professor explained us how the matter was going to be in this period, additionally we made some consultations on analog, digital signals and the number system: (is the first thing we'll work on in the period):


What is an analog and an digital signal?



  • an analog signal is generated by some type of electromagnetic phenomenon, which is represented by a continuous mathematical function of variable: amplitude period as a function of time.



  • the digital signal is a signal that encodes signs to represent data in magnitudes of discrete values (a sequence of discrete values in binary could be: 0 0 1 1 1 0 1 1 1 0 1 0 1...


Resultado de imagen para que es una señal analoga

What are the binary, octal and hexadecimal system?


  •  Binary:a binary system is a numerical system represented with two digits: 0 and 1, is widely used in computers because only two voltages are used.

  • Octal:  is a positional numbering system based on the number 8, using Arabic Indian digits: 0,1,2,3,4,5,6,7. It has the advantage that it does not use other signs apart from digits

  • Hexadecimal: is a positional numbering system based on the number 16, which means that there are 16 possible digit symbols. Their numbers are represented by the first 10 digits of the decimal numbering and the interval from number 10 to number 15 is represented by the letters of the alphabet: A, B, C, D, E and F.




conversions:

binary to decimal: To convert from binary to decimal, do the following:
Start on the right side of the binary number. Multiply each digit by 2 elevated to the consecutive power (starting with power 0.20).
After performing each of the multiplications, add them all and the resulting number will be the equivalent of the decimal system.

binary to octal: To convert from binary to octal, do the following:


  1. Group the binary quantity in groups of 3 by 3 starting on the right side. If at the end of grouping you do not complete 3 digits, then add leading zeros.
  2.  Then see the corresponding value according to the table:


  •  Binary number 000 001 010 011 100 101 110 111
  • Octal number 0 1 2 3 4 5 6 7
       3.  The corresponding quantity in octal is grouped from left to right.
Example: 
110111 (binary) = 67 (octal). Process
111 = 7
110 = 6
Group from left to right: 67

Binary to hexadecimal: To perform the binary to hexadecimal conversion, do the following:

  1.  Group the binary quantity in groups of 4 to 4 starting from the right side. If when you finish grouping do not complete 4 digits, then add leading zeros.
  2. Then see the value that corresponds according to the table:


  • Binary number 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
  • Hexadecimal number 0 1 2 3 4 5 6 7 8 9 A B C D E F

     3. The corresponding quantity in hexadecimal is grouped from right to left.

Examples
110111010 (binary) = 1BA (hexadecimal). Process
1010 = A
1011 = B
1 then add 0001 = 1
Group from right to left: 1BA


Decimal to binario: The number of the decimal system is divided by 2, whose whole result is then divided by 2, and so on until the dividend is less than the divisor, 2. That is, when the number to be divided is 1 the divisió ends

Decimal to octal: We divide the number by 8:

If the quotient is greater than or equal to 8, we divide it by 8.


Sistema de numeración octal (base 8): método para pasar del sistema octal al sistema decimal y viceversa. Ejemplos y ejercicios resueltos de cambio de base 8 a base 10 y viceversa. Dividir entre 8 y multiplicar por potencias de 8. Secundaria
In our case, the quotient is 96 (greater than 8), so we divide it again: 



Sistema de numeración octal (base 8): método para pasar del sistema octal al sistema decimal y viceversa. Ejemplos y ejercicios resueltos de cambio de base 8 a base 10 y viceversa. Dividir entre 8 y multiplicar por potencias de 8. Secundaria

We go on like this until we get a quotient less than 8.

In our case, the quotient is 12 (greater than 8), so we divide it again:


Sistema de numeración octal (base 8): método para pasar del sistema octal al sistema decimal y viceversa. Ejemplos y ejercicios resueltos de cambio de base 8 a base 10 y viceversa. Dividir entre 8 y multiplicar por potencias de 8. Secundaria

The quotient is 1, less than 8, so we have finished the process. 
We have indicated the remains with two stripes and the last quotient with a circumference.

The number in base 8 is:

(Last quotient) (Last remainder) (Penultimate remainder)... (Second remainder) (First remainder).

In our case,

The last quotient is 1.

The last rest is 4.

The penultimate remainder is 0.

The first remainder is 0.

Therefore, the number 768 in octal base is 1400. That is

Decimal to hexadecimal: is done by dividing by 16 the decimal number we want to convert, treating the division as an integer division without decimals, note the rest and continue dividing the quotient obtained between sixteen to get a final quotient of between 1 and 15.
Si quieres saber como convertir un numero decimal en hexadecimal, en cual es mi ip online te muestro como hacerlo, el proceso para convertir un numero decimal a hexadecimal es fácil. Este es un ejemplo de decimal a hexadecimal.

Achieving a sequence of decimal numbers with the remains of each division and the final quotient, which we substitute for the hexadecimal equivalent of the table above, and order them from right to left.




Si quieres saber como convertir un numero decimal en hexadecimal, en cual es mi ip online te muestro como hacerlo, el proceso para convertir un numero decimal a hexadecimal es fácil. Este es un ejemplo de decimal a hexadecimal.


octal to binary: Each octal digit becomes its equivalent 3-bit binary and they come together in the same order.

Example
247 (octal) = 010100111 (binary). The 2 in binary is 10, but in 3-bit binary is Oc(2) = B(010); the Oc(4) = B(100) and the Oc(7) = (111), then the binary number will be 010100111.

octal to decimal: In the decimal (base 10), each digit in octal is equal to that digit  multiplied by the  exponent of 8 that is equal to its location minus one.
Example: o3425 to decimal


OctalDecimal
o3425=( 5 × 1 )+( 2 × 8)+( 4 × 64 )+( 3 × 512)
=5+16+256+1536
o3425=1813
octal to hexadecimal: octal is similar to hexadecimal because they are both easily converted to binary. Where octal is equal to three-digit binary, hexadecimal is equal to four-digit binary. Where octal numerals start with the letter "o", hexadecimal numerals end with the letter "h". The easiest way to convert from one to the other is to convert to binary and then to the other system.

Hexadecimal to decimal: Use the decimal value for each hexadecimal digit. For 0-9, it is the same, but A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15.
Keep a sum of the numbers converted at each step below.
Start with the least significant hexadecimal digit. That is the digit on the right end. This will be the first item in a sum.
Take the second-least significant digit. That is next to the digit on the right end. Multiply the decimal value of the digit by 16. Add this to the sum.
Do the same for the third-least significant digit, but multiply it by 162 (that is, 16 squared, or 256). Add it to the sum.
Continue for each digit, multiplying each place by another power of 16. (4096, 65536, etc.)


example: 5Fh to decimal
HexDecimal
5Fh=( 5 x 16 )+( 15 x 1 )
=80+15
5Fh=95
Hexadecimal to binary: Changing a number from binary to hex uses a grouping method. The binary number is separated into groups of four digits starting from the right. These groups are then converted to hexadecimal digits as shown in the chart above for the hexadecimal numbers 0 through F. To change from hexadecimal, the reverse is done. The hex digits are each changed to binary and the grouping is usually removed.
When the quantity of bits in a binary numbers is not a multiple of 4, it is padded with zeros to make it so. Examples:
binary 110 = 0110, which is 6 Hex.
binary 010010 = 00010010, which is 12 Hex.

Hexadecimal to octal: The first step to convert a hexadecimal number into octal is to convert the hexadecimal number into binary, for this, we will help ourselves from the hexadecimal to binary converting table above and translate the hexadecimal number by writing below each digit the correspondence in binary.
Ejemplo de conversión hexadecimal a octal - Conversor hexadecimal a binario
Obtained the binary number we will make the conversion from binary to octal, starting by separating the binary number in blocks of 3 digits starting from the right to the left, we will take help from the table of binary conversion to octal that we have seen above and we will replace each block of binary digits by its corresponding equivalent in octal, in this way and so quickly you know how to convert a hexadecimal number to octal manually.



Ejemplo de conversión hexadecimal a octal - Conversor hexadecimal a binario

before finishing the class, professor christian showed us how to make a cardboard abacus and explained that we had to make one similar to the one he drew for the next class.