Wiznet makers

amalmathewtech

Published August 20, 2023 © 3-Clause BSD License(BSD-3-Clause)

0 UCC

0 VAR

3 Contests

0 Followers

0 Following

Efficient Medical Gas Management with W5300 Chip Solution

I'm developing an advanced medical gas monitoring solution powered by WIZnet's W5300 chip, using the Raspberry Pi Pico as the host interface

COMPONENTS Hardware components

WIZnet - W5300-TOE-Shield

x 1


Raspberry Pi - Raspberry Pi Pico

x 1


PROJECT DESCRIPTION

Story:

Recently, as part of my regular job, I had the opportunity to work on a medical gas monitoring device. While working on this project, I was inspired to explore its implementation in a more cost-effective and advanced manner. Drawing from my previous experience with WIZnet's W5100s and W5500, I found that the W5300, with its "only" parallel interface, presented a new and intriguing challenge for me.

              Here, I am excited to present a proof of concept for a cutting-edge Medical Gas Monitoring Device that has the potential to revolutionize patient safety and healthcare delivery within medical facilities.

About Medical Gas Monitoring Device:

In medical facilities, the accurate monitoring of medical gases is of paramount importance to
ensure patient safety, optimize healthcare delivery, and adhere to regulatory standards. My proposed Medical Gas Monitoring Device is designed to address the critical need for real-time, reliable, and comprehensive monitoring of medical gas distribution systems.

Features and Benefits:

  •    Real-time Monitoring

The device will offer continuous, real-time monitoring of various medical gases, including oxygen, nitrogen, nitrous oxide, and compressed air, among others. This feature will ensure that healthcare providers are promptly alerted to any deviations from optimal gas levels.

  • Multi-Gas Capability

The device will be capable of simultaneously monitoring multiple medical gases, streamlining the monitoring process and reducing the need for separate monitoring systems.

  • User-Friendly Interface

The user interface will be intuitive and user-friendly, allowing healthcare staff to easily access and interpret gas levels, alarms, and historical data.

  • Customizable Alerts

Customizable alarm thresholds will be a key feature, enabling healthcare providers to set alarms based on specific gas concentration levels, ensuring timely interventions.

  • Data Logging and Analytics

The device will maintain a comprehensive log of gas concentration data over time, which can be accessed for analysis and reporting purposes. This data-driven approach will enable healthcare administrators to make informed decisions regarding gas distribution and usage.

  • Remote Monitoring

In an era of advancing technology, remote monitoring capabilities will be integrated into the device, enabling healthcare personnel to monitor gas levels and receive alerts through mobile devices or computers.


The Drive Behind It, also known as Motivation. 

Once upon a time, my heart danced to the tunes of hobby projects, and truth be told, it still does. There's an undeniable joy in crafting for the sake of happiness. But you know what's even cooler? Redirecting that creative spark towards projects that spark a difference in society.

You see, there's a twist in my tale. While the fun of tinkering remains, my spotlight has shifted towards projects that cast a positive glow on our world. It's like upgrading from joy to joy with a touch of purpose. 🌟🛠️

First Challenge + Solution:

When I embarked on the journey with the W5300-TOE-Shield, I immediately stumbled upon a riddle. The examples I sought were mostly cozying up to the STM32 Nucleo-144 boards. But guess what? I've got an affinity for challenges!

So, with a determined spirit, I flexed my problem-solving muscles and whipped up a slew of examples. First and foremost, these brainchildren were brewed to ensure my own sanity. Yet, a whisper of altruism lingered.

Now, the plot thickens—I've decided to host this treasure trove on my personal website. A virtual
haven for the brave souls navigating the microcontroller cosmos. Who knows, maybe this array of resources will sprinkle some magic into the process of interfacing with microcontrollers of their choice. 🌌🔮🔌

For those brave souls venturing into the realm of low-level drivers, I've conjured a tutorial on my website titled "WIZnet’s W5300 Indirect Address Mode with 8-bit Data Bus." 🎩🔮 Don't worry, I've sprinkled my time and expertise into this digital potion for your guidance. It's all there, waiting to make your low-level driver journey a tad less spellbinding. Who knew documentation could be this enchanting? 😉📜✨

WIZnet’s W5300 Indirect Address Mode with 8-bit Data Bus

 

Note : All the project files are up on Github .

 

Alright, let's dive into the nitty-gritty of implementation! 

TallBoyz lets go game show improv here we go GIF
Let's Begin

Presenting the Proof of Concept! 

 

Hardware components:

Raspberry Pi Pico : hey there, ready to connect ?

WIZnet W5300 TOE Shield : oh hey, Pico !
You know me, always up for some data-dazzling adventures. What's the Plan?

Connection Details:

As previously mentioned, I'll be utilizing the indirect mode with an 8-bit data bus. Here's the breakdown of the connections:

Data Bus (8-bit): Connecting to the microcontroller's data pins, facilitating bi-directional data transfer.

WIZnet W5300 TOE Shield Raspberry Pi Pico
DATA0GP2
DATA1GP3
DATA2GP4
DATA3GP5
DATA4GP6
DATA5GP7
DATA6GP8
DATA7GP9


Address Lines: Linking the microcontroller's address lines to enable addressing of memory locations.

WIZnet W5300 TOE Shield Raspberry Pi Pico
ADDR0GP10
ADDR1GP11
ADDR2GP12


Control Lines: Attaching control signals, including Read, Write, and Chip Enable (CE), to orchestrate data flow.

WIZnet W5300 TOE Shield Raspberry Pi Pico
/RDGP13
/WRGP14
/CSGP15

Note :The push button on the perfboard functioned as a "reset" during Pico's development, allowing for swift reboots for debugging purposes.

Additionally, I've employed GP0 pin (UART0 TX), to facilitate debug messages. These messages are channeled to my USB to TTL converter, granting me a convenient means of monitoring and diagnosing the system's behavior. This real-time feedback loop significantly aids the development and troubleshooting process.

Here's a sneak peek into the hardware setup:

For further information and detailed specifications, I recommend referring to the datasheets.

The Firmware Plan:

As a firmware engineer, the "C programming language is my go-to tongue when conversing with microcontrollers. 

Initially, I crafted the foundational C code for the Pico utilizing the C/C++ SDK. Embracing tools like CMake, Make, and the terminal etc.  added an exciting layer of enjoyment to the process.

Indeed, programmers have a special affinity for the terminal!!

Feel free to explore the following GitHub repository:

Computer Reaction GIF by GitHub
 

Feel free to check out the GitHub repository I've mentioned. You have the freedom to not only utilize it but also contribute to its enhancement. The repository operates under the BSD Clause 
3 open-source license, granting you the liberty to explore and collaborate.

 

The following displays the results of the Test Code on the Putty serial terminal:

All set and ready to roll!

What's next?

Wiznet offers a driver and associated libraries called "ioLibrary" (short for Internet Offload Library) tailored for their chips.

Incorporating the IoLibrary

 One of the fundamental tasks for operating the W5300 is reading and writing values to the W5300 registers. These registers control various aspects of the chip's operation and configuring them correctly is essential for proper functionality.

 

The progress of the serial terminal .....

 

Demo Video:

 

Final Thoughts:
 

Due to time constraints, I couldn't complete all the work I intended to. However, I will continue working on it. You can find all updates on my GitHub page.

Happy creating!

 

Documents
  • GitHub Repo

    You can stay updated on the mentioned repository by keeping an eye out for future updates.

Comments Write