WEEK 11 | Output Devices
The list of components
- 12V DC motor,
- ATtiny44,
- Conn Pwr Jack 2.1x5.5,
- H-Bridge (40V, 2A),
- Regulator (5V, 1A)
- Header 3x2
- Screw terminal
- Resonator 20MHz,
- Capacitors: 0.1uF & 10uF (H-Bridge) || 0.47uF & 22uF (Regulator),
- 10kΩ resistor.
I also discovered Octopart website.
DC motor - V1
I also learnt the meaning of the specification: " Current - Full load: 1380mA ". The board needs to provide less amps than the transistor. So from now on, I'll check the voltage AND the amperage output of the transistor before providing power.
DC Motor - V2
DC Motor - V3
You'll find the final eagle files here (schematic, board & traces).
This is what I understood about this code:
- on_delay(): delay between forward and reverse in each cycle (slow, medium and fast);
- fast_off_delay(): changes speed rotation in "fast cycles"
- medium_off_delay(): changes speed rotation in "medium cycles"
- slow_off_delay(): changes speed rotation in "slow cycles"
- PWM_count: number of "forward cycles" and "reverse cycles" in each slow, medium and fast cycle
- cycle_count_fast: number of "fast cycles"
- cycle_count_medium: number of "medium cycles"
- cycle_count_slow: number of "slow cycles".
Click here to download the C code with some modifications and comments.