How Barcode Scanner Works?

In real time the barcode scanners do not consider black and white stripes as one and zero. They detect the sequences of these white and black lines and convert them directly into a decimal number. The decimal number will be the output of a barcode scanner.

  • The scanner’s head consists of an LED or laser light which is focused on the barcode.
  • The light reflects this barcode into another light detecting electronic component called a photoelectric cell. The white areas of this barcode reflect more light and the black areas reflect less light.
  • As the scanner scans the code, the cell generates a specific pattern of on-off pulses that corresponds to the black and white stripes. This means for the above shown barcode with (black black black white black white black black), the cell would act as “off off off on off on off off).
  • There is an electronic circuit that is attached to this scanner will convert the on and off pulses into binary digits i.e., zeros and ones.
  • The binary digits are sent to a particular computer which is attached to the scanner. This computer detects the code as 11101011.

Bluetooth Low Energy

Wireless devices are making a great impact on the world with every passing day. The people who use these wireless devices have increased rapidly. When the radios were first invented, every company has a single goal for their engineers and scientists. The companies wanted them to create the best radio module that the market has ever seen. The efficiency of the radio module should be top notch. But none of them has a clear definition for a perfect radio module. What defines the perfect radio module is something that cannot be defined easily. It normally depends on the tasks that the radio module has to solve.There are some situations where we need to send huge amount of data on a wireless network and in that situation, no one would ask for a power efficient way as they want to transmit the data first. Then there are some other situations where only a small amount of data must be transmitted and then we can opt for power consumption ways. The portable devices usually notify us when there are some occurrences and as these devices us batteries for power, the radio modules in such devices should be as efficient as possible.

There is one radio technology that stands out amongst all kinds of energy efficient radio modules. This technology is capable of sending a suitable amount of data at a relatively cheap cost of energy consumption- Bluetooth Low Energy.

Organization of BLE in Three Major Blocks


The application block, as its name depicts is a user application which will interface with the Bluetooth protocol stack. The controller covers the lower layers of a protocol stack whereas the host covers the upper layers of protocol stack. The host is capable of communicating with the BLE module with the help of a Host Controller Interface (HCI). The basic purpose of HCI is to interface the host and controller and this specific interface is capable of interfacing a wide range of hosts with a controller. In our case, the MCU runs this application and talks a specific connectivity device. This connectivity device is made with the help of a controller and host. For this specific purpose, the SPI or various other interfaces are used to communicate.


We have created a one simple and smart hand glove held barcode scanner which can be operated with the help of a battery. This glove has an inbuilt Bluetooth chip which communicates with the smartphone APK that keeps record of each scanned item and also uploads the data to cloud for future use like management of stock, etc.

Block Digram


Electronic Components Used


This RT206 barcode scanner has two red LEDs for supplementary lighting. This helps in scanning the barcodes even in complete darkness.

The TR206 uses red colored LEDs for illumination. This way the engines show better reading performance when the barcodes are printed in red colors. For the applications where red barcodes are involved, it has been advised to turn off the engine’s illumination and use a non-red supplementary lightning (like green) instead.


The predecessor of ESP32 module has a special built-in processor. But as the multitasking is involved when the WiFi stack is updated, the applications use a separate microcontroller for processing of data, interfacing the sensors and digital input output. With ESP32, you may not want to use another microcontroller. ESP32 has Xtensa Dual-core 32-bit LX6 microprocessors that run up to 600 DMIPS. The ESP32 will run on the breakout boards and modules from 160 MHz up to 240 MHz . this is a great speed for anything which requires a microcontroller with different connectivity options.

The processors consists of a closely tied internal memory which is
used for following purposes

  • 448 Kbytes of ROM for booting and other core functions.
  • 520 Kbytes on chip SRAM for instruction and data.
  • 8 Kbytes of SRAM in RTC. This is called as RTC SLOW memory which can be accessed by the co-processor during the deep sleep mode.
  • 8 Kbytes of RAM in RTC which is also called as RTC FAST memory. It can be used for data storage and can be accessed with ease by the main CPU during RTC boot from deep sleep mode.
  • 1 Kbit of EFUSE and 256 bits of this is used for the system purposes (chip configuration and MAC address). The remaining 768 bits are reserved for the customer applications and this includes Chip-ID and flash encryption.

MCP 73831 Battery Charger

High accuracy present voltage regulation in the output (+/-0.75%)

  • The output voltage options include 4.2V, 4.35V, 4.4V and 4.5V.
  • The charge current is user programmable.
  • The charge status output can directly drive LEDs.
  • On-chip thermal regulation.
  • End-of-charge ratio and pre-conditioning options.

AMS1117 (3.3V) Voltage Regulator

The AMS1117-3.3V voltage regulator module is a perfect option for various types of microcontroller projects and also for different types of electronic projects. This is a high performance module which is capable of providing a quick solution for powering your circuit completely.

  • Output voltage-3.3V.
  • Output current-1A.
  • Operates down to 1V dropout.
  • Line regulation- 0.2% max.
  • Load regulation-0.4% max.
  • SOT-223 package available
  • AMS1117-3.3 car replace IRU1117-33CD by IRF.
  • Manufacturer- Advanced monolithic systems.

SMT-0540-S-R 5X5MM Transducer

High accuracy present voltage regulation in the output (+/-0.75)

  • A side firing electro mechanical transducer designed for 2 to 4 Vp-p.
  • Tiny 5×5 mm footprint with 2mm height for thinner devices.
  • 78 dBA minimum output (3Vp-p @10cm) and 4 KHz resonant frequency designed for reflow soldering using a lead free profile.

Lipo Battery (3.7v, 1000MAH)

The Lithium Polymer batteries which are also called as LiPo batteries are a latest type of batteries which are used in various types of consumer electronic devices. They have gained a lot of popularity in the radio control industry since some years and now evolved as the most popular choice for any person who is looking for a long run times and higher powers.

The LiPo batteries offer wide array of benefits but the users must verify whether the benefits outweigh the drawbacks or not. In my personal opinion, there is nothing to fear about the LiPo batteries as long as you adhere to the rules and treat the batteries properly.


  • The LiPo batteries are of lighter weight and can be made in almost all shapes and sizes.
  • They have higher capacities which allow them to hold more amount of power.
  • They discharge rates are higher which means they pack good amount of power in them.


  • Very short life span. The average life span of a LiPo battery is 150-250 cycles.
  • If the battery gets punctured, a fire can start out due to sensitive chemistry involvement.
  • Need extreme care for charging, discharging and storage.