Check out the HOPE instructor's blog page about the microbug for a better understanding of what it does!
read it up before starting the lab!
CURRENTLY SOME IMAGES ARE BROKEN.
We’ll be beginning a new multi-week (4 weeks specifically) lab for doing the schematic and layout of a small programmable robot. Here’s a video of a robot very similar to the one we want to make (just ours will be based around a nice PCB).
Below is a basic block diagram of the robot; we expect your schematic to somewhat resemble this (but you don't need to draw wires between the blocks if using labels is neater).
We expect to see these main “blocks” in your schematics:
- A microcontroller block (micro and power filter passives).
- A motors and motor controller block (and power filtering passives).
- A sensing block (the reflectance sensors and its passives)
- An LED block (LEDs and their passives)
- A programming header block
- A power block
For the basic parts we’ll be using these:
|Microcontroller||ATtiny1616, the brains that will actually control the motors and read the sensors and make decisions|
|Reflectance Sensors||QRE1113GR, for seeing changes in brightness underneath it, like for following a line|
|3x LEDs||as indicators/blinky lights back to the user|
|Battery||CR2032, you’ll need to choose a battery holder and maybe need to make a custom footprint based on the datasheet|
|Motor Driver||TC78H651AFNG, to be able to supply high currents to the motors; why can’t we just directly drive the motors from the microntroller’s pins!|
|Motors||To move around; just use a generic motor symbol for now in schematics, for layout you’ll need to later make a footprint that we will give dimensions for.|
Supporting passives and other connectors will be up to you to find. If you aren't sure what some passives values might need to be, or what sizes seem reasonable, ask us! Not sure what filtering really means? Again, feel free to ask!
When you are finding the parts, don't forget to record them in a BOM!
The motors are these tiny DC motors from some seller on ebay. Note that we remove the square shell in assembly, hence the circular cutouts in the board.
The pads are the squares, and dimensions are in mm. Add additional appropriate footprint layers.
Complete the layout
You are provided with the board outline, which comes as a .dxf file. IMPORT THE BOARD OUTLINE BEFORE PLACEMENT OR ROUTING.
We highly, highly suggest searching up the datasheets for the parts we choose to understand what they are supposed to do, and faciliate part placement and orientation in relation to the board outline. Not all part placement rules are specificed below. Understanding how things should be oriented is part of the lab. For example, take a look at the battery cell holder on Digikey.
- Make sure it falls under BAC's standard capabilities just like in your last design (USB Charger lab).
- You are allowed and encouraged to use both sides of the board.
- Standard 2 layer board. You are not allowed to design with more than 2 layers.
- You MUST use the provided board outline and component footprints.
- Exception: you are allowed to change the footprints for the 2 LEDs not being used as the rear caster.
- Try to minimize the number of vias used. A suggested maximum is 20.
- One of the LEDs must go on in center of the back of the board, facing downwards. It acts as the caster for the robot.
- All pin headers should be facing up.
- The other two LEDs should be visible from the top of the PCB.
- The two light sensors must be facing downwards on the left and right sides of the caster LED in the back. They are meant to be used as sensors for line following.
- Motors must be mounted at the two cutouts on the top side of the board. You should try to align the center of the pads as nicely as you can with the rounded cutouts. The "c" formed by the silkscreen should be on the inside of the board. Take a look at the gif to get a general idea of how the motors are expected to be mounted. Note that the motors the board outline was made for are round.
- Add the IEEE logo (provided as a bitmap image) somewhere on the board with a reasonable size. Instructions below for how to create footprint from bitmap. As with all silkscreen elements, do not have it overlap pads, board edges, or other silkscreen.
- We also highly suggest adding additional silkscreen to label important connections). One connector is meant to be used with a jumper, can you figure out which one it is?
Checkoff: We're going to be checking for all of the above, in addition to a completed layout with no DRC errors, and BAC InstantDFM report.
Important (and late) note: There is one unconnected error that we expect to be in your completed board layout. Hint: look at the datasheet for the battery holder.
How to Import the Board Outline
Download the board outline from here. If you cleverly set your grid size you can get things to line up nicely using the properties panel.
- In the Pcbnew layout editor:
File -> Import -> Import Graphics. Then select the
microbug_body.dxf. Change the graphic layer to "Edge.Cuts" then click OK.
- Click to set down the imported board outline. It should look like so: (placement arbitary, only to show proper imported size)
How to flip parts to the other side of the board
The rear caster LED is required to be facing downwards along with the two light sensors, and we suggest having the battery holder on the bottom as well.
Note: Text SHOULD BE mirrored when on the back.
- Hover over the part you want to flip to the other side of the board, then press
Right-Click -> Flip).
- That's it. Notice how the colors of the footprint silkscreen changes from the color for the top to the color for the bottom.
How to insert images
Silkscreen art? Copper art? Just, boring logos?
- In the main KiCad project window, find the Bitmap to Component Converter (looks like a lowercase 'a' being measured).
- Click "Load Bitmap" and select the desired bitmap. For this lab, the "ieee-logo.bmp" should be in folder named "logos".
- Note that the imported image is huge (146.6mm by 146.5mm). You can resize by:
- Making the image smaller externally, like in Photoshop or something.
- Change the Resolution (in Bitmap info, right above the "Load Bitmap" button). Increase the values to have the resulting footprint appear smaller, and reduce to make it bigger. DPI stands for "dots per inch".
- Keep format in Pcbnew (you're going to make a footprint object essentially), and select "Front silk screen" in the "Board Layer for Outline" section.
- If want to do exposed copper art, you should use the "Front solder mask" option. Don't do this for this lab.
- Click the "Export" button and save the footprint (.kicad_mod) file into the "microbug-fplib.pretty" folder in the project directory.
- Import the footprint directly in Pcbnew, or add a placeholder, no-pin symbol in the schematic and assign as footprint.