If you have some problems with loading the images, open this webpage with Internet Explorer. The videos only can be seen with Google Chrome or Firefox, in this webpage: click here , explain the reason of the problems of videos in Internet Explorer.

Presence Detector

Student name and contact details

Name: Óscar Ramón Adamuz Hinojosa

Student of Telecommunications Engineering

Mail: oscar93rah@gmail.com or oscar93rah@correo.ugr.es

Version: V1.1

Last update: 17/01/2015

Introduction

At first, the objective of this project was the design of a PCB about whatever application. So there was freedom to choose the project.

Initially, I was interested in an application about the detection of one car in a parking, to avoid the collision between the car and one wall. I found one design in this webpage: click here .

And the information about the project was in this PDF:

The problem of this design is that it is necessary the use of two PCB. This mean that the price of the product would be more expensive. So that I decided to change some things about the main desing to solve the problem.

The first change was the integration of the LEDs in the main PCB. This change solve the problem of using two PCB but introduce a new one. Now it is impossible to use this circuit to detect the car and the driver see the LEDs blinking.

The second change involved the use of this device. At the beginning, I thought in an application that the children could use like a toy. And also the children could understand the device. In that moment the idea of a Presence Detector had been born.

With the new design, a child would play with this device approaching some object to the toy.

The children would notice how the blinking change as the object would be nearer or further.

Project Objetives

The main purpose in this project, is the design of a presence detector using analog technology and a distance sensor.

The Presence detector has to detect object until 30 cm.

The user has the possibility of changing the response of the light (the fastness of blinking).

Project Stages

Below, there is a summary of the procces:

1º. The simulation of the design of a parking sensor (This appears in the PDF above).

2º. To check the correct working of the device.

3º. Introduce the necessary changes to obtain the Presence detector.

4º. To check the correct working with the new changes.

5º. If in this stage there would be some problem (doesn't work properly), introduce new changes until the problem disappear.

6º. When the circuit works properly, the next stages treat about the box that will contain the circuit, and the PCB design.

7º. Before of the PCB design, the box will be designed. The idea of this, is the adaptation of the PCB with the box.

8º. When the size of the box would be known, it will be time to design the PCB.

9º. Prepare the 3D models of the components that will be used.

10º. This PCB will have some elements which interact with the outside, so that in the placement of components, the designer will have in a count this elements.

11º. Also, there will be other things to have in a count, as the prices of the components, their sizes, their features...

12º. When the placement is finished, the designer will check that this placement was done properly and He/She will check that there isn't any compatibility problem between the PCB and the box.

13º. Then, the components will be routed. The designer will try to optimize the proccess to reduce the final cost (Remember: The smallest PCB, the cheaper the product would be.).

14º. To check that the PCB design comply all the design rules (Depends on the technology that is available.).

15º. Finally, when the design was done, The box will be printed (with a 3D printer) and the PCB will be built and it will be solder.

Below you can see a diagram that explain all the proccess:

Simulation

Firstly, I simulated the circuit that appear below.

But immediately, I noticed some problems:

-The LEDs were always switch off.

-The circuit need to be supplied by 12 V (Remember that the circuit only can be suplied by battery AA or AAA).

-The 12 V are unnecessary, because the original design used uselessly a 12 to 5 converter (78L05). And the rest of the circuit is supplied by 5 V.

The solutions for these problems, were the following:

-Using less LEDs. From 21 (original design) to 5.

-Remove the converter, and the use of 4.5 V (with 3 AA battery)

These solution introduced some advantages:

-Reduce the amount of components. This means that the final cost was decreased.

-Reduce the amount of volts necessary to supply the circuit.

-Loss power removal (Before, the circuit loss power in the converter).

When the changes were introduced, The second step was the simulation of the new circuit. For this task, I used the software Proteus. I chose this software for the simulation because this software had most the necessary components for the simulation.

Only there was one component that didn't appear in the software (BAT 85 diode). The solution was to look for the Spice Model of the component and introducing the model in the software.

Below, you can see the Presence Detector schematic:

In the new schematic, you can see the changes that were introduced and that I commented before.

Before I explain in detail the working, I'm going to explain how introducing a new component in Proteus. In this case, the BAT85 diode.

At first, in the place where there should be a BAT85 diode, you have to put other component. In this case, a general diode. Then, you need to look for the Spice Model for the BAT85 diode. Next, you have to put the Spice Model (it is a script with properties) in other propertiers, which is a parameter that appear when you click in the general diode. Below you can see the example:

Finally to conclude this section, I simulated all the posibilities for this devices. Below you can see some videos with showing some of the characteristic of the Presence Detector, and a short explanation of the video.

In the video, the distance detector show 30 cm which is the maximum sensitivity which has got. Then appear the oscilloscope which shows the signal in the VCO (Voltage Controlled Oscillator) output. This output control the LEDs blinking. In this distance, the green LED is switching on (always is switching on for whatever distance). The red LEDs are switching off. When the distance decreased, the red LEDs switch on, and they blink. The blinking is faster when the distance is smaller. Finally for a determinated distance, the red LEDs are allways switch on as the green LED.

Other function of the Presence Detector, is that it can change the blinking of the LEDs, for example the light can blinking with a smaller o bigger distance than in the previous video, only the user has to use the potentiometer 1 to change this feature. In the video below, you can see this characteristic.

In the video above, you can see how to change the necessary distance to start blinking (the LEDs).

Other "function" is to change the sensitivity. It means that you can detect object from other distance for instance, detecting object from 100 cm or more, using the second potentiometer. I write this explanation of this way because the PDF that I follow for this project, explain that function, but in the simulation was impossible to check this function (only I can check from 4 cm to 30 cm). However, I include this potentiometer because in the future I will check if this function works properly or not.

When the simulation worked properly, I should have started with the box desing, but in my case I started with the PCB desing. I made a mistake. So the reader who is reading this now, don't make the same mistake!!!. Follow the instruction that I said before in the project stages.

Preparation 3D components

For the PCB design, I used the software Altium. This software allows the circuit simulation, and the PCB design.

In this case, I didn't use this software to simulate the design, because this software didn't have almost the necessary components. So I used Proteus how I said before.

The first thing which I did when I used Altium, was the schematic. It was true that I didn't simulate the circuit, but the schematic was necessary to design the PCB.

The schematic that I was desing was this:

In the picture above, you can see the same schematic that I showed before with Proteus. The difference is that this schematic is more tidy. This schematic isn't useful for simulation, because Altium don't have as components as Proteus, but it is useful for visualizing the different functions (one for each block) inside the circuit.

If I hadn't done the simulation with Proteus, I would have done the simulation with Altium. But I simulated with Proteus, the next step is related with the preparation of the 3D components.

On the one hand, while I was doing the circuit with Altium, I prepared a component library (schematic components) because in the future someone would want to work with this project, this person would be able to find easier the components

On the other hand for the PCB desing, I prepared other component library, but in this case, the library was related with the PCB (PCB library). In this library, I had to design the footprint for each component, and prepared the 3D model for each component.

In this part, firstly I had to look for the size of every component which I used, so I need to download the datasheet of every component and desing all the footprint with the correct measures. In this point it was very important to have in a count the minimum size that you can drill (pads size designing).

Then, when the footprint was done correctly. I prepared the 3D models. For this task, I needed to look for the models in the next website: click here .

In this website you can find 3D models for every component for Altium (.step) and Solidworks (.sldprt)

Below, you can see a video where I show the differents menus for the footprint designing and the 3D model insertion.

In the video above, at first I show the PCB components list. In this list there are all the footprint. For each footpirnt, you need to be sure that all the measures are well. Then for every component, you need to put the 3D model. I show how load the 3D model (you download this in the webpage that I said before) and how rotate the model. When the 3D models are put, you have to select the component in the schematic library (one to one) and select the new footprint with the new 3D model. When this step is done, you can start with routing.

Placement and Routing

In this part, when all the footprint were prepared, I had to place the component and route them.

In this task, the most important thing was the space optimization. I looked for reduce the size of the PCB, so I did some versions of the PCB. In each one of them, I achieved reduce the size, and finally in my last version I achieved more or less the size that I searched.

I show below a picture of my last version of the PCB:

The features of this PCB design are the follow:

- All the SMD components are in the bottom layer

-All the through-hole components are routed in the bottom layer (The technology used in the laboratory don't allow other option)

-The top layer is used for connect the vias (these were necessary for the density of this design).

-Some components had to have a specific position in the PCB. The connectors had to be in the edge of the PCB (easier to connect these with the battery or the sensor) and the potentiometers the same thing (these have to connect with the outside).

When all the components are placed and routed, the next stage consists on the application of the rules design for the PCB. In this task, I had to load the rules that the teacher upload in the server of the subject. When the rules were loaded, I apply these rules and the first time I had several errors. These errors were related with the distance between some components. The more common error, which I had, were the follow:

Clearance Constraint.

Minimum solder mask silver.

Silk to silk.

Silk to solder mask.

Net Antennae.

To solve these problems I had to modify the placement, the routes or even the footprint which I designed before.

I repeat this process sometimes until the errors disappeared.

With this part finished, Only had to check the 3D model of the PCB and obtain the corresponding reports.

3D Design

When the routing was finished, the next step include the vision of the PCB with a 3D visor. Altium include one of them.

Below you can see a video where I show my PCB in 3D with the models of every components that I downloaded before

In the video, you can observe that the potentiometers and the connectors are placed in the edges of the PCB as I said before. The switch are in the middle so the final user will have to interact with it with a output in the cover of the box. The LEDs as the switch will have to have a output in the cover of the box.

Besides in the top layer, you can see how all the components have their serigraphy correctly. Furthermore there were some characteristic in this layer:

-All the components in this layer are through-hole.

-The density in this layer is more or less high.

-In the model the switch isn't the correct, but the footprint have the real size of the switch.

In addition, in the bottom layer you can see how all the components have their serigraphy correctly. Furthermore there were some characteristic in this layer:

-All the components in this layer are SMD.

-The density in this layer is more or less low.

-In the model the through-hole components (3D model), should have the pads cut. In a future, these pads would be cut.

-Perhaps there are too much vias but there wasn't other option because I needed a small PCB and the process of soldering will have to do in only one layer.

Panelize Process

Other interesting process is the panelize process. When all the design is finished, the next step is the building the real PCB board.

For this task is necessary to generate some files. These files are the gerber output, and they are necessary for the panlize.

Below I give you a guide of teacher Andrés Roldán Aranda, where all the steps for the generating of the gerber output are explained

click here

Below, you can see a part of the panelize of my PCB

All the gerber output are in the downloads sections

BOX Design

The box design had to be done before the PCB design, but a bad decision was taken by me. So in this case I had to make the box design from the PCB.

For the box design I used SolidWork as a design software.

With this software, the task were the building of the base and the cover.

In the building I had in a count the specific position of some components as the connectors, the potentiometers, the sensor and the switch.

Below you can see the base and the cover of my desing (final version).

Features of the base:

-To the left of the base, there is a hole where the battery will be put.

-To the right of the base, there is a hole where the PCB will be put.

-In the part where the PCB will be, there are two circumferences where the wires pass. This wires will connect the two connectors (You can see the position of the connectors in the gure 50) with the sensor and the battery.

-There are two holes which connect the outside with the box. In this part the potentiometers will go out to the outside.

-At the top of the base, you can see a little cavity with two little holes that connect the cavity with the outside. In this part the sensor will be put.

-The cylinder which there is to the right of the base, it is a cavity where a screw will pass.

Features of the cover:

-In its surface you can see 5 circles. This circles would be the output of the LEDs.

-In its surface you can see a rectangle. This rectangle would be the output of the switch.

-A circle in one corner, will be the place where the screw will join the cover with the base of the box.

-You can see written the name PresDet. This name is the name of the product. This name means Pres(ence)Det(ector) -> PresDet.

-There are some fl aps which will fit properly with the box.

Below you can see some videos of the base and the cover (separated)

And now, you can see all the parts together

Finally, you can see a video of the box (All parts together)

3D Printing

When the box design is finished, the next step is the 3D printing of the different parts of the design. For my box, I only have to print two part, the base and the cover of the box.

For printing every part, firstly I used the software Cura for the simulation of the printing. With this software, you can simulate the dimension of the printer, the speed of printing, the time of printing, and other features which your 3D printer has got. Besides, the most important thing about this software, is that you can observe how the printer will print the part.

Below you can see a video of the 3D printing simulation of the base

Below you can see a video of the 3D printing simulation of the cover

Real Box

When the 3D printing is simulated, the next step is printing the real box with the helping of the files which I generated with Cura

Below you can see some pictures about the real box

Memory Project

If there are some things which you don't understant or you think that there are things which don't appear in the description of the project, you can allways consult the project memory.

In the memory, all the procedures that appear explained in this website, appear but with more details and much better documented.

 

BOM

In this section, I am going to show a table where I include the price of every component which I will use to build the PCB.

You can notice which there are more components of the necessary. It is true because on the one hand the provider RS ask for a minimum of component of every kind, and on the other hand. some components is interesting to have more than the necessary because in a future one of this component wouldn't work properly, I would have other components to replace the broken component.

 

Components providers

All the components used for the project were purchased in RS.

You can find them in this webpage click here .

Downloads

Here you can download every archive which I use for this design.

Proteus simulation

click here

Schematic library Altium

click here

PCB library Altium

click here

Schematic Altium

click here

PCB Altium

click here

3D Model Altium

click here

Components 3D models

click here

Components Datasheets

click here

Gerber Output Files

click here

Solidworks Parts

click here

Other PDFs as solidworks measures, pcb top and bottom ...

click here

 

Conclusions.

-The most important conclusion is the importance of the following the scheme of a good design, as the showed at the beginning of this project. In some aspect I didn't follow the steps properly and these decisions cost time.

-If you do a good review of the design, you will be able to find some things that can change. In my case I had to do several reviews to obtain the final desing. Probably this design would be able to be improved.

-When you are doing a review, you have always to think in reduce the size, and reduce the final cost (think about the final product)

-Before of keeping on the project, is important to have a clear idea of the next step, because you can lose time if you don't understand or you don't have clear the next step.

 

Future improvements.

Apart from the size and cost reduction, I have thought that an important improvement of this design, would be the addiction of a sound system that join the lights blinking. The colector of the second transistor, which control the blinking, has a signal that also would be able to be used to control a oscillator. For example: When the lights are on, a tone sounds, and when the lights are off, there is noise.

This improvement would increase the size of the product and the cost, but it would introduce a big improvement and it would do more interesting the product.

Acknowledgements.

Personally I would like to thank Andrés Roldán Aranda for all the helping during the process of designing.

Without his helping, the development of this project wouldn't be possible.

 

Personal assessment.

From the first day which I started the subject, I think about this project as a personal challenge. I have never done something similar. And just thinking about the idea of doing a product for myself were very interesting.

Obviously, the process weren't easy. I needed to learn to use new software, as Altium, Solidworks, Cura. Moreover, every step don't work properly the first time that I did.These situations meant lost time, but also in this time learn some skills that I would have never learn if I haven't done the project.

In addition, the teacher always demanded more things and more improvements of my project. On the one hand, this means more time and more work but the other hand, I learn a good way of working in a project.

To conclude, although it was hard doing the project, I am very proud of my final desing and the all thinks that I learn in this period.

Copper Clad Project

Introduction

An extra project for this subject, was the desing of a device whose main purpose was the production of the main musical notes.

For this device, the objectives were:

-Use Copper Clad technology.

-Can play the ma in musical notes: Do, Re, Mi, Fa, Sol, La, Si.

-Use sensors to decide which musical note play.

This work has been done by 8 students. Each student had a different activity for the development of the desing. 7 of them had to do one of the 7 musical notes, and other had to do the speaker amplifier

Below I show links to visit the webpage of the other members of this project, if you want to consult their work.

Pedro M. Vallejo Muñoz

click here

Borja Saez Mingorance

click here

Victor Burgos Gonzalez

click here

Pedro Jesus Garcia Garcia

click here

Mario Lizana Calvo

click here

Alejandro Toral Lopez

click here

In my case, I did the circuit to produce the Re sound. So in the next secctions I describe all the procedures that I had to do in this specific work.

Desing of note Re

Theoretical calculation

In this part, I had to desing a specific circuit whose main objetive was produce the Re sound.

The first step in this work, was to decide which was the exact frequency of the sound Re (remember that this sound is a pure tone in one frequency). Look for information about this, I noticed that the exact frequency was 293.66 Hz.

When the frequency of the sound is knonw, the next step was to decided which was the best circuit to produce this sound. Quickly the answer was to use a IC (integrated circuit) 555 as a astable oscilator

In the picture above (you can find this in LM555 datasheet), you can see the configuaration of 555 as an astable oscilator. With this oscilator, you can generate a square signal with a specific frequency, and specific period in which the singal have the highest value (The signal don't have to have the same time the highest value and the lowest value)

To configure the frequency, it is neccesary to use the next equations:

f=1.44/((Ra+2Rb)C) -> to calculate frequency

D=Rb/(Ra+2Rb) -> to calculate Duty Cycle

The desing is free in relation with the duty cycle. So I decided to desing a square signal which had a 1/3T of output low and 1/3T of output high.

Other decision that I had, was use a resistor A of 3.3 K

With these decisions, the expresion of duty cycle is:

1/3=Rb/(3.3+2Rb)

Where easily Rb=3.3 K

In that moment, I fixed the duty cycle. Then Use the expresion of frequency, I calculated the capacitor value:

C=1.44/((3300+6600)293.66)=495.316 nF

The problem with this value, is that in market don't exist this value, so I decide use a capacitor of 500 nF.

With this desing (Ra=Rb=3.3k and C=500nF), the ideal frequency of the square signal was:

f=290.9 Hz

Which is a value near of 293.66 Hz (Note Re sound), so in that moment, I found a good design for the oscilator.

Simulation

The next step was to simulate the desing. For this task, I used Proteus. In the picture below, you can see the IC 555 as an astable oscilator in Proteus.

In the picture there are one different between the design done before and the value for the capacitor. In the desing I said that the value are 500 nF. In the picture the value are 497 nF. The change was due to the real values that I could buy. Only I could buy a capacitor of 470 nF and other of 27 nF. So I had to put in parallel the 2 capacitor to achieve a equivalent capacitor of 497 nF. Fortunately this change introduce a new value of the frecuency of f= 292.66 Hz. This value is nearer than the previous value. In spite of the problem, the solution improved the previuos solution.

Also, there are 2 new elements. One of them is the LDR. And the other is the speaker.

The LDR is a resistor whose value change by the intensity of light. In this case, I put the LDR between the pads 4 and 2. With this configuration, when the light inside in the LDR the circuit is off, and the output of the IC 555 is 0V. If someone o something cover the LDR, this resistor will receive less light and the circuit will be on. In this moment, the output will be the square signal.

The other element is the speaker. With this element, I could check how would be the sound. In the simulation, the load resistance used in the speaker was 8Ω

Below you can see a demostration of the simulation

Building and testing

When the process of simulation was finished, the next step was the building of the circuit. I remember that the main objetive of this project is the use of copper clad technology, so it was necessary to make a copper clad desing. Below you can see a first sketch of the circuit.

When the sketch was done. The next step was the soldering of the different components.

Finally, the last step (only for this note) was to probe the circuit. The result is shown below

Soldering techniques

Soldering SMD

One way of soldering SMD components is explained below:

-First, you need to put tin into pads.

-Second, you take the SMD with tweezers.

-Then, you close the SMD to the tin.

-Finally, while you close the SMD, you need to heat the tin to solder the pads.

Below you can see an example how to solder SMD.

Obiously, this task is not easy. The more practice you have, the better soldering you will have.

Des-soldering with hot air

One technique for des-soldering components is with hot air. In this technique the tool used for des-soldering is a hot air gun.

For des-soldering with this device, you need to follow the next steps:

-Turn on the hot air gun.

-Wait until the hot air gun takes the optimal temperature (depends on the components which you want to des-solder).

The hot air gun throw out hot air constantly, so you need to close the gun near the component.

Wait until the pass from solid to liquid state

In this moment, you have to remove the component

Below I show a example of des-soldering of SMD with this technique.

Below you can see a image where are some of THT components desolding during the class.

PCB elements recognition

In this section, I am going to show some pictures about a real pcb and I am going to recognize some elements about these pictures.

In this picture, you can see some of the basic elements of PCB as vias, tracks, SMD pads or THT holes.

In the second picture, you can see some the characteristic form of the QFP footprint so I supose which in this place, there were a QFP component.

In the third picture, you can see a real bottom layer of the PCB. In this case the designer did this layer only to solder THT components or put different trace with connect with vias.

Other observations about this PCB, is that the vias and the holes are bath with gold, and the surface use the tipical soldermask.