Three Sensor Array

How to create a three sensor array

by Gary Carlson

flickr:7632966500

Creating the board

1.     Mill printed circuit boards
  1. Use shears to cut the PCB into smaller piece. A 180mm x 60mm is sufficient to make ten boards.
  2. Use double sided tape to fixture the piece onto a mounting block.
  3. Use a 1/32” end mill for both holes and traces.
  4. 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.
flickr:7632345964

CAMBAM setting (all in mm):

  1. Holes are drilled through. Traces are engraved below copperclad. Edges are engraved through.
  2. Stock -> Stock size: 180, 60, 0.79
  3. Spindle speed: 3000
  4. Tool diameter: 0.79
  5. Tool number: 0
  6. Drill Target depth: -0.81
  7. Drill Drilling method: Canned Cycle
  8. Drill Cut feedrate: 60
  9. Drill Plunge feedrate: 60
  10. Trace Engrave Target depth: 0 (zero the z axis to the appropriate height)
  11. Trace Engrave Cut feedrate: 120
  12. Trace Engrave Plunge feedrate: 120
  13. Edge Engrave Target depth: -0.810-0
  14. Edge Engrave Cut feedrate: 120
  15. Edge Engrave Plunge feedrate: 120

2.     Prepare boards for soldering
  1. Sand down the traces to make sure the sensors lie flat.
  2. Drill out holes from the bottom using a #65 bit to make sure pins fit.
  3. 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.
flickr:7632345748

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.

flickr:7632295072
  1. Method 1: Use plastic template to line up solder onto the sensors (can do multiple at a time)
    1. Place sensor with contacts face up.
    2. Line up contacts with holes, hold the template firmly in place with tweezers, apply liberal amount of solder.
    3. Use edge of tweezers to press the solder onto the contacts.
    4. Carefully remove the sensor from the template, making sure to keep the solder attached, and drop in the appropriate location.
  2. Method 2: Apply solder directly onto sensors or onto board.
    1. Make sure not to use too much solder to make a connection between two contacts.
    2. Carefully drop the sensor into the appropriate location.
    3. 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.

flickr:7632298402

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

flickr:7632421942

6. Use a wire to connect the left two holes on the bottom.
flickr:7632438400

7. Repeat for the right two holes.

8. Attach pins and solder.
flickr:7632499660

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.

flickr:7632665498

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.

flickr:7632665758

**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…

flickr:7631349620
flickr:7631422412
flickr:7631350010 flickr:7632532390
12. Using Cypress Bridge Control
  1. Connect the I2C to USB bridge to the computer via the USB cable provided.
  2. Place the sensor on the breadboard.
  3. Start up the Bridge Control program.
  4. Connect to the bridge by hitting the "Connect" button near the bottom. (Looks like <|>)
  5. Click the +5.0V for Power.
  6. Toggle power by hitting the button below the "Connect" button. The bottom of the screen should read "Connected" and "Powered".
  7. Open up "FreeScale_Triple_new.iic" or copy its contents into the editor.
  8. Make sure "Send all strings" is checked.
  9. Hit "Send".
  10. Everything is working correctly when all signs are positive "+".
  11. If everything is working properly, hit "Repeat".
  12. When you switch to the Chart tab, you will see a graph of the raw pressure and temperature data being plotted in realtime.
  13. When finished, disconnect the bridge and close the program.
flickr:7632784138
flickr:7632784048

13. Using MATLAB
  1. Make sure the Bridge Control program is closed.
  2. Open Windows Command Processor ("cmd") and "Run as administrator".
  3. Change directory into USB2IIC and run USB2IIC.exe with /regserver. (Picture attached)
  4. Open MATLAB.
  5. Open CollectionCode.m. There are four parts to this file.
  6. 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).
  7. If the last two "ans" variables in the command window equal 34, then a connection is made.
  8. Evaluate the second cell.
  9. A graph appears with a realtime plot of pressure versus time.
  10. Hit ctrl+c (cmd+c for Mac users) to stop reading the sensors at any time.
  11. Evaluate the third cell to save plots of calibrated and uncalibrated pressure, temperature, and the workspace variables. Change names as appropriate.
  12. 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.
flickr:7632931882
flickr:7632931710
flickr:7632931154

Materials

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
2x tweezers
1x solder paste (digikey SMD291AX-ND)
1x solder
1x hot plate/oven
1x soldering iron
5x wire wrapping wire (red, black, yellow, white, blue)
1x microcontroller
1x No-clean flux pen, McMaster: 7893A21

Files

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

Programs

CAMBAM - used to create gcode from CAD files.
MATLAB
Cypress Bridge Control - used to communicate with the sensors. The software comes with the I2C to USB bridge.

wordpress com stats

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial 3.0 License