Introduction: Biosecurity Box
Tuberculosis is a worldwide endemic disease with a high mortality rate, approximately 5 million people die each year. Despite being a disease completely curable, WHO data reveal that it is still being the third cause of mortality in the world. In the last decades, modern diagnostic methods have been developed, which diagnose the disease with a high sensitivity rate and in a few hours. However, developing countries cannot implement these new methods due to economic reasons, missing specialists and hard implementation in remote areas. For this reason, we are focusing on developing a set of embedded devices that modify and strengthen common laboratory instrumentation coupling mechanisms, circuits, microprocessors, SoCs and software with the finality of the automation of TB diagnostic.
This is one of the embedded devices we´ve developed to help our main project of building an automatic digital microscope to detect disseases.
You can find full documentation and support by following us here!
This devices purpouse is to hold samples form contagious diseases like tuberculosis since it can spread even when in a test slide. This device needs to have a controlled envirorment by purifing air constantly and sterilizing the envirorment through the implementation of UV lights. See here how it was built!
Step 1: Building the Structure!
To get all files mentioned further on you should go to this page:
If you want mor info on the development you could search our logs we made while building it at:
Step 2: Building the Structure! - Pt 1
First, you will need a 1.80mx0.90m sheet of acrylic. You can find one for 13$ in a local store. To cut the acrylic sheet a CNC would be the best, nevertheless, we do not have one. Thus, we used a saw. The measures can be taken from the CAD file namedbox_to_store_and_collect_biological_samples.stl.
Step 3: Building the Structure! - Pt 2
After cutting the acrylic, you have to use a milling machine to fine tune the sides of the cut parts. Then, the material is ready for being glued. You can use chloroform to seal the parts, this chemical melts the acrylic and creates a strong chemical bond between the two parts. Remember that they need to be fine tuned otherwise they might not glue because they will not be close one to another and the chloroform does not fill the missing parts. Of course, it is hard to fine tune the sides, thus, you may have some not sealed parts. To seal this missing parts we recommend using hot silicone. Actually, we found that the only useful glue is hot silicone, it will fill and seal all your empty parts. Do not use any cold silicone or acetate based glue, they are completely useless.
Step 4: Building the Structure! - Pt 3
Then, in order to give a consistent shape and more resistance to the box, you can use L corners (they are also uploaded as L.stl in the file section). Use a drill to perforate the acrylic, then put screws to secure the L corners. So far, we have an hermetic box. If you want to make sure it is hermetic you can immerse the box in water. Seal if again if water gets in.
Step 5: Building the Structure! - Pt 3
The next step is to add the filter, for this you can take the measures from the CAD file. Cut the acrylic and use a drill and screws to secure the filter to the acrylic. Then, use hot silicone to seal the sides of the filter and the acrylic. Then, cut the middle wall using the measures from the CAD and use L corners to secure it. There is no need for chemical seals.
Step 6: Building the Structure! - Pt 4
Next, we are going to add the rails and trays to put the slides and the biological sample containers. For this task, you can use a drill and screws. Then, let's add the two doors. We are going to use hinges to secure the doors.
Step 7: Building the Structure! - Pt 4
The box is almost done. In the design log, we decided to use tarpaper to make the box similar to a thermos. Nevertheless, tarpaper is expensive (15$ half square meter), therefore, we decided to use reflective painting. The inside will be painted in black, meanwhile the outside will be painted in gray.
We took out the door first to paint everything.
After painting the box, we will proceed to make hermetic the doors of the box. For this task we will use the rubber that is used at car's doors. Use hot silicone or a glue called "LA GOTITA". Glue the rubber to the sides of the doors.
Step 8: Building the Structure! - Pt 5 (Final)
Next, we are going to make the locks for the doors. For the upper door we have used common locks found in any supermarket. Use a drill and screws to secure them. Then secure the door by screwing it to the hinges already placed.
Step 9: Building the Electronics! - Pt 1
Now lets fit all the electronics; fans, servos, pcbs, arduinos, inside the box.
To place the fans to the bottom we are going to drill holes and screw them. However, you must first place medical mask filters at the bottom of the filters. This is done in order to prevent that the bacteria leave the box.
Step 10: Building the Electronics! - Pt 2
Next, we are going to add the slide holders. The schematics and PCB can be found in the file section and explained in the design log.
Step 11: Building the Electronics! - Pt 3
Then, we are going to glue the PCB and the 3D printed design (the 3D printed design can be found in the file section).
Step 12: Building the Electronics! - Pt 4
The next step is to glue this slide holder to the tray (This tray was also built from the acrylic sheet and then painted black). Use hot silicone. You can also see the white leds that we have added. This will be useful in dark places.
Add White LEDs to the walls so they can be turn on when the door opens. This is to improove visibility when checking the samples. Add UV LEDs to the back walls so they have a greater reach.
For this task you can use the rail plastic. Place groups of 3 UV LEDs in each floor of the container's trays, the slide holders' tray and the compartment to store protective equipment. Then place groups of 3 LEDs in each wall of both trays.
Step 13: Building the Electronics! - Pt 5
Then, we are going to add the DHT11 sensor to the ceiling of the box. We have designed a very simple support for the DHT11. You can find it in the file section.
Step 14: Building the Electronics! - Pt 6
For the bigger door we are going to use 4 servomotors that will press the door with the rubber. We found that this lock works extremely well!! The door is completely close when the four servos press the door. The only problem is that the user must push the door softly so the servomotor does not get stuck. We secured them with 3d printed parts also to be found on the files section.
Step 15: Building the Electronics! - Pt 7 (Final)
Then, we are adding the holders of the biological sample's containers. You can download the file named container_holder.stl and print them. Place them using the measure from the CAD file and glue them to the tray.
Step 16: Wiring It All! - Pt 1
First, lets start by gathering all the wires from the servos on a single rail. We dicided to wire together the ground and the Vcc wires to have only one pair of wires for alimentation and 4 wires for controlling the servos individually. Then we made a hole next to the powerbank for all the wires from the servos and the alimentation from the powerbank, to acces the arduino from inside the box.
Step 17: Wiring It All! - Divergence
The following steps will show you our old version of it, this will give you a better idea of what are we doing n. What happened was that we started developing a pcb that would hold an arduino nano and all transistors and extra components. Since it was fully integrated, it was nearly imposible to make quick modifications or fixes. Slong the way we added mqtt through wifi module ESP8266, swap some transistors. We decided to leave this pcb to fix in further updates. For now, we installed transistors, resistors, and the wifi module just by wires hanging on the walls of the box.
Step 18: Wiring It All! - Beta Pt1
Once all the sensors, leds, fans, servomotors, locks, etc have been added, we can proceed to make the PCB. Use the following schematic to guide yourself with the circuit. This schematic misses the ESP8266 which is conected like this:
rx -> tx
tx -> rx
Vcc -> 3.3v
Gnd -> Gnd
Gpio0 -> D6
This schematic, although will give you a good idea, its implementing a code developed to run with the arduino nano. On our current code, pins and connections are made to work with an arduino Mega as shown in the pictures.
Step 19: Wiring It All! - Beta Pt2
Then, we can proceed to make the PCB use the file named Box_to_store_and_collect_biological_samples_PCB.prt to print the PCB or use it in another way to build your PCB.
This PCB is to use with the arduino Nano with the pinout shown in the schematic on the last step.
Step 20: Wiring It All! - Beta Pt3
Once your PCB is done, we can proceed to wire everything to the PCB. This step is hard because you have to put the PCB inside the box and put the wires inside the female pins.
Step 21: Wiring It All! Pt 3
Since time is not unlimited and this is only a prototype, we followed this path which is connecting everything to an arduinoMega and also place transistors directly on the wire. As you may be thinking by now: "yes, this path is obviously more direct and less sturdy and scalable. But on the other hand, lets debugin and modifications a lot less painful than modding the PCB and/or soldiering extra modules the ESP8266. As soon as everything else is up an running perfectly we will keep on developing the PCB and probably set to its old position.
A problem encountered also was the lack of a door or opening to get to the electronics if anything needed to be checked and/or Moded. So, we used a hole that was previously there and sent al cables through there: We also placed a protoboard small rail for power source. This is to avoid using arduino's few and current limited power sources. This rail was connected directly to the power bank, from this rail the arduino was powered up. Here a picture of the wiring: A MOSFET transistor was used to power up all servos. A Tip 31 was similarily used to power up fans. As previously said, they were soldiered in the cable, hanging with some tape. For Leds and Uvs normal npn transistor was used.
Step 22: Wiring It All! - Pt 4
Then we made another hole to pass all the cables from that side of the box to the side were the arduino was laying.
Step 23: Wiring It All! - Pt 5
As you can see we screwed down the arduino to the bottom of the box. Then we made all the wires to go the slimest way possible. In this part. Be creative. Try to wire everithing the most organized way posible. Don´t try to get down all smooth because that is nearly imposible and to much time consuming. Cut cables that are too long and strech cables by adding more cable and some dermofill when needed. Do your best trying to make wires dont move and still be easy to change if something breaks. Keep it simple yet usefull!
Use the readme file to know the cables must be connected! REMEMBER TO PLUG IN THE ESP8266 TO 3.3 volts
Step 24: The Code! - Arduino Nano BETA
This is the code implemented to use with the nano and the pcb. It is very old and hard debugg or remake must be done.
Step 25: The Code! - Arduino Mega
Finally everything is connected. You can proceed to test all the electronics uploading the software.
test4.ino - Main code for the Arduino mega
Readme.txt - Instructions on arduino mega main code
Step 26: The Code! - ESP8266
If you want to go IOT, then here is how!
esp_v0.2.ino - Main code for the ESP8266
Readme-esp.txt - Instructions on the ESP8266 main code
To accoplish this, the simplest way is to use a standar serial comunication between the arduino and the ESP8266. This is plausible only because the ESP8266 has a built in microprocessor with its own memory and in consecuence own firmware. Meaning it can stablish a serial comunication fairly easily with some libraries. This module is so popular right now that there are amazing support and libraries which made programing it fairly easily!
Great ESP8266 Comunity: www.esp8266.com
The comunication of the box to the server will be done through MQTT Publish-Subscribe protocol which is a lightway and easy way to comunicate data from machines like the box and the server. Here is the oficial web of mqtt:
This module works with AT Commands. But lets face it. AT Commands are tedious and a pain in the neck. This is the official git that implements the Arduino IDE to program ESP8266 to upload a new firmware to the module. It is well documented and very well debuged.
It is just like programing an arduino Mega but with few modifications before compiling a new code. We will be using the following libraries that can be downloaded from the sites below:
esp8266wifi-master () - www.mqtt.org
PubSubClient (kollearly) - www.mqtt.org
Being said that, lets get down to bussines. The code implemented was modified from one of the examples that come with the "PubSubClient" library, 'mqtt_esp8266'. This library makes very easy to work with publish/subscribe protocols like mqtt, it works great with 'esp8266WiFi.h' library to make the module do wonders!
To do all this you will need a mqtt broker first. You can use "test.mosquitto.org" if you connect your esp module to the internet. But if you want to run it locally, we advice you to download mosquitto offline server. Here are some instructions on it:
mosquitto oficial web: https://mosquitto.org/
local broker with mosquitto: https://mosquitto.org/download/
Step 27: DEMO!!!!
Here is a fully functionating demo.
Here is our last log on the box: https://hackaday.io/project/10188-automatic-digita...
Follow us and keep in touch: https://hackaday.io/project/10188-automatic-digita...