Skip to content

Simulation Model

Sizwe edited this page Jun 2, 2018 · 3 revisions

Simulation Model

The Application used is Proteus 8(Professional). Proteus is one of the best simulation software due to its flexibility and enabling us to work with all the devices that we wish to put in our design. It includes devices like led, keypad, relays, and serial communication for our communication with the raspberry pi3.

There is also important setting that should be taken into consideration like setting the baud rate for serial communication, selecting the microcontroller to be used, selecting the file of storage for the code to be imported.

Microcontroller communicates with the raspberry pi3, storage units, LCD, and the weight sensors of each storage, on serial communication when the raspberry pi 3 sends the letter a/A to the microcontroller it requests the parcel status on the storage unit one using the sensor inside the unit, with d/D the lock status is requested, with b/B the parcel status is requested for storage unit 2 and with e/E its lock status is requested. With c/C the parcel status is requested from storage unit three and with f/F its lock status is requested.

If the status is requested the microcontroller reads the status of port 1.7(DO) to check if the status is in logic high or Low, if is high it sends the logic high to the raspberry pi indicating that the sensor is reading a value/weight of the parcel inside the storage unit, and it also displays massage on the LCD written “Storage Unit Occupied”. Else if the sensor of the storage unit does not read any value, the P1.7(DO) reads the logic Low and sends it to the raspberry pi indicating storage is available and displaying to the LCD” Storage Unit Available”.

After the raspberry pi has finished communicating with the use on the interface and the password is generated, and selection of the storage unit is made by the user/customer. The microcontroller connects raspberry pi and relays.

Function of the relay is to supply the required amount of voltage to the magnetic locker, so it opens or closes, each relay of the storage unit is connected to its magnetic locker. When the raspberry pi sends a logic High to the microcontroller it requests the selected storage unit to the opened, The microcontroller also sends the logic High to the relay of the selected storage unit, the relay generates the required voltage by the magnetic locker and it triggers the locker to open the storage unit.

When the user wants to retrieve the parcels, firstly communicates with the interface which is connected to the raspberry pi.

The raspberry pi checks if the password entered is correct, if the password is correct is sends a logic Low to the microcontroller, the microcontroller also sends the logic low to the relay of the storage unit a user wants to retrieve parcels from. The relay disconnects and the low is sent to the magnetic locker of the storage unit. The magnetic locker loses its magnetic strength and the storage unit opens for the user. But if the password entered is incorrect the logic High is kept on the relay of the locker to keep the locker locked.