Hello, friends today we will discuss the basic concept of chemistry it is our first tutorial series in which we will discuss:
Now in this article, we will discuss atoms. Its definitions, examples, properties, its evolutionary history, and also some important facts in the form of questions.
A tiny particle that cannot be seen with a naked eye so-called atom.
Or
Atom is the lowest unit of matter and is often divided without the discharge of electrically charged particles.
Or
Atom is the introductory structure block of chemistry.
Examples
Hydrogen (H2)
Nitrogen (N3)
Helium(He)
We discuss different properties of atoms like:
The no of protons present in the nucleus of an element is called atomic number Or nuclear charge no.
. Its symbol is Z.
Examples
The sum of the numbers of neutrons and protons in the nucleus of an atom is called atomic mass or mass no.
Example
Sodium has 11 electrons = 11 protons and 12 neutrons in an atom. So its mass no is
A= 11+12= 23
Periodic table
In this table, we can see atomic numbers, atomic mass, and symbols of atoms. Above the symbol is atomic no and below is the atomic mass.
The distance between the nucleus and the outermost orbit of the electrons of an atom is called atomic radius or atomic radii.
The relative mass unit or atomic weight open element is defined as the number of atoms of an element in grams contained in 12 grams of carbon _12(isotope)
The atomic mass unit or Dalton is defined as the one-twelfth of the mass of a carbon atom.
Types of bonds
This type of bond is formed by the complete transfer of an electron from one atom to another.
Example
In this type of bond, electrons are mutually shared between two atoms.
Types
In which one bond pair of electrons is formed by the contribution of an electron by each bonded atom.
In which two bond pair is formed by the contribution of electron pair from each atom.
In which three bond pairs are formed by the contributions of three electrons from each bonded atom.
A bond is formed between the electron pair donor and the electron pair acceptor.
Example:
Those covalent bonds in which hetero atom takes part and one attracts the bond pair of an electron more strongly than the other.
If a covalent bond is constituted in which two similar atoms shared pair of the electron is excited by the both equally. such a type of bond is called a nonpolar covalent bond.
If the electronegativity between two elements is more than 1.7 the bond between them will be predominantly ionic and if it is less than 1.7 the bond between two atoms will be predominantly covalent.
Metallic bond:
A metallic bond is formed due to free electrons.
Timeline: 400 BC.
Scientist: Democritus
A first-person who uses the term atom(mean individual derived from atoms) was a Greek philosopher. He says that if you divided a piece of matter and divide and continue dividing, at any moment reach when you can’t divide it more, that fundamental unit was Democritus called an atom.
Timeline:1800s
Scientist: Jhon Dalton
Timeline: 1890s.
Scientist: Thomson
J.JThomson was a physicist who use cathode ray tube technology to discover electrons.
When he found that negative charge, he did not stop and did a series of experiments, he discover the mass of the electron. He found that the mass of an electron is 1000 times lighter than a hydrogen atom. He made a statement saying that an electron must be inside an atom. Before it, he says the negative charge corpuscles later his name was changed and named as an electron.
Using her prediction, he discovered what an atom looks like?
Timeline: 1910’s.
Scientist: Ernest Rutherford
Sir Rutherford made a famous gold foil experiment and proved the Thomson atomic model.
Timeline:1910’s
Scientist: Neils Bohr
Niels obeys the planetary model but he found some disadvantages. He could answer the Rutherford question
Why electrons do not fall into the nucleus?
He replies with a perfect answer to the question because of his knowledge of quantum physics and energy.
There is a problem with this theory: Electrons could not move in a specific path or orbit.
Timeline:1920’s
Scientist: Erwin Schrodinger
He was a revolutionary physicist and he presented the atomic model by using Heisenberg’s uncertainty principle.
By the definition, atoms are the units of matter, so those are not atoms that do not consist of matter.
Parts of atoms that are not associated with a proton are not atoms.
An electron is not an atom, also neutrons bonded to other neutron is not an atom.
Atoms react for attaining the nearest noble gas configuration and become more stable by following the duplet or octet rule.
We can say that an atom “has the shape of the sphere” because a positively charged nucleus is at the very center, and the negatively charged electrons are distributed around it. The electrons are attracted to the nucleus and repel each other. A nucleus, the mass of neutrons and protons within an atom, arranged itself in a roughly spherical shape.
Electrons revolve in fixed energy levels around the nucleus. It can not befall into the nucleus because electrons do not radiate energy and move in a circular orbit due to necessary centripetal force.
We have an idea from its name, the neutron is the neutron. In other words, the interaction between protons and electrons can cause the formation and destorarion of neutrons. As electrons are negatively charged and protons are positively charged particles. So they cancel each other charge and that’s why neutrons carry no charge and they are neutral. They exist in the nucleus for the stability of nuclei.
At the start, hydrogen is used to measure but it gives a fraction. so it would be changed into oxygen, Scientists used a mixture of natural oxygen but it led to confusion. So again changed the reference and turned it into carbon – 12. We use this because it gives all the atomic mass units in exact no. The reason is the different ratio of the mass of proton and neutron performing the change of nuclei.
I Hope, I cover all aspects of the atom, in the next tutorial we will learn about the molecules. If someone has any questions about the atom I will try to answer them. write it in the comment box. Thanks
Hello readers, I hope your all are doing great. We know that a Raspberry Pi Pico module comes with multiple inbuilt features for example onboard memory, processing units, GPIOs or General Purpose Input Outputs (used to control and receive inputs from various electronic peripherals) etc.
In our previous tutorials, we discussed how to access GPIO pins of the Raspberry Pi Pico module for both input as well as output operations.
In this tutorial, we are going to discuss another important feature of the Raspberry Pi Pico module (RP2040) which is Dual Core Processor. The Pico board features with 133MHz ARM Cortex-M0+, Dual Core Processor. This dual-core feature makes the Pico module capable of multiple thread execution or multithreading.
Now before writing the MicroPython program let’s first understand the concept of the dual-core processor in the Raspberry Pi Pico module.
Fig. 1 raspberry Pi Pico dual-core programming
A core is the basic unit of any processor which is responsible for executing program instructions. A multi core processor comes with the features of executing multiple tasks at a time. Multithreading is the ability of a processing unit to provide multiple threads of execution simultaneously (operating system supported). In multithreading, threads share their resources with each other. So this dual-core processor feature results in increased processing speed.
Raspberry Pi Pico (RP2040) module is having two processing cores, Core0 and Core1. In the default mode of Raspberry Pi Pico program execution, Core_0 executes all the tasks and Core1 remains idle or on standby mode. Using both the cores of RP2040 provides us with two threads of execution and hence a more powerful project with better processing speed.
Both core0 and core1 execute their assigned tasks independent of each other while sharing all the resources like memory space and program code with each other. Sharing the memory location between two cores can create race conditions and hence can cause trouble when mutual memory accessing is not assured. On the other hand, sharing program code with each other (core0 and core1) may sound troublesome but practically it is not. The reason is fetching code is a read instruction that does not create a race condition.
Fig. 2 Core_0 and Core_1 communication
As we mentioned above, sharing memory space with two cores simultaneously can cause race conditions. So, to make the cores to communicate with each other the Raspberry Pi Pico module is featured with two individual ‘First In First Out’ (FIFO) structures. Each core can access only one FIFO structure so both core have their own FIFO structure to write codes which helps in avoiding race condition or writing to the same memory location simultaneously.
You can follow the given link for detailed study on Raspberry Pi Pico: https://www.theengineeringprojects.com/2022/04/getting-started-with-raspberry-pi-pico.html
The development environment we are using is Thonny IDE, to program the Raspberry Pi Pico board for accessing the dual core feature with MicroPython programming language.
So, before writing the MicroPython program user need to install the respective development environment.
We already published a tutorial on how to install and access Thonny IDE for Raspberry Pi Pico programming using MicroPython programming language. You can find the details at the given link address: https://www.theengineeringprojects.com/2022/04/installing-thonny-ide-for-raspberry-pi-pico-programming.html
Now let’ write a MicroPython program with Thonny IDE to access raspberry Pi Pico’s both cores:
In this example code we using just a simple “print()” commands to print the messages from each core for testing purpose.
Fig. 3 Importing necessary libraries
Fig. 4 declaring thread lock object
Fig. 5 Task for Core_1
Fig. 6 Core_1 thread
Fig. 7 Task for default core (core_0)
The MicroPython code with thonny IDE for Raspberry Pi Pico is written below:
import machine
import utime # access internal clock of raspberry Pi Pico
import _thread # to access threading function
spLock = _thread.allocate_lock() # creating semaphore
def core1_task():
while True:
spLock.acquire() # acquiring semaphore lock
print( "message from core_1")
utime.sleep(0.5) # 0.5 sec or 500us delay
spLock.release()
_thread.start_new_thread(core1_task, ())
while True:
spLock.acquire()
print( "message from Core_0 ")
utime.sleep( 0.5)
spLock.release()
Fig. 8 Enabling Shell
The result obtained from the above code is attached below. Where we can see the messages received or executed by both the cores as per the instructions provided in the micropython code.
Fig. 9 output printed on shell
Let’s take another example where we will interface some peripheral LEDs and will toggle those LEDs using different threads of execution or cores.
Fig.10 importing necessary libraries
Fig. 11 declaring led objects
Fig. 12 Toggling LED with core_1
Fig. 13 toggling LED with core_0
from machine import Pin
import utime # access internal clock of raspberry Pi Pico
import _thread # to access threading function
# declaring led object
led_0 = Pin( 14, Pin.OUT ) # led object for core_0
led_1 = Pin( 15, Pin.OUT ) # led object for core_1
spLock = _thread.allocate_lock() # creating semaphore lock
def core1_task():
while True:
spLock.acquire() # acquiring semaphore lock
print( " message from core_1" )
led_1.value( 1)
utime.sleep( 0.5) # 0.5 sec or 500us delay
led_1.value(0)
spLock.release()
_thread.start_new_thread( core1_task, () )
while True:
spLock.acquire()
print( "message from Core_0" )
led_0.value(1)
utime.sleep( 0.5)
led_0.value(0)
spLock.release()
In the results attached below we can that two LEDs are attached with raspberry Pi Pico boar. Green (GPIO14) and Red (GPIO15) LEDs represent the output of Core_1 and Core_0 respectively.
Fig. 14 Core_1 output (GPIO 14)
Fig. 15 Core_0 Output (GPIO15)
In this tutorial, we learned how to access both the cores of the raspberry pi Pico module and to execute task or control peripherals with individual cores. We also learned the concept of threading and multithreading.
This concludes the tutorial. I hope you found this of some help and also hope to see you soon with a new tutorial on raspberry Pi Pico programming.