User:Snewkirk7953/ENES-100/project 2

Week2 Narrative
My partner Adel and I will continue working on the ECU project from last week.

The first thing I did was revise the wiring setup, including all 11 wires I determined were the possible matches to the 6 OBD wires. Previously, I only used one wire of each color from the ECU side to connect with the OBD, so five ECU wires were left unused. I instead grouped all the wires of each color together and connected them all to the OBD because they are probably all used by the code reader.

I also determined from the wiring documentation that the three pink wires, A5, B2, and C18, were likely to be the power lines. They are labeled on the wiring diagram as "hot" or "hot at all times," which implies that they carry power and are probably the wires that put power through the ECU to the OBD connector and allow them to communicate. After testing the current through each, I learned that B2 carries much more current than the other two pink wires, and required an increase in allowed current from the voltmeter to prevent the code reader from shutting off on contact. I tried using all 7 possible combinations of the three wires, connecting them to the orange line which I supplied positive power to, but none of them changed the results; the code reader still returned a connection error.

The Can Bus simulator has arrived, so I will need to learn how to use it with the ECU to hopefully bypass the screen on the code reader that asks you to turn the key in the ignition.

Wiring
I spent some time studying the wiring diagram to determine where the pink wires should be connected, in case I had them in the wrong location.

The ignition coil assembly takes power from a pink wire, unnamed in the diagram, and information from the ECU via wires C31 and C32.

Based on this information and the tests from last week, I can conclude that the pink wires alone are not sufficient for getting the ECU to communicate with the code reader.

The next step is to use the Can Bus to simulate the car ignition.

Electricity
I took some notes on an electricity lecture from Foerster:

Connecting a wire directly to the positive and negative ends of a battery will cause a short and the battery will become hot. A circuit needs a load to prevent shorts. A load is anything that takes energy from the battery and converts it to a different form, like a light bulb converting the electricity to light and heat energy or a motor converting the electricity to kinetic energy.

Conventional flow, where electricity in a circuit flows from the positive end of a battery to the negative end, was proposed by Benjamin Franklin. However, the electricity actually flows from negative to positive and is known as electron flow. This is because current is made up of electrons that move extremely slowly individually, but the energy travels quickly due to the power source causing them to vibrate and transfer that energy down the path of electrons.

I learned that shorts can be harmful to both the circuit and people who touch it, but the small amount of current going through the ECU wires isn't enough to cause concern. I am working with a wire grade of about 18-22 so they don't carry enough current to be dangerous.

Arduino UNO
I took the two Arduinos and two CAN-BUS shields home to work with them. After installing the necessary software (v1.0.5) and drivers (dpinst-amd64) for the Arduino from arduino.cc, I found that it came with example codes to play with. I found a tutorial for one here that explains how to use an LED Blink code.

Following the tutorial, I opened the file named Blink.ino, which brought up a short code with comments included that explained what each line did. Then I set the board type to Arduino UNO and, after connecting the board to my laptop's USB port, uploaded the code. The first upload failed because it returned an error due to an invalid serial port. The tutorial suggested using the port COM3 or higher, so in the error window I tried the upload again using COM3 (it was the only available option). This time, the LED blinked successfully.

Video of second run (I did not encounter the upload error this time)

Arduino Basic Programming
Arduino programs are called "sketches" and the most basic one blinks an LED on the board. The first piece of code is the declaration stage, and identifies the variables. The second step is the void setup, which is important for running the code - it does not return data to anything, hence the word "void." The last and main piece of a basic code is the void loop, which is repeated over and over as long as the Arduino is powered on.

Week3 Narrative
This week I put the Arduino programming on hold to make a complete documentation of the ECU wires and their destinations in the vehicle.

First I used this wiring diagram of the ECU to create a spreadsheet showing the names of the wires, their colors, and their functions in the vehicle as listed in the diagram. Each plug had a casing that opened up in the back to show the numbers next to each wire. I determined the letter name of each plug in my last project documentation by using these numbers and wire colors to match them with the wiring diagram. Once I had all the wire names listed in the spreadsheet, I entered their colors and then looked at the wiring diagram to see where they carry power/data to or from. To determine whether the wires carried power/info to or from the ECU, I used the names of the destinations; "sensor" typically meant a device that measured the status of a particular system to relay information to the central computer, and words like "valve," "indicator lamp," and "injector" are associated with outputs, or things that the ECU sends data to to control.

Wiring spreadsheet

Week4 Narrative
This week I put together a presentation for the seminar.

Diagrams
Power is supposed to come through the ECU first because it is the computer that processes the codes sent to the scanner device. With the power supplied to the OBD connector, it only simulates the car battery that turns it on when it is plugged into a working vehicle. There is no data coming through. So, the main goal in this project was to find the wires or pins that power originally came through to the ECU, but many attempted solutions resulted in the conclusion that power comes through multiple lines. We tried all combinations of the pink wires, which we determined to carry power due to the diagram labeling them as hot at all times, and with the orange wire that we determined to carry power through trial end error (it turns on the scanner when used by itself as the power line). Without power in the ECU, the scanner will only return connection errors because it cannot send power or data to the ECU, only the other way around.