Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2026:bianca.popa1106:timotei_iosif.cicu [2026/05/09 08:15]
timotei_iosif.cicu [MicroSD]
pm:prj2026:bianca.popa1106:timotei_iosif.cicu [2026/05/12 10:30] (current)
timotei_iosif.cicu [Analog inputs, internal MAP and battery voltage]
Line 479: Line 479:
 {{:​pm:​prj2026:​bianca.popa1106:​timotei_iosif.cicu:​2026-05-07-220538_1256x404_scrot.png?​300|}} {{:​pm:​prj2026:​bianca.popa1106:​timotei_iosif.cicu:​2026-05-07-220538_1256x404_scrot.png?​300|}}
  
-Changing only the resistor at the collector of the npn resulted in my mosfet never really turning off, this lead to me burning one of my mosfets in about 10 seconds without a heatsink on it (however, with a heatsink, it could last well over 1:30 minutes; I didn't test any further). Below is a image showing the mosfet reaching 100C; after I took the picture, it instantly shot up to 140C+Changing only the resistor at the collector of the npn resulted in my mosfet never really turning off, this lead to me burning one of my mosfets in about 10 seconds without a heatsink on it (however, with a heatsink, it could last well over 1:30 minutes; I didn't test any further). Below is a image showing the mosfet reaching 100C; after I took the picture, it instantly shot up to 140C. With both resistors changed, the maximum temperature reached on the whole PCB is 40C (with an ambient of 25C).
  
 {{:​pm:​prj2026:​bianca.popa1106:​timotei_iosif.cicu:​whatsapp_image_2026-05-07_at_22.17.44.jpeg?​300|}} {{:​pm:​prj2026:​bianca.popa1106:​timotei_iosif.cicu:​whatsapp_image_2026-05-07_at_22.17.44.jpeg?​300|}}
Line 485: Line 485:
 I don't know if you caught the mistake that I made, but the engine'​s redline 13000 RPM (as in rotations per minute) which translates to around 216-217 rotations per second, so a maximum switching frequency at around 54-55Hz which even my original hardware could handle at 10Amps while only reaching a temperature of around 40C (with 25C ambient). I only realized this mistake while writing this documentation because I had to go back to my Requirements Gathering document and I spotted that I only intended to make a circuit that works below 100Hz, but I guess with minimal modifications I can control an engine that has a red-line of 1440000 RPM, or at the very least the injector and spark plug outputs can handle it. I don't know if you caught the mistake that I made, but the engine'​s redline 13000 RPM (as in rotations per minute) which translates to around 216-217 rotations per second, so a maximum switching frequency at around 54-55Hz which even my original hardware could handle at 10Amps while only reaching a temperature of around 40C (with 25C ambient). I only realized this mistake while writing this documentation because I had to go back to my Requirements Gathering document and I spotted that I only intended to make a circuit that works below 100Hz, but I guess with minimal modifications I can control an engine that has a red-line of 1440000 RPM, or at the very least the injector and spark plug outputs can handle it.
  
-So in conclusion, my injector and spark plug output blocks work as they are.+So in conclusion, my injector and spark plug output blocks work as they are, but I still ordered the new resistors and I have changed them. 
 + 
 +With the 100Ohm resistors, I require a heatsink on them as they reach 80C at 25C ambient.
  
  
 ==== Crank and Cam inputs ==== ==== Crank and Cam inputs ====
  
-When my first order from mouser came, I noticed that the comparator was missing (as can be seen in some of the images), so I placed another order. After it arrived, I soldered the comparator to the PCB. I tested the crank and cam inputs using a signal generator set at Pk-Pk 20V centered at 0V using multiple types of signals at multiple ​types of frequencies. ​On the software aspect ​of things, for the low speed runs I blinked the LED at the same frequency as the signal that I was reading, and at higher frequencies I divided that frequency so that I could visually see that the comparator ​was reading fast enoughI tested ​the VR detection circuit at up to 3000Hz. I also confirmed with an oscilloscope that I was detecting ​the VR signal at the right frequency.+When my first order from mouser came, I noticed that the comparator was missing (as can be seen in some of the images), so I placed another order. After it arrived, I soldered the comparator to the PCB. I tested the crank and cam inputs using a signal generator set at Pk-Pk 20V centered at 0V using multiple types of signals at multiple frequencies ​(max 5KHz)Using an oscilloscope I measured ​the output ​of the comparator. ​As can be seen in the VSS section, my Mcu is more than capable of handling ​the required frequencies.
  
-TODOInsert image of the setup.+{{:pm:​prj2026:​bianca.popa1106:​timotei_iosif.cicu:​whatsapp_image_2026-05-09_at_17.42.49.jpeg?​300|}} 
 +{{:​pm:​prj2026:​bianca.popa1106:​timotei_iosif.cicu:​whatsapp_image_2026-05-09_at_17.42.49_1_.jpeg?300|}}
  
 ==== Analog inputs, internal MAP and battery voltage ==== ==== Analog inputs, internal MAP and battery voltage ====
Line 498: Line 501:
 For the analog inputs, I checked them using a potentiometer and compared the readings from them to the readings on my multimeter. I did the same for the internal MAP and battery voltage. Afterwards, for the latter two, I converted the reading to their respective units and representations and confirmed that for the MAP I was reading around atmospheric pressure and for the battery voltage I was reading 12V (the value that I set my power supply at). For the analog inputs, I checked them using a potentiometer and compared the readings from them to the readings on my multimeter. I did the same for the internal MAP and battery voltage. Afterwards, for the latter two, I converted the reading to their respective units and representations and confirmed that for the MAP I was reading around atmospheric pressure and for the battery voltage I was reading 12V (the value that I set my power supply at).
  
-TODO: Insert image+At first the Adc_Calibrate function failed, after investigating further in the S32K3 Datasheet and Reference Manual, and measuring VREFH and VDD_HV_A with a multimeter (and later an oscilloscope),​ I determined that I made an error in the hardware design. VREFH is 0.01V higher than VDD_HV_A, and the datasheet states this is only valid in transient mode (the VREFH line can jump higher than VDD_HV_A only momentarily for a short period). 
 + 
 +To fix this, I cut the track from the 5V_SENSORS net going to VREFH and I soldered a wire from VREFH to 5V_DIGITAL. This fixed my issue
 ==== CAN transceiver ==== ==== CAN transceiver ====
  
 To test the CAN transciever,​ I wired up a CAN network with two devices on them: my ECU with the internal termination resistor turned on, and one of my old projects that also had CAN on it, with another termination resistor near it. For the first test I confirmed using an oscilloscope (that can decode CAN packets) that my ECU was sending the correct information,​ and in the second test I set my other project to send CAN packets and using the debugger I confirmed that my ECU was receiving the correct CAN packets To test the CAN transciever,​ I wired up a CAN network with two devices on them: my ECU with the internal termination resistor turned on, and one of my old projects that also had CAN on it, with another termination resistor near it. For the first test I confirmed using an oscilloscope (that can decode CAN packets) that my ECU was sending the correct information,​ and in the second test I set my other project to send CAN packets and using the debugger I confirmed that my ECU was receiving the correct CAN packets
- 
-TODO: Insert image of the setup 
- 
 ==== VSS ==== ==== VSS ====
  
-To test the VSS input, I used a singal generator at 5000Hz ​using a square wave between 0V and 5V. I then used the same methodology as the validating the Crank and Cam input blocks.+To test the VSS input, I used a singal generator at 60KHz using a square wave between 0V and 5V. I created a blinking LED with a divider from the frequency of my VSS input. And confirmed with an oscilloscope that all of the interrupts were caught.
  
-TODOInsert image of the setup+{{:pm:​prj2026:​bianca.popa1106:​timotei_iosif.cicu:​whatsapp_image_2026-05-09_at_17.12.49.jpeg?​300|}}
  
 ==== UART ==== ==== UART ====
  
 I could not buy the Uart-to-USB chip because it was out of stock when I placed the order, instead I ordered an external Uart-to-USB module and I confirmed using it that my ECU can communicate to a computer using UART over USB. I could not buy the Uart-to-USB chip because it was out of stock when I placed the order, instead I ordered an external Uart-to-USB module and I confirmed using it that my ECU can communicate to a computer using UART over USB.
- 
-TODO: Inset image of the setup 
- 
 ==== Internal flash ==== ==== Internal flash ====
  
Line 526: Line 525:
 ==== RTC ==== ==== RTC ====
  
-I have used this RTC IC in the past with great success. Inorder to validate that the RTC is wired correctly, I first tried getting the vendor id from it using an I2c command, then I tried setting the clock and reading it back a few seconds later to see if it has increased. My tests were successful.+I have used this RTC IC in the past with great success. Inorder to validate that the RTC is wired correctly, I first tried getting the vendor id from it using an I2c command, then I tried setting the clock and reading it back a few seconds later to see if it has increased.
  
 ==== Digital outputs ==== ==== Digital outputs ====
  
-To test the digital outputs, I turned them on and placed a 10 Amp load on one of them, then I measured the temperature rise on them. +To test the digital outputs, I turned them on and placed a Amp load on one of them, then I measured the temperature rise on them. After 2 minutes, they never reached above 60C with an ambient ​of 25C
- +
-(TODO): Insert image of the setup+
  
 +{{:​pm:​prj2026:​bianca.popa1106:​timotei_iosif.cicu:​whatsapp_image_2026-05-09_at_13.54.31.jpeg?​200|}}
 +{{:​pm:​prj2026:​bianca.popa1106:​timotei_iosif.cicu:​whatsapp_image_2026-05-09_at_13.54.32.jpeg?​200|}}
 ==== Hardware validation conclusions ==== ==== Hardware validation conclusions ====
  
-(TODO)+After the hardware validation step, I can confirm that the PCB works as intended, and I can move unto the firmware.
  
 ===== Software requirements and architecture ===== ===== Software requirements and architecture =====
pm/prj2026/bianca.popa1106/timotei_iosif.cicu.1778303747.txt.gz · Last modified: 2026/05/09 08:15 by timotei_iosif.cicu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0