PIR to Arduino and LEDs #2

Status
Not open for further replies.

I recommend that you DO NOT post any more schematics, boards or order PCB's at this time. It is becoming difficult to keep track of them.

I suggest you take time to learn the schematic capture and capture the schematics first.

Then we can review the captured schematics, check they are up to date and correct before proceeding to PCB layout. This is what I was alluding to when suggesting to make ONE schematic and keep it up to date. Let the schematic drive the board layout. Also, the parts used on the boards posted seem to be of random package type/size. For example, the sensor module should have all 1/4 resistors and Q1 should be a TO-92 case. A list of parts should be on hand to use for laying out the board and ordering parts.

I make these suggestions because I want you to succeed with your project (It is a cool project) .


Your post above has not been updated.


It looks close but I cannot vouch for the above schematic. I can only post the schematic I have and I know to be correct. The only thing that has changed in mine is the annotations we discussed in post #10.

The bread board was
examined and there is a red/red/orange
resistor. But i guess it was eliminated
and the elimination was missed.

It was never there and must have gotten added by mistake.


I took your FTB designator to be whatever you are using to make a connection from the arduino pins to the shield. The terminal shown as a box with an "X" inside is a typical symbol for an arduino terminal and represents an "FTB" connection. I called it a "Feed Thru Terminal". I can see now that that is probably not a good designator as you meant FTB to mean "Fixed Terminal Block". TB1 through TB12 are Fixed Terminal Blocks.


Correct.


Review schematic post #19,

I took your FTB designator to be whatever you are using to make a connection from the arduino pins to the shield. The terminal shown as a box with an "X" inside is a typical symbol for an arduino terminal and represents an "FTB" connection. I called it a "Feed Thru Terminal". I can see now that that is probably not a good designator as you meant FTB to mean "Fixed Terminal Block". TB1 through TB12 are Fixed Terminal Blocks.


I suggest, once more, to take some time to learn the schematic capture program and practice passing changes between the schematic and board layout so you get a feel of what is required for updates to work. You can create a simple one LED board to try this on. Practice this until you are comfortable with it. Then capture the sensor module schematic and we'll start from there.
 
Last edited:
Hello ETO forum,

It has taken me a while to get my head wrapped around
Dip Trace schematic software as suggested by the experienced
eTech in the Oct 27 post #18 to forum thread

And the point made in that post was well taken:

I need to organize the info, the schematics and PCB drawings.

So the focus of this re-entry is two things:
1. Offer a more organized list of docs.
2. Ask a question about the original 12v schematic
(The schematic design as not changed since early Sept 2019.
[There was an early schematic in Aug 2019 that used a 5v power supply
that was abandoned in favor of a 12v source.])

There are three modules:
- The Main board - Ardunio Shield called the 'Shield' hereafter
- The Sensor Module, includes the PIR
- The LED Module, pretty simple two resistors, six LEDs

As eTech suggested there would be two representations of each
of the three modules, a schematic and a PCB illustration.
So that's six depictions. But then a schematic is needed to
show the whole, complete system which is seven. And a couple
are needed to explain aspects of the design. So an attempt
is made to keep the number to a minimum but ten is about the
minimum needed. It is a large system stretching out about
fifteen feet.

Rather than display them all in this post a zip file has been created with
these docs.
1. The complete schematic: Shows one PIR and mainboard connection.
PODACAL_12v_complete_200907.jpg (Titled: 'Pocadal...' dated 201812)
2. Shield schematic: shows schematic of PCB that mounts on Arduino
PODACAL_12v_main_board_201029.gif
3. Shield PCB
Staircase_Main_Board_PCB_201128.jpg
4. Sensor Module schematic: PIR and transistor
PODACAL_12v_Sensor_mod_schematic_201023.jpg
5. Sensor module PCB
Sensor_Mod_201020_PCB.jpg
LED Module schematic no separate drawing because shown on
PODACAL_12v_main_board_201029.gif
6. LED Module PCB
LED_Mod_200910_PCB.jpg

Ancillary drawings
7. The Staircase design: shows placement and number of modules.
Why, for instance, there are three LED modules at first and last
and two modules for each in between: Sixteen LED modules one for each
stair riser: two for the five intermediate (2 -6) is ten and three for
first and last is six. Ten and six make sixteen.
staircase_design_200528_600_x_400.gif
8. Staircase Module Locations shows map of Sensor modules (8) and
LED Modules (16) and wiring to Shield and power
Module_location_drawing_201220_800_x_600.gif
9. Main board schematic: how the Shield and the opto-couplers
work with TBD62003A. Similar to Shield schematic.
PODACAL_12v_Arduino_Shield_Main_Board_schematic_201026.jpg
10. How the Shield fits on the Arduino
Arduino_shield_for_TBD620033A_201212.jpg

Don't get me wrong. It is not expected that anyone
will look at all these docs. Just wanted to get a baseline
on the project docs. Hope were coming into the
home stretch and they won't change much. So in
future posts perhaps these docs can act as reference.

And the final question. In the complete schematic
file name PODACAL_12v_complete_200907.jpg
which will be posted here in the post, so it doesn't have to be dug out of the zip file,
in the wires between the sensor module and opto_coupler, the
wires are marked 'PIR1 out' and 'PIR1 rtn'.



The 'PIR1 out' is understood. This the signal
going out from the sensor to the opto-coupler
and the Shield.

But (assuming that 'rtn' is 'return' at 'PIR1 rtn') what is
being returned? The trace marked 'PIR1 rtn' is going to
the collector of the 2N3904 so don't understand
how and why something is being returned to a transistor
collector.

Thanks.

Allen in Dallas
 

Attachments

  • Staircase_docs_201220.zip
    937.9 KB · Views: 199
what is
being returned? The trace marked 'PIR1 rtn' is going to
the collector of the 2N3904 so don't understand
how and why something is being returned to a transistor
collector.
It's a "Current loop" driver. The transistor switches on or off current (set by the resistors) to the LED in the opto isolator.
The labelling does not change how it works.
From the LED half "point of view", you could say it has a + supply and - return, while the transistor is on..

It's virtually a clone of a standard current loop as used for MIDI instrument interfaces.

See the schematics on this page as an example - they are split between the driver and receiver as it's a plug-together system, but if you look at the two haves together it's pretty much the same setup as in your drawing.

 
I still don't understand why there are four 430Ω resistors in series with the opto LED.

Mike.
 
Hello ETO forum,

It has taken me a while to get my head wrapped around
Dip Trace schematic software as suggested by the experienced
eTech in the Oct 27 post #18 to forum thread

And the point made in that post was well taken:

I need to organize the info, the schematics and PCB drawings.

So the focus of this reentry is two things:
1. Offer a more organized list of docs.
2. Ask a question about the original 12v schematic
(The schematic design has not changed since early Sept 2019.
[There was an early schematic in Aug 2019 that used a 5v power supply
that was abandoned in favor of a 12v source.])

There are three modules:
- The Main board - Arduino Shield, called the Shield hereafter
- The Sensor Module, includes the PIR
- The LED Module, pretty simple two resistors, six LEDs

As eTech suggested there could be two representations of each
of the three modules, a schematic and a PCB illustration.
So that's six depictions. But then a schematic is needed to
show the whole, complete system which is seven. And a couple
are needed to explain other aspects of the design. So an attempt
is made to keep the number to a minimum but ten is about the
least needed. It is a large system stretching out about
fifteen feet.

Rather than display them all in this post a zip file has been created with
these docs.
1. The complete schematic: Shows one PIR and mainboard connection.
PODACAL_12v_complete_200907.jpg (Titled: 'Pocadal...' dated 201812)
2. Shield schematic: shows schematic of PCB that mounts on Arduino
PODACAL_12v_main_board_201029.gif
3. Shield PCB
Staircase_Main_Board_PCB_201128.jpg
4. Sensor Module schematic: PIR and transistor
PODACAL_12v_Sensor_mod_schematic_201023.jpg
5. Sensor module PCB
Sensor_Mod_201020_PCB.jpg
LED Module schematic no separate drawing because shown on
PODACAL_12v_main_board_201029.gif
6. LED Module PCB
LED_Mod_200910_PCB.jpg

Ancillary drawings
7. The Staircase design: shows placement and number of modules.
Why, for instance, there are three LED modules at first and last
and two modules for each in between: Sixteen LED modules one for each
stair riser: two for the five intermediate (2 -6) is ten and three for
first and last is six. Ten and six make sixteen.
staircase_design_200528_600_x_400.gif
8. Staircase Module Locations shows a map of Sensor modules (8) and
LED Modules (16) and wiring to Shield and power.
Module_location_drawing_201220_800_x_600.gif
9. Main board schematic: how the Shield and the opto-couplers
work with TBD62003A. Similar to Shield schematic.
PODACAL_12v_Arduino_Shield_Main_Board_schematic_201026.jpg
10. How the Shield fits on the Arduino
Arduino_shield_for_TBD620033A_201212.jpg

Don't get me wrong. It is not expected that anyone
will look at all these docs. Just wanted to get a baseline
on the project docs. Hoping we are coming into the
home stretch and they won't change much. So in
future posts perhaps these docs can act as reference.

Have received the PCBs and am loading the boards
to do a PIR to Shield to LED module test.

And the final question.
In the complete schematic
file name PODACAL_12v_complete_200907.jpg
which will be posted here, so it doesn't
have to be dug out of the zip file.


On the traces between sensor module and opto_coupler the
wires are marked in green font: 'PIR1 out' and 'PIR1 rtn'.
(Just above blue font:
'H=12.0=Motion
L=0.0v= No Motion'

The 'PIR1 out' is understood. This the signal
going out from the sensor to the opto-coupler
and the Shield.

But (assuming that 'rtn' means 'return' at 'PIR1 rtn') what is
being returned? The trace marked 'PIR1 rtn' is going to
the collector of the 2N3904 so it is not understood
how or why something is being returned to a transistor
collector.

Thanks.

Allen in Dallas
 

Attachments

  • Staircase_docs_201220.zip
    2 MB · Views: 189
Hello ETO forum,

Got the boards for the staircase project loaded and connected
using the tested schematic:


Here's a photo:


Test one PIR to Arduino and LED DMOs
1a. Connected sensor S1 to 12v and grnd.
1b. Connected sensor S1 to Out and Rtn at Arduino shield.
1c. Connected LED module ground to DMOS connx LM1 and
+12v at power source.

Expected result: LED modules light w motion at the PIR
Actual result: LED modules do not light with motion at the PIR

Have tried connecting the LED +V to the +v on the Arduino. No luck.
Also unit tested the LED modules and the Sensor module.
See PIR Sensor Unit Test posted herewith below.

Also posted below PIR_to_Arduino_sketch

Thanks.

Allen in Dallas

PIR Sensor Unit Test (eTech)
Post # 8 'PIR to Arduino and LEDs #2'
20 Oct 2020
1. Connect a temporary jumper from +PIR out to PIR Rtn.
2. Connect the DMM +probe to either the temporary jumper, or the +PIR out terminal. (make sure the jumper is in place)
3. Connect the DMM ground probe to -PWR
4. Connect 12 vdc power to the +PWR and -PWR terminals.
5. The DMM should read about 12 vdc with no motion detected (doesn't need to be exact).
6. Cause motion to be detected by the PIR (a wave of a hand over the PIR).
7. The DMM should read less than 0.7 vdc with motion detected (doesn't need to be exact).

++++++++PIR to Arduino Sketch +++++++++++
Code:
int led = A0;               // the pin that the sensor is attached to
int sensor = 2;         // the pin that the sensor is attached to

void setup() {
  pinMode(led, OUTPUT);
  pinMode(sensor, INPUT);
  Serial.begin(9600);
}

void loop() {
  int sensorval = digitalRead(sensor);
  Serial.println(sensorval);
 
if (sensorval == LOW) {
    digitalWrite(led, HIGH);
  }else{
    digitalWrite(led, LOW);
  }
 
}
 


My first suggestion is to test each module independently identify and localize the problem.
 
That "PIR test" was presumably from an earlier design, as you cannot possibly get the result it states - so also, presumably, you have not actually tested the PIR modules on their own?

Link PIR OUT and PIR RTN

With power applied, the voltage on that link should be around supply voltage with no trigger and half supply when triggered.

The two 470 resistors form a divider, so the transistor turning on (and collector near 0V) means half way between that and supply at the output, while the jumper link is in place.

If connected to the opto on the next board, the PIR OUT voltage should drop slightly, a couple of volts or so, and the PIR RTN voltage drop rather more, down to 2 - 3V, when triggered.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…