This week I spent the majority of my time wrapping up the website. I have the back-end and front-end code written, and I will need to test it this coming week with the Jetson by sending POST commands As for testing and verification, I have started testing the PCB with the Arduino. So far, I have gotten 100% accuracy on the 128/128 test I did, though I have only tested the top half so far. I have also started to solder the LEDs together and am trying different configurations (such as 1, 2, 3, or 4 LEDs underneath each test square). This is because, during testing, I noticed that with 4 NeoPixel LEDs, the light sometimes bleeds into neighboring squares, which makes it difficult to clearly identify the white squares. I also spent time designing the enclosure box that fits under the PCB holder and buttons; this is where the Jetson, Arduino, and wires will be located.
Top View:
The bottom right corner is for the Jetson.
Bottom View:
As you can see right now, I have a sliding mechanism so we can pull the Jetson in and out, and the hole provided also allows us to plug in a power source.
Side View:
On the sides, we can see the ventilation holes for the Jetson. This is to ensure that nothing overheats and the air from the running fan doesn’t get trapped. On the front left, you can see an extra hole, which is for the camera’s CSI port.
This following week, I will finish testing all of my components. Additionally, I will 3D print this box and glue it to the demo parts. I am on track to finish all testing and integration before the final presentation!
This week I worked on putting all the demo parts together, including the CAD parts which I had printed out. I also worked a bit more on the website. I have completed both the front-end static pages (this consists of the CSS files for each page along with their corresponding HTML files, and then a style.css file for the overall format which applies to all pages). Here are the static pages:
I ran these static pages using the GitHub Codespaces Live Server feature.
I decided to use the Model-View-Controller (MVC) architecture for this website. This means there will be two parts: front-end and back-end.
This is an architecture I learned in my full-stack class. A key point of this website is that it will connect to the Jetson. We have decided to use Wi-Fi, so the Jetson, through Wi-Fi, will send information through a JSON HTTP request. Here is a path flow of how it will work:
The HTTP request is as follows:
HTTP
POST /api/games/123/moves
{
“from”: “e2”,
“to”: “e3”,
“color”: “black”,
“piece”: “pawn”
}
At this point, the move has already been validated through the validation code running on the Jetson. Hence, all we have to do is store it in the database and add it to the front-end. There will be a .ts file in the client folder (front-end), current.ts, which will parse this information and send it to the server controllers along with updating the HTML file in the front-end. Based on the request and information (POST and the JSON information), the controllers will choose which model to send it to (in server models). Then, this model will make the changes to the database.
On top of the software portion, I worked a bit on the hardware. I worked on soldering parts together to the Arduino this week, so the wires to the LEDs and the LEDs. Initially, my plan was to separate the LEDs per row and then solder one row to the other. Although, the distance between the LEDs and the solder pads is very minimal, so anytime I tried soldering onto the pads it would burn into the LEDs. So I decided to, instead of wires, just have 4 LEDs of the strip not being used for each row. So this is the new diagram:
Here is a two-row example. As you can see, we still maintained the 4 LEDs per square = 32 LEDs per row. Then we will have an extra 4 transition LEDs on the side pockets, which have already been modeled in our old CAD system instead of wires. We will need a total of 7 transition LED sets for the 8 rows total; this means 7 * 4 = 28 LEDs which will never turn on. So the total number of LEDs we need is 7 * 4 + 32 * 8 = 284. The LEDs I bought are two sets of 144 LEDs, so we will have the perfect amount and hence no additional cost.
In terms of progress, I am just a bit behind in getting this LED setup. I already have it working; it’s just in terms of getting it physically embedded into the physical design and doing any extra printing. This won’t take long, just an hour of extra work, so I should be able to catch up on this next week.
This coming week we are starting integration and testing. I have completed one preliminary round of testing on the PCB. I know that each square works with the layered model (the chessboard and LEDs between), although I want to do more detailed tests. In addition, I want to start with integration between the hardware components, like the buttons, to the software side. Finally, I would like to complete the back-end of this website.
Verification:
Here are some of the specific subsystem verification tests I will be running:
Subsystem
Design Req
Testing Plan
Pass Criteria
PCB
100% correct per-square detection
Two placement/removal cycles per square, total 256 transitions. Compare reported (digital matrix) with expected (ground truth/what we see)
256/256 correct, no unintended square changes (no false positives)
LEDs (Feedback)
feedback events fully correct ≥ 95%
100 commands total including 50 hints and 50 illegal move commands. Hint commands should result in green blinking lights in the pathway from the current square to the next square (based on the specific piece’s move rules). Illegal move commands should result in blinking red light on the current illegal move square and green blinking light on previous move square. Compare reported to expected (ground truth/what we see).
≥95/100 fully correct. Fully correct is defined as the hint/illegal move color is emitted correctly, and other LEDs are not changed. This means the white squares which have white LEDs (which are not part of the hint/illegal path) should remain white with no changes. If either path/squares emit incorrect incorrectly or other LEDs are impacted it will be considered incorrect.
Button (Input)
Input events fully correct 100%
20 presses per button, including short presses and long holds.Compare digital printed input to actual button press.
20/20 fully correct per button. This means as the button is pressed the exact button input should be seen in the software side at each attempt. Along with no false positives.
This week I have been working on building the physical board to prepare for the demo.
This is my initial design of what I wanted it to look like:
With this being the top of the board:
My biggest concern was the distance between the Magnets and the PCB (vertically). I needed the components between them (Chess board & LEDs) to not take much space so that sensors would still be able to detect the magnets. Additionally we intend to incorporate tactile features such as raised black squares and holes for the magnets to go into. All the magnets are the same size so that means we need to minimize the distance from the bottom of the magnet hole of the black square to the PCB. Thankfully I was able to move the PCB delivery date Thursday so I used it to prototype and find the right size for the chess board and the led holders.
I first started with the chess board design, this was my initial design:
The left is the CAD version and the right is the real output.
As you can see it has the features of raised black squares and holes for the magnets. I used the given size for the magnets on the amazon link and made the “top holes” the same size. When the print came it seemed that the magnets would not go in due to small extra PLA within these holes. Although when testing this board with the PCB Sensors the sensors were able to pick it up. But when I placed a neopixal strip between the sensors and the printed Chess board The detection no longer worked. So I made two changes to the chess board: I increased the diameter of the holes and I decreased the overall thickness for the board. I then printed/tested a simple two chess tile demo (one black one white).
In terms of the Neopixal strips I need to build a base for them to stick on. As per my old idea I will have 4 neopixals for each square perfectly. But if i put a complete base below it it just adds to more distance between the sensor and the magnets above. So I decided to use a grid method I first tested out one grid. From the order website I found that the max height is 2mm, I made the gap of this grid 2mm and the top and bottom 0.5mm. The fact that the top and bottom are 0.5mm makes it flexible to push the LED through but tight enough such that it stays in place and doesn’t stick to the PCB. I tried porotype one cell and once i can push the LED through I made the full grid as shown below:
The extra space on the edge of the grid is for the wires where I can connect one LED strip to the other.
Finally I porotyped the extra sheet (layer) that is below the PCB (which holds it). On JLCBC I saw that the width of the PCB is 1.6mm (this does not include the extra height of the sensors). But the sensors are at the center of the grid opening and the chess board holes are right above that, so the height of the sensors won’t hit the top chess board. But we still need to align the PCB with the grid and to do that I created a bottom sheet which a 1.6mm edge Right where the Grid edge is. Then if both these edges are glued/nailed together we minimize the distance from the chess board to the PCB. Here is the prototype for the PCB holder :
The final part I made was the letters & braille. This is the prototype for it:
The final part I made was the letters & braille. This is the prototype for it: The braille came out a bit sharp and there were also some strands/strings between the braille. This is because the way 3D printing works is with melted PLA, so when the nozzle moved from one small braille dot to the other quickly, they attached. I am going to try using sandpaper on it to see if it refines it a bit. If not, I will try using braille stickers.
Together this is what the final setup looked like (right now only the bottom layer has LEDs but I will wrap and solder them soon.) I also ran some tests and all the magnets are detected through this layered system.
For next week, I hope to finish up the website and also start integration. I am not behind on my personal tasks, but as a team we are a bit behind on integration. As of now, I have only tested the LEDs and PCB working with Arduino. I hope to get them working with the Jetson by next week as well.
This week, I worked on choosing the LED format for the smart chessboard. One option was to arrange LEDs as an 8 × 8 matrix, with eight row connections and eight column connections. This approach uses 16 control lines and works well when only a few squares need to light up, such as the current and destination squares of a move. However, after discussing the idea with my TA, I realized that lighting only two squares may not clearly teach how a piece moves. For example, a knight’s legal path is not obvious from seeing only its starting and ending squares.
The other option was to use individually addressable NeoPixels. These LEDs are mounted on strips that can be cut and connected into rows. NeoPixels let the board light a full path, display different colors, or blink to indicate an illegal move or draw the player’s attention. They require a 5 V data signal, while the Jetson Orin Nano’s GPIO signals are 3.3 V. To avoid relying on an unreliable 3.3 V signal, the Jetson will send commands to an Arduino over USB, and the Arduino will control the NeoPixels. I therefore decided to continue with the NeoPixel design.
The next step was choosing the Neopixel strips which would minimize wiring. These were some of the options I had:
I compared the LED spacing options to find a strip that would align with the board’s 1.1-inch (27.94 mm) square pitch while keeping the wiring manageable. I selected the 144 LEDs/m strip, whose LEDs are spaced approximately 6.9 mm apart. Four LED pitches are about 27.6 mm, which is close to the 27.94 mm square pitch. The LED package itself is approximately 5 mm wide so the 6.9 mm measurement is the distance between LED centers.
I plan to use four LEDs for each square, grouping them so they can light together as one square. This gives 32 LEDs per row and 256 LEDs across the eight rows. The strips will be connected in a curved path, with short wires joining the end of one row to the beginning of the next. The spacing calculation and layout under each square is shown below:
When looking at the overall process we need to consider each step along the way.The Jetson will determine which LEDs to activate and send those commands to the Arduino over USB. The Arduino will send the control signal from one of its output pins to the first NeoPixel’s DIN connection. Each NeoPixel then passes the signal to the next one through its DOUT connection.
For an illegal move, the square containing the piece’s new, illegal position will light red, and its previous square will light green. When the player requests a hint, the LEDs along the suggested path will light green. (These colors are subjected to change we will do some research on which colors are best for the visually impaired)
The NeoPixel strip’s ground will connect to the Arduino’s ground and the external 5 V supply’s ground. The grounds must be connected together so the LED data signal and the strip share the same electrical reference. The external 5 V supply will power the LEDs because the strip may require more current than the Arduino or Jetson can provide. The Jetson’s USB connection will power the Arduino and carry commands, but it will not power the LED strip. The image below shows all the connections.
I have also started to Cad up the box in which the components will exist. I am using existing models and editing them to fit our needs.
I am still on track, this upcoming week although I have many tasks to complete next week. I need to connect the Neopixal LEDs, speaker, and get ready for the sensor demo. I also hope to complete this cad box and try to 3d print it to test it out if it fits well.
This week I finalized the PCB and sent it out for fabrication. I chose the check component placement option, and when it came back I noticed there was an issue in the production files. As I used Fusion to create this PCB, I did not know that it doesn’t automatically tent the via holes. While checking the TS/BS (top soldermask/bottom soldermask) files, I noticed there were mask holes at the vias (hence not tented). I fixed this and sent it back to production, and it should go as scheduled.
I also worked a bit on understanding the PCB and Jetson integration. I read a bit about the Jetson header connection (image below) and saw that there are three methods to get the information from the PCB to the Jetson: SPI, GPIO, or I2C. I2C is not an option here because the shift registers I am using, SN74HC165, don’t support this protocol. This leaves us with SPI or GPIO. SPI (Serial Peripheral Interface) lets two chips communicate, but one device controls the communication (the Jetson). SPI has 4 signals: SCK (clock), MOSI (controller -> device data), MISO (device -> controller data), and CS (chip select). If we were to use SPI, we would have an automatic clock whose speed we can choose by setting the SPI clock speed and polling interval. We would also have the MISO signal for DATA_OUT (which are the bits coming from the PCB), and then a separate GPIO signal for LOAD. If we were to use all GPIO ports, we would need to manually change the clock high/low and read each bit. This works, but it takes more software effort, and timing varies under Linux. So I decided to go with SPI.
This is how the pathway would look:
Initialize: Set SPI speed and timing mode; set LOAD = high.
Wait until the next board reading (every 20 ms).
Set LOAD = low (briefly).
Set LOAD = high (capture all 64 sensor states).
Request one SPI transfer of 8 bytes.
(SPI generates 64 clock cycles automatically.)
Bits are read through MISO.
Convert the received 8 bytes into 8×8 matrix readings.
Repeat steps 2->7.
Something I also looked into this week was the NeoPixels. I can connect these to the Jetson 5V, or Jetson -> Arduino -> NeoPixels. I am still trying to find the right Neopixel set to order, especially with considerations to the board dimensions. One option is to buy individual NeoPixels “buttons” and wire them together to manually create my daisy chain. Another option is NeoPixel strips, these are the better option. They are already wired together so I will only need to solder between each row. Although the issue with the strips is the spacing and I need to find one that fits the exact dimensions of the board.
In terms of schedule, I am still on track. I hope to get the NeoPixels ordered on Monday, and since all the suppliers I am checking have 2-3 day delivery, I should be able to complete the NeoPixel arrangement by the end of next week. In terms of next week’s tasks (integrating the PCB), I am still waiting on the PCB, so in the meantime I hope to help with building the physical board/chess pieces, and start integrating other components so that we have a product ready for demo. In the worst case (the PCB doesn’t come by demo), we will mitigate this by using the 1 row of sensors we bought as a test demo instead and show that the board works with one row.
This past week, I finished the schematic and layout for the 8×8 PCB matrix. The layout took a lot of time because this was my first project in Fusion in about two years, so I spent time relearning the tools and wiring rules.
Our progress is slightly behind schedule. I decided not to send out the PCB before fall break, which technically set us back a full week. The PCB total came to about $364.50 (not including shipping), and we also need $25 for a stencil. That leaves roughly $30 in the budget for the NeoPixels, board materials, and chess pieces. While reviewing the order, we noticed a large $228.60 charge that came purely from the board’s size. We therefore decided to reduce the board from 2.5 x 2.5 inches per square to 1.1 x 1.1 inches per square. This lowers our cost and also helps our users, as a smaller board means less space for a visually impaired player to cover with their hands.
Over break, I have been shrinking the board and redoing the entire layout. To catch up, I rearranged some tasks. Instead of integrating the PCB next week, I will work on the front end of the website and on ordering and wiring the NeoPixels. By Monday, I hope to have the orders for the PCB and NeoPixels confirmed. For the rest of the week, I will figure out how the NeoPixels will work with the Jetson and begin work on the website.
This week, I spent a lot of time practicing for the design presentation. In addition, I completed the matrix schematics for both the analog and digital sensor matrices. Here are the specs/connections of the sensor matrix:
Analog Sensor Matrix:
There are 8 sensors per row. Each sensor connects to a “mini” mux, and the 8 mini muxes feed into the master mux. The mini muxes share the same S0-S2 lines, while the master mux gets its own control lines.
For each mini mux:
A0-A1
Sensor0-Sensor7
S0-S3
Jetson GPIO inputs (control lines) (shared)
A
Master Mux (first row mini mux A corresponds to A0 of master mux)
For Master Mux:
A0-A1
MiniMuxRow0 – MiniMuxRow7
S’0-S’3
Jetson GPIO inputs (control lines)
A
ADC Input
ADC Output
Jetson I2C Ports
The Nvidia Jetson will have 6 GPIO ports for the designated control lines. The first three (S0, S1, S2) are connected to the S0, S1, and S2 ports of all the mini muxes. The next three (S’0, S’1, S’2) are connected to the S0, S1, and S2 ports of the master mux. The S0-S2 lines choose the column from each row, and then these 8 column sensor values, one from each row, go into the master mux. The master mux will then choose each row one by one and send each value into the ADC, then into the I2C ports of the Nvidia Jetson.
Here is some pseudo code for how the matrix will work:
For c in range(0,7): # choose column for each row [c0, c1, c2, c3, c4, c5, c6, c7]^T
For r in range(0,7): # choses the row from the set of columns
Return matrix[i,j]
Digital Sensor Matrix:
In this matrix, there are 8 shift registers, one for each row. The shift register is a PISO, so it will take in all 8 sensor results in parallel and pass them out serially through one data output line (QH). This matrix works by daisy-chaining the shift registers together in order (SR0’s QH goes into SR1’s SER). The final output will be a serial line (from SR7’s QH) of 64 digital values, either 1 or 0. The first digit of the 64 will be for Sensor 0 in Row 0, and the last digit will be for Sensor 7 in Row 7.
In terms of the schedule, which has been changed for the design presentation, I am on track with completing my task for building the Hall sensor schematics (8×8), as shown above. However, our team task of testing the sensors and physical board has been pushed to next week because we just received the sensors on Wednesday and are not able to test them until Monday. I think as long as we complete the testing on Monday, I will be able to complete next week’s task of laying out the Hall sensor matrix after we have chosen which sensor to move forward with.
For next week, I plan to lay out the chosen sensor matrix and implement the LED matrix. Then, over the weekend, I should be able to order the full PCB.
Monday:
Run sensor tests
Discuss board dimensions
Tuesday-Thursday:
Layout board based on dimensions (LED & SENSOR)
Do final connection checks (power lines/register or mux connections/capacitors where needed)
Add to cart and calculate cost
Wednesday/Thursday:
Discuss with TA and send out the order if possible
I want to try my best to get the order out by Wednesday since the following week will be fall break and we don’t want to delay our pcb order.
After a conversation with my TA, I realized the best course of action was to actually test out both sensor types rather than decide based purely on specs, especially considering potential magnetic cross-talk across adjacent squares. So, I have ordered a test-bunch (8 each) of both the digital and analog sensor alongside the exact magnets we will be using for the final project. Hence, testing will begin as soon as these materials arrive. In the meantime, we received our NVIDIA Jetson Orin Nano. This lets me establish exact hardware pin mappings which is helpful for considering how many GPIO ports I will have from the PCB.
Since we are not sure about the sensors yet to stay on schedule, I developed the plan for two distinct 1×8 array PCB layouts. For our digital approach, I am pairing eight DRV5032FADBZR Hall-effect sensors with a 74HC165 Parallel-In/Serial-Out (PISO) shift register. I specifically chose a PISO register over a Parallel-In/Parallel-Out (PIPO), because a PIPO register has 8 output lines, while the PISO register has an output of a single serial data line. When scaled to an 8×8 matrix, daisy-chaining eight shift registers end-to-end allows us to read all 64 squares across the board while only using 3 control lines (data-out, clock, latch).
For the analog validation design, I am pairing eight DRV5055A1QDBZR linear sensors with a CD74HC4051 analog multiplexer. Using three digital GPIO selection lines we can choose from (000 to 111) for the multiplexer choosing between sensor 0 and sensor 7. Although Jetson Orin Nano doesn’t have built-in analog-to-digital converter pins, so the multiplexer has to be routed to an ADC chip (converts analog to digital number) before transmitting the data to the Jetson over I2C or SPI pins. To scale this approach to an 8×8 board, I plan to implement a two-stage multiplexing. Each row of 8 sensors gets its own CD74HC4051 analog multiplexer. The three digital GPIO selection lines will be in relation to the columns, so if 111 is chosen then the column 8 sensor for each row will be selected. Then these 8 outputs go into a master multiplexer which is chosen through another three GPIO selection lines. This essentially results in a nested for loop one for the column, and the other for the row.
I am on time with the schedule, as we have ordered all necessary components and I have designed the plan/schematic for the 1×8 architecture. I should be done with the PCB 1×8 prototype by next week. In addition I will be presenting for the design presentation next week, so I will be spending some time preparing for that. I hope to deliver that well :).
Digital:
Analog:
When implementing the ADC (ADS1115IDGSR) , port (A) from the multiplexer will be allocated to the ADC.
This past week, I spent time finalizing the system’s circuit architecture, researching components, and planning my approach for the PCB. The final PCB board will use an 8 × 8 matrix of Hall-effect sensors and LEDs, but I decided to begin with a 1 × 8 prototype. This will allow me to confirm that the sensors work properly and meet our 98% accuracy user requirement before ordering the complete board. A major concern is crosstalk, where a magnet may activate a sensor on a neighboring square. I compared linear analog sensors, which measure magnetic-field strength, with switch sensors, which produce a simple ON/OFF output. Although analog sensors could help identify which sensor has the strongest reading, they would require more processing and could increase latency (another user requirement). Since both accuracy and response time are important, I decided to use a switch sensor. I selected the 20 Hz DRV5032 digital omnipolar switch because it is sensitive, responds quickly, and is omnipolar. I also want to test the sensors physically before finalizing the PCB, so I plan to purchase/find SOT-23-to-3-pin DIP breakout boards. These will allow me to connect the sensors to a breadboard and test the complete 1 × 8 setup using an Arduino.
I am slightly behind schedule, although I completed this week’s main tasks: finalizing the circuit architecture and selecting the major components. The delay is mainly because I have not yet submitted the component order form. To catch up, I plan to meet with my TA on Monday to review my approach and component choices before submitting the form. Once the approach is approved, I will submit the order immediately and begin the PCB design while waiting for the components to arrive.
Next week, my main goal is to complete the 1 × 8 PCB array design by Friday. This includes designing both sides of the board, with the LEDs on the top and the Hall-effect sensors on the bottom. Since I have previous PCB design experience, I believe this is a realistic goal. In parallel, I also want to begin working on the design presentation, which is due next weekend. I will be presenting on behalf of my team, so I want to discuss each part of it with my teammates.