How to set up a cheap beam break sensor control distance scene using a reflector
Source: InternetPublisher:黄土马家 Keywords: Sensor Receiver Reflector Updated: 2024/12/10
This project uses a reflector panel instead of an inexpensive beam interruption sensor for a transmitter/receiver setup and is able to handle long distance scenarios.
Specific parts list:
LEDs with a half angle of 5 degrees are capable of delivering 100mA. They also emit light at 940nm, which is perfect for the receiver.
Vishay TSSP4038 IR receiver. The receiver can also detect continuous 38kHz light. Some other sensors require bursts that I'm not ready to figure out how to code yet.
Arduino Pro Mini 3.3v
D-SUN adjustable voltage regulator. I just kept it lying around
5V relay module can be triggered by 3.3V Arduino
0.1uF capacitor
300uF capacitor
2N7000 transistor (this can only handle 200mA, so limits the power to the LED, but it's still more than the 20mA the Arduino pin can source) You might want to upgrade to a 2N2222 if you need more power.
I gathered bits and pieces from other projects to make this. The coding would probably look better, and soldering would be ok too.
I want to make a sensor that does not have a dedicated transmitter but a reflective plate. Also, it must be remotely usable.
I had a lot of trouble figuring out how to get this thing to work, but in the meantime I learned one thing: capacitors near the sensor are a must. I ended up covering the entire sensor (except the front, obviously) in Sugru to keep stray light out.
Let’s look at the final result first:
In fact, after testing my first setup, I found that the effective range was only about 10m.
To increase the range I tried to increase the effect on the LED. So I turned up the voltage regulator from the previous 3.3v to around 4.5v and powered the Arduino via the RAW pin instead of the VCC pin to use the onboard regulator here. I put a 10Ω resistor in series with the LED. (Described on the schematic) Then I found out that my Arduino had a snag, its voltage regulator had died. So I replaced it with my Trinket Pro 3v. The functionality between the two is basically the same.
Function:
The built-in timer function on the Arduino works on pin 11 and is connected to the gate on the transistor to allow the LED to pull more current than the 20mA the Arduino can directly provide. My LED can safely pull 100mA at 1.5V continuous. According to the spec sheet (page 4, bottom left), this can be safely increased to about 160mA when pulsed.
The IR receiver is connected to a power source (through a resistor) and has a 0.1uF capacitor. The output of the receiver connected to pin 8 goes low when 38kHz modulated IR light is detected and goes high when the beam is broken. It is easy to program the Arduino.
Pin 12 is connected to the relay module which is also powered by an external regulator at 4.5V
The coding ensures that whenever the beam is broken, the onboard LED lights up. This is mainly to align the sensor with the reflector. Only when the beam has been broken for 2 seconds does pin 12 go high and trigger the relay. This is because I want people and cars to be able to walk through the beam without triggering it. The relay only turns off when a car is parked. This coding could easily be prettier, but I copied/pasted/edited it from another project, one of which used buttons to trigger different things on long/short presses.
- A simple door handle touch alarm circuit
- Replace the GE LOGIQ a200 ultrasound measurement key with a self-made touch switch
- Design and principle analysis of practical electric curtain remote control device
- Design and analysis of the principle of automatic power-off switch during power outage
- Design and analysis of voice control circuit
- Simple three-phase motor phase loss protection circuit
- Homemade motorcycle anti-theft alarm
- Range hood automatic controller
- Preheating bath water tank water level controller
- Control two contactors with one wire
- Analysis of key points for sensor selection
- How the acceleration sensor works
- Circuit diagram of a thermocouple cold junction temperature compensation
- Remote anti-theft alarm
- AD7730 digital pressure measurement circuit
- AD7710 internal functional block diagram and pin function diagram
- Color sensor amplification circuit
- Gyro amplifier circuit
- Identification sensor amplification circuit diagram
- Current-to-voltage converter with grounded bias and sensor