IR sensor

Another televisor build using club circuits. Geared towards identifying where to get all the materials, tools, how to 3D print stuff, and troubleshoot.

Moderators: Dave Moll, Andrew Davie, Steve Anderson

IR sensor

Postby Andrew Davie » Sun Feb 26, 2017 7:24 pm

Time to revisit the IR sensor LEDs. THese always gave me trouble and I kept blowing them up. I wonder if it was my dodgy power system.
Anyway, I have a IR LED and corresponding receiver. First thing is to hook 'em up and see if they work.

These days it's pretty easy to test the emitter - just look at it with a smartphone camera...

IR0.jpg
IR0.jpg (206.24 KiB) Viewed 18007 times


And yep, works just fine. I put it on an old pencil, and used a hot glue gun to fix that pencil in place (temporarily) - way better than sticky tape I was using a decade ago. Looking again with my camera, I made sure that the LED was shining through the timing holes and I could see the 'purple' as each hole passed. With that done, I also glued down the receiver-side. This dual-pencil setup is just a temporary kludge. I'm pretty sure I'm going to be 3D-printing a mount for the IR sensors so that they are guaranteed to be facing each other, and the gap is a set distance. Should be easy - will get to that this week. But for now, pencils and glue.

IR1.jpg
IR1.jpg (234.4 KiB) Viewed 18007 times


Next I hooked up the 'scope to the leads of the receiving diode thing. I expected to see a voltage change as the holes passed. So I spun up the disk (it's not controlled speed yet, just runs on whatever the 12V makes it do) and had a look at the signal...

IR2.jpg
IR2.jpg (313.84 KiB) Viewed 18007 times


OK, that looks pretty good! I'm getting a low voltage when there's no hole, and a significant voltage when there is - about 2V difference. That should be good, I think. In the image above I've clearly caught the taped-up 32nd timing hole. Since the spikes are about 2.2ms apart, the disc spins once every 2.2*32 ms = 70.4 ms, so it's running at 1000/70.4*60 rpm = 852 rpm. Overspeed :) but that's exactly what I was seeing.

Next thing I think is to get the motor hooked up to the correct outputs from the control circuit and see what happens. I have to trace the correct location on the circuit board, because the wires had broken off and yeah... no documentation. Currently I'm just feeding 12V to the motor - good to know it's not way overspeed but certainly not underspeed at that voltage.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: IR sensor

Postby Andrew Davie » Sun Feb 26, 2017 11:13 pm

Re-reading my original construction diary, it seems that the signal from the IR detector should be around 12V.
So, that's got to be my first port of call next time I have a chance. 2V or thereabouts isn't right. Must have the path/alignment wrong.
I'll take them off and do a measurement face to face, and I'll bring forward my 3D print of the mount.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: IR sensor

Postby Klaas Robers » Sun Feb 26, 2017 11:30 pm

If you connected the IR detector just to your oscilloscope, without any thing else, I would expect about 0.5 volt from the diode working as a solar cell. This detector is a diode, or even better a transistor, which is opto sensitive. That is: it conducts the current when it is illuminated. So you need a voltage, say 12 volt, and a resistor in series with the opto sensor. Then you can expect a voltage swing of several volts and in the dark even 12 volts. But that is not needed. The CMOS circuits see the change from zero to one at half the supply voltage, so +6 volt if the supply is +12 volt. Then a voltage swing from +5 to +7 is in principle sufficient.

Play with the value of the series resistor, take a potentiometer for this game. If the resistance is too low you don't reach the + 6 volt trigger level. I should start with a potentiometer of 100 k. If that only works at its end of rotation, I would replace it by one of 10k. Find an optimal position and measure the resistance value. Then you may solder in a fixed resistor. You will see that it is not critical at all.
User avatar
Klaas Robers
"Gomez!", "Oh Morticia."
 
Posts: 1656
Joined: Wed Jan 24, 2007 8:42 pm
Location: Valkenswaard, the Netherlands

Re: IR sensor

Postby Andrew Davie » Mon Feb 27, 2017 9:08 pm

I did some work on a 3D print of a IR mounting bracket today.

It has 5 parts and snap-fits together. Basically two arms that wrap around the disk. On the end of each arm there's a hole for a IR diode. Bend the arms of the diode and they sit in a little channel for them and the wires. The channel continues through the middle of the adjustment arm and out the back. Over the top of the channel goes a little snap-on cover, so it looks neat. The back arm has a friction-mount for the front arm, so you can adjust the distance apart the IR pair are - and of course the mounting press-fit holes keep them exactly aligned.

IR4.jpg
IR4.jpg (311.26 KiB) Viewed 17985 times


This is the prototype - I usually do a prototype print and then adjust a few tolerances. In this case, the friction-mount hole is printed too small, and the interior wire-guides are also too small. The IR mounts are perfect, and the channels could be a bit wider and deeper. But basically, pretty good first effort. Tomorrow I'll have a working version. Nice that it all snaps together without any glue, and is adjustable.

IR5.jpg
IR5.jpg (337.7 KiB) Viewed 17985 times
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: IR sensor

Postby Andrew Davie » Mon Feb 27, 2017 9:35 pm

Heres' me trying to show how it's constructed.

IR6.jpg
IR6.jpg (321.08 KiB) Viewed 17985 times


The IR diodes push-fit into the holes. The top of the diodes just poke out the other side. The purple dot represents the transmitter - and it's pointing up. The other one is pointing down. The pins are bent 90 degrees and lie in the channels. I've drawn in some pretend wires to show the wire routing, which is along the channels. On the front arm (with the purple xmit diode), the wires go into and through the middle of the connecting rod. They are underneath as seen in this view - I made the part transparent, to show their path. On the back arm, they go along the outside. Then the snap-fit covers are attached - "A" flips over and snaps tight over the diode pins and wiring. B goes under and likewise covers the pins and wiring from view. Then C snaps over the vertical wires and finally the whole front arm assembly flips over and slides into the channel of the back arm assembly. Then you have a completed unit with 4 wires coming out the back and neither of the diodes visible, nor wiring, and the distance between is adjustable.

It's nothing special, but I enjoyed designing it so that it was printable and assembled without glue or cutting/drilling.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: IR sensor

Postby Andrew Davie » Wed Mar 01, 2017 11:59 pm

Corrected the problems in the prototype, and printed and assembled an alpha version.

IRb1.jpg
IRb1.jpg (326.1 KiB) Viewed 17972 times


IRb0.jpg
IRb0.jpg (368.9 KiB) Viewed 17972 times
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: IR sensor

Postby Harry Dalek » Sat Mar 04, 2017 5:06 pm

Thats one mighty opto switch ! out of interest how much does it cost to print something like that i have to review the posts to see if you mentioned time on printing ...any case interesting ...
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5364
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: IR sensor

Postby Andrew Davie » Sat Mar 04, 2017 5:23 pm

Harry Dalek wrote:Thats one mighty opto switch ! out of interest how much does it cost to print something like that i have to review the posts to see if you mentioned time on printing ...any case interesting ...



Cost: nothing - using the printer at work. OK, if you pin me down - material costs about 20 cents?
Printing time - about two hours.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: IR sensor

Postby Andrew Davie » Sat Mar 04, 2017 8:31 pm

Harry Dalek wrote:Thats one mighty opto switch ! out of interest how much does it cost to print something like that i have to review the posts to see if you mentioned time on printing ...any case interesting ...


Harry anything you want 3D printed I'll do it for you for free.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: IR sensor

Postby Harry Dalek » Sat Mar 04, 2017 11:07 pm

Andrew Davie wrote:
Harry Dalek wrote:Thats one mighty opto switch ! out of interest how much does it cost to print something like that i have to review the posts to see if you mentioned time on printing ...any case interesting ...


Harry anything you want 3D printed I'll do it for you for free.


Thank you Andrew i think its one of those things if you have the tool you can think out side the box and in this case make any shape of thing you can program in ...i bet thats the hard part .
I can't think of any thing at the moment but i am keen seeing what your making ...what is it using plastic ? does it use reels of plastic like wire ?
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5364
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: IR sensor

Postby Andrew Davie » Sat Mar 04, 2017 11:25 pm

Harry Dalek wrote:Thank you Andrew i think its one of those things if you have the tool you can think out side the box and in this case make any shape of thing you can program in ...i bet thats the hard part .
I can't think of any thing at the moment but i am keen seeing what your making ...what is it using plastic ? does it use reels of plastic like wire ?


I create the shapes in a programming language/tool called OpenSCAD. It uses what's called "constructive solid geometry". Very simple. Units are millimeters and degrees, and you just describe the shapes you want to add together, move around, or subtract from each other. You can, for example, subtract a small sphere from a larger cube and you end up with a cube with a spherical hole in it. You can shift shapes around before/after subtraction or addition. It's as simple as this...

Code: Select all
union(){
    sphere(r=10);
    cube([10,20,20]);
}



The above adds a sphere and a rectangular cube together. The numbers are sizes and/or positions.
The result is this...

Screen Shot 2017-03-04 at 11.18.20 PM.png
Screen Shot 2017-03-04 at 11.18.20 PM.png (38.64 KiB) Viewed 17950 times


I can change the "union" to a "difference"...

Code: Select all
difference(){
    sphere(r=10);
    cube([10,20,20]);
}


With the result...

Screen Shot 2017-03-04 at 11.20.09 PM.png
Screen Shot 2017-03-04 at 11.20.09 PM.png (24.32 KiB) Viewed 17950 times


Or, I could subtract the sphere from the cube...

Screen Shot 2017-03-04 at 11.21.36 PM.png
Screen Shot 2017-03-04 at 11.21.36 PM.png (17.26 KiB) Viewed 17950 times


There are a number of operators in the language, and a variety of shapes. You can draw a shape and then "extrude" it to form a warped 3D version of the shape travelling through space, creating an object as it goes. Very powerful and easy to use. Here's the language cheat sheet.

As to the materials, it's a plastic filament that looks like grass-cutter/snipper line. Usually materials called ABS or PLA. They have different characteristics (flexibility, brittleness, warping) and require different settings/skills to print.


If you would like, I can send you something - a copy of this opto switch assembly, maybe? So you can check out how it looks in the flesh.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: IR sensor

Postby Klaas Robers » Sun Mar 05, 2017 8:38 am

Andrew, you must have seen my Heathkit-like SSTV monitor. It has a bezel in front of the circular picture tube, to leave over a square viewing area with rounded corners. That I also designed in Open SCAD to have it 3D-printed. i am just a beginner in it, as I only use it when I want to have a certain object. I don't have a 3D-printer, but one of my sons has one.

I like Open SCAD as it changes the way in which you look at objects and it changes your way of thinking. Youngsters at school should have this, use it and have access to a way to have their things 3D-printed. However some schools have already a 3D-printer. Don't know what they do with it......
User avatar
Klaas Robers
"Gomez!", "Oh Morticia."
 
Posts: 1656
Joined: Wed Jan 24, 2007 8:42 pm
Location: Valkenswaard, the Netherlands

Re: IR sensor

Postby Andrew Davie » Sun Mar 05, 2017 11:06 am

Klaas Robers wrote:Andrew, you must have seen my Heathkit-like SSTV monitor.


Klaas you should post a picture to remind me. I can't recall if I've seen your SSTV bezel or not.
But it's a great idea for Harry's project! Harry, when you have your final square size we could do a bezel for you and print it - provided it's not too big for my printer :)

I introduced OpenSCAD to some students I was mentoring last year. I am not sure if they continued with it. There are other 3D design tools they use which let you just point and click, which doesn't require the thinking that you do with OpenSCAD construction.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: IR sensor

Postby Klaas Robers » Sun Mar 05, 2017 7:52 pm

Image

Yes I know, there are expensive and very expensive programs that keep you from thinking. Especially for "The Lazy Generation". These programs keep you on purpose stupid, such that they can ask even more money from you....... This is for the industry, not for students and youngsters.
User avatar
Klaas Robers
"Gomez!", "Oh Morticia."
 
Posts: 1656
Joined: Wed Jan 24, 2007 8:42 pm
Location: Valkenswaard, the Netherlands

Re: IR sensor

Postby Andrew Davie » Sun Mar 05, 2017 8:37 pm

Klaas Robers wrote:Image



Ah yes. It's a beautiful thing.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia


Return to Andrew Davie's Televisor #2 (2017)

Who is online

Users browsing this forum: No registered users and 0 guests

cron