You are on page 1of 2

When a DC voltage is applied, current flows through the coils inducing a constant magnetic

field. The more current flows, the stronger the magnetic field.

In this diagram, we are showing the induced magnetic poles on each of the stators ends and
the 4 permanent magnetic poles on the rotor that is seen by the stator. The rotor would
rotate clockwise and then come to a stop after 45 degrees voltage (although in general
operations, it will come to a stop after 90 degrees). And then we would turn off this coil and
turn on the other coil which induces the opposite magnetic poles.

Because we have to be switching between the coils and also controlling the amount of
current flowing through the coils which allows us to set the speed, our team has decided to
use a voltage PWM strategy to control the motor. The current obtained would be a function
of voltage and the DC Resistance which is 39.03 ohms. The inductance which is 17.157mH
plays minimal part as the current would be regulated and thus the inductor approximated as
a short circuit. My colleague would go through the significance of the time constant later.

The client mentioned that they would like a smart fan for three reasons: accurate speed
control, reduced overhead on the main controller and power consumption measurement and
feedback of fan operating parameters.
Accurate speed control is important for low speed applications when the fan is used to
control air flow between the refrigerator and freezer compartments
If the fans have a communications interface then the main controller can set and forget the
refrigeration system fans.
Power consumption measurement and feedback of fan operating parameters can be used to
determine whether the duct is becoming blocked with ice buildup.

Our team has developed an idea for the how the code should work based on these 3 key
requirements. As you can see we have a sort of a negative feedback between speed
detection and speed control blocks. This allows us to know what the real time speed is and
be able to adjust the PWM generator accordingly.

The speed detection block also outputs to the error detection block along with the power
measurement blocks output so that we can detect if a duct is being blocked. Wed expect
that power would increase non linearly to maintain the same speed as the duct becomes
more blocked.

The client also specified an asynchronous serial, 8bits per frame, no parity, 1 stopbit UART
protocol which will be what were using.

The client specified that when the Smart Fan broadcasts the data structure it will
include all information about itself. Therefore the UART Transmitter would always
send information including spd = speed, req = requested speed and cur =
current speed ver = the current software version of the Smart Fan pwr = the
current power usage of the whole Smart Fan clr = clear (see clear values
section below)
ew = errors/warnings array (the ew array lists zero or more of the following:
reqTooLow = requested speed too low/slow, running at minimum speed instead
blockedDuct = fan has
detected that the duct is blocking
air flow
lockedRotor = fan has detected
the rotors are locked in a stationary position)
Each node in the bus has a unique ID that is one ASCII character between 0 and
9. The Smart Fan is assigned the ID 3. JSON pairs that dont identify the Smart
Fan should be ignored.
.
The smart fan will generally operate in slave mode on the comms bus. Slave
mode means only respond to comms messages, not initiate comms messages.
The only exception to this is that the smart fan will output the JSON Structure
while error conditions are detected.

If a speed value is requested that is slower than what the fan can achieve, run at
the minimum achievable speed and report an error/warning of
requestedTooLow

The client specified that Speed 0 is a special case, the motor should be stopped
and power consumption should be minimised. This is why weve included a sleep
mode with an input of speed for the smart fan.
So if you are not receiving any instructions, the microcontroller should go to sleep
but carry on whatever PWM duty cycle it was doing before. According to the
datasheet of ATTiny 841(?) you can wake the microcontroller when there is a
UART transmission detected.

Finally weve also added a feature to our microcontroller that is the watchdog
timer. This serves as a way to detect and recover from computer malfunctions. If
the microcontroller is functioning properly, the microcontroller would always reset
the timer before it timesout. If it doesnt this implies that there is a glitch
somewhere and because the client wanted a smart fan, the microcontroller would
know to reset itself. This would save a lot of time and convenience if the fault
turns out to be just a software one.

You might also like