Is Used. LM7805 IC Provides +5 Volts Regulated Power Supply With Provisions To Add A Heat Sink Whose Input Voltage Range 7V-35V
Is Used. LM7805 IC Provides +5 Volts Regulated Power Supply With Provisions To Add A Heat Sink Whose Input Voltage Range 7V-35V
R2 = 1KΩ;
R3=2.2KΩ;
C1=0.1µF;
There are three voltage levels in the PCB circuit 3.3v, 5v and 12v. For 12v DC we’re using
HLK-PM 12, datasheet is attached whose input voltage range is 90-264 Volt AC and output
voltage is 12v DC after then for getting output voltage 5v DC, LM7805 is used. LM7805 IC
provides +5 volts regulated power supply with provisions to add a heat sink whose Input voltage
range 7V- 35V. For 3.3v dc, voltage divider circuit is used and converts it to a lower one by
using a pair of resistors R2 and R3. These voltages are for the functioning of different modules in
the PCB which operates at different voltage level.
Barcode Scan engine and bill validator, both are communicating with NODEMCU on UART.
The UART (Universal asynchronous receiver/transmitter) module allows configuration of and
communication over the UART serial port. Rest of pins of different components are connected
with I/O pins of NODEMCU. Interfaced LCD with NodeMCU using I2C. Connecting LCD to
I2C and then interfacing it to NodeMCU is very simple.
The LCD’s registers from D0 to D7 and Vcc, GND, RS, R/W pins will be connected to I2C.
Coding:
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27,16,2);
int state=0;
int validity_state=0;
int input;
void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
Wire.begin(D4,D3);
pinMode(bv_in, INPUT);
pinMode(disp_in, INPUT);
pinMode(Position,OUTPUT);
pinMode(bv_op, OUTPUT);
pinMode(validity, OUTPUT);
//lcd.print("Hello World!");
start();
}
void loop() {
// (note: line 1 is the second row, since counting begins with 0):
lcd.clear();
lcd.print("Insert Money");
delay(3000);
void start()
lcd.print(" Welcome");
delay(2000);
lcd.clear();
//lcd.setCursor(0, 1);
lcd.blink();
delay(2000);
void a()
state = digitalRead(bv_in);
if(state==0)
lcd.clear();
lcd.print("No Money");
lcd.setCursor(0,1);
lcd.print("Inserted");
delay(2000);
if(state==1)
lcd.clear();
lcd.print("Money Inserted");
delay(2000);
validity_state = digitalRead(validity);
if(validity_state==1)
lcd.clear();
winner:
digitalWrite(disp_in, 0x0010000);//
if(Serial.available())
input = Serial.read();
Serial.println(input);
digitalWrite(disp_in, 0x1111000);
digitalWrite(disp_in, 0x0010000);
digitalWrite(Position,HIGH);
delay(3000);
goto winner;
else
{
lcd.clear();
if(validity_state==0)
lcd.clear();