top of page

Senior Design 1 - Tips, Tricks, Troubleshooting


Get hype, I'm about to make the lives of you future students so much easier.

It won't give you everything you need, but hopefully I can speed up your troubleshooting and get you started earlier.  My goal here is to make it so that we can focus more on doing the project and less on wrestling the Q4 board.  


I recommend you install the following programs during the first week of class.

For Quanser interfacing - all the computer engineers in the group should do this.  

Matlab 2017b (Not a.  I know Kapadia says a, don't use a.  There are some additional setup steps you have to do if you use a.  Use b.  Don't use a newer version because the Quanser files we have don't work beyond 2017, trust me I tried.  )

*With the following add-ins:  

Simulink real-time

Visual Studio 20xx (andrew what is it)?  Needed to compile things in a way that can talk with simulink 

Adobe Muse  - part of the class is to build a website, you should use Adobe Muse for this.  Trust me. 

Perdonal Web Space - Go to this page and click the link for "Request Personal Web Space".  Fill out the form and submit it.  If they don't respond in 2 business days fill it out again.  If that still doesnt work then email saying "Hello, I'm in the electrical engineering Senior Design 1 course and we need to create a website for part of it.  Please give me access to my personal web space" and that should work.  Then follow this tutorial on using it - basically you add it as a network drive and paste in the files (that you exported from Adobe Muse) into it. 

Here's mine:

For 3D modelling

Fusion 360 - if no one in your group has 3D modelled before, use this.  It's 10x easier to use than solidworks, I exclusively use it for my 3D modelling needs.  

Solidworks - meh

OpenScad - in case you find a nice parameterized file that you need to edit.  Download this only if oyu need it 

Obviously you'll also want a GroupMe for your group, a shared google drive folder shared with everyone (and go ahead and make separate folders for Project 1/2/3/4, Pictures and Videos, and 3D printing design files).  Use Google Docs for the reports.  Use a separate Google Sheet to keep track of your expenses so you can reimburse everyone in the end.  Heck, this deserves a bullet

Hardware to buy at the beginning of the semester

Here's the fun part.  

I recommend buying this stuff early in the semester so you have it to play around with as soon as possible and so that you can buy things from China for super cheap and it will be there by the time you start working on the final projects.  

Disclaimer - I'm writing this tutorial in December 2019.  This year we used the Quanser Q4 boards with the Tohoku DC motor.  If you aren't using the Quanser boards any more then a lot of these things aren't applicable.  

Spare Fuses - [Digikey link] The Q4 board has a 1A fuse in it that you'll probably blow a few times throughout the semester.  It might be your fault, or it might just spontaneously decide to blow the fuses.  Either way, expect to blow 2-4 fuses throughout the semester.  Kapadia/the TA's set a limit of 3 fuses per group, after which we would be docked some points on our final grade.  Additionally, if you blew a fuse when a TA wasn't there you were just screwed until you could get one from them.  Much more convenient to buy your own, and if you add like 10 fuses to another order it won't even cost that much.  Part number 0679H1000-01

Ribbon Cables for Q4 Digital Input/Output (DIO) - The Q4 board has a line of pegs that are your digital inputs and outputs, but since they're the pegs you need a female wire to connect to them.  Wouldn't it be nice if you could connect with just a standard male jumper wire?  That's where the ribbon cables come in.  

  • 10 pin (5x2) for the weird block - search "10 pin ribbon cable".  Personally I buy on ebay direct from China, it takes a month to get here but the ribbon cables were like $1.50 each instead of much more on Amazon

  • 16 pin (8x2) for the Digital I/O - Get 2 of these if you think you'll use more than 8 DIO or just want a spare. 

Stepper Motors - [Lightweight] [Standard] If the project involves movement of any kind you'll probably want to consider a stepper motor.  They turn based on a PWM signal, with continuous motion (infinity degrees) and typically 200 steps per revolution.  Warning - the Quanser board / Simulink isn't really designed for stepper motors so you'll run into some difficulties.  That said, they're still worth using for their speed and (sometimes) accuracy.  Fair warning they're kinda heavy.  You don't need a fancy brand version, just get the StepperOnline one from Amazon.  The pancake style I linked is less powerful but far lighter weight than the normal one.  Nema 17 is the smallest common size. 

Stepper Motor Drivers - [Overkill] [Cheap and probably good enough] - You can't use a stepper motor without a driver.  The driver takes in a separate power input from the digital pins on the board and supplies the motor with enough current, and it converts the pwm input to the signals on the A/B wiring of the motor.  Personally I used the TB6600 driver because I like having DIP switches for the microstepping settings and the current, and I like the screw terminals.  That said, it's around $12 for a sketchy off-brand version of it and $20-$30 for a legit one.  Most people use either the red or purple ones (A4988 or DRV8825 or L298N) - any of those will work.  

Servo Motor - [Weak & Cheap SG90] [MG995] [MG996R] - Servo motors rotate 180 degrees (More like 165 on Quanser] and hold their position wherever you set them.  Great for small movements.  They're super lightweight so they're easy to move around, and they come with a few small arm attachments you can easily screw into other things.  WARNING THEY'RE EASY TO BURN UP.  If it tries to reach a certain angle but can't get there it will keep throwing the max current at it until it reaches the spot or it burns up.  Buy like 3 spares.  You can allow it to try to go further but I recommend only 30 seconds at a time max.  Personally I used the SG90 but I considered the bigger ones.  I don't think there's a significant difference between the MG995 and MG996R. 

Things to stay away from

  • DC Motors with Encoders you find on amazon - THEY'RE SUPER SLOW.  The Tohoku DC motor is crazy fast and works well with the Q4 board so you might think "oh let's get another!" Well everything on Amazon you find when you search for "DC motor with encoder" are in the 100-200rpm range, which is super slow.  Don't use anything below like 1000RPM

  • Linear Actuators - THEY'RE EXPENSIVE AND SUPER SLOW.  So Dr. Kapadia gave you a project with some linear motion required and you immediately thought of a 12V linear actuator - don't.  They're slow (pretty sure it's driven by a dc motor with a bunch of gears) and expensive.  Instead, look up Rack and Pinion designs or look up common 3D printer designs for a belt and pulley system with some 8mm linear rods.  

  • Gin.  It tastes bad.  Stick with Vodka or Tequila. 

  • Lead Screws driven by a stepper motor - it will be slow, use a belt-driven system instead.  (Unless it's only for like 3 inches of motion)

Stepper pancake.jpg
stepper big.png

Troubleshooting FAQ

I'll make this pretty later

Before you check anything else:
Matlab pin numbers start counting at 1, but the board is labelled starting at 0. Is your thing plugged into the correct pin?
Is the amplifier on?
Is the simulation running?
Is the lab power supply (if you're using it) turned on?
Q4 pins sometimes are broken or burnt out, try a different pin?

DC Motor General Issues - Note, this was written in 2019 when we used the Tohoku DC Motor

  • When we tell it to move a direction, it starts turning and never stops. --> Your plug to the amplifier is probable wired in reverse. Connect the current + to - and vice versa

  • Not turning but encoder works --> Is your amplifier turned on? Correct ports? Wiggle the rear ribbon cable on the Q4 board, if it gets loose nothing will move

  • Motor "singing" making noise after moving to position - try changing your PID tuning, or just live with it.

  • Encoder not working - Possibly a dead Q4 port, or the wrong port.  

Stepper motor general issues
Inconsistent movement - this is just a part of life with moving the stepper motor with the Quanser board and simulink. We recommend homing the motor as often as possible so that it doesn't have as long to drift.
Making awful noises or not moving at all - try a different PWM frequency, probably slower.
Too slow - Try changing the <resolution?> of the simulink file itself, so that the board can output a faster PWM
Not enough torque - try a higher voltage so that it can get more power out of the same current. Can also try a different driver that can provide more current.  I used the 

Servo motor general issues
Beforehand: The small, cheap SG90 servo motors are very easy to burn out. This typically happens when you try to grip something for an extended period of time, like 2 minutes straight. The motor will continue to use power when it can't reach a certain position, so if you tell it to close to 5 degrees but it can only close to 25 degrees it will pull current and heat up indefinitely and after a few minutes will overheat. To avoid this make sure it's only closed for a few seconds at a time, and not trying to close too much beyond where it needs to be.
Spins freely without resistance - You killed it. Get a new one.
Not moving the full 180 degrees with the Q4 board - I didn't find a fix for this. Design your project to work with just 160 degrees of movement

bottom of page