IR detector


Closed Thread
Results 1 to 29 of 29

Thread: IR detector

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    one way in my mind now... Use HPWM on your led emitter, place the IR receiver on RA.4/T0CKI. Use Timer0 to count, Timer1 or Pause to do your sample time. The read the TMR0 register.

    Another wich i don't really like but i saw many times... Led emitter directly to Battery via resistor, IR detector to RA.4/T0CKI. Jump in a interupt routine on a TMR0 overflow. Easy neat... may kill the IR Led soon.. battery too.

    Do a search for T0CKI, you should find some tips to begin.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Smile

    Here is a table again to select a resistor value with respect to current (mA) vs input volt.
    Make the rounding as close as possible.



    --------
    Code:
    I(mA)	R (ohm)	R (ohm)
    	9V	12V
    
    1	9000	12000
    2	4500	6000
    3	3000	4000
    4	2250	3000
    5	1800	2400
    6	1500	2000
    7	1286	1714
    8	1125	1500
    9	1000	1333
    10	900	1200
    11	818	1091
    12	750	1000
    13	692	923
    14	643	857
    15	600	800
    16	563	750
    17	529	706
    18	500	667
    19	474	632
    20	450	600
    21	429	571
    22	409	545
    23	391	522
    24	375	500
    25	360	480
    26	346	462
    27	333	444
    28	321	429
    29	310	414
    30	300	400
    31	290	387
    32	281	375
    33	273	364
    34	265	353
    35	257	343
    36	250	333
    37	243	324
    38	237	316
    39	231	308
    40	225	300
    41	220	293
    42	214	286
    43	209	279
    44	205	273
    45	200	267
    46	196	261
    47	191	255
    48	188	250
    49	184	245
    50	180	240
    51	176	235
    52	173	231
    53	170	226
    54	167	222
    55	164	218
    56	161	214
    57	158	211
    58	155	207
    59	153	203
    60	150	200
    61	148	197
    62	145	194
    63	143	190
    64	141	188
    65	138	185
    66	136	182
    67	134	179
    68	132	176
    69	130	174
    70	129	171
    71	127	169
    72	125	167
    73	123	164
    74	122	162
    75	120	160
    76	118	158
    77	117	156
    78	115	154
    79	114	152
    80	113	150
    81	111	148
    82	110	146
    83	108	145
    84	107	143
    85	106	141
    86	105	140
    87	103	138
    88	102	136
    89	101	135
    90	100	133
    91	99	132
    92	98	130
    93	97	129
    94	96	128
    95	95	126
    96	94	125
    97	93	124
    98	92	122
    99	91	121
    100	90	120
    101	89	119
    102	88	118
    103	87	117
    104	87	115
    105	86	114
    106	85	113
    107	84	112
    108	83	111
    109	83	110
    110	82	109
    111	81	108
    112	80	107
    113	80	106
    114	79	105
    115	78	104
    116	78	103
    117	77	103
    118	76	102
    119	76	101
    120	75	100
    121	74	99
    122	74	98
    123	73	98
    124	73	97
    125	72	96
    126	71	95
    127	71	94
    128	70	94
    129	70	93
    130	69	92
    131	69	92
    132	68	91
    133	68	90
    134	67	90
    135	67	89
    136	66	88
    137	66	88
    138	65	87
    139	65	86
    140	64	86
    141	64	85
    142	63	85
    143	63	84
    144	63	83
    145	62	83
    146	62	82
    147	61	82
    148	61	81
    149	60	81
    150	60	80
    
    
    Sayzer August'06
    Selecting resistor value with respect to 
    Current vs input Volt
    Attached Files Attached Files
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Aug 2006
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    After some searching I found this
    http://www.picbasic.co.uk/forum/showthread.php?t=190

    after making some changes I think I will be able to use this to do what im needing.

Similar Threads

  1. Replies: 17
    Last Post: - 12th April 2014, 02:17
  2. PIC10F200 Automated IR Light Switch
    By Bruce in forum Code Examples
    Replies: 7
    Last Post: - 3rd May 2007, 11:40
  3. Replies: 10
    Last Post: - 16th October 2006, 18:23
  4. how to get pic to pic communication
    By kinsiro in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th August 2005, 17:12
  5. IR for robot on 16F877A
    By Samuel in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 9th April 2005, 20:57

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts