Project Files
–– KiCad Files
–– ESP32C3 3D Model
–– Arduino Files
–– ChatGPT PDF 1
–– ChatGPT PDF 2
Brainstorm & Design
This week, our class learned about the different types of input devices that might be used when designing our projects. From microphones to temperatue sensors to cameras, each type of input can be added to our PCB boards to do different things. So the first step was to think of what to do this week.
In my case, I wanted to start working towards my final project, which will need to take in texts from me and print them out on a receipt, while also lighting up, controlling a little popout bird, and emitting sound. I knew I could focus on those output devices in future weeks, so in this case I wanted to test what input would be necessary: the WiFi system that could take in my message. I figured the easiest way to do this would be to find a chip with an embedded WiFI system, attach an antenna, and display the output on a tiny screen.
After doing some research, and checking our inventory, it seemed like the XIAO ESP32C3 could do exactly what I was looking for. To confirm, I checked with ChatGPT while linking each of my components; from there, it helped me figure out which pins needed to connect to which components, and acted as a great double-checker of my work when I needed it. The full chat can be found in the "Project Files" section above, or here.
Here are the components I used, when I first laid them out in KiCAD:
And here they are once everything is connected, using the tag system to conect wires through names tags:
Make sure you double click each component and enable the footprint!
I then exported into the KiCAD PCB view, where I started actually designing how each component would be connected on my intended PCB board. I made sure to up the minimum clearance to 0.5mm based on what we found in previous weeks.
Here's my board once I connected each of the components and added the square board shape as the platform to mill out:
Lastly, I exported my Gerber files as well and generated the Drill files which I will use in the next step to mill my board. Make sure you generate the Drill files, because I milled two test boards before I realized why the holes weren't included!
Milling My Board
Now that I had my Gerber and Drill files, all I needed to do was drop them into Quentin's "gerber2image tool." That generates the two .pngs pictured below:
From there, I opened up the "mods project" site, then right clicked into programs –> open program –> "Carvera mill 2D PCB all". Then I dragged the trace png into "Traces image", and the board png into "Exterior image", and hit "Calculate". This generates the correct file for the milling machine, as well as a 3D model with the milling path within your browser (also pictured below):
Then I brought my .nc file over USB to the milling machine, plugged it in, made sure the offset was aligned with my intended board shape (avoiding the screws holding the board in), and hit "Run"!
How beautiful!
From there, I followed the steps from previous weeks – clipping out the board from the tab attachments, sanding it down (wet sanding really does help, in both clearing out material and making sure everything stays smooth!), and basically just making it look beautiful.
...but you know what's missing? Holes. Holes I needed for pins, to solder the OLED screen onto the board. Oops.
Oh well. Back to the drawing board! I went through the process again, this time making sure the milling machine showed the holes in 3D. Then milled, sanded, polished, etc and even checked it under the microscope to make sure everything looked good. All seems well, so I soldered on my components and moved on.
Make sure to clean up your station when you're done!
Testing the System
Now that I had the full board, I wanted to test the WiFI messaging capabilities! I used ChatGPT to generate some Arduino code, first just to test the LED and display to make sure everything was connected properly. You can find that code in the section above, or here.
That seemed to run perfectly, lighting up my LED and displaying the welcome message on my display.
It was time to start trying to send a message over WiFi. Once again, I employed ChatGPT to generate code for me, working through the errors until we found something that worked (included in the same conversation linked above). In the end, what seemed to work was signing up for an Adafruit IO account, through which I could include my account username and key within the Arduino code, and set up an attached feed through the Adafruit IO website that I could send messages from.
I typed in my message, and...
It worked!