1. Individual assignment:
PCB design:
I designed the PCB for a DC motor. I used eagle programe with the correct rules and I developed the schematic.
I used severals componente such as:
Regulator of 5V and 1A
H-bridge A4953 and dc motor
Pins for FTDI and ISP, also I put a RESET pin
I search the with of the trace before design the traces, and I get 0.431 mm.
Finally I started to create the traces and I had to perform them again and again. On the one hand for not reading the data sheet well and on the other for not finding the path of the traces.
Since I could not do it, I started designing it in parts, first the ATmega328P
Second I connected the microcontroller with FTDI and Resonator.
Third I connected the motor part and the battery
And finally I connected all the parts.
Finally I used the milling machine to mill the output plate but Ihad a problem when not creating the security edge in png. So in the next image you see how you create a bridge in the lower part of the plate.
As I had to re-mill the plate, I decided to change some things like the FTDI connection, and try to take advantage of the components of the previous plate by completely desoldering it with the help of the heat gun.
For the programming of this board I had in mind the datasheet of the microcontroller to use two pins with PWM that were pin 5 and 6 of arduino. I also had to take into account the datasheet of the h-bridge to move the engines or to stop them. I also had a problem with this h-bridge because it needs at least 8 volts to be able to work and directly from the computer it did not work.
OUTPUT PROGRAMMING
int controlPin1 = 5; int controlPin2 = 6; int ledPin = 16; void setup(){ pinMode(controlPin1, OUTPUT); pinMode(controlPin2, OUTPUT); pinMode(ledPin, OUTPUT); } void loop(){ analogWrite(controlPin1, 255); analogWrite(controlPin2, 255); digitalWrite(ledPin, HIGH); delay (4000); analogWrite(controlPin1, 0); analogWrite(controlPin2, 255); digitalWrite(ledPin, LOW); delay (4000); }
FILES:
- Traces
- Interior
- File eagle board
- File eagle schematic
- File eagle project
- Programmation