Week 8 began with our second meeting with Prof. Gargi Khanna, joined by my mentor Aman Asrani. We showcased the improvements made to previously added components based on feedback from the first meeting. We then brainstormed the design of the Serial Port component, and were joined by Vivek Rao, who provided insightful inputs that greatly enriched the discussion.
Serial Port Component Design
During the discussion, we explored how a Serial Port component could enable educational simulations involving real hardware. The conversation highlighted several practical use cases and helped refine the expectations for the component's interface and user experience.
One of the most informative parts of the session was the detailed discussion around the bit width property of the components give in circuit simulators.
๐ง Planning the Demo
Following these discussions, I focused on preparing a comprehensive demonstration of the Serial Port component, which had been developed in the previous weeks.
Initially, I considered two separate examples:
- One for receiving input from actual hardware.
- Another for sending output to hardware.
However, we finalized the idea of a single integrated demo that covers both input and output as it would be much more practical & intuitive.
๐ ๏ธ Final Demo Setup
The finalized setup includes:
- Arduino Uno
- LDR (Light Dependent Resistor)
- Relay Module
- Bulb
- (Most importantly) CircuitVerse with Serial Port Component
Workflow:
- Arduino reads analog data from LDR (connected to A0).
- This data is sent to CircuitVerse via the Web Serial API.
- Based on the reading, CircuitVerse sends a control bit (0 or 1) back to the Arduino โ it sends 1 if the LDR reading is less than a threshold value (indicating low light).
- Arduino uses this bit to toggle Digital Pin 7 high or low.
- Digital Pin 7 controls the relay, which switches the bulb on/off.
This setup effectively demonstrates bi-directional communication (Tx & Rx) using the Serial Port component โ making it a powerful example of real hardware-software integration in CircuitVerse.
๐งฉ Circuit Diagram
๐ฅ Demo Video: Serial Port in Action
โ Other Progress
At the end of the week, I also raised a Pull Request for the documentation of the Bit Extender component, which was developed and finalized in the previous week.
Looking Ahead
In the coming week, I plan to write the documentation for the Serial Port component and begin designing the next component: a FIFO Queue, which will enhance data handling capabilities within the simulator.
Thanks for reading.
Top comments (1)
@nihal Rajpal did you connect a bulb to 220 V socket or I understood the sketch not correct ?
Thank you for your explanation.