Transcript
Page 1: Special Design Report

Special Design ReportSpecial Design Report

IMDL Summer 2002

Matthew Chernosky

July 11, 2002

Page 2: Special Design Report

OverviewOverview

Additional hardware Pulse Width Modulation channels

Need for additonal PWM channelsDesignResults

Page 3: Special Design Report

Need for additional channelsNeed for additional channels

Atmel ATMega163 – 3 PWM channels built-in

Motion – Requires 2 channels (left and right)

Golf ball pickup– Needs more than one channel

Page 4: Special Design Report

DesignDesign

2 additional channels to be implemented

Channels used for locomotionAltera MAX7032 CPLDDevelopment in VHDL

Page 5: Special Design Report

DesignDesign

3 Settings for each channel– Forward– Reverse– Stopped

A 2-bit wide input bus selects desired setting for each channel

4 output port pins of uP

Page 6: Special Design Report

DesignDesign

AlteraMAX7032

AtmelMega163

1 MHzoscillator

MicrocontrollerCPLD

PWM A Out

PWM B Out

Chan A select

Chan B select

Page 7: Special Design Report

DesignDesign

15-bitcounter

CPLD

PWM A

PWM B

FF

FFLogic

Chan A select

Chan B select

1 MHz clock

Reset

Page 8: Special Design Report

VHDLVHDL

ENTITY motor_pwm_580 IS

PORT(

clk : in STD_LOGIC;

PWM_IN_A: in STD_LOGIC_VECTOR(1 downto 0);

PWM_IN_B: in STD_LOGIC_VECTOR(1 downto 0);

PWM_OUT_A: out STD_LOGIC;

PWM_OUT_B: out STD_LOGIC

);

END motor_pwm_580;

Page 9: Special Design Report

VHDLVHDL

cnt: PROCESS (clk)BEGIN

IF (clk = '1' and clk'EVENT) THENif (count < COUNT_MAX) then

-- increment countercount <= count + 1;

else-- reset counter when COUNT_MAX reachedcount <= COUNT_RST;

end if;END IF;

END PROCESS;

Page 10: Special Design Report

ResultsResults

Oscilliscope waveform tests

Works with servos

20 ms

1.75 ms


Top Related