8. Electronics Production¶
Group Assignment¶
Individual Assignment¶
Pump Working¶
This week, I decided to change the design of my board. However, before doing so, I assembled part of the circuit with the water pump in a real setup to ensure it was working. During testing, I checked how the circuit responded to the control signal, measured the current consumption, and confirmed that the pump turned on and off according to the specified cycle.
My circuit operates from an external power source, so I used the L7805CV voltage regulator to convert 12V to a stable 5V to ensure the proper operation of the microcontroller and other components of the circuit that require this voltage. To stabilize the regulator’s operation, I used two 100µF capacitors — one on the input and one on the output. and the IRFZ44N transistor as an electronic switch. The transistor receives a signal from the RP2040 and turns the pump on or off according to the specified cycle.
Then, I switched to KiCad and began designing the schematic for my board.
Schematic Part¶
For the convenience of further work on the board, I added pin headers for each of the pins. I divided the board into two sections:
-
Input section, which includes:
- A pH meter used to measure the acidity or alkalinity of water. It displays the pH value, indicating whether the water is acidic, neutral, or alkaline.
- A TDS meter used to measure the total dissolved solids in water—such as minerals, salts, and metals—to assess water quality.
- A Water flow sensor used to monitor the amount of water passing through the system.
-
Output section, which includes:
-
A water pump, for circulating or delivering water to the plants,
-
An aerator, for increasing the oxygen level in the water,
-
Grow lights, for providing artificial light to support plant growth.
-
After the drawing was ready, I exported it in SVG format. In the latest versions of KiCad, the process of exporting in SVG format has changed. Here’s how I did it:
- Click on Fabrication Outputs, select Gerbers, and in the Plot formats section, choose SVG.
- Then I select the layers I want to export and click Plot.
The file locations are automatically saved in the folder where the drawings were saved.
Since this method exported the entire working surface, I separated the schematic using Adobe Illustrator, setting the size to match the PCB from which I need to cut the board.
G-code Generation¶
After these steps, I went to the ModsProject website to generate the G-code for CNC. There, using the right mouse button, I opened the program by selecting Programs → Open Program → Roland → Mill 2D PCB.
Next, the SVG file needs to be uploaded to the web platform. To do this, click the Select SVG File button in the first menu and choose a pre-prepared file containing the trace layout.
Once the file is successfully uploaded, activate the Invert option in the next menu. This is necessary to mill not the traces themselves, but the area around them. This approach keeps the traces intact by isolating them through the removal of the surrounding material.
At this stage, I select the type of operation to be performed. In the menu, I choose the Mill traces option, which corresponds to milling the PCB traces. The selection field also shows the recommended tool for this operation — a 1/64 inch end mill. I use this tool to ensure precise milling of fine traces without damaging nearby elements.
Next, I move to the Mill Raster 2D menu, where I set the parameters for the milling process. These include values such as tool diameter, cut depth, max depth, offset number, offset stepover, and direction.
If needed, these parameters can be adjusted manually depending on the specifics of the task and the equipment used. However, in my case, I kept all the default settings as they were suitable for my requirements. Once everything is set, I click Calculate, and the G-code generation process begins.
A short time after clicking the Calculate button, while the generation is in progress, a window automatically opens in the browser displaying a visualization of the toolpath. This allows me to make sure that the toolpath has been generated correctly. At the same time, the final G-code file is automatically downloaded, which I then use for milling on the machine.