How to create a three sensor array
by Gary Carlson
Table of Contents
Creating the board
1. Mill printed circuit boards
- Use shears to cut the PCB into smaller piece. A 180mm x 60mm is sufficient to make ten boards.
- Use double sided tape to fixture the piece onto a mounting block.
- Use a 1/32” end mill for both holes and traces.
- Use CAMBAM to produce G-code. The file TripleArray_x10.cb is already set up with the proper settings for CAMBAM. The file TripleArray_x10_gcode.nc is the G-code for a Mach 3 CNC mill.
CAMBAM setting (all in mm):
- Holes are drilled through. Traces are engraved below copperclad. Edges are engraved through.
- Stock -> Stock size: 180, 60, 0.79
- Spindle speed: 3000
- Tool diameter: 0.79
- Tool number: 0
- Drill Target depth: -0.81
- Drill Drilling method: Canned Cycle
- Drill Cut feedrate: 60
- Drill Plunge feedrate: 60
- Trace Engrave Target depth: 0 (zero the z axis to the appropriate height)
- Trace Engrave Cut feedrate: 120
- Trace Engrave Plunge feedrate: 120
- Edge Engrave Target depth: -0.810-0
- Edge Engrave Cut feedrate: 120
- Edge Engrave Plunge feedrate: 120
2. Prepare boards for soldering
- Sand down the traces to make sure the sensors lie flat.
- Drill out holes from the bottom using a #65 bit to make sure pins fit.
- Counter bore hole with larger drill bit (a #33 bit works) to make sure wires do not comes in contact with the bottom of the board.
3. Surface mount sensors
The contacts of the sensors must be placed in the appropriate location. If the membrane of the sensor is to the right, then the traces with the holes should be below the sensors.
- Method 1: Use plastic template to line up solder onto the sensors (can do multiple at a time)
- Place sensor with contacts face up.
- Line up contacts with holes, hold the template firmly in place with tweezers, apply liberal amount of solder.
- Use edge of tweezers to press the solder onto the contacts.
- Carefully remove the sensor from the template, making sure to keep the solder attached, and drop in the appropriate location.
- Method 2: Apply solder directly onto sensors or onto board.
- Make sure not to use too much solder to make a connection between two contacts.
- Carefully drop the sensor into the appropriate location.
- A lot of movement after placement may cause a bad connection.
N.B.: Use no clean flux dispensing pen to help solder stick, if needed
4. Surface mount capacitors
Use tweezers to place a small drop of solder on the traces shown in the picture. Make sure solder does not get into the grooves. Use tweezers to lightly place the capacitor onto the solder bridging the two sides. When the solder is heated up on the hot plate/in the oven, the capacitor will fall into place.
5. Melt solder
Use an oven/hot plate at just above the melting point of the solder or at a relatively low setting on the device to mount the sensors and capacitors
6. Use a wire to connect the left two holes on the bottom.
7. Repeat for the right two holes.
8. Attach pins and solder.
Adding the rubber
9. Create the mold
Create mold for rubber in order to attach rubber on top. You can obtain files for the mold from Leif or Yaro. An easier way to attach the rubber is to simply tape the sides of the board with masking tape to create your own mold. Just make sure the there are no holes on the sides or corner of the tape. You can use a mold release agent on the bottom on the board in case any rubber leaks, but it isn't necessary.
10. Mix and pour the rubber
Mix equal parts of A and B of Vytaflex. Stir for 3 minutes, making sure it is completely mixed. Pour evenly into mold on top of sensor. N.B.: Some may leak out; just . Degass until no more bubbles appear. After degassing, top off mold. Needs 16 – 24 hours to finish rubber.
**Ignore the 40 and the 6 on the rubber. They were just to mark the rubber as Shore A 40 and 6 mm height.
Reading the sensors
11. Create the breadboard
Still working on this section…
12. Using Cypress Bridge Control
- Connect the I2C to USB bridge to the computer via the USB cable provided.
- Place the sensor on the breadboard.
- Start up the Bridge Control program.
- Connect to the bridge by hitting the "Connect" button near the bottom. (Looks like <|>)
- Click the +5.0V for Power.
- Toggle power by hitting the button below the "Connect" button. The bottom of the screen should read "Connected" and "Powered".
- Open up "FreeScale_Triple_new.iic" or copy its contents into the editor.
- Make sure "Send all strings" is checked.
- Hit "Send".
- Everything is working correctly when all signs are positive "+".
- If everything is working properly, hit "Repeat".
- When you switch to the Chart tab, you will see a graph of the raw pressure and temperature data being plotted in realtime.
- When finished, disconnect the bridge and close the program.
13. Using MATLAB
- Make sure the Bridge Control program is closed.
- Open Windows Command Processor ("cmd") and "Run as administrator".
- Change directory into USB2IIC and run USB2IIC.exe with /regserver. (Picture attached)
- Open MATLAB.
- Open CollectionCode.m. There are four parts to this file.
- The first cell of this file is used to make a connection to the bridge. Evaluate the first cell by hitting ctrl+enter (or cmd+return for Mac users).
- If the last two "ans" variables in the command window equal 34, then a connection is made.
- Evaluate the second cell.
- A graph appears with a realtime plot of pressure versus time.
- Hit ctrl+c (cmd+c for Mac users) to stop reading the sensors at any time.
- Evaluate the third cell to save plots of calibrated and uncalibrated pressure, temperature, and the workspace variables. Change names as appropriate.
- Finally, evaluate the fourth cell to release the bridge. Since the bridge can only maintain one connection, if you do not do this, you will not be able to use Bridge Control.
1x End Mill Square End, 2 Flute, 1/32" Mill Dia, 1-1/2" L O'all, McMaster: 8848A35
1x Double-sided tape, McMaster: 75955A672
1x Printed circuit board - Flame-Retardant Garolite (G-10/FR4) Copper Clad on Both Sides, 1/32" Thick, McMaster: 8521K44
3x MEMS sensors (make sure they are A2 for I2C connection), Digikey: MPL115A2
3x 1.0 uF surface mount capacitors, Digikey: 445-4998-1-ND
22x .100” pin connectors, Digikey:SAM1031-50-ND
1x I2C to USB kit, Digikey: 428-1910-ND
1x Vytaflex Urethane Rubber, Reynolds Advanced Material
1x #65 drill bit
1x #33 drill bit
1x solder paste (digikey SMD291AX-ND)
1x hot plate/oven
1x soldering iron
5x wire wrapping wire (red, black, yellow, white, blue)
1x No-clean flux pen, McMaster: 7893A21
Necessary files can be found at the Google Doc folder: Three Sensor Array Files.
Use these files read pressure and temperature data from the sensors in MATLAB and in Cypress Bridge Control.
CollectionCode.m - MATLAB script to calibrate and read the sensors
FreeScale_Triple_new.iic - Cypress Bridge Control script for reading the sensors
Use these files to modify the PCB layout and to mill out the boards.
TripleArray_x10.cb - CamBam file for ten sensor boards
TripleArray_x10_gcode.nc - gcode file for a Mach3 CNC milling machine
TripleArray.dxf - CAD file for the array
CAMBAM - used to create gcode from CAD files.
Cypress Bridge Control - used to communicate with the sensors. The software comes with the I2C to USB bridge.