Milestone 4
Optimization
Software & Code
Optimizations made:
Moved from static plotting of saved data to live plotting of sensor data on an interface
Data collected by the Raspberry Pi and the XAIO Sense Microcontroller stored in a comma separated list
Not yet encrypted
Prevented graph overflow by only displaying 50 most recently captured data points
Prevented overflow error with any negative numbers being transmitted to the Raspberry Pi through offset value
Electrical Circuits
Optimizations made:
Went from using 4 Op-Amps to using 2 Op-Amps
We are using the JRC4558 Dual Op-Amp as seen in Figure 3
Went from having resistors, wires, and diodes on our breadboard being very tall and poking out to having it be very flat and slim
We trimmed the prongs on resistors and diodes and use flat wires with short prongs
The final breadboard iteration can be seen in Figure 5
Went through 3 iterations of custom PCBs
First iteration was with 4 Op-Amps, 2 layers, and 42 x 42 mm (Figure 8)
Second iteration was with 2 Op-Amps, 2 layers, and 45 x 45 mm (Figure 9)
Third iteration is the same as the second one with smaller dimensions of 37 x 32 mm (Figure 10)
Figure 1: Arduino IDE Serial Monitor Output
XIAO BLE Microcontroller Sensors Side
(triangle wave test data)
Figure 2: Plot Output of Received Data
Raspberry Pi 4 Model B Interface Side
Figure 3: JRC4558 Dual Op-Amp Pinout
Delivery
Hardware
Figure 4: Simulink Diagram of Circuit
Figure 5: Amplifier Circuit, without a dual Op-Amp
Figure 6: High Pass Filter
Figure 7: Top View of Completed Circuit with XIAO Sense Microcontroller
Figure 8: PCB Iteration 1
Figure 9: PCB Iteration 2
Figure 10: PCB Iteration 3
Software
Figure 11: XIAO Sense BLE Microcontroller Code
Sends sensor data from the XIAO BLE microcontroller (Figure 12) to Raspberry Pi 4 Model B (Figure 13) used as interface through Bluetooth (XiaoWaveform2.ino)
Figure 12: XIAO Sense BLE Microcontroller
Figure 13: Raspberry Pi 4 Model B
Raspberry Pi 4 Model B Interface Code
Figure 14: receive_waveform2.py code file: Record data for 10 seconds, then display
Figure 15: receive_waveform3.py code file: Live plotting is added; program runs for 10 seconds, updating the graph with each new sensor input
Figure 16: receive_waveform4.py code file: Data storage implemented and graph overflow solved; writes sensor data to a .csv file that a separate program, display_waveform.py, uses to live plot the sensor inputs
Figure 17: display_waveform.py code file: Runs concurrently with receive_waveform4.py, displaying 50 most recently recorded sensor values on an updating graph; live plots sensor data
Live Testing Video
Screenshots of Live Data Transmission
Innovation Expo Poster
Management
We evaluated each team member on the following categories on a scale from 1 (bad) to 5 (good):
Participation
Timeliness
Communication
Development of Product
Overall Contribution
The results can be seen in the following image carousel:
Overall, the team believes that the project was successful, but there are areas for improvement. More research on compatible microcontrollers earlier on could have streamlined the process, potentially allowing us to purchase a custom PCB. Working with friends had its challenges, with conflicts that could have been avoided or managed better due to the different dynamic of working relationships. Despite these challenges, we felt the project achieved more than expected, especially after overcoming hurdles like data transfer via Bluetooth. Our team wished for an overall more appealing and compact design with a physical casing but time constraints played a factor in this failure, particularly with software development. Despite not fully realizing certain aspects like a physical model, our team believed we managed our time effectively and adapted well to initial setbacks in code development and data transmission by focusing on PCB and circuit design preparation for seamless incorporation and testing.