Smart Medicine Cabinet

Ask questions about projects relating to: aerodynamics or hydrodynamics, astronomy, chemistry, electricity, electronics, physics, or engineering

Moderators: kgudger, bfinio, MadelineB, Moderators

Locked
deleted-832069
Posts: 6
Joined: Mon Feb 10, 2020 4:28 pm
Occupation: Student

Smart Medicine Cabinet

Post by deleted-832069 »

The science project I need help one is one of the ideas Science Buddies provides: “Smart Medicine Cabinet: Build a Sensor That Reminds Patients When to Take Their Medication*”. In the project, you have to build a sensor based on a voltage divider. I looked for help on a forum and they gave a link to a wikihow page that says to use 10ohm and 20ohm resistors but the project suggests 2.2-kiloohm resistors and 220-kiloohm resistors. I am very confused about this. Also, I know I need two conductive metal pads but I am confused about how to attach them to the resistors and where to get them. I looked on Amazon and local hardware stores and can not seem to find them.

I am going to stop the project at building the sensor and was having difficulty troubleshooting ideas for the title as I am not doing the whole project. Can I say "Building a Sensor that Registers When A Medicine Bottle Has Been Placed On It"? It seems sort of wordy for a title. Also, since I am only going up to the sensor, I was wondering how to take my project one step further. I am in 8th grade but I understand all the concepts in this project but I need more instruction in computer sciences to write the program this project needs. Building a sensor that just registers is not very helpful, so within my skill set, I am wondering how to take my project and make it more useful. I'm open to anything.

https://www.wikihow.com/Make-a-Voltage-Divider-Circuit
Here is the link for the voltage divider.

Thank you for reading this far, it would be extremely helpful if someone could explain this to me! Thanks again!
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Smart Medicine Cabinet

Post by bfinio »

Hi Skylarbelle13,

Ok - time for a crash-course in electronics! The short answer to your question about the voltage divider is that you can build a voltage divider with ANY two resistors and it will still "work." The resistors you choose depend on what you want the output voltage to be. A voltage divider takes an "input" voltage and "divides" it to give you a lower "output" voltage. There is an equation that relates the output voltage to the input voltage depending on the resistor values (the "top" resistor in the diagram is R1, and the "bottom" resistor in the diagram is R2):

Output voltage = R2/(R1+R2) * input voltage

The Wikihow page you linked is just giving a general example of how to build a voltage divider, but not for a specific application. The resistor values given on the Science Buddies page are chosen such that the sensor will work with a microcontroller like an Arduino. This is where our next important topic comes in - digital logic. Digital signals can only be "high" or "low," but nothing in between. For the Arduino, anything below 1.5 volts is considered "low" and anything above 3 volts is considered "high." So the resistor values in Figure 1 are chosen such that when the bottle isn't there, the voltage divider outputs 0.05 volts, which gets interpreted as "low," and when the bottle is there, the output is 5 volts which is "high." If you are connecting your sensor to a computer program, you can then use this signal to answer the question "Is the bottle there or not?" and tell your program to do something accordingly.

If you would like to add a programming aspect to your project and not just build the sensor, then I would recommend looking at either our Getting Started with Arduino page or our Raspberry Pi kit. Both a Raspberry Pi and an Arduino would work with this type of sensor.

https://www.sciencebuddies.org/science- ... th-arduino

https://www.sciencebuddies.org/science- ... spberry-pi

As for conductive metal pads - you could just cut pieces of aluminum foil, or you could buy copper tape and cut pieces of that. Both should work: https://www.amazon.com/s?k=copper+tape

For connecting resistors to the pads, you could use alligator clips like these: https://www.amazon.com/WGGE-WG-026-Piec ... 06XX25HFX/

I realize that's a lot of information in one post. For this type of project it might help if you can find a teacher or parent who is familiar with electronics and can provide some guidance, but please write back if you have more questions!
deleted-832069
Posts: 6
Joined: Mon Feb 10, 2020 4:28 pm
Occupation: Student

Re: Smart Medicine Cabinet

Post by deleted-832069 »

Thank you so much! That was so helpful! I just have a couple more questions, sorry.
- Do I need to use an Adruino if I'm just building the sensor, or is it only for the microcontroller if I choose to extend my project?
- Can aluminum foil be used as a replacement for the metal pads, or is it and the copper tape just a way to attach the resistors to the pads?
- If they can be used as replacements for the pads, can copper tape be used to attach the resistors to the foil?
Thanks so much again! I really am sorry for bombarding you with so many questions.
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Smart Medicine Cabinet

Post by bfinio »

Hi skylarbelle13 - no problem! This is a lot of new material to absorb, please don't hesitate to ask questions.

- You do not need to use an Arduino if you just want to build the sensor. You would need to use an Arduino if you wanted to add a programming aspect to your project. If you don't want to do any programming, then it is fine to just build the sensor.
- To be clear, the "metal pads" can be any conductive metal - a piece of copper tape or aluminum foil would work.
- You can use alligator clips (linked in my previous reply) to attach the metal pads to the resistors. You can also put the resistors in a breadboard which makes it easier to build a circuit. If you don't know what a breadboard is, look at our tutorial here and watch the video at the top of the page: https://www.sciencebuddies.org/science- ... breadboard

This project has some pictures that show how you can connect aluminum foil squares to a breadboard using alligator clips (scroll down to Figure 10): https://www.sciencebuddies.org/science- ... #procedure

However, I have one note of caution now that I look at the Science Buddies project in more detail (this is an older project, and I didn't write it myself). In the right-hand side of Figure 1 it says "bottle closes the gap, and current bypasses big resistor." However, I don't think this will work with a plastic bottle, because plastic is an insulator and current won't flow through it. You would need a bottle with a metal bottom - which you could make simply by taping a piece of aluminum foil to the bottom.

Hope that helps - again, please don't worry about having more questions. That's what we're here for!
deleted-832069
Posts: 6
Joined: Mon Feb 10, 2020 4:28 pm
Occupation: Student

Re: Smart Medicine Cabinet

Post by deleted-832069 »

Wow, thank you! That's so helpful, thank you so so much!
deleted-832069
Posts: 6
Joined: Mon Feb 10, 2020 4:28 pm
Occupation: Student

Re: Smart Medicine Cabinet

Post by deleted-832069 »

I built the resistor, but it keeps overheating and I'm afraid it's going to short circuit so I can't keep it built for very long. I have to detach it and I don't have enough time to add the pads. How do I prevent this?
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Smart Medicine Cabinet

Post by bfinio »

Hi skylarbelle13 - a few questions that will help us troubleshoot:

1. What size resistors did you end up using?
2. What are you using for a power supply (what type of batteries and how many)?
3. What exactly do you mean by "it keeps overheating"? Do you see or smell smoke? Does the circuit get hot to the touch? If so, can you tell me exactly which part?

Thanks,

Ben
deleted-832069
Posts: 6
Joined: Mon Feb 10, 2020 4:28 pm
Occupation: Student

Re: Smart Medicine Cabinet

Post by deleted-832069 »

I ended up using 10ohm and 20ohm resistors, and I did smell smoke. The resistors were hot when I touched them, and the 20ohm resistors, which at first were blue, ended up being a burnt black color. I used one 9 volt battery.

Also, I'm really sorry, I just have a couple more questions.
Should the resistors connect to the medicine bottle, the metal pads, or to each other?
If I'm trying to do a circuit with an LED, and I'm building it so that when you pick the medicine bottle up, the LED turns off, where should I attach the LED?

You have been so helpful, thank you so much!
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Smart Medicine Cabinet

Post by bfinio »

Hi skylarbelle13,

I apologize, I should have been more careful with my previous statement that a voltage divider will work with any resistors. I was not thinking about power or things getting hot. 10 or 20 ohm resistors are way too small when using a 9V battery. Based on your previous posts I assumed you would be using resistors in the hundreds or thousands of ohms which would have been OK.

However, adding an LED complicates things a bit. If your resistors are too big then the LED will not light up.

I want to clarify something though - you are NOT using an Arduino or doing any programming, correct? If your goal is to build a sensor where the LED lights up when the medicine bottle is there and turns off when the bottle is picked up, then you only need ONE resistor. You do not really need to worry about making a voltage divider or the "high" and "low" voltages described in the project. I have a video here that shows you how to calculate the resistor size you need for an LED:

https://youtu.be/EeCh68a1GEg

I need to figure out how to attach a file to a forum post, I will make a diagram that shows what you need to build as I think that will be easier than explaining it in words.
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Smart Medicine Cabinet

Post by bfinio »

Ok - I figured out how to do an attachment. This is the diagram of what I think you want to build. In order to understand it, I think it would help if you did more background research about terms like open, closed, and short circuits. We have a project that explains it here:

https://www.sciencebuddies.org/science- ... background

That project is not exactly the same as yours, but the concepts are the same. It does not have a regular resistor, but the Play-Doh acts like a resistor.

In the drawing I attached, the medicine bottle and metal pads act like a switch. When the medicine bottle is lifted up, there is an open circuit and the LED will be off. When the medicine bottle touches the metal pads, there is a closed circuit and the LED will light up. The resistor is required because there is no play doh in the circuit, and without it the LED will burn out. I have a video here that explains how to calculate the resistor size you should use with an LED, but if you are using a 9V battery, your resistor should be a few hundred ohms.

https://youtu.be/EeCh68a1GEg

Hope this helps, please write back if you have more questions!

Ben
smart medicine cabinet diagram.pdf
(27.98 KiB) Downloaded 143 times
Locked

Return to “Grades 9-12: Physical Science”