| Electronics > Projects, Designs, and Technical Stuff |
| No way of bypassing this Lasertrigger circuit - and about calculating stuff |
| (1/4) > >> |
| HendriXML:
In your by lasers beams protected house of intellectual terror mission impossible Tom Cruise is comming for your very secret electronic designs. He bring his own set of lasers to satisfy the sensors, will he succeed or will it be impossible? Not with this circuit! because it drives not one, but two resettable latches. One that signals when a laser beam is broken. One that signals that the sensor is exposed when it shouldn’t. Those states are alternatively checked by pulsing the laser beam at roughly 7 kHz. If the beam is broken, the laser will for safety reasons shut down (it served it’s purpose anyway). This will as a side effect also trigger the other latch - I won’t remedy that. Another quirk is that it starts up being activated. Used with a micro controller a reset on both latches should remedy that. I will search for a more suited photo diode, because the one I use has a very high impedance in exposed and non-exposed conditions. However the discrimination between the laser exposure and surrounding light exposure is very good. Measuring millivolts with high impedances and long leads make it now too sensitive for external interference. Besides that it really works well, especially using the triangle wave to disable comparisons during signal transitions. The latches are also designed in such a way that a signal triumphs a reset. So no one is crossing my beam >:D. Any comments or suggestions? |
| HendriXML:
Below I posted the calculations for this project. It uses a self-made scripting tool, which is able to define tasks. Within those tasks one can do calculations and simulations, or whatever. A task essentially produces / provides information to use either in schematics or for further calculations. The tool ensures every task is executed in the right order and only once. Technically a task sets fields of a newly created object. Depended task can read those fields for further calculations. I always report what is "consumed" from that object. In this way it is very well documented how data travels and what is affected by what when things change. There is also the possibility of creating asserts: states, values that you want to guard. If for example I tested a forward voltage on 20 mA, then I might want to ensure that the true current is calculated and checked against 20 mA. So when modifications alter the current, the task will fail. Giving the opportunity to do a new measurement and updating the forward voltage and current. Creating such a script is a lot of work, but is also supports thinking in a very modular way. The coarse dependency information NEEDS and NEEDED BY is generated, so no need to do that by hand. In the near future I will probably upgrade the BOM scripts (https://github.com/HendriXML/KiCad-BOM-reporter) to report calculated values against schematic values. |
| HendriXML:
CHOOSEN VALUES NEEDED BY Empirical values TL082 Empirical values 1N4004 Exposed sensor LED Break signal LED Laserdiode control Triangle wave voltages Virtual ground en reference voltage dividers Comparator latches PROVIDES voltVCC : 5,00 V ohmR3 : 100 kΩ ohmR6 : 47 kΩ ohmR23 : 4,7 kΩ ohmRV1 : 1 kΩ ohmRV3 : 500 Ω ampVirtGndVoltageDividerTarget: 7,00 mA voltVirtualGroundMargin : 250,00 mV DATASHEET VALUES 2N7000 NEEDED BY Laserdiode control Comparator latches PROVIDES ohmOnResistance : 6,00 Ω EMPIRICAL VALUES 2N3906 Q3 NEEDED BY Laserdiode control PROVIDES voltEC : 600,00 mV DATASHEET VALUES 2N3906 Q3 NEEDED BY Laserdiode control PROVIDES factAmplificationAt30mA : 30,00 A voltBESat : 700,00 mV DATASHEET VALUES LM339 NEEDED BY Exposed sensor LED Break signal LED Comparator latches PROVIDES voltLowlevelOutputVoltage: 150,00 mV EMPIRICAL VALUES TL082 NEEDS Choosen values NEEDED BY Virtual ground target voltage Triangle wave voltages CONSUMES Choosen values voltVCC : 5,00 V PROVIDES voltSwingToGroundNominal : 40,00 mV voltSwingToVCCNominal : 3,70 V EMPIRICAL VALUES 1N4004 NEEDS Choosen values NEEDED BY Virtual ground en reference voltage dividers CONSUMES Choosen values ampVirtGndVoltageDividerTarget: 7,00 mA PROVIDES voltForwardVoltage : 700,00 mV EMPIRICAL VALUES RED LED NEEDED BY Break signal LED PROVIDES voltForwardVoltage : 2,00 V ampForwardCurrent : 20,00 mA EMPIRICAL VALUES BLUE LED NEEDED BY Exposed sensor LED PROVIDES voltForwardVoltage : 3,40 V ampForwardCurrent : 20,00 mA EMPIRICAL VALUES LASER DIODE NEEDED BY Laserdiode control INTERMEDIATE voltVoltageDrop : 726,00 mV voltPackageVoltage : 3,00 V PROVIDES ohmSerieResistor : 33,00 Ω voltForwardVoltage : 2,27 V ampForwardCurrent : 22,00 mA EXPOSED SENSOR LED NEEDS Choosen values Empirical values blue LED Datasheet values LM339 CONSUMES Choosen values voltVCC : 5,00 V Empirical values blue LED voltForwardVoltage : 3,40 V ampForwardCurrent : 20,00 mA Datasheet values LM339 voltLowlevelOutputVoltage: 150,00 mV INTERMEDIATE voltR21 : 1,45 V ohmCalcR32 : 72,50 Ω PROVIDES ohmR32 : 75 Ω BREAK SIGNAL LED NEEDS Choosen values Empirical values red LED Datasheet values LM339 CONSUMES Choosen values voltVCC : 5,00 V Empirical values red LED voltForwardVoltage : 2,00 V ampForwardCurrent : 20,00 mA Datasheet values LM339 voltLowlevelOutputVoltage: 150,00 mV INTERMEDIATE voltR21 : 2,85 V ohmCalcR21 : 142,50 Ω PROVIDES ohmR21 : 150 Ω LASERDIODE CONTROL NEEDS Choosen values Empirical values laser diode Empirical values 2N3906 Q3 Datasheet values 2N3906 Q3 Datasheet values 2N7000 CONSUMES Choosen values voltVCC : 5,00 V ohmR23 : 4,70 kΩ Empirical values laser diode ohmSerieResistor : 33,00 Ω voltForwardVoltage : 2,27 V ampForwardCurrent : 22,00 mA Empirical values 2N3906 Q3 voltEC : 600,00 mV Datasheet values 2N3906 Q3 factAmplificationAt30mA : 30 voltBESat : 700,00 mV Datasheet values 2N7000 ohmOnResistance : 6,00 Ω INTERMEDIATE voltR4sInternal : 2,13 V ohmR4sInternal : 96,64 Ω ohmCalcR4 : 63,64 Ω ampGndBaseQ3 : 733,33 μA ampR23 : 148,94 μA ampR5 : 882,27 μA ohmR5sOnResistance : 4,87 kΩ ohmCalcR5 : 4,87 kΩ PROVIDES ohmR4 : 68 Ω ohmR5 : 4,7 kΩ VIRTUAL GROUND TARGET VOLTAGE NEEDS Empirical values TL082 NEEDED BY Triangle wave voltages Virtual ground en reference voltage dividers CONSUMES Empirical values TL082 voltSwingToGroundNominal : 40,00 mV voltSwingToVCCNominal : 3,70 V PROVIDES voltNominalValue : 1,87 V TRIANGLE WAVE VOLTAGES NEEDS Choosen values Empirical values TL082 Virtual ground target voltage NEEDED BY Virtual ground en reference voltage dividers CONSUMES Virtual ground target voltage voltNominalValue : 1,87 V Empirical values TL082 voltSwingToGroundNominal : 40,00 mV voltSwingToVCCNominal : 3,70 V Choosen values ohmR6 : 47,00 kΩ ohmR3 : 100,00 kΩ PROVIDES voltLow : 1,01 V voltHigh : 2,73 V VIRTUAL GROUND EN REFERENCE VOLTAGE DIVIDERS NEEDS Empirical values 1N4004 Choosen values Virtual ground target voltage Triangle wave voltages GOAL Determine resistance values such that: VirtGnd can be set voltVirtualGroundMargin higher or lower than the determined one with RV3 Voltage difference between RefLow - RefHigh can be set to 25% of the voltage difference between voltTriangleWaveLow and voltTriangleWaveHigh Voltage difference between RefLow - RefHigh can be set 10% higher than the voltage difference between voltTriangleWaveLow and voltTriangleWaveHigh The maximum settable voltSettableVirtGndLow should go as lease low as voltSettableVirtGndLowMax The minimal settable voltSettableVirtGndHigh should go at least as high as voltSettableVirtGndHighMin RV1 mid and RV3 mid should be optimized so that voltVirtGndCtrl matches voltVirtGndTarget Maximum current should be optimized to ampVirtGndVoltageDividerTarget CONSUMES Choosen values ampVirtGndVoltageDividerTarget: 7,00 mA voltVCC : 5,00 V ohmRV1 : 1,00 kΩ ohmRV3 : 500,00 Ω voltVirtualGroundMargin : 250,00 mV Empirical values 1N4004 voltForwardVoltage : 700,00 mV Virtual ground target voltage voltVirtGndTarget : 1,87 V Triangle wave voltages voltTriangleWaveLow : 1,01 V voltTriangleWaveHigh : 2,73 V INTERMEDIATE voltVCCMinusD3 : 4,30 V voltTriangleWaveDelta : 1,72 V voltSettableReferenceDeltaLowMax: 430,05 mV voltSettableReferenceDeltaHighMin: 1,89 V voltSettableVirtGndLowMax: 1,62 V voltSettableVirtGndHighMin: 2,12 V voltSettableVirtGndLow : 618,36 mV voltSettableVirtGndHigh : 2,25 V voltSettableRefDeltaLow : 408,01 mV voltSettableRefDeltaHigh : 1,91 V voltVirtGndMidDif : 371,54 μV ampTotMaxDif : 399,22 μA ampMaxAmp : 7,40 mA PROVIDES ohmR1 : 56 Ω ohmR2 : 1,8 kΩ ohmR12 : 1,8 kΩ ohmR13 : 56 Ω ohmR14 : 470 Ω COMPARATOR LATCHES NEEDS Choosen values Datasheet values 2N7000 Datasheet values LM339 GOAL Determine resistance values such that: When BeamBreak signal is high the latch is always low When BeamBreak signal is low, a closed switch SW1 can set the latch high When the output of U3A is high it stays high unless switch SW1 is pushed and BeamBreak signal is low Maximum current should acceptable when switch is closed and Q2 is conducting Different voltages should have good spreading CONSUMES Choosen values voltVCC : 5,00 V Datasheet values 2N7000 ohmOnResistance : 6,00 Ω Datasheet values LM339 voltLowlevelOutputVoltage: 150,00 mV OptimumDelta : 3,33294702420633 PROVIDES ohmR15 : 12 kΩ ohmR16 : 27 kΩ ohmR17 : 82 kΩ ohmR18 : 33 kΩ ohmR20 : 39 kΩ ohmR29 : 12 kΩ ohmR28 : 27 kΩ ohmR30 : 82 kΩ ohmR27 : 33 kΩ ohmR31 : 39 kΩ |
| Yansi:
You seem you have had just too much fun building this circuit. BTW, most IR opto-gates are made using a double modulation. First, there is a carrier frequency (usualy couple tens of kHz), so the light can be easily distinguished from a background noise and DC component of the ambient light completely canceled out at the sensor (just narrowband AC amplifiers/filters present). Then the carrier is OOK modulated at a couple of hundred Hz. Transmit side can be implement by a pair of oscillators (for example a couple of 555 timers), the receive side is quite simple too, when using an off-the shelf IR receiver with integrated demodulator (those obligatory 36, 38, 56kHz IR remote control receivers), the evaluating logic can then be made using a missing pulse detector and a pulse stretcher (which, quite funnily could be made also using a couple of 555 timers). ;) |
| HendriXML:
Instead of reporting all tasks, it is also possible to zoom in on one and its required tasks. |
| Navigation |
| Message Index |
| Next page |