Maker Pro
Maker Pro

Photoelectric switch help

Hi.
I'll preface with the fact that I am an entomologist... I have a very basic knowledge of electronics. In other words, I know how to hook up jumper cables to my car battery, but that's about it.
I'm trying to build an insect trap with light that will turn on at dusk and turn off at dawn. It's possible to buy these all wired, but I need many and have a limited budget. I have a photoelectric switch that I purchased on amazon http://www.amazon.com/Amico-Photoelectric-Switch-Sensor-50mmx25mm/dp/B00BLZ93T2.
My power source is a 12V 18AH battery and the light is a 15w blacklight bulb. Hooking the bulb directly to the battery works. When I incorporate the switch into the circuit, the red light indicates that the switch is powered, but the sensor will not activate the switch. I adjust the potentiometer, but still nothing happens. There is a green light that indicates the sensor. I tried hooking it up both ways (light activated, and dark activated), but still nothing. I will say that when it is hooked up for dark activated, the lamp stays continuously unlit, and when it's hooked up for light activated, the lamp is continuously lit. I'm not sure if I just got a faulty sensor, or if there is something I am missing here. Should go for a more expensive switch? The reviews on amazon are great for this switch though, there's even a video explaining how to hook it up, but it doesn't seem to work for me.
Once I get this figured out, I would like to eventually incorporate a solar panel so that the battery gets charged during the day. The ultimate goal being a trap that can be set out for weeks at a time in remote areas and be completely self sufficient.
Any help on this is very much appreciated. I can provide pictures of how I have everything hooked up if that would help.
Thanks!
Marc
 

Harald Kapp

Moderator
Moderator
Welcome to our forum, Marc.

Can you sketch how you set up the connections of lamp, sensor board and battery?

There's a quick way to check the sensor: unplug the sensor cable from the board. With thix kind of sensor this is equivalent to "dark". When you short-circuit the pins of the sensor connector on the PCB, this is equivalent to "light". Does the circuit behave as expected? If not, the board is most probably faulty.
If the board behaves as expected, check the sensor. Do you have an Ohmmeter or a multimeter with Ohm range? The resistance of the sensor should be high in the dark, low in light.
 
Did you watch the video on the link you provided?
As you are trying to drive a 12V light, you should put the jumper in place as per the video. Although this is not explained in the video, it looks like the jumper connects positive, through the PCB, to the centre pin on the output side(screwdown terminals).
Be aware that the 12V supply connects to the board on the connector right next to where the sensor connects. The jumper is to the centre of the board next to the relay.

The negative side of the battery must be connected directly to the one side of the light and the positive side will be connected to one of the two outside screwdown connectors - the middle screwdown will not be used in your case(jumper in place).

As a side note: This is not a very good switch. It does not switch on/off cleanly(as demonstrated in the video) - it buzzes on and off at the switchover point. This will reduce the life of the relay and also the light.
 
I watched the video, and it was a big help. Otherwise I'd be pretty lost (well, more so than I am presently).

Perhaps I am confused by this jumper business. There is a small plastic piece that easily is pulled off of two pins which resides below the relay under the letters SRD. I assume this is the all powerful jumper. So if I understand what you're saying, this jumper should remain in it's home next to the relay. That's what I did, and got the aforementioned results of no switch activity. The pic on amazon looks as if the jumper is not in place.

You mentioned this switch isn't very good to begin with... would you recommend a different switch for my particular application?

Thanks!!
Marc
 
Okay, I took some pics of how it's setup. Today I noticed that one part on the circuitboard is super hot when it's hooked up. I labelled it with an arrow in the picture. It get's hot enough to burn your skin. That can't be good! What am I doing wrong?
attachment.php

attachment.php
 

Attachments

  • image2.jpg
    image2.jpg
    141.6 KB · Views: 261
  • image.jpg
    image.jpg
    149.8 KB · Views: 350
It looks correct what you have done, so I guess the board is faulty - return it for a new one. Without connecting the light, the green led should show you when it switches on/off when you turn the pot from side to side.
The only other thing: Did you do the checks that Harald suggested?
 
It looks correct what you have done, so I guess the board is faulty - return it for a new one. Without connecting the light, the green led should show you when it switches on/off when you turn the pot from side to side.
The only other thing: Did you do the checks that Harald suggested?

It's not faulty....

When you trigger the relay, you need to supply 5v not 12v (most transistors that size handle 6v max on base)
 
You only have 1 wire connected to the relay terminals. You need to have two, the relay is wired just like a switch. One of the three terminals is normally open, one is normally closed and the other is common.

Bob
 
@BobK:
If you put the jumper in place then the way it is wired is correct. Thee + taken from the 'top' terminal to switch on when i gets dark, and the gnd connected directly to the battery.
 
Top