Non-programmable Sensor Reading Board With JLCPCB

by UNIPGRacing in Circuits > Electronics

253 Views, 2 Favorites, 0 Comments

Non-programmable Sensor Reading Board With JLCPCB

IMG_20211217_144542.jpg

This article is proudly sponsored by LCSC and JLCPCB.

Founded in 2006, JLCPCB has been at the forefront of the PCB industry. With over 14-year continuous innovation and improvement based on customers' need, they have been growing fast, and becoming a leading global PCB manufacturer, who provides the rapid production of high-reliability and cost-effective PCBs and creates the best customer experience in the industry. In this project i will show you how you can make a non-programmable logic board with JLCPCB.

Introduction

F6M5TBTKPV75JWO.png

This non-programmable logic circuit has been designed in order to turn off the system, inside which the board is placed, when the voltage of the input signals deriving from two sensors is higher than their respective threshold values.

The system must remain turned off until at least one of the two conditions is no longer present for more than 5 seconds, and the action of opening the circuit must occur if both the values exceed the threshold for more than 100 ms.

Voltage Comparators

Screenshot (103).png

There are 4 operational amplifiers inside the circuit that are utilized as voltage comparators. Two of them take as input the analog signals deriving from the sensors and they are used to determine if their respective voltage values exceed the threshold ones, set due to resistive dividers; if this happens, a high logic value will occur as output of each amplifier. Moreover an AND logic gate is used to determine if the two conditions occur simultaneously. The other two op-amps instead are utilized inside RC circuits to allow the net to introduce timing mechanisms, in particular to have logic 1s as output after 5 seconds or 100 ms have passed, depending on the RC circuit time constant (a value that we can change acting on the resistance and on the capacity of the capacitor).

S - R Latch

Screenshot (104).png

Since registers or flash memories where storing data and variables are not present inside the board, we need to add a memory element that can save the current state in which the net stands and eventually, depending on the occurring conditions, that let the circuit changing its state. For example we need to know if the circuit stands in the steady state in which the system remains turned on, or in which the two conditions occurred simultaneously and then the circuit opens, or again where one of the two conditions have not been occurring anymore for more than 5 seconds and so the net can reset and get back to the initial state. For this reason inside the board some NOR gates have been introduced in order to form, if appropriately connected to each other, an S - R Latch, a simple memory element that can fulfill this function.

Transistors

Screenshot (106).png
Screenshot (105).png

Afterwards three transistors have been inserted, two BJTs and one MOSFET, used as electrically controlled switches. Two of them, NPN type, have been placed inside the RC circuit that has to measure a 5 second time-span and in particular they are used to regulate the capacitor’s charge/discharge cycle. Finally the third transistor (nMOS) is used to control the opening/closing of the out relay that has the purpose to electrically connect and so to supply the entire system inside which the board is placed.

Voltage Regulators

Screenshot (108).png

Finally to finish the schematic two voltage regulators have been inserted on the board; they are used to stabilize and reduce the potential difference provided by the system’s battery from 15V to 12V and 5V. In particular the lower voltage is used to supply the entire board, instead the 12V one supplies the external sensors and the out relay.

Drawing the Schematic and Assigning Footprints

Screenshot (109).png

After testing in the workshop the functioning of the circuit, we moved to the realization of the real PCB. There are a bunch of programs that can be used, for example we availed of the KiCad, a free to download software commonly used for personal projects. The first step to take is recreating the schematic inserting the components and connecting them to each other; before moving on it’s recommended to check all the electrical problems and short circuits using the dedicated tool.

The next step is to assign the footprints to their corresponding components of the schematic, paying attention to select the ones with the right dimensions, the right number of pins and their correct numeration in relation to the real components or packages that will be soldered at the end of the process on the printed circuit.

PCB Layout

Screenshot (110).png

To start working on your PCB layout you will need to draw the border of the PCB you want to design, choose a shape and its dimensions. After this you have to load the netlist you created previously and put all the components in place on the board.

Once you like the layout of the board you can start drawing the tracks. To do this you will need to manually connect each component to the others using the command "track". You can also use multiple layers, vias and a ground plane to make a better layout. As last thing you can also add some silkscreens to enumerate or assign names to components, to recognize them better at the time of the soldering, or simply to decorate the board aesthetically adding some symbols or logos.

Ordering Your PCB on JLCPCB

F9UKV0PKRDHVUWD.png

The last thing you have to do to finish the project is to export the Gerber files; to do this you must navigate through the menu on KiCad until you find a command called "plot"; then make sure to export the Gerber files of all the layers, the BOM and the drill files for the holes and vias of the PCB. We finally reached the final step. To order your PCB go to www.jlcpcb.com and on the homepage fill in the table with the characteristics of your board. Then click on "Quote Now" and the website will redirect you to the ordering page. Now select all the characteristics you require for your PCB or leave it to the defaults if you do not need particular options.

Upload the Gerber files by clicking on the specific command on the top of the page, then add all the remaining files you exported previously. Now you are ready to place your order; add your personal informations, shipment address, shipment option and get to the checkout to pay for your order. Finished. Just wait for it to arrive and remember that you can always keep track of your order from your personal account on www.jlcpcb.com. If you have any trouble you can always use the live chat on www.jlcpcb.com. to talk to an expert.

Have fun!