Summary of "Embedded Systems and Design & Development - Feb 17, 2026 | Afternoon | VisionAstraa EV Academy"
Overview / goals
- Course objective: implement basic BMS functionality (monitor → control → communicate) on an embedded controller, focusing on over‑voltage protection for a single lithium cell.
- Required measurements: current, voltage, temperature (sensors + ADCs + signal conditioning).
- Protection hardware: MOSFET (to isolate the cell from the charger), TVS diode (transient suppression), fuse (final physical isolation).
ADC / MCU considerations
- Key ADC parameters to check in datasheets: resolution, conversion time, input voltage range, number of channels.
- Typical automotive MCUs (examples: SPC series, Infineon, NXP) commonly provide 12‑bit ADCs; battery‑pack applications may use 16‑bit ADCs for higher precision.
- Example calculation:
- With a 12‑bit ADC and 0–5 V range: LSB ≈ 5 / 4096 ≈ 1.22 mV.
- For a 100 mV over‑voltage detection requirement, 12‑bit resolution is adequate.
- Example MCU discussed: ATmega328 (provides ADCs, timers, interrupts, serial modules, etc.).
Design flow and algorithm
Typical data flow:
- Sensor → ADC → store in memory → CPU processes via firmware → control MOSFET to disconnect when cell ≥ threshold (example threshold: 4.1 V).
Pseudocode (high level):
initialize_peripherals()
while true:
raw = read_adc(channel)
voltage = convert_raw_to_voltage(raw)
if voltage >= threshold:
drive_gpio(disconnect_switch)
else:
drive_gpio(connect_switch)
delay(loop_interval)
Firmware choices: assembly (rare), embedded C/C++ (common), MicroPython, or graphical block editors (Blockly-style) for onboarding and simple logic.
Using generative agents to speed development
- Practical tip: use generative AI (ChatGPT, Gemini, etc.) to parse large datasheets (PDFs) and extract specifics (e.g., ADC resolution) instead of manual page scanning.
- Always cross‑verify critical values against the original datasheet.
- Recommended workflow: use AI to produce skeleton code (“wipe coding” / agent‑assisted code generation), then refine and test thoroughly in the target environment.
“Wipe coding” / agent‑assisted code generation is useful for producing skeleton code quickly; treat generated code as a starting point and validate for safety‑critical applications.
Hands‑on tutorial — Tinkercad + Arduino demo
- Platform: Tinkercad Circuits (free). Use Arduino UNO model and either blockly (blocks), text, or combined editors.
- Demo: analog input using a potentiometer to simulate a sensor; built‑in LED indicates threshold crossing.
- Voltage divider scaling example:
- Goal: scale a 9 V source to 0–5 V ADC input.
- Instructor example: R1 ≈ 800 Ω and R2 = 1 kΩ to map 9 V to ≈5 V.
- Emphasized: use standard resistor values, account for tolerances, and always include margin (never drive ADC beyond its max).
- Simulation tips:
- Use the multimeter in Tinkercad.
- Check ADC input referenced to MCU ground.
- Avoid feeding voltages > ADC maximum on real hardware.
- Assignment: implement the over‑voltage protection example in Tinkercad and modify code so a threshold (e.g., 3 V in the demo) toggles the LED. Instructor will demo a solution in the next class.
Signal conditioning and measurement fidelity
- Single‑ended ADC inputs share a common reference; noise on one channel can affect others.
- For higher fidelity:
- Use differential measurement inputs.
- Use external signal conditioning (filters, buffering, isolation amplifiers).
- Always reference analog measurements to the MCU reference/ground and account for channel buffering differences (some channels may be unbuffered).
Current sensing overview (brief)
Reviewed common current‑sensor types and tradeoffs:
- Shunt resistor
- Pros: simple, direct (I → V via Ohm’s law).
- Cons: power dissipation (I^2R), resistor drift, floating node/isolation challenges.
- Hall‑effect sensors
- Measure magnetic flux; available as open‑loop or closed‑loop designs.
- Current transformers (CT)
- Suitable for AC only.
- Industrial sensors
- Fluxgate and magnetoresistive sensors; fluxgate used for high‑accuracy industrial measurements.
Safety and isolation:
- Consider ASIL/safety levels, galvanic isolation, and floating‑node issues when measuring high or floating currents.
- Use isolation or specialized sensors as required.
Next steps / roadmap mentioned
- Next session: design of a shunt‑resistor current sensor and practical core current protection.
- Later topics: thermal protection, constant‑current/constant‑voltage control, cell balancing, SOC estimation algorithms (software side).
- Encouragement: complete the Tinkercad over‑voltage protection circuit before the next class.
Tools, platforms and references mentioned
- Hardware / MCUs: ATmega328 (Arduino UNO), SPC series, Infineon, NXP.
- Vendors / datasheets: Mouser.
- Tools: Tinkercad (simulation + block/text coding), Arduino IDE‑style environments, MATLAB/Simulink (Embedded Coder and HIL potential), multimeter (for simulation checks).
- AI/generative agents: ChatGPT, Gemini.
- Languages: Embedded C/C++, MicroPython, graphical block editors (Blockly).
Practical tips / best practices
- Always consult and verify datasheets; use AI to speed extraction but cross‑check critical numbers.
- Keep ADC inputs within safe range; include margin for resistor tolerances.
- Use differential measurement or isolation for noisy/high‑fidelity applications.
- Use agent‑generated code as a skeleton; thoroughly test and fine‑tune for safety‑critical systems.
- Simulate first (Tinkercad), then test on real hardware; account for non‑idealities (component tolerances, power dissipation).
Main speaker / sources
- Instructor: VisionAstraa EV Academy (primary speaker and demonstrator).
- Participants: class questions and interactions.
- Referenced tools and sources: Atmel/ATmega328 (Arduino UNO), SPC/Infineon/NXP MCU datasheets, Mouser, Tinkercad, ChatGPT/Gemini, MATLAB/Simulink.
Category
Technology
Share this summary
Is the summary off?
If you think the summary is inaccurate, you can reprocess it with the latest model.
Preparing reprocess...