Mechatronic Systems Lab
EML4804L — Mechatronic Systems Lab
← Course Modules
Course Description
Mechatronic Systems Lab is an introduction to mechatronics by laboratory experience for interfacing mechanical and electrical systems, providing instruction and practical exercises in C programming, microcontroller programming, interfacing with sensors and actuators, data acquisition, communication, and closed-loop control.
Within the SCNS taxonomy, EML is the Mechanical Engineering prefix and the L suffix marks a laboratory-only course. The University of West Florida publishes this at 1 semester hour, corequisite EML4804, giving approximately 45 contact hours.
The catalog's list is unusually specific, and it amounts to a complete embedded systems skill set: C, microcontrollers, sensors, actuators, data acquisition, communication, and closed-loop control. That is genuinely employable material — and it is learned only by making hardware do things, which is precisely why it is a separate laboratory course rather than a demonstration inside the lecture.
Learning Outcomes
Required Outcomes
- Set up and use an embedded development environment and toolchain.
- Write, compile, debug, and deploy C programs to a microcontroller.
- Use general-purpose input and output to read switches and drive indicators.
- Configure and use timers for timing, counting, and waveform generation.
- Configure and use interrupts and describe interrupt service routine constraints.
- Generate pulse-width modulation and use it for actuator control.
- Configure and use analogue-to-digital conversion and interpret the result.
- Interface analogue sensors, including conditioning and scaling.
- Interface digital sensors using SPI and I2C.
- Interface with a host computer using UART or USB serial.
- Acquire, log, and plot data from a running system.
- Drive DC motors using an H-bridge and control speed and direction.
- Drive stepper motors and describe step modes.
- Drive servo motors using position commands.
- Read encoders and determine position and velocity.
- Implement a closed-loop position or speed controller in embedded C.
- Implement and tune a digital PID controller on hardware.
- Handle actuator saturation, integral windup, and noise in a real loop.
- Debug hardware and software faults systematically using instruments.
- Use a multimeter, oscilloscope, or logic analyser to diagnose a system.
- Apply electrical and mechanical safety practice in a laboratory build.
- Document a build with schematics, code, and test evidence.
- Work effectively in a laboratory team.
Optional Outcomes
- Implement communication between multiple microcontrollers.
- Use a real-time operating system or scheduler.
- Implement state machine control.
- Interface a camera or vision sensor.
- Design and fabricate a printed circuit board.
- Complete an independent integrated project.
Major Topics
Required Topics
- Embedded toolchain setup
- C programming for microcontrollers
- GPIO
- Timers
- Interrupts
- Pulse-width modulation
- Analogue-to-digital conversion
- Analogue sensor interfacing
- Digital sensors: SPI and I2C
- Host communication
- Data acquisition and logging
- DC motor drive
- Stepper motor drive
- Servo control
- Encoders and feedback
- Embedded closed-loop control
- Digital PID implementation and tuning
- Saturation, windup, and noise
- Systematic debugging
- Instrument use
- Laboratory safety
- Documentation
- Teamwork
Optional Topics
- Multi-controller communication
- Real-time operating systems
- State machine control
- Vision sensing
- PCB design and fabrication
- Independent integrated project
Resources & Tools
- Introduction to Mechatronics and Measurement Systems (Alciatore & Histand) — carried forward from the lecture.
- Embedded Systems (Valvano) or Making Embedded Systems (Elecia White) — the second is unusually good on practical embedded engineering judgement.
- The Art of Electronics (Horowitz & Hill) — the electronics reference worth owning.
- Your own development board — Arduino, STM32 Nucleo, or Raspberry Pi Pico. Buy one. Unlimited experimentation outside laboratory hours is what separates students who become competent from those who complete the exercises.
- A multimeter — the minimum, and inexpensive.
- An inexpensive USB logic analyser — transformative for SPI and I2C debugging, and it costs very little. Seeing the bus is the difference between diagnosing and guessing.
- A breadboard, jumper set, and an assortment of passives — the basic kit.
- Manufacturer datasheets and application notes — free, and the operative documents. Learning to read a datasheet is a core outcome of this course, not a preliminary.
- KiCad — free schematic capture and PCB design.
- Git — free; embedded code changes constantly and a working version you can return to is invaluable.
Career Pathways
- Embedded systems engineer — consistently in demand and well paid.
- Mechatronics and controls engineer — SOC 17-2141.
- Robotics engineer.
- Automation engineer — Florida's manufacturing base and Siemens Energy in Orlando.
- Test and instrumentation engineer — data acquisition is the core skill.
- Product development engineer — most products contain a microcontroller.
- Medical device engineer.
- Theme park and attraction engineering — Orlando's ride control and show systems are exactly this work, and it is a distinctive regional employer.
- Aerospace avionics and actuation — the Space Coast and Melbourne.
- Hardware startup and prototyping roles — this skill set is what small teams need.
- Graduate study in robotics or embedded systems.
Special Information
⚠ Read the datasheet — that is the actual skill
- Every component's behaviour is defined in its datasheet, and the ability to find the answer there is what distinguishes an engineer from someone copying example code.
- Check the electrical characteristics table first — supply voltage, logic levels, current limits, and absolute maximum ratings. Exceeding an absolute maximum destroys the part immediately and permanently.
- Logic level mismatch is a classic destroyer. A 5 V output into a 3.3 V input damages the input, and level shifting exists for that reason.
- Current limits matter. A microcontroller pin can source only a few tens of milliamps; driving a motor or a relay directly from one destroys it, which is why transistors and drivers exist.
- Timing diagrams define protocols. SPI mode, I2C addressing, and setup and hold times are in the datasheet, and a bus that does not work is nearly always a configuration mismatch.
- Application notes are underused. Manufacturers publish worked reference designs, and following one is good engineering rather than cheating.
- Errata exist. Silicon has bugs, they are documented, and a peripheral behaving impossibly is worth checking against the errata sheet.
⚠ Debugging hardware and software together — a systematic method
- The fault could be in the mechanics, the wiring, the electronics, the configuration, or the code, and guessing across five domains wastes hours. Halve the system and test.
- Verify from the bottom up. Is there power? Is the pin toggling? Is the signal reaching the device? Is the device responding? Is the value being interpreted correctly?
- Use instruments rather than reasoning. A multimeter answers "is there voltage"; a logic analyser answers "is the bus doing what I think"; an oscilloscope answers "what is this signal actually doing." You cannot debug what you cannot see.
- Toggle a pin to time code. Setting a pin high at the start of a routine and low at the end shows execution time on a scope, and it is the standard embedded profiling trick.
- Print sparingly. Serial output changes timing and can mask or create the fault you are chasing.
- Change one thing at a time, and keep a working version in git before you change anything.
- Suspect the wiring. Loose breadboard connections, a floating ground, and a swapped pair account for an enormous proportion of laboratory faults.
- Check the ground. Two subsystems without a common ground reference produce inexplicable behaviour, and it is one of the most common student errors.
⚠⚠ Laboratory safety: software errors become physical motion
- A bug in your code becomes a motor spinning, which is a different hazard class from a purely computational error.
- Provide a hardware emergency stop that cuts actuator power independently of the code. A stop that requires the software to be running is not a stop.
- Secure everything before powering up. Clamp the mechanism, keep hands and cables clear, and expect unexpected motion on first power.
- Power actuators separately from logic, and connect actuator power last.
- Capacitors hold charge after power is removed, and motor drives in particular retain dangerous energy briefly.
- Lithium batteries are a fire risk when shorted, over-discharged, or physically damaged. Charge them where a fire would be contained and never leave them unattended.
- Wear eye protection when a mechanism can throw something, and tie back loose clothing and hair around rotating parts.
- Do not defeat interlocks to make a demonstration work. This is the recurring failure mode this repository documents across every hands-on discipline.
- Report damage and near misses.
⚠ Institutional context — check the number against the description
- This guide is written from the University of West Florida catalog, which publishes a complete and explicit set of EML entries. Other Florida institutions teaching this subject may number it differently.
- The EML prefix is not consistent across Florida. This repository documents a genuine subject collision in the thermal-fluids sequence — EML3015 and EML3016 denote different subjects at UWF and at the FAMU-FSU College of Engineering.
- Much of the mechanical engineering core is also taught under the general engineering prefix EGN, and under SCNS those are different courses. Equivalency does not cross prefixes or a C or L suffix.
- Identify a course by its catalog description, never by its number or title, and give a receiving department the description rather than the number.
How Florida course levels affect transfer
The first digit of an SCNS number denotes the year of offering, not transferability. Courses at the 1000 and 2000 levels transfer transparently between Florida public institutions, and 3000 to 4000 is unproblematic since both are upper division. The boundary that actually matters is 2000 to 3000, where lower-division credit generally cannot satisfy an upper-division requirement.
EML4804L is 1 semester hour and approximately 45 contact hours, taken with the corequisite lecture EML4804 — distinct SCNS numbers, both required. Assessment is by working hardware, demonstrations, and documentation rather than examinations.
Buy your own board and build things outside the timetabled hours. Forty-five scheduled hours is a floor; the students who leave this course genuinely employable in embedded work are the ones who kept building afterwards.