Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/adc #91

Merged
merged 10 commits into from
Apr 10, 2024
Merged

Feature/adc #91

merged 10 commits into from
Apr 10, 2024

Conversation

dyldonahue
Copy link
Contributor

@dyldonahue dyldonahue commented Apr 7, 2024

Changes

This implemented adc and current sensing

Notes

current sensing eq was taken from datasheet, math worked for test values but the offset may need to be calibrated

To Do

Any remaining things that need to get done

  • Verify that adc works on board
  • Calibrate sensing

Closes # (#67 )

@dyldonahue dyldonahue requested a review from nwdepatie April 7, 2024 23:14
Copy link
Contributor

@nwdepatie nwdepatie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

149000 lines changed jesus christ

@dyldonahue dyldonahue merged commit fa2114a into develop Apr 10, 2024
1 check passed
@dyldonahue dyldonahue deleted the feature/adc branch April 10, 2024 23:24
dyldonahue added a commit that referenced this pull request Jun 17, 2024
* implemented watchdog (#83)

* implemented watchdog

* fixed gpio toggle order

---------

Co-authored-by: Dylan Donahue <[email protected]>

* #72 [Compute] - Add in PWM to control fans (#84)

* regenerated IOC with timer changes

* ^

* added last timer

* Implemented #72, function to individual control fan via PWM. Wrapper function not yet created

* Minor tweaks to fan_select pwm function

* Fixing make issues

* Fixing make issues pt.2

* Fixing make issues pt.3 (forgot to save, oops)

* More build error fixes

* Safety checks for if out-of-range index is passed in

* Fixed premature return statement

* Removed wrapper function definition for now

* moved objects, setup fan init

* proper calls

* fixed enum

* nit fixes

---------

Co-authored-by: Dylan Donahue <[email protected]>
Co-authored-by: dyldonahue <[email protected]>

* #77 [GPIO Expander] - Route isoSPI to GPIO Exander (#85)

* Updated function for creating/sending I2C commands to GPIO expander. Old method commented out for reference if needed, remove after verification

* Minor syntax fix for i2c write register call within function

* adjusted ic address

* removed comment

---------

Co-authored-by: Dylan Donahue <[email protected]>

* Spi debug (#89)

* ioc change

* ioc fix

---------

Co-authored-by: Dylan Donahue <[email protected]>

* Feature/adc (#91)

* updated pins to adc in ioc

* updated for 5v ref pin

* added driver files

* implemented adc/current sensing

* added DMA to ioc

* added DMA adc checks

* ioc issues

* ^

* updated makefile to add drivers

* verified adc

---------

Co-authored-by: Dylan Donahue <[email protected]>

* Feature/segment mapping (#92)

* remapped segment

* fixed mapping

---------

Co-authored-by: Dylan Donahue <[email protected]>

* Initial compose (#90)

* initial compose

* updated dcl CAN msg (#93)

* updated dcl CAN msg

* updated subomdule hash

* fixed can IDs

---------

Co-authored-by: Dylan Donahue <[email protected]>

* updated therm map (#95)

Co-authored-by: Dylan Donahue <[email protected]>

* Changes for getting car running

* updated res to temp valc (#96)

* Feature/debug (#102)

* updated ioc

* fixed adc

* Updating fault state

* Converting to millivolts

* Adjusting current sensing algorithm

* Adjusting config values and disabling faults

* fixed faults

* called mc can msg

* linduino updates

* fixed adc hardware smoothing

* therms disabled

* add ids

* shep timing

* Add base

* submoduel hash

* Redoing some fault stuff and changing CAN message sending

* updated ioc so CAN doesnt crash

* Retrying therm mapping

* Feature/stm watchdog (#98)

* added stm watchdog

* updated can to 500kbts

* updated makefile

* Fixing watchdog

* started therm disable

* Uncommenting DCL message

* therm averaging and disabling

* Charger can (#99)

* replace msg content with msg presence for bmsdata.is_charger_connected

* charger msg timeout

* can2 is 500kb/s, ioc changes, codegen, support for extended CAN IDs, updated embedded-base

* charger send msg, charger connected timer

* ioc change for can speed

* replace msg content with msg presence for bmsdata.is_charger_connected

* charger msg timeout

* rebase

* charger send msg, charger connected timer

* ioc change for can speed

* lots

* ioc and charging merge fixes

* balancing

* removed shitty comments, compatible with extended ID, submod has extended id can

---------

Co-authored-by: Scott Abramson <[email protected]>
Co-authored-by: Scott A <[email protected]>
Co-authored-by: Jack Rubacha <[email protected]>

* send extended can

* therms mapping

* Therm averaging algo

* Update compute.c

* Fixing therm calcs

* added mapping correction for configure_balancing (#100)

* added mapping correction for configure_balancing

* added mapping correction for configure_balancing

* I think fixing it

---------

Co-authored-by: nwdepatie <[email protected]>

* re disabled therm map

* changed dcl and ccl to int16, no more packed

* Revert "changed dcl and ccl to int16, no more packed"

This reverts commit 7b98eda.

* endian swap

* can debug

* Disabling charger

* Feature/charging algo (#101)

* updated charging algo

* fixed charging param

* final charging fix

* therms debug

* fuck u matt

* algo fix

* NO MORE CHARGING

* switching can line

* lowered max voltage timer

* misc edits

* clean up

---------

Co-authored-by: nwdepatie <[email protected]>
Co-authored-by: Jack Rubacha <[email protected]>
Co-authored-by: Scott Abramson <[email protected]>
Co-authored-by: Scott A <[email protected]>

* impl and verified new (old) current sensor (#103)

* Miscellaneous FSAE changes (#104)

* Clamping voltages within a non noisy range

* Fixing DCL copy timer and clearing all faults every loop

* Copying over other thermistors from last reading

* Filtered mode works

* Disabling thermistors

* Printing cell temperatures

* inverted ccl

* Making Max Temp based on cell temps instead of thermistors

* Using continuous CCL for max CCL

* Disregarding therms if bad ADC reading

* Adding in lower bound temperature clamp

---------

Co-authored-by: nwdepatie <[email protected]>

---------

Co-authored-by: Dylan Donahue <[email protected]>
Co-authored-by: ameall <[email protected]>
Co-authored-by: Jack Rubacha <[email protected]>
Co-authored-by: nwdepatie <[email protected]>
Co-authored-by: Scott Abramson <[email protected]>
Co-authored-by: Scott A <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants