EE-Emerge / EE-Emerge2021_Firmware

0 stars 1 forks source link

Create initial motor control algorithm #2

Open SeanAlling opened 3 years ago

SeanAlling commented 3 years ago

Initial control algorithm should be designed to control a fan motor in open loop.

How can this be done on a microcontroller?

What type of algorithm should be used?

ScottyMcCotty commented 3 years ago

This might be an over-simplified interpretation of the problem, but we just want the microcontroller to continually check the position of the potentiometer and tell the fan what speed it should be going.

To conserve battery life, maybe the microcontroller could sleep between checks and only check 10 times/second rather than checking during ever clock cycle (or however those things happen).

Maybe another option could be hardware interrupts? If we had buttons for speed control (maybe an "up" and "down" button for adjusting the speed?) then instead of having the microcontroller constantly polling the buttons, the buttons could just send hardware interrupts to be serviced by the microcontroller. This might save battery life

oceanofthelost commented 3 years ago

All of these are good points. Since we are designing a mask there is a need to minimize the power consumption.

When I mentioned which algorithm to use I was more referencing an open loop or closed loop control algorithm. There are pros and cons to both.

ScottyMcCotty commented 3 years ago

Open loop would be the easiest to prototype for, so that's what I think would be best to start with. I don't know the exact details, but I imagine the closed loop implementation would be a little more involved. I'd rather start with simple and get a working prototype. Then we take something that's working and improve it

SeanAlling commented 3 years ago

What is the simplest circuit that can be used to develop open loop control? There is some circuitry from Fall quarters project that could be used for this. Is it open or closed loop?

VerbaVolent commented 3 years ago

As much as an open loop algorithm would be easier and more convenient, there are quite a few reasons we might want to at least shoot for a closed-loop algorithm. Correct me if I'm wrong, but if we have an open loop algorithm, the user would use a knob or some other interface to set the fan speed according to their comfort and they would have to manually readjust it as temperature changed because there would be no sensor telling it the actual temperature or humidity inside of the mask and trying to restore it to a set point.

In the context of a pandemic, reducing the amount of times that a person needs to touch an object is probably high priority. It takes on even more priority if we end up trying to market our design to healthcare workers who may choose our product over the Razer mask for cost and long-wear capability, since a surgeon or nurse isn't going to want to be constantly stopping to adjust the fan and disinfecting the control box as equipment.