electronic shoe sizing device

43
Electronic Shoe Sizing Device By Eric Ayala Siyan Guo Robert McDonald Final Paper for ECE 445, Senior Design, Spring 2016 TA: Benjamin Eng 4 May 2016 Project No. 43

Upload: others

Post on 09-May-2022

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Electronic Shoe Sizing Device

Electronic Shoe Sizing Device

By

Eric Ayala

Siyan Guo

Robert McDonald

Final Paper for ECE 445, Senior Design, Spring 2016

TA: Benjamin Eng

4 May 2016

Project No. 43

Page 2: Electronic Shoe Sizing Device

AbstractThe goal of our project is to design and build a electronic shoe sizing device. The intention is that this device

should be able to measure foot size more accurately, more consistently, and be easier to operate than the other devices

currently found on the market. Through the use of a Wi-fi module, the user can control the device and view shoe

sizing results via a smartphone. The device utilizes a mechanical platform that acts as the actual measurement tool

which consists of four movable parts used to set up the distance measurements. Force sensors are used to stop the

motors from moving the movable parts once the force sensor’s threshold is exceeded. Distance sensors will be used

to take the actual measurements. Finally, an Arduino mega 2560 is used as the microcontroller which integrates all

the control signals and carries out the necessary calculations. This paper contains the details of our ideas, designs,

progress, and results. It also contains appendices showing detailed schematics as well as plots, data, and other

information important to our design. Ethical considerations we worked under are also provided.

1

Page 3: Electronic Shoe Sizing Device

Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.1 Statement of Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2.1 Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2.2 Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.1 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.2 High-Level System Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.3 Individual Block Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.3.1 Movable Walls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.3.2 Ball of Foot Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.3.3 Motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.3.4 Motor Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.3.5 Force Sensors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.3.6 Distance Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.3.7 Wireless Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.3.8 Power Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.3.9 Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.3.10 Computation Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3 Schematics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.1 Arduino mega 2560 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.2 Motor Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.3 Power Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4 Calculations and Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.1 Torque and RPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.2 Simulations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.3 Tolerance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5 PCB Design Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

6 Verification Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

6.1 Distance Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

6.2 Force Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

6.3 Wi-Fi Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

6.4 Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

6.5 Computation Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

6.6 Motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

6.7 H-Bridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2

Page 4: Electronic Shoe Sizing Device

6.8 Mechanical Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

7 Cost and Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

7.1 Labor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

8 Conclusion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

8.1 Accomplishments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

8.2 Uncertainties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

8.3 Future Work/Alternatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

8.4 Ethical Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

9 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Appendix A Requirement and Verification Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Appendix B Mechanical Platform CAD Drawings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Appendix C Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Appendix D PCB Revisions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Appendix E Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Appendix F Sensor Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Appendix G Motor Characteristic Curves. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

1

Page 5: Electronic Shoe Sizing Device

1 Introduction

1.1 Statement of Purpose

Everyday, people suffer from knee pain, foot pain, swelling of the feet, and foot blisters according to

the Foot Healthcare Associates of Michigan Podiatry [2]. Many of these people are unaware that the root

cause of their pain is actually improperly sized shoes. There are also a number of common injuries that are

caused by wearing improperly fitted footwear. Some of these injuries include: bunions, corns, hammer toe,

crossover toe, ingrown toenails, diabetic foot, achilles tendonitis, and plantar fasciitis according to Stuart J.

Fischer, Steven L. Haddad, and [email protected] [3],[4].

The importance of having properly sized footwear should seem rather obvious, but the simple fact

is that many people are used to wearing and purchasing footwear that do not fit them correctly. With

the busy lives people live today, properly sized shoes are most likely not of daily concern and people put

on improperly fitting footwear everyday. This only increases the probability of injury or the development

of some sort of foot discomfort over time according to [email protected] [4]. To make things

worse, the problems associated with improperly sized footwear are only exacerbated for more physically

active people.

We plan to make an electronic device that will automatically measure a person’s foot. This device will

be more accurate than the commonly seen manual foot measuring device (known as a Brannock Device) and

will decrease the likelihood that a person will suffer an injury related to improperly fitting footwear. Our

device will comprise of distance and force sensors as well as movable aluminum walls and a specially-made

unit to measure a person’s arch length. This arch length measuring unit and the movable walls will be

controlled by DC gear motors. The motors will stop moving forward when the pressure sensors detect a foot

is in the way and once the distance measurement has been taken, the walls will move back to the original

position and will stop when the walls some in contact with a limit switch. Our device will also have a user

interface that will control the device and display the results.

1.2 Objectives

1.2.1 Goals

• Design and build an electronic foot measurement device that will perform foot length, foot width, and

arch length measurements more accurately and consistently than a Brannock Device

• Create a simple, non-intrusive interface to wirelessly communicate with the foot measurement device

1.2.2 Benefits

• Prevents common foot injuries and discomfort due to improperly fitted shoes

• Provides a more consistent standard for measuring feet to footwear vendors

• Footwear vendor employees no longer need to be trained how to properly use the Brannock Device and

will only need to know how to interface with the system

1.2.3 Features

• Measures foot length, foot width, and arch length of foot automatically

2

Page 6: Electronic Shoe Sizing Device

• User interface wirelessly communicates with device to display the results and control the device

• Uses microcontroller to organize data obtained by the device and to control the motors used by the

device

3

Page 7: Electronic Shoe Sizing Device

2 Design

2.1 Block Diagram

Figure 1: Block Diagram of the System

4

Page 8: Electronic Shoe Sizing Device

2.2 High-Level System Description

To aid in comprehension of the individual block diagram descriptions, a high-level system description

follows:

The electronic foot sizing device will consist of 3 movable walls and a specially made part that will

move to measure the arch length of the foot. These four movable parts will have motors, motor controllers,

distance sensors, and force sensors connected to them. The motors, motor controllers, distance sensors, and

force sensors will all be connected to a microcontroller which will receive data from all of these blocks to

provide the entire system with the necessary actions that each part needs to perform.

Through the use of force sensors, when a force in excess of our 20 g threshold has been exerted upon a

force sensor, an analog signal will be sent to the microcontroller. The microcontroller will then send multiple

digital signals to the motor controller to tell the motors when to stop or move as necessary. Once the motors

stop moving, the distance sensors will take their measurements. After this has been completed, the motor

controller will then reverse the direction of the motor and move the wall back to its original position. In

order for the motor to return to its initial position, there will be limit switches that will activate when the

walls come into contact with them. Once this limit switch is tripped, the motor will stop moving. Similarly,

the width and arch length of the foot will be measured using the same techniques just described.

Once all the data has been obtained, data will be sent from the microcontroller to a Wi-Fi module

that is connected to another device capable of running a PuTTY terminal. The data will then be displayed

on the PuTTY terminal. This terminal will also act as the user interface in which the user is prompted to

enter commands to control the device.

2.3 Individual Block Descriptions

2.3.1 Movable Walls

There are a total of four movable parts in the mechanical platform. All four of these parts will be

allowed to move linearly in only a single direction through the use of lead screws. Each part will have its

own lead screw and connected motor. The combination of a lead screw and a motor is what grants each

movable part its ability to move. We designed the entire mechanical platform initially using CAD software

(see Figures 7-11) and came to the final design (see Figure 12) with the help of the machine shop. The

machine shop also built the entire mechanical platform for us.

Three of these movable parts are walls made of aluminum. Additionally, two of these walls have

circular cutouts which allow distance sensors to be embedded into the walls. These sensors are placed in

such a way that the faces of each sensor are made flush with the surface of the wall that will come in contact

with the user’s foot. Because the height of the sensors is larger than the thickness of the walls, the walls

were fitted with mounting brackets to hold the sensors firmly in place.

The sole unmovable wall is located along the inside of the foot being measured. This wall has one

such cutout for the distance sensor. This sensor is responsible for measuring the width of the foot. This

distance sensor is placed at a height of 7 cm from the base of the platform. The size of this wall will be: 15

cm high, 40 cm wide, and .4 cm thick.

This unmovable wall is very important to the functions of the system as a whole as it has a column of

3 motors and their corresponding lead screws mounted to its side which are responsible for moving 3 of the

four movable parts in the device. The relations between these 3 motors, lead screws, and their connections

to the corresponding movable parts will be explained later in this section.

5

Page 9: Electronic Shoe Sizing Device

One of the movable walls that is used to measure the length of the foot will also need to have circular

cutouts for a distance sensor. This wall will be 15 cm in height, 38 cm in width, and .4 cm in thickness.

This wall has a plate attached to the back of it which serves the purpose of attaching the wall to the lead

screw which allows this wall to move. The motor and lead screw for this wall are located at the top of the

column described earlier.

The second movable wall is also used when taking the length measurement and acts as the reference

surface that the distance sensor embedded in the first wall is directed at. The second wall is placed directly

across from the first and has the exact same dimensions. This wall is also attached in the same manner as

the first; it has a bracket attached to the back of it which is used to attach the wall to the lead screw. The

motor and lead screw for this wall are placed in the middle of the column of motors/lead screws.

The third and final movable wall is used to measure the width of the foot. This wall does not have

a distance sensor embedded in it and the dimensions of this wall are: 15 cm high, 40 cm wide, and .4 cm

thick. This movable part is not part of the column of lead screws/motors, but instead moves by way of its

own motor/lead screw combination that runs underneath the platform.

An important feature of the movable walls is that they stop when they reach their original position

after the distance data has been taken. To achieve this, we placed limit switches at the intended starting

locations of each of the movable walls. These limit switches are triggered when a wall comes in contact with

the switch and sends a logic signal to the microcontroller. The signal sent to the microcontroller indicates

that contact has been made and will stop sending the PWM signal to the motor.

To account for the momentum retained by the motor immediately after stopping the PWM signal,

we needed to insert some material between the switch and the wall to help dissipate this unwanted energy.

Without any material inserted, the wall would get forcibly wedged into the limit switch. This caused the

wall to become stuck and required much more torque (and therefore much more current) to dislodge it. We

chose gauze wrap as the material to place between the wall and limit switch. Gauze wrap was chosen for

the following reasons: gauze wrap has an elastic quality that allows it to return to its original shape after

having force applied, is firm enough after being depressed so as to provide a strong enough surface to press

the limit switch’s button, and lastly, still retains enough softness while being depressed to give the wall the

time and distance necessary to slow the wall before any binding occurs. The decision to use gauze wrap to

prevent this binding action proved to be a successful design choice.

2.3.2 Ball of Foot Object

This final movable part is to be referred to as the BoF (ball of foot) object throughout this report

for convenience. The BoF object is rectangular and has two rounded and filleted edges intended to cause

no discomfort when coming in contact with the ball of a person’s foot. We needed to round and fillet two

edges so that the ball of both the left and right foot can be comfortably contacted which allows the arch

length of either foot to be measured. Like the rest of the mechanical platform, we designed the BoF object

using CAD software and it was built with the help of the machine shop. This object also needs to have

a long flat protruding surface to act as the reference surface for the distance sensor to be aimed toward.

The BoF object’s motor/lead screw are located at the bottom of the column of motors and lead screws as

described earlier. Additionally, the BoF object has two limit switches along its track path to constrain its

linear motion. These limit switches are very helpful when initializing the device.

6

Page 10: Electronic Shoe Sizing Device

2.3.3 Motors

The motors are a very important part of our project and had to be carefully chosen to fit our specific

needs. We utilized four 12 V DC gear motors in the project, one for each of the four moving parts. An

important characteristic of the motors was that we required a stall current of 5 A or less. The motors had to

draw a maximum of 5 A because the traces on the PCB boards were designed to safely handle only 5 A of

current. In order to move the largest aluminum wall (worst case load), we need the motors to be capable of

supplying at least 250 g-cm of torque (refer to calculations in 4.1). The other three motors will be moving

loads that are smaller than this worst case load. Through manipulation of PWM modulation, we controlled

the microcontroller to adjust the speeds of these smaller loads as needed. As noted in the previous sections,

the four motors responsible for moving each of the movable parts are attached to a lead screw and motor

combination which allows them to move.

2.3.4 Motor Controller

The Motor Controller is the device whose assigned task is controlling the DC Motor. The motor

controller includes an automatic means for starting and stopping the motor, selecting forward and reverse

operation, regulating speed, and protecting against faults. Parts were chosen in conjunction with the PCB

current limit of 5 A. Using the ADuM7234 half-bridge gate driver, we can take care of the major faults that

include Overlap (shoot through) protection and Overvoltage Protection (OVP). Shoot through protection

is included in the gate driver to take care of the case when the MOSFETs are switching. It specifically

takes care of the case when one of the NMOS turns on from one side of the H-bridge, but the NMOS

immediately below or above the one that just turned on remains on from the previous cycle as MOSFETs

can’t instantaneously turn off. This causes a brief time that there is a short between the MOSFETs as

there is no longer a motor acting as the load. One of the special features of the gate driver is to create

a dead time or deadband to prevent this from happening. The OVPs purpose is to detect and pull down

the overlap voltage to prevent damage to the device. This gate driver is ideal since it can drive H-bridges

because their high side outputs can be referenced to higher voltages than the isolated ground reference. One

motor controller is needed per motor, so we will need 4 complete motor controllers for the entire system.

2.3.5 Force Sensors

The force sensors are utilized to indicate to the microcontroller when to stop the movable walls and

BoF object. These sensors are directly adhered to a layer of padding before being attached to the walls or to

the BoF object. This padding is used to give the motors a little extra time to slow down in order to prevent

the user’s foot from being uncomfortably contacted by the wall or BoF object. There are five of these sensors

in total. Two circular force sensors with sensing area of 5.1 mm2 are mounted to the BoF object for the

purpose of detecting when the BoF object contacts the ball of the user’s foot. Two 1.5 in2 active area force

sensors are used on the two walls used to measure the length of the foot. These sensors are placed so that

when the user’s toes come in contact with the wall, the motor will stop the wall from moving any further.

Finally, we used a force sensor shaped as a long strip of length 609.6 mm X 10.2 mm width on the wall

that measures foot width. These 5 sensors indicate when a specified force threshold has been reached once

there is enough force between the subject’s foot and the sensor. The threshold we chose is for 20 g of force.

Once this threshold has been reached, it will send an analog signal to the microcontroller. From there, the

microcontroller will tell the motors to stop moving the corresponding wall/BoF object.The distance sensors

will then take their measurements.

7

Page 11: Electronic Shoe Sizing Device

2.3.6 Distance Sensors

The distance sensors take the actual distance measurements once the walls or BoF object stop moving.

These sensors are embedded into the walls. For a description of the relationship between the movable walls

and sensors, see block description 2.3.1.

There are three of these sensors in total. The sensors are used to take the measurements and send the

data to the microcontroller for processing. The motors are used to move the walls or BoF object that the

distance sensors use as a reference surface which allows the sensors to take the necessary measurements.

One of these distance sensors is bracket mounted to the fixed wall on which the inside of the foot is

placed. It is placed at a distance of 7 cm from the bottom of the mechanical platform. This sensor is used to

measure the width of the subject’s foot by measuring the distance between the fixed wall and the movable

wall that will contact the side of the subject’s foot.

Similarly, we need to measure the length of each foot, so we need one more distance sensor on one of

the movable walls at a distance where someone’s foot would not interfere with the sensor. This distance was

found to be 6 cm from the fixed wall. This distance sensor measures the distance from the starting position

of one of the walls to the moving wall. We only need one sensor to take length measurements for both feet

because changing the orientation of the foot will not cause interference with the sensors.

Finally, we will need one more distance sensor to measure the arch length of the subject’s foot. This

sensor will be mounted to a raised piece of PVC so that the sensors have enough distance from the bottom

surface of the platform to operate without interference. This value will only give us the arch length of one

foot. To get the other foot’s arch length, we will need to take the distance from the BoF object to the far

movable wall and subtract the value we get from the distance sensor that measures to the BoF object.

2.3.7 Wireless Module

The communication between the microcontroller and the user interface will be bi-directional, so we

need a Wi-Fi module which can be used as an access point, or in other words, it has to act as both a client

and a server. We used the ESP8266, which is a simple and low-cost serial-to-WiFi module. It satisfies our

needs as it is capable of acting as an access point and also has a built-in TCP/IP protocol stack. The module

accepts commands via a simple serial interface. In order to set up the serial connection with the Arduino

mega 2560, we used Arduino IDE, which is software created by Arduino that supports the ESP8266 module

[6]. Moreover, the Wi-Fi module can only accept a 3.3 V power supply, while the Arduino mega supports a

5 V power supply. We initially planned to use a logic level shifter to convert the 5 V to 3.3 V, however, it

was rather unstable when we used the Arduino mega board as the power supply to the Wi-Fi module. After

learning that the Wi-Fi module requires a peak current of around 250 mA, we decided to use an external 5

V power supply and step down the voltage to 3.3 V using a voltage regulator. After making these changes,

the Wi-Fi module was far more stable.

2.3.8 Power Module

The power module is responsible for delivering power to the microcontroller, motor, and the sensors

for correct operation. To supply this power we used the power supply from the toolbox to get voltage levels

of 12 V for the PCB board and 5 V for the sensors. The 5 V was then stepped down to 3.3 V for the Wi-Fi

module through a linear regulator.

8

Page 12: Electronic Shoe Sizing Device

2.3.9 Microcontroller

The microcontroller we used in our system was the Arduino mega 2560. The user interface controls

which foot will be measured by sending a either the ”left” or ”right” keyword. Once the foot is selected,

the device starts to undergo the measurement process. The microcontroller collects force sensor data and

distance sensor data in order to control the motors, which in turn controls the movement of the walls and

the BoF object. The data obtained is then processed and sent wirelessly to the user interface where the

results are displayed to the user interface screen.

2.3.10 Computation Module

The computation module we designed does not use MATLAB as indicated in our original design

plans, but instead is completely controller by the microcontroller and serial port of the Arduino IDE. This

computation unit is in charge of doing necessary calculations and integrates all signals to obtain the final

shoe sizing results. Signals come from both the user and the mechanical platform itself. The user commands

are collected by a PuTTY terminal on a smartphone, which also serves as the display interface. We did not

have enough time to work on creating an app specifically designed for our purposes. After the microcontroller

receives the user command, the microcontroller begins to control the entire system and provides the necessary

PWM signals to move the motors as needed. The logic flowchart for the software and a sample display window

can be found in Appendix C.

The user controls when the device runs, which means they get to start the device when they are

ready to measure one of the feet. Because of this, the first section of the software is the setup of the Wi-Fi

module. After receiving this foot selection, the microcontroller will move the corresponding motor until the

force sensor is touched. Touching the force sensor then activates the distance sensor. In order to reduce the

inaccuracy caused by a single reading from the distance sensor, we designed it to keep 10 measurements and

then calculate the average of this set. After this average distance is obtained, the microcontroller then moves

the motor backwards to its initial position until the limit switch is pressed. Then we will convert the absolute

distance to a proper shoe size for both men and women and print the results to the PuTTY terminal for

display. After the user is done with one foot, they can continue to measure another foot, or if they want to

remeasure the same foot, they only have to input another selection from the PuTTY terminal. The following

safety feature was implemented within our software: When the motor is running and something happens

with other components so that the motor cannot be stopped, the code allows the user to input the letter ”s”

as a command to immediately stop all 4 motors.

9

Page 13: Electronic Shoe Sizing Device

3 Schematics

3.1 Arduino mega 2560

The schematic in Figure 2 shows how the Arduino mega 2560 is interacting with the rest of the

components. It requires a voltage of 5 V to function properly. From Figure 2, all the force and distance

sensors, as well as the ESP866 Wi-fi module can be seen interacting with the microcontroller. The motor

controller block is not shown below due to visual spacing constraints. It can, however, be seen interacting

with the microcontroller in Figure 2.

Figure 2: Arduino mega 2560 schematic

10

Page 14: Electronic Shoe Sizing Device

3.2 Motor Controller

Figure 3: Motor Controller Schematic

Our H-bridge is constructed using 4 power MOSFETs, 2 NMOS on the top, and 2 NMOS on the

bottom. The arrangement of MOSFETs that are turned on are used to control the polarity/direction of the

motor, and to stop the motor as well. In Figure 3, it can be seen that when U$3 and U$6 are turned on, the

left lead of the motor (M+) will be connected to the power supply, while the right lead (M-) is connected

to ground. At this moment, there is a connection across the motor, which causes current to start flowing

through the load. This direction is considered the forward direction and this current flow will cause the motor

shaft to start spinning in the clockwise direction. In order to spin the motor shaft in the counter-clockwise

direction, we need current to flow in the opposite direction. This is obtained when U$4 and U$5 are turned

on. The current flow in this direction is considered to be the reverse direction.

One problem that can occur is that the motor can be modeled as a generator when an external

source causes the motor to move faster than its applied current/voltage. This leads to another problem,

which is that once a motor acquires momentum it continues to convert that energy into an electro-motive

force (voltage) once power is no longer applied. As a result, when we switch the direction of the motor,

momentarily the voltage on the motor is about twice the previous supply voltage since the EMF is now in

series with the the supply. For this reason, we have free-wheeling schottky diodes which provide a return

path for the back EMF currents, and thereby clamp the voltage to within the supply rails.

Another thing to consider is that the high-side of the H-bridge is floating so a bootstrap circuit is

needed (based off of reference [8]). It is implemented with the capacitor (C1), resistor (R3), and the diode

(D1) as shown in Figure 3. There are two bootstrap circuits, one for the forward direction and another

for the reverse direction. During turn on, the PWM does not come instantly, so all MOSFETs are in a

11

Page 15: Electronic Shoe Sizing Device

high-impedance state until the DC voltages are settled. During this time, the capacitor is charged by the

DC supply path. The charged capacitor provides the voltage for the high-side gate driver. During switching

transitions, GNDA of the high side is pulled down to ground and the other capacitor is charged. When it

switches again, the diode is now reversed biased and the capacitor voltage forces the VDDA voltage to 24

V. As a result the capacitor maintains a voltage of 12 V. Due to all this, the gate driver voltage of the high

side MOSFET is always referenced to the floating source voltage of the capacitor.

3.3 Power Module

Figure 4: Power Module Schematic

The power module schematic is shown in Figure 4, shows the different voltages needed to power up

the different components in the circuit. We have a wall adapter that regulates the 120 V RMS to 12 V DC.

From there, we have a linear regulator that steps down the voltage to 5 V. We also have another voltage

regulator to step down the voltage from 5 V to 3.3 V.

12

Page 16: Electronic Shoe Sizing Device

4 Calculations and Simulations

4.1 Torque and RPM

RPM Calculation: Goal is to have user wait a maximum of 10 seconds. This corresponds to

having the length wall take 10 seconds to move one way as that is the wall that will

take the longest time to move:

Starting distance of length wall: 40 cm

Average Foot Length: 22 cm

Distance to Average Foot: 40 cm - 22 cm = 18 cm

In order to move 18 cm in 10 s –> 18cm10s = 1.8 cm

s

Given that the screw spacing on the lead screw is 3 mm:1.8 cm

s

.3cm = 6 RPS =

360 RPM

Torque Discussion:

Originally, we designed the mechanical platform using the Mabuchi RS-550 motors. These motors

were unable to consistently move the walls while pulling less than 5 A current as specified so that the PCB

traces don’t burn. This was very problematic because by the time we got the platform back from the machine

shop, there wasn’t much time left in the semester for us to order new motors so we needed to act quickly.

Upon looking at the datasheet for the Mabuchi motors, we see that at 5 A current (where the motors would

just barely move), the torque required to just move the walls was about 250 g-cm. So when looking for a

new motor, we had to find a motor with stall current less or equal to 5 A and whose stall torque was well

over 250 g-cm. If we also include the RPM stipulation, we know exactly what sort of specs we are looking

for. We found a motor that fits our needs well, it is the Lynxmotion PGHM-01 planetary gear motor. It has

a no load RPM of 300, a nominal torque of 1120 g-cm, and a stall current of 5 A. The characteristic curves

for these two motors can be seen in Figures 18 and 19. Figure 18 is the original motor we used and Figure

19 is the final motor we used. From Figure 19, we can see that the motor has plenty of room to increase in

torque before getting near the 5 A limit.

4.2 Simulations

In order to simulate the polarity of a DC motor, we used a resistor and inductor in series to model

a DC Motor. The resistor’s value was just V oltageCurrent = 12V

5A = 2.4Ω where Voltage is the supply voltage and

Current is the maximum current the motor can handle. The value of the inductor was chosen within reason

because in order to calculate the actual inductance of the motor, we will need to empirically derive the

inductance of the motor. The datasheet should have this value, but for this specific motor there was no

specification. The DC motor has a stall current of 5 A, so based on this requirement, the MOSFETs need

to be able to handle at least 5 A or more. Stall current is the maximum current drawn when the motor is

at its maximum torque. As a precaution, we picked MOSFETs that can handle more than the stall current

of the motor. Some resistors where added at the gate to avoid ringing. Ringing happens because of the

gate capacitance in series with the connecting wire’s inductance and can cause the transistor to dissipate

excessive power because it doesn’t turn on quickly enough. In Figure 6, a PWM input was generated

by using a pulse wave with an amplitude of 5 V. This represents the input that is going to be coming from

the gate drivers to be able to control the MOSFETs. There are two signals V[005] and V[002], one for the

13

Page 17: Electronic Shoe Sizing Device

Figure 5: Schematic Simulation of H-Bridge

left side of the H-Bridge the other for the right side. These pulse signals are complements of each other, as

can be seen in Figure 6. What we wanted to show in this waveform was that the H-Bridge can produce a

current that is both positive and negative to show that when a pair of specific power MOSFETs are turned

on you will get +5 A for forward direction, and -5 A for reverse direction. Based on Figure 6, the output

I[L1] shows that the current is alternating between ±5 A when the MOSFETs are switching.

4.3 Tolerance Analysis

In order to meet our accuracy goals, we need to ensure that the distance sensors are accurate to ± 3

mm. This will ensure that we are able to measure the proper shoe size as the minimum difference in shoe

sizes is 3 mm. For example, the size difference in foot length between a women’s size 10 to a women’s size

10.5 is only 3 mm. This can be seen with the actual numbers shown below:

26.2 cm - 25.9 cm = 3 mm

The distance sensors we used (iTEAD HC-SR04) need to meet this accuracy as it is crucial to our de-

vice giving accurate readings, which is primarily what distinguishes our project from the manually operated

Brannock Device. In order to verify that the claims of accuracy within ± 3 mm are true, we will utilize the

steps listed as item 1 in the Appendix A Requirements and Verfication table.

5 PCB Design Process

An integral part of the design is the motor controller PCB board. This board is crucial as it helps

control the direction of the motors. This is vital since having a forward and reverse direction allows wall

movement in both directions. In total, there are 4 identical boards since we have 4 different motors to

control. The whole PCB design process took two revisions to get the board working, and yet another to

make room for heat sinks on the MOSFETs. We had many complications when designing the board and

will talk more in description about what went wrong in each revision.

In the first revision, two of the major problems we had were schematic errors and inexperience in

14

Page 18: Electronic Shoe Sizing Device

Figure 6: Simulation Results of H-Bridge

soldering. When debugging the board using a continuity test, we found many of the components were not

connected as they should have been. There was a mislabeled wire in the Eagle schematic. One of the wires

labeled was +12 V and the other signal was 12 V. The signals have different names and this lead to having

floating connections when laying out the board. The other main issue we had was that the board did not

come with vias connected between layers. These connections had to be manually made. Although we tested

continuity to check that both the upper and lower layers were connected, we failed to check that the entire

trace to that via was also connected. This was a a big problem since after assuming that everything was

connected, we connected power to the board and the first thing that happened was that we burned the gate

drivers. The gate driver was the part that had the mislabeled wire. We burned at least 4 gate drivers before

we realized what the problem was. In appendix D, Figure 15 , shows the board layout for this first revision.

The second revision was more successful than the first revision. This time we were more careful when

soldering and tested that every trace leading to the vias was properly connected using a continuity test.

When powering the board, before we connected a load to the board we probed all the voltages to make sure

that the voltage readings we were getting were as expected. This was something we didn’t do in the first

revision, since we weren’t sure about the values we where expecting. After confirming that all the voltages

were correct, we went ahead and connected the motor to the board. The board worked as expected and

by using a simple sketch in Arduino IDE we were able to control both the forward and reverse direction

of the motor. One thing we didn’t even consider to add on the board was the addition of heat sinks for

the MOSFETs. The temperature of the MOSFETs increased rapidly so we had to go back and do another

revision to make space for the heat sinks. In Appendix D Figure 16, you can see the second revision and in

Figure 17 you can see the final revision. You can easily see how different the spacing is between the last two

revisions.

15

Page 19: Electronic Shoe Sizing Device

6 Verification Process

This section summarizes the verification tests we performed and the results of these tests. The

complete requirement and verification table is attached in appendix A.

6.1 Distance Sensors

The requirement for the distance sensors is to accurately measure the distance between 8 cm and

40 cm with an error of ± 3 mm. The sensors were able to take accurate measurements as can be seen in

Appendix E, Table 4. All the measurements are within 3 mm of error. So this requirement is satisfied based

on the data.

6.2 Force Sensors

The requirement for the force sensors was to accurately measure a minimum of 20 g within an error of

± 50%. The force sensors worked as expected, and were even more sensitive than expected. With minimum

contact force on the sensor, it will trigger an analog signal to send to the microcontroller. We ran multiple

trials where we set the threshold to 20 g and calculated the % error from the measured values. This table

can be seen in Appendix E, Table 5. The results show that we are within the ± 50% error.

6.3 Wi-Fi Module

The Wi-Fi module is essential to creating communication between the user interface and the micro-

controller. To test its functionality, we first set up the serial connection and tested the module via multiple

AT commands using the Arduino serial monitor. After making sure it responded to the commands, we

then established a connection with the PuTTY terminal on a smartphone. We checked to make sure all the

entries we inputted to the PuTTY terminal got printed out correctly on the serial monitor and vice-versa.

After sending a 10-character message 10 times, we saw that all the characters were printed correctly. This

corresponds to an error of 0%. This shows that we verified the Wi-Fi module meets the expected requirement.

6.4 Power Supply

The requirement for the power supply is for the linear regulator (LT1084CT-5#PBF-ND) to provide

provide 5 V ± .1 V at a maximum current of 5 A. This requirement was satisfied since each motor is drawing

about 220 mA. No more current will be drawn since only one motor is on at a time. The voltage reading

is 5.01 V with the motor running. The other requirement was that the Wi-Fi Module power supply in

conjunction with the 5 V to 3.3 V LM340T15 7815 linear regulator must be able to supply up to 250 mA at

3.3 V ± .1 V. The voltage output of the linear regulator was 3.38 V. This satisfies the requirement.

6.5 Computation Interface

The computation interface is in charge of actually integrating signals. To test this module, we first

programmed the sketch to setup the Wi-Fi module. The program is written to respond according to the

user’s input. The mechanical platform should operate as the user interface requests it to. We verified that

the performance is as expected while testing the Wi-Fi module’s requirement. However, due to the uncleared

input buffer within the Arduino, the motor drove the walls to randomly move in different directions for a

small amount which could cause collisions with other walls. Other than this issue, the computation interface

worked exactly as expected.

16

Page 20: Electronic Shoe Sizing Device

6.6 Motors

The requirement for the motors is that each motor must be able to move the largest wall (wall that

measures the width of the foot) while pulling less than 5 A of current at a voltage of 12 V. The motors chosen

for this application only had a stall current of 5 A. So this guarantees that the current will never exceed 5 A.

The motors were drawing a current of 220 mA when trying to move the largest wall. The other requirement

was that when the wall comes into contact with the limit switch, the maximum amount of current drawn

is 5 A. By the same logic as before the motors only have a stall current of 5 A. When the wall came into

contact with the limit switch, the peak current is 321 mA, which satisfies our requirement.

6.7 H-Bridge

The requirement for the H-Bridge is to spin the motor in the clockwise and counter-clockwise directions

while drawing less than 5 A at no load. The H-bridge accomplished this since we were able to move the

walls back and forth. While the motor was on at no load, it draws 130 mA. This satisfies the requirement.

6.8 Mechanical Platform

The embedded sensors attached to the mechanical platform are accurate to between 8 cm and 40 cm

with an error of ± 3 mm. The sensors were able to take accurate measurements as can be seen in Appendix

E, Table 4. All the measurements are within 3 mm of error. So this requirement is satisfied based on the

data.

7 Cost and Schedule

7.1 Labor

Table 1: Labor

Labor Hourly Rate Total Hours

Invested

Total Cost

Eric Ayala $35.00 150 $13,125.00

Robert McDonald $35.00 150 $13,125.00

Siyan Guo $35.00 150 $13,125.00

Total 450 $39,375.00

The total cost is parts spending + labor, which is calculated as follow:

Labor + Parts = $39375.00 + $390.25 = $39765.25

The exact parts list is shown in appendix E.

17

Page 21: Electronic Shoe Sizing Device

8 Conclusion

8.1 Accomplishments

Overall, our device worked as expected. We tested every major part on its own and all of them worked

perfectly. The force sensors can stop the motor more safely with the padding and our mechanical design

worked flawlessly. We also tried to use the computation interface to control each individual hardware module

and things turned out very well.

8.2 Uncertainties

Upon the completion of each individual module, problems occurred when we tried to integrate the

whole system together. Due to our unfamiliarity with the software as a team of 3 electrical engineers, when

serial monitor to the microcontroller, the motors would briefly move in random directions which would cause

binding as the walls would hit each other or get wedged into the gauze wrap of the limit switches. We

have been looking for the possible cause of this issue. It turns out that the input buffer needs to be cleared

manually after each run. We researched this issue and also consulted some of our colleagues who are more

familiar with Arduino. All of the potential fixes we tried had no effect. In the end, we ran out of time to

actually fix this problem.

8.3 Future Work/Alternatives

In order to fix the issue mentioned in the previous part, there are two possible solutions. We can

change the mechanical platform design to make up for the software deficiency. By making each movable wall

shorter than they are in the current device iteration, any initial movement of the walls will not cause the

walls to crash into each other if we separate them enough initially. After the initial movement, we can reset

the walls to their intended initial positions and then start the measurement process from there. Another

solution is to make changes to the code so that this input buffer can be cleared every time we restart the

program. This would solve the problem entirely, but we could not find the proper way to achieve this in our

current code.

On the software side, since all our teammates are electrical engineering majors, we did not have much

experience with developing smartphone apps. If we had more time, we would research more about making

apps and try to create a simple app to serve as the user interface. Using a PuTTY terminal can be a little

bit challenging, because the connection can be unstable sometimes. Our app would be able to show whether

the connection to the Wi-Fi module was successful or not and a connection button will be shown on the

interface. From our app, the user would be able to connect to the Wi-Fi by tapping this button. There

would also be two selections for either left or right foot, so that users don’t have to actually type in any

selection, but instead press the corresponding button on the app’s interface. A display window will be set

up so that the results will be displayed more clearly.

8.4 Ethical Considerations

While working on this project, our group members strictly followed the Code of Ethics that are stated

on Institute of Electrical and Electronics Engineers (IEEE) policies, Section 7 - Professional Activities.[5]

We followed all the ethics codes while taking special cautions for the following codes:

• To accept responsibility in making decisions consistent with the safety, health, and welfare of the public,

and to disclose promptly factors that might endanger the public or the environment

18

Page 22: Electronic Shoe Sizing Device

• To avoid injuring others, their property, reputation, or employment by false or malicious action.

Since our final product will be used by customers, it is very important to keep the device safe enough

for all users while in use. One of the most important factors is to prevent the device from hurting customers’

feet. As mentioned eariler, there is an emergency halt command in the software that turn all PWM signals

to the motors off under dangerous situations. Another critical aspect is that we will make sure all of our

connections are tight and secure so that the customers won’t get any electric shocks.

• To be honest and realistic in stating claims or estimates based on available data.

We incorporated multiple parts which require a high-level of accuracy and we made sure to do enough

calculations, simulations and testing to report accurate data.

• To seek, accept, and offer honest criticism of technical work, to acknowledge and correct errors, and

to credit properly the contributions of others.

Since we used knowledge that was fairly new to us, we expected to encounter questions and errors

throughout the design process. Critiques were vital for the debugging and troubleshooting process and we

were very receptive with regards to suggestions and guidance received from various outside sources and

teaching assistants for the class.

19

Page 23: Electronic Shoe Sizing Device

9 Bibliography

[1] Lucky Foot. (2012, October 3). Importance of Wearing Properly Fitted Shoes [Online]. Available:

http://www.luckyfoot.com/importance-of-wearing-properly-fitted-shoes/

[2] Foot Healthcare Associates. (2014, November 27). Wearing the Proper Shoe Size Becomes more Im-

portant with the Growth of Feet [Online]. Available: http://www.michiganpodiatry.com/wearing-proper-

shoe-size-becomes-important-growth-feet/

[3] Fischer, Stuart J. and Haddad, Steven L. (2012 August). Tight Shoes and Foot Problems [Online].

Available: http://orthoinfo.aaos.org/topic.cfm?topic=A00146

[4] [email protected]. (2014, November 13). Wearing the Wrong Fitting Running Shoe Can

Cause Serious Injury [Online]. Available: http://www.footandankleassoc.com/blog/post/wearing-the-wrong-

fitting-running-shoe-can-cause-serious-injury.html

[5] IEEE.com. (2016). 7.8 IEEE Code of Ethics [online]. Available: http://www.ieee.org/about/corporate/governance/p7-

8.html

[6] NURDspace. (2016). ESP8266 [online]. Available: https://nurdspace.nl/ESP8266

[7] Kirt Blattenberger. (1996). Density of Some Common Building Materials [Online]. Available: http://www.rfcafe.com/references/general/density-

building-materials.htm

[8] H-Bridge Driver Circuit Using Isolated Half Bridge Drivers. Analog Devices. N.p., 2011. Web. 02

Mar. 2016. Available: http://www.analog.com/en/products/interface-isolation/isolation/standard-digital-

isolators/adum7234.html

20

Page 24: Electronic Shoe Sizing Device

Appendix A Requirement and Verification Table

Requirement Verification Points

1. Distance Sensors(a) Can provide distance accuracy

within ±3 mm at a range of 8cm to 40 cm

1. Verification(a) Verification Process:

i. Measure distance between sensor andobstacle (at 8 to 40 cm from sensor) us-ing tape measurer

ii. Attach echo pin of distance sensor to mi-crocontroller analog input

iii. Attach trigger connection to microcon-troller digital output pin

iv. Attach power and ground pins to 5 Vand ground of the microcontroller, re-spectively

v. Plug microcontroller into computer’sUSB port and use Arduino IDE to loaddistance sensor program onto board

vi. Compare distance sensor results to re-sults from tape measurer

vii. Repeat process for various points be-tween 8 cm and 40 cm

5 pts

2. Force Sensors(a) Can measure a minimum of 20

g with an error within ± 50%

2. Verification(a) Verification Process:

i. Set up voltage divider between sensorand 100 kΩ resistor

ii. Attach 5 V power supply to the voltagedivider circuit

iii. Apply 20 g weight to sensor and recordvoltage across the 100 kΩ resistor

iv. Apply 200 g weight to sensor and recordvoltage across the 100 kΩ resistor

v. Using a linear curve between the previ-ous two voltage values, find what voltagecorresponds to a 20 g weight

vi. Apply known weight of 20 g and recordvoltage across the 100 kΩ resistor

vii. Compare measured voltage value to volt-age prediction and calculate percent er-ror

5 pts

Continued on next page

21

Page 25: Electronic Shoe Sizing Device

Table 2 – continued from previous pageRequirement Verification Points

3. Wi-Fi Module(a) The Wi-Fi module should be

able to receive and send dataat a error rate < 5% (Among100 characters transmitted,there has to be less than 5-character error)

3. Verification(a) Verification Process:

i. Connect the Wi-Fi module to the micro-controller and upload the correspondingbaud rate sketch to the board. The baudrate for our Wi-Fi module is 115200baud

ii. Use AT commands in the serial monitorwindow to setup the access point. Enterthe following commands in order with-out the quotes: ”AT+CWMODE=3”,”AT+RST”, ”AT+CIPMUX=1”,”AT+CIPSERVER=0,80 (port num-ber)”. Then use ”AT+CIFSR” to dis-play the IP address of the Wi-Fi module.I used ”AT+CIPAP=192.168.4.1” toset the IP address to be 192.168.4.1.Connect mobile device to the wirelessmodule and then open up PuTTYterminal, and setup the host IP addressto be 192.168.4.1, port to 80 (or whichever port number you input at the”AT+CIPSERVER” command)

iii. Now the mobile device can talkto the computer. By typing in”AT+CIPSEND=0,10”, the computerwill be able to talk to the device as wellwith a 10-character limit. You can nowenter any string within the characterlimit you set into the serial port andpress Enter to send to the PuTTYterminal

iv. A sketch which repeatedly transmitsdata (sends same 10 character string 10times) will be uploaded to the board.We will be able to visually check the cor-rectness of the transmitted data

5 pts

Continued on next page

22

Page 26: Electronic Shoe Sizing Device

Table 2 – continued from previous pageRequirement Verification Points

4. Power Supply(a) LT1084CT-5#PBF-ND linear

regulator must provide 5 V ±.1 V at a maximum current of5 A

(b) The Wi-Fi Module power sup-ply in conjunction with the 5 Vto 3.3 V LM340T15 7815 linearregulator must be able to sup-ply up to 250 mA at 3.3 V ±.1 V

4. Verification(a) Verification Process:

i. Turn on the DC power supply and sup-ply 12 V across pin 3

ii. Prepare a DC voltmeter to measure theoutput voltage of the regulator

iii. Verify the red and black cable connec-tions are correct, red for positive polar-ity to pin 2, black for negative polarityto pin 1

iv. Make sure that pin 2 reads positive 5 V(b) Verfication Process

i. Connect 5 V to the LM340T15 7815 lin-ear regulator

ii. Add a resistor network that will give usan equivalent resistance of 13.2 Ω

iii. Insert ammeter from digital multimeterin 3 amp mode into circuit to measurecurrent

iv. Observe and verify that the current isnear 250 mA, if the supply is not capableof supplying 250 mA, the current willread less than 250 mA

5 pts

Continued on next page

23

Page 27: Electronic Shoe Sizing Device

Table 2 – continued from previous pageRequirement Verification Points

5. Computation Interface(a) The Computation Interface

should be able to send dataand receive data at an errorrate < 5% (Among 100 char-acters transmitted, there hasto be less than 5-character er-ror). Distance sensor data willbe transmitted to test the com-putation interface’s ability tosend and receive data

5. Verification(a) Verification Process:

i. Set up distance sensor so that it pointsat an object between 8 and 40 cm awayfrom the sensor

ii. Measure distance between sensor andobstacle using tape measure

iii. Attach echo pin of distance sensor to mi-crocontroller analog input

iv. Attach trigger connection to microcon-troller digital output pin

v. Attach power and ground pins to 5 Vand ground of the microcontroller, re-spectively

vi. An Arduino sketch that gathers datafrom a distance sensor and transmits thedata through the wifi module needs to beuploaded onto the microcontroller

vii. Open up a PuTTY terminalviii. To set up PuTTY, enter the IP address

of the Wifi Module (192.168.4.1) into thecorresponding HOST Name (or IP ad-dress). Also make sure that the port ofthe wifi module matches the port des-ignated earlier by AT commands in theArduino IDE (port 80)

ix. Check to see the correctness of the re-sults by looking at the data printed ontothe PuTTY terminal

5 pts

Continued on next page

24

Page 28: Electronic Shoe Sizing Device

Table 2 – continued from previous pageRequirement Verification Points

6. Motors(a) Must be able to move largest

movable wall (wall that mea-sures width of foot) whilepulling less than 5 A of currentat nominal voltage (12 V)

(b) Must be able to contact limitswitch and successfully pressthe switch button withoutpulling more than 5 A of cur-rent

6. Verification(a) Verification Process

i. Set 5 A limited power supply set to 12V and then turn off the output

ii. Ensure the power supply’s limit currentis set to 5 A, if not, set it to 5 A

iii. Attach 5 A limit power supply set to 12V to the terminals of the motor con-nected to the movable wall that mea-sures foot width

iv. Turn on the power supplyv. Verify that the current needed to move

the wall (as shown on the power supply)does not go to the 5 A limit. This likelymeans more current is needed

vi. Wall must move, if not, this test fails(b) Verification Process

i. Set 5 A limited power supply to 12 Vand then turn off the output

ii. Ensure the power supply’s limit currentis set to 5 A, if not, set it to 5 A

iii. Attach 5 A limit power supply set to 12V to the terminals of the motor con-nected to the movable wall that mea-sures foot width

iv. Setup digital multimeter to measure cur-rent in the 10 A mode and connect theammeter to measure current through themotor

v. Turn on the power supplyvi. Once the motor reaches the far wall and

the voltage from the switch changes to alogical high, look at the supply’s currentand immediately turn output from thepower supply off

vii. This current should not read 5 A as thatprobably indicates that current in excessof 5 A was actually needed, but not pro-vided due to the 5 A limit imposed bythe power supply

5 pts

Continued on next page

25

Page 29: Electronic Shoe Sizing Device

Table 2 – continued from previous pageRequirement Verification Points

7. H-Bridge(a) Must draw less than 5 A for

no load on the motor and mustbe able to spin motor in clock-wise and counter-clockwise di-rections

7. Verification(a) Verification Process:

i. Plug in a 12 V, 10 A rated AC to DCpower adapter to the PCB input

ii. Connect the multimeter using the 10 Asetting and connect it in series with themotor

iii. Program microcontroller to send 5 Vamplitude PWM square wave of fre-quency 31 kHz and duty cycle of 50%to one gate driver while the other gatedriver will have a PWM of 5 V and dutycycle of 0%.This ensures that only oneside of the H-Bridge is on at a time.

iv. Verify that the output current is lessthan 5 A magnitude

v. Switch the PWM signals to reverse thedirection of the motor

vi. Verify that the output current is lessthan 5 A magnitude with the oppositesign as the first direction

10 pts

8. Mechanical Platform(a) Verify that the distance

recorded from the wall to thesensor is accurate to between8 cm and 40 cm with an errorof ± 3 mm

8. Verification(a) Verification Process:

i. Set the wall that measures the length ofthe foot within 8 cm and 40 cm

ii. Use a tape measure to measure the dis-tance between the sensor and the wall

iii. Connect the ATMEGA2560 and printthe measured distance into the serialbus. Verify that the distance measuredwith the tape measurer is the same asthe reading that the ATMEGA2560 ismeasuring ± 3 mm

iv. Repeat the previous steps for differentdistances within 8 cm and 40 cm. Makesure they’re all within ± 3 mm

10 pts

26

Page 30: Electronic Shoe Sizing Device

Appendix B Mechanical Platform CAD Drawings

Figure 7: Isometric View of Basic Platform (Initial Design)

Figure 8: Top View of Basic Platform (Initial Design)

27

Page 31: Electronic Shoe Sizing Device

Figure 9: Side View of Basic Platform (Initial Design)

Figure 10: Isometric View of BoF Object (Initial Design)

28

Page 32: Electronic Shoe Sizing Device

Figure 11: Basic Platform With BoF Object (Initial Design)

29

Page 33: Electronic Shoe Sizing Device

Figure 12: Final Mechanical Platform

30

Page 34: Electronic Shoe Sizing Device

Appendix C Software

Figure 13: Software Flowchart

31

Page 35: Electronic Shoe Sizing Device

Figure 14: Sample Smartphone PuTTY Display

32

Page 36: Electronic Shoe Sizing Device

Appendix D PCB Revisions

Figure 15: First Revision

33

Page 37: Electronic Shoe Sizing Device

Figure 16: Second Revision

34

Page 38: Electronic Shoe Sizing Device

Figure 17: Final Revision

35

Page 39: Electronic Shoe Sizing Device

Appendix E Parts

Table 3: Parts List

Part ManufacturerRetail

Cost ($)Quantity

Total

cost ($)

HC-SR04 Ultrasonic Range Finder iTEAD Studio 2.50 3 7.50

FSR 400 ShortInter Link

Electronics10.97 2 21.94

FSR 406Inter Link

Electronics12.40 2 24.80

FSR 408Inter Link

Electronics22.99 1 22.99

WiFi Module - ESP8266 Sparkfun 6.95 2 13.90

Mega 2560 microcontroller Arduino 45.00 1 45.00

H-bridge Resistors and Capacitors ECE Machine Shop 2.00 15 30.00

Voltage Regulator LT1084CT Texas Instruments 8.04 4 32.16

Voltage Regulator LM340T15-7815 ECE Machine Shop 2.50 1 2.50

ADUM7234 Half-Bridge Driver Analog Devices 3.81 8 30.48

MOSFET N-CH IRF3710ZPBF-NDInternational

Rectifier1.90 16 30.40

DIODE SCHOTTKY

SSC53L-E3/57TGICT-ND

Vishay

Semiconductor0.61 8 4.88

DIODE ZENER 13V CMZ5928B

TR13DKR-ND

Central

Semiconductor Corp0.67 8 5.36

Limit Switch - P13584SCT-ND Panasonic 1.50 5 7.50

12VDC Planetary Gear Motor PGHM-01 Lynxmotion 27.71 4 110.84

Total - - 390.25

36

Page 40: Electronic Shoe Sizing Device

Appendix F Sensor Data

Table 4: Distance Sensor Data for the Range of 8 cm to 40 cm

Actual (cm) Measured (cm) Error(mm)

40 39.81 1.90

38 38.07 0.70

36 36.12 1.20

34 34.05 0.50

32 31.98 0.20

30 30.01 0.10

28 27.99 0.10

26 26.03 0.30

24 23.93 0.70

22 22.11 1.10

20 20.12 1.20

18 18.08 0.80

16 16.06 0.60

14 13.91 0.90

12 12.08 0.80

10 10.01 0.10

8 7.97 0.30

37

Page 41: Electronic Shoe Sizing Device

Table 5: 10 Trials of Force Sensor Data for 20 g Weight

Trial # Measured (g) % Error

1 25.71 28.5

2 27.20 36.0

3 18.03 8.50

4 16.60 17.0

5 21.20 6.00

6 22.40 12.0

7 19.20 4.00

8 26.03 0.30

9 15.10 25.5

10 19.10 4.50

38

Page 42: Electronic Shoe Sizing Device

Appendix G Motor Characteristic Curves

Figure 18: Mabuchi DC Motor Characteristic Curve

39

Page 43: Electronic Shoe Sizing Device

Figure 19: Lynxmotion PGHM-01 Motor Characteristic Curve

40