Other blogs in this project

Forget Me Not Design Challenge Week 01: The Introduction

Forget Me Not Design Challenge Week 02: The EnOcean Sensor Kit, EnOcean Pi, and Raspberry Pi Model B+ Unboxing

Forget Me Not Design Challenge Posting 03: The EnOcean Sensor Kit, EnOcean Pi, and Raspberry Pi Model B+ Setup, Configuration, and FHEM Operation

Forget Me Not Design Challenge Week 04: Tektronix TBS1052B-EDU Oscilloscope

Forget Me Not Design Challenge Post 05: EnOcean EOP-350 Universal Programmer Board

Forget Me Not Challenge Design Challenge Post 07: Door Lock Monitor

Forget Me Not Challenge Design Challenge Post 08: Soldering Iron Monitor

Forget Me Not Challenge Design Challenge Post 09: Soil Moisture Monitor

Forget Me Not Challenge Design Challenge Post 10: Cat Feed Monitor

Forget Me Not Challenge Design Challenge Post 11: Project Summary

 

Overview

My proposed sensor system is shown in Figure 1. The system consists of a door lock monitor, soldering iron monitors, cat feed monitor, and a plant moisture monitor. The door lock monitor is based on the STM320U Magnet Contact transmitter module, and the soldering iron, cat feed, and plant moisture monitors are based on the STM332U temperature sensor module.

 

sensor_system2.png

Figure 1

 

These sensors communicate on the 902 MHz band with a Raspberry Pi Model B+ with an EnOcean Pi TCM310U Gateway Controller Module. The Raspberry Pi communicates with my Windows XP PC and smartphone by wireless Ethernet. I can monitor the sensors using the Friendly Home automation and Energy Management (FHEM) server or the OpenHAB smart home automation server or both. Both software packages are open source and provide a lot of functionality and compatibility with numerous hardware sensors without the need to connect with cloud services.

 

Preliminary Schematic

I received a copy of Cadsoft Eagle PCB Design Software V7, which includes a schematic editor, layout editor, and autorouter. The Eagle PCB design software is new to me and I was eager to give it a try, so I used the schematic editor to capture a schematic of the over all design that is shown in Figure 1.

 

Everything in V7 is new to me and you can find a description of what’s new in V7 at the Cadsoft website [1]. To get started, I worked through the tutorial that is provided with the installation and watched the tutorials mostly by Jeremy Blum, which are available on the Cadsoft website or on YouTube [2] [3] [4] [5] [6] [7]. The V7 tutorial is very good and I used the manual for reference to help with understanding some of a command function that was not covered completely in the tutorial. The Jeremy Blum tutorials are very good and his CAM files were very helpful, so it was worth the time to watch them.

 

I’ve used quite a few PCB design tools over the years. The user interface philosophy is a little different with the Eagle tools. With Eagle, you select the operation you want to perform first (move, copy, delete, etc.), and then select the component. In all the other tools I’ve used, you select the part first, and then select the operation to perform (move, copy, delete, etc.). It’s taken me quite a while to not default to the select part first mode, but now I think I’m finally getting the hang of it. The other operation that trips me up is the ctrl-right mouse click to move groups of components or objects. I’m having to redo this operation much less often now. Anyway, the Eagle PCB tools compare favorably in capability to the other tools I’ve used and offer quite a bit of value, as the cost of the tool is much less that many of the competing tools. The libraries are pretty extensive too. Once a board is laid out, it can be exported as a 3D model that can be imported in to 3D tools like Sketchup. It’s a really useful tool to make sure your board fits into a larger assembly in all the right places.

 

The schematic editor and layout editor are tightly coupled so that changes in the schematic are reflected in the layout, and changes in the layout are reflected in the schematic. The schematic page in Figure 2 shows a hierarchical schematic. The new Module command allows me to make hierarchical schematics. Using the Module command, I can design a function once and then repeat the function multiple times just by adding multiple instances of the module. Updates and changes to a module schematic will correct all instances of the module. This saves time updating common circuits used multiple times on a schematic. My soldering iron, for example, has two irons so I created one soldering iron monitor module and placed two instances of it on the main schematic page (see Figure 2).

 

The three other monitor modules are also placed on the main page along with the module for the Raspberry Pi and EnOcean Pi. Since all the connections between the monitor modules and the RPi are wireless, I chose not to include these wireless connections as ports on the module. The Port command can be used to add signals to the Modules when they are needed.

 

fmndc_system_schematic_01a.png

Figure 2

 

Door Lock Monitor

Figure 3 shows the schematic for the door lock monitor schematic page. Presently, this preliminary schematic contains only a STM320U Magnet Contact transmitter module and a magnet. As my design matures, new components can be added and new schematic pages can be added as needed.

 

fmndc_systems_schematics_02.png

Figure 3

 

Soldering Iron Monitor

Figure 4 shows the soldering iron monitor schematic page. This schematic page contains a STM332U temperature sensor module, a Samtec connector that mates with the connector on the STM332U sensor, a resistor, thermistor, and the mounting hardware to mount the thermistor to the soldering station stand (screws, nut, washers, and standoff). The resistor and thermistor leads are to be soldered to the connector so that the STM332U can be easily removed and not hacked up.

 

The resistor and thermistor form a resistor divider that is connected between SWPWR (switched power) and ground. The center tap of the resistor divider is connected to ADIO0. This analog input will be used to transmit the resistor divider voltage to the RPi so that the temperature of the soldering iron can be determined. If the temperature is above a certain value then an alert message can be issued by either the FHEM server or OpenHAB server.

 

fmndc_system_schematic_03b.png

Figure 4

 

According to EnOcean technical support, the Samtec mating connector part number for the connector on the STM332U is FLE-110-01-G-DV. This is a surface mount connector. On the Samtec website, I found a through hole equivalent mating connector (SFMC-110-01-L-D) so that I can hand solder the resistor and thermistor to it. I also found the equivalent connector on the STM332U so that I could add the same connector to a STM320U, if needed. This connector number is FTSH-110-01-L-DV.

 

Cat Feed Monitor

Figure 5 shows the cat feed monitor schematic page. This page contains a STM332U, connector, Force Sensing Resistor (FSR), capacitive touch sensor, bowl, and the hardware for the base, platform, screws, and feet. The connector is the SFMC-110-01-L-D (same as above), and the capacitive touch sensor board comes from Adafruit. It connects to SWPWR and ground for power and provides an indication that the cat touched the metal bowl. The outputs from the capacitive touch sensor connect to the digital inputs of the STM332U. The FSR and resistor form a resistor divider between SWPWR and ground. The center tap of the divider is connected to ADIO0 and provides an analog voltage proportional to the force on one of the platform's feet. As the cat food is consumed the force should be reduced, resulting in a change in divider voltage that indicates that the cat has fed.

 

fmndc_systems_schematics_04.png

Figure 5

 

Plant Moisture Monitor

Figure 6 shows the plant moisture monitor schematic page. This schematic page contains a STM332U, a HSM 100 moisture sensor, resistor, moisture probe, housing, and a tube. The moisture probe will be made from two galvanized nails and will form a resistor divider with the fixed resistor R1. This divider is connected between SWPWR and ground. The center tap of the divider is connected to ADIO0. The voltage from this divider will provide a secondary means of determining the soil moisture content. The HSM 100 moisture sensor reports the measured humidity as an analog voltage on ADIO3.

 

fmndc_systems_schematics_05.png

Figure 6

 

Raspberry Pi and EnOcean Pi

Figure 7 shows brains and transceiver of the sensor network. This schematic contains a RPi and EnOcean Pi.

 

fmndc_systems_schematics_06.png

Figure 7

 

Bill of Materials

Figure 8 shows the Bill of Materials for this design from all schematic pages and modules. Each component is associated with a Module name and a schematic name. The value of the component is shown along with the device, package, and associated library.

 

sensor_system_bom_101314b.png

Figure 8

 

Figure 9 shows the BOM by the Value of the device. This BOM is a handy way to determine the total number of each component required. I still need to order components for the tube or the moisture monitor, cat base, cat platform, feet, and make the touch sensor out of copper foil once the cat platform is constructed. The STM332U, STM 320U, and SFMC connectors have not arrived yet.

 

sensor_system_value.png

Figure 9

 

I tried using Designlink to create a BOM that I could order from Newark.com, but it would not generate a list of components from the schematic. I suspect an incompatibility with the hierarchical schematic. Eagle technical support indicated that this and many other User Language Programs (ULPs) must be updated to handle a hierarchical schematic. I created a copy of the schematic and manually flattened it. I tried to use Designlink again but it was offline. So, I created my BOM manually on the Newark.com website. Figure 10 shows my Newark.com order for most of the items in the BOM.

 

sensor_system_order1.png

Figure 10

 

Component Library

Most of the components on these schematic pages were built by hand because they were not in any of the libraries that came with Eagle and I did not find any Eagle libraries for the EnOcean components either. Eagle requires you to build a symbol and a package, and link them two together to make a device that can be placed into a schematic and onto a PCB. Most of my packages don’t contain any pads since I was not planning laying out a board with this schematic. I was just trying to build a system level parts list and BOM only.

 

I started by creating a project library using the Eagle Control panel (see Figure 11). I selected the user directory, and then selected File -> New -> Library and typed in jays_parts.lbr.

 

library_ctrl_panel.png

Figure 11

 

Once the library was created, I opened it by double clicking on the filename. I made a component for a screw, for example, by clicking on the Symbol button and gave the new symbol the name SCREW_SYM. I used the Wire command to draw a rectangle around the center of the symbol identified by the + sign (see Figure 12). The wire line should be drawn on layer 94. Next, I used the Text command to add the name variable >NAME and placed it on layer 95. The value variable >VALUE was then added at the bottom of the symbol on layer 96. I would forget to change to the proper layer frequently and this can be fixed any time by clicking the symbol button, selecting the name of the symbol to be fixed, and the using the Change -> Layers command to put the variables on the correct layers (most common error for me).

 

library_device_editor1.png

Figure 12

 

Next, I clicked on the Package button, and entered the package name as SCREW_PAK. I adopted the _SYM and _PAK filename postscripts to easily identify symbol and package files when building the device later on. Figure 13 shows the package editor. If a via or pad is needed for the package, then the Via button is clicked, the Via selected along with the required size. The manufacturer's datasheet should have a recommended via diameter and drill size. If not, then IPC-2221 [8] or MIL-PRF-55110 [9] can be consulted for the recommended via pad diameter and drill size for the diameter of the lead of the package. If pads are required, then pin 1 is usually placed as a square pad that is placed starting at the origin, and the remaining pads are placed as round pads with the appropriate spacing. Starting at the origin makes it easy to place the pads on the correct centers. Once all the pads are placed, then they can all be moved as group so that the origin is in the center of the pad field. This seems to be the common configuration for packages in the Eagle connector library. In this case, I just did not include any vias and saved the file.

 

library_device_editor2.png

Figure 13

 

Next I clicked on the Device button and created a new device called SCREW_METAL. I added the SCREW_SYM by clicking the Add button and selected the symbol from my library (jays_parts.lbr). The Package was added by clicking on the New package button on the right side of the window and selecting SCREW_PAK. Since my package does not contain any vias or pad, there is no need to associate the pads with the pin symbol names (which don’t exist in this case either) using the Connect button. I found that adding a description to the devices was very helpful, as it shows up in the description column of the library when adding components and helps with searching for components. See Figure 14.

 

library_device_editor3.png

Figure 14

 

Figure 15 shows all the components (Devices) I created to make the schematic.

 

library_listing.png

Figure 15

 

Eagle Installation

I recommend Eagling Up. With this software “add-on”, I can export a 3D model of my layout that I can use in Sketchup. The list of software packages that need to be installed are listed below.


 

I installed Cadsoft Eagle V7.1.0 in its default location at C:\EAGLE-7.1.0. Sketchup 8 was already installed at C:\Program Files\Google\Google SketchUp 8. I installed ImageMagick in the following location at C:\Program Files\ImageMagick-6.8.9-Q16 and then unzipped eagleUp and placed the following files in the directories shown below [10] [11] [12] [13].

 

  • eagleUp_export.ulp goes to C:\EAGLE-7.1.0\ulp
  • eagleUp_import.rb goes to C:\Program Files\Google\Google SketchUp 8\Plugins
  • The content of /models can be placed anywhere. I recommend copying this directory near your Eagle libraries, for example in C:\EAGLE-7.1.0\models
  • The Eagle demo files can be placed anywhere so I put them at C:\EAGLE-7.1.0\projects\examples\eagleup_demo files.

 

Figure 16 shows my Eagle V7 tutorial schematic, and I used this schematic and layout to demonstrate the eagleUp plugin.

 

eagle_tutorial1_schmatic.png

Figure 16

 

Figure 17 shows the resulting layout generated from the schematic and tutorial directions. I chose to lay out the board a little differently that what is shown in the tutorial.

 

eagle_tutorial1_layout.png

Figure 17

 

To eagleUp the layout, I ran File -> Run ULP and select eagleUp_export.ulp (see Figure 18).

 

eagleup_ulp.png

Figure 18

 

I selected the default settings on in the EagleUp Parameters panel that pops up and made sure that all the paths were set correctly in the general settings panel.

 

eagleup_settings.png

Figure 19

 

The eagleup ulp generates the file \eagleUp\tutorial1.eup when complete.

 

Next, I ran Sketchup and deleted the default figure, set the length units to millimeters by going to Window -> Model Info -> Units and selecting Millimeters from the pull-down menu. I imported the eagleUp file generated from the eagleup exporter using Plugins -> Import eagleUp V4.4 using the file C:\EAGLE-7.1.0\projects\examples\tutorial\myproject\eagleUp/tutorial1.eup. A lot of windows pop up one after another from the ImageMagick converter. A dialog box then pops up and indicates that all my packages are quite large and asks: Do you want to resize it?. I indicate Yes to all packages. Sketchup builds of each component one at a time and places it on the PCB. The result can be seen in Figure 20.

 

tutorial1_sketchup_model.png

Figure 20

 

This is the coolest thing ever! I did have trouble with missing components (Sketchup models). I found most of them at the 3D warehouse [14], and placed them in the model directory in their own directory. I had to change the name of the models to match the package name used by in the Eagle library. The electrolytic capacitors used the TAP5-45 package, and this turns out to be a Panasonic 470 uF electrolytic capacitor measuring 5mm x11mm. tknelms posted a 5mm x 11mm electrolytic capacitor on the 3D Warehouse and called it “Electrolytic Capacitor 5x11.skp”. After downloading this model to C:\EAGLE-7.1.0\models\eagle_tutorial_parts, I renamed it TAP5-45.skp. The eagleUp Sketchup importer then found the component. I did this for the 1x04.skp, 1x17.skp, and the TO92.skp models as well. When the import was complete, I just had to move the 1x04 header over into the correct position to match the via locations. There is a mismatch between the centers of the Sketchup model and the Eagle package location on the board that I have yet to identify.

 

Summary

In summary, the system schematics for the Forget Me Not Design Challenge were captured using in a hierarchical schematic using the new Module command in Eagle. Parts lists and a Bill of Material (BOM) were generated along with list of components to order. The device editor was used to create symbols and packages to make components for a project library for this challenge. The Eagle V7 tutorial board schematic was captured and layout. It was then converted into a 3D model in Sketchup.

 

References

[1] Cadsof, New in V7

[2] Cadsoft, Eagle V7 User Interface

[3] Cadsoft, Tutorial 1 for Eagle: Schematic Design by Jeremy Blum

[4] Cadsoft, Tutorial 2 for Eagle: Printed Circuit Board Layout by Jeremy Blum

[5] Cadsoft, Tutorial 3: CAM Output and DFM by Jeremy Blum

[6] GitHub, sciguy14/Eagle-Tutorial-Series Eagle-Tutorial-Series / 03 PCB /

[7] Cadsoft, EAGLE PCB Design tool offers 3D visualization for complex board design

[8] ipc.org, IPC-2221A or B Generic Standard on Printed Board Design (a Google search may yield and old issue or a copy from an education institution)

[9] dla.mil, MIL-PRF-55110 General Specification for Rigid Printed Wiring Board

[10] eagleup, Installation

[11] ImageMagick, Downloads and release

[12] GitHub, Adafruit Eagle Library

[13] element14 Community, Eagle CAD Libraries

[14] 3dwarehous.com, 3D Warehouse