You are on page 1of 4

ECE Onboarding Document

Fall 2023
Page 1

Contact: Electrical Lead - Nicholas Chin


Welcome to the ECE Team!
If you’re new here and missed our presentations, or just need a refresher about what our
subteam does, here’s a one sentence summary of our role: The ECE Team is responsible for
the electrical power and control signals that make the rover move. If you think of Mechanical as
being responsible for the body of the rover, and Software for the brain of the rover, then ECE is
in charge of the circulatory system and nerves of the rover.

There are two main areas of focus for our team, power distribution and controls. Power
distribution, as you may have guessed, deals with ensuring electrical power gets to where it
needs to go. This covers things such as the wiring harness, batteries, and circuit protection so
that the rover doesn’t burn itself up. There won’t be any code involved with this; much of the
work involves circuit diagrams and the physical layout of all the wires. You might also consider
designing some PCBs if that is a feasible way to implement some of this. Controls deals with
sending out electrical signals that control the flow of power between power sources and the
motors. This involves writing embedded software that will receive a motion command and
determine what signals the STM32 needs to send out to control the motor drivers, which then
send out power to a motor. It also may involve designing PCBs that the STM32 will plug into,
which electrically connects the STM’s pins to components such as a motor driver chip on the
same board, or a connector that will be used to connect wires to another board. In Controls,
you’ll likely spend a good amount of time looking at datasheets to figure out the functions of
each pin, the control signal that those pins use, and details about an STM32 peripheral.

FAQs
Do I have to choose between PCB Designs/Electrical/Embedded?
Nope! You are free to work in any of these areas and move between them. Often, the different
areas are tightly coupled with each other, such as designing a PCB such that a pins dedicated
to a certain peripheral used in the embedded code is available or routed to the correct place.

What’s the difference between embedded and software?


In SPEAR, software is in charge of the high level behavior of the rover, such as “move the
wheels at this speed” or “move this joint on the arm to 60°”, without regard to how that’s
physically implemented. Regardless of whether the actuator is a DC motor, a stepper motor, or
a servo, Software only needs to worry about the “what” and “why” of an action while ignoring the
“how”. Embedded, on the other hand, is in charge of implementing the behavior that the
software side sends out, and needs to know the specifics of the actuator and the control signals
that need to be sent out to make the actuator perform the requested action. Embedded only
needs to worry about the “what” and “how” of an action, without worrying about “why” we need
to perform that. This adds modularity to the overall code that runs on the rover, allowing
actuator types to be changed on the rover without Software needing to change their code, and
allowing Embedded to focus on the specifics of one joint without getting caught up in things like
ECE Onboarding Document
Fall 2023
Page 2

motion planning, navigation, or reading the input from the controller. Many of the control signals
are also time sensitive, and having the main Software processor sending out those signals
could lead to imprecise behavior.

Do I need any experience to contribute?


Not at all! We only ask that you are willing to learn, ask questions about things you don’t know,
and try to regularly show up for meetings (and communicate with us when you can’t). A lot of
what we do on the ECE team isn’t covered much by our studies until late into your degree, if at
all (especially things like PCB design), so SPEAR is a great way to get a head start on topics
you’ll learn later, or gain experience that many other students won’t have. That said, having
some experience programming would be useful (for embedded), and furthermore experience
with C/C++. If you can look at our existing code and understand the general syntax and flow
(things like if, for, while, etc statements and functions), even if you aren’t sure what some of the
functions actually do, such as the functions from ChibiOS, then you should be fine.

General
All of our PCB designs and embedded software are stored and managed on our GitHub:
https://github.com/UofA-SPEAR

If you haven’t already, sign up for GitHub and send your username to an ECE lead so that they
can add you to the UofA-SPEAR organization, allowing you to submit code and designs to the
repos.

The next few sections contain area specific onboarding information. Feel free to skip any that
you aren’t interested in working in. Once you are done, take a look at our task list to get an idea
and look for things you’d be interested in working on.
Task list: (also in the 2023/2024 folder in the SPEAR Google Drive), see sheet for “Electrical”
https://docs.google.com/spreadsheets/d/1eFihw2qlDePnSGHcJec1_Wpy1sTWWtINyW9r2Mp-
aQk/edit#gid=826201614

A lot of work on the rover itself will be done in the Elko Engineering Garage on the 2nd floor of
ETLC, and you must go through their orientation to be able to work in the space. Please
complete it if you haven’t already:
https://confluence.garage.ualberta.ca/display/GS#orientation

Once you have completed orientation you will be able to register for equipment training (the
orientation should have gone through how to do that. Here are some relevant equipment
trainings for the stuff we do:
● Soldering iron
○ Used for assembling boards and the wiring harness
○ Probably the most useful out of any of these, if nothing else do this training
ECE Onboarding Document
Fall 2023
Page 3

● Electrical test equipment


○ Power supply, waveform generator, and oscilloscope
○ Can be useful for testing PCBs and debugging the control signals being sent out
● PCB Mill
○ Generally we order our PCBs from a professional manufacturer (currently
JLCPCB), which have far more advanced capabilities than the mill is capable of
and produces higher quality PCBs. They are also much easier to solder to.
○ This is useful though for making simple boards last minute where the lead time
for a professional PCB is too long, but ideally all of our boards are done far
before this may be relevant.
○ Not super important to do

You don’t have to get the equipment training right away but you should get them (especially for
the soldering irons) if you want to work on assembling boards and the electrical system when
we get around to it.

Power Distribution
Take a look at last year’s block diagrams of the power distribution system to get familiar with
how things are currently implemented.
https://app.diagrams.net/#G1NbH425MH2BqrfGMkZvZZb_TYSr4aq9X7

PCB Designs
Currently, we use KiCad to design our boards. It’s free and open source, and is available
natively for Windows, MacOS, and Linux. We used Autodesk Eagle in the past, but have since
switched to KiCad and imported our old designs. Go to the “Download” page from KiCad’s
homepage to access installers for various platforms.

For consistency between platforms, please install releases from the 7.0 series, which is
currently the latest major version. If you are using Windows or MacOS, you shouldn’t have to
worry about this, as the installers for those platforms use the latest version. If you are using a
Linux based distribution such as Ubuntu, the KiCad package in their official repositories may be
out of date. See the following link for instructions for specific Linux distributions to ensure you
have the latest version: https://www.kicad.org/download/linux/

Once you have KiCad installed, go through a tutorial for KiCad to get familiar with the interface
and workflow (if you aren’t familiar already). Here are a few that seem pretty decent:
● Official KiCad 7 tutorial,
○ This is a pretty thorough guide that goes through a lot of the main aspects of
using the software, though it probably goes into far more detail than you actually
need to get started.
ECE Onboarding Document
Fall 2023
Page 4

○ https://docs.kicad.org/7.0/en/getting_started_in_kicad/
getting_started_in_kicad.html
● KiCAD 7 PCB Layout in 5 steps
○ A relatively short walkthrough for designing a basic PCB that plugs into a USB
port and blinks an LED.
○ https://www.youtube.com/watch?v=3FGNw28xBr0
● KiCad Tutorial from DigiKey
○ This was made for KiCad 4 so not everything will be the same as KiCad 7, but is
still a great beginner focussed tutorial as it gives some more explanation into the
KiCad workflow.
○ https://www.youtube.com/playlist?
list=PL3bNyZYHcRSUhUXUt51W6nKvxx2ORvUQB

Embedded
For ease of development, embedded code is generally done in a Linux environment, though
there’s nothing inherent about our code or build environment that requires Linux. For most
people the easiest thing to do would be to install Ubuntu in a virtual machine. If you manage to
get compilation working natively in your normal OS, feel free to write up a guide with the details!

(This is a work in progress, please see Software’s instructions for installing Ubuntu: OnBoarding
Documentation Under the “Getting Started” heading)

Once you have Ubuntu 22.04 installed head over to the following guide to set up Ubuntu with
the embedded developer environment: Ubuntu 22.04 Setup

You might also like