Posts

Remote low-voltage outdoor light switch

Image
In this article I will explain a remote light switch for low-voltage outdoor lighting. This device toggles the state of the load whenever the power to it is interrupted briefly. This device also connects to a wireless remote control (similar to this one ) to allow the user to control the brightness of the LED strip. Background I built this device to power a set of LED light strings (similar to these ) from a 12 volt battery. The battery is charged by a solar panel through a charge controller. Various motion-activated lights in the house are also powered from the battery and solar panel. However, there was only a single 12 volt wire feeding multiple outdoor loads, some of which were needed during the day. Thus, I created this device to switch these lights on at night. An Arduino measures the voltage on the solar panel and determines when night begins. Then, it briefly interrupts the power to the lights, and the device interprets this and switches the lights on (or off). This allows po...

Second version of the PWM dimmer and test results

Image
In this article I will give updates on the PWM dimmer I explained in a previous article . I will explain the changes that have been made and present a new schematic. I will also quantitatively compare the performance of the PWM dimmer to the performance of a phase control dimmer. New schematic and explanation The new schematic is shown below: Link to simulation (1Ω resistor and 500pf capacitor are only for the simulation, they are not part of the circuit) I have made several changes to the design: Gate drive circuit The gate drive transformer was replaced with a handmade one made from a toroidal ferrite core and 9 turns of a single twisted pair from a CAT5 cable. An additional circuit was also inserted between the 555 timer and the gate drive transformer to amplify the current on the output. This circuit consists of an NPN and a PNP transistor, with both bases connected through separate resistors to the output of the 555 timer. The capacitors between the output and the bases ...

Arduino-based pill timer that makes phone calls

Image
In this article I will explain the operation and construction of a pill timer that can make phone calls via a cordless telephone handset. I will explain the individual parts of the device and explain the logic that controls the pill timer and telephone. Operation of the pill timer The pill timer connects to a keypad, an LCD, and a telephone handset. when the user powers on the pill timer, they must enter the current time using the keypad. To start the timer, the user presses tha "1" key on the keypad. The pill timer determines at what times the user needs to take their pills according to a schedule that has been hard-coded into the pill timer. When it is time for the user to take a pill, the timer will initiate a call to a pre-programmed number. Once the user has picked up, it will play a recorded message. Specifically, this recorded message is "It is time for pill box number" followed by a number. Schematic and explanation gEDA schematic file Memory chip T...

Software for identifying the ideal setup of a solar panel based on surroundings

Image
In this article I will present a program that can identify the most efficient angle of a solar panel, taking into account any objects that may cast a shadow on the panels. I will explain each step of the program. The source code can be found at https://github.com/mnigmann/solar Finding the sky The program takes as an input an image of a spherical projection of the surroundings, such as the image below: To identify the regions of sky, the program applies a Sobel filter, dilates the image, and applies a threshold. This causes regions where the color does not change much (such as the sky) to be black and regions where the color changes a lot to be white (such as trees, grass, buildings, etc.). For the above image: The user must then click on the regions of the image containing sky. Using the cv2.floodFill function, the program identifies the rest of the sky, as seen below: Finding the position of the sun The program calculates the position of the sun based on some formulas fr...

People counter made from discrete components

Image
In a previous article , I described how I created a people counter that used capacitive sensing. In this article, I will describe the operation of a people counter I made from discrete components that works on a similar principle. As described in the previous article, this circuit will contain two separate oscillators, with each one connected to a sense wire. However, in this circuit, one of the oscillators will be a voltage controlled oscillator (VCO). A frequency comparator will compare the frequencies of the two oscillators and tune the VCO so they match. Schematic and explanation gEDA schematic file Regulator U1 regulates the 12 volt input into the 5 volts needed for the logic gates. The capacitors C1 and C2 are actually placed near the power pins of U2 and U3. Reference oscillator (bottom left box) The reference oscillator oscillates independently of any other signal, except for the capacitance on the sense wire. The circuit is identical to the one described in the prev...

DC doorbell driver

Image
In this article, I will describe the need for and operation of a timer circuit when using a mechanical doorbell. This circuit switches the solenoid in the doorbell off after about a second and keeps it off even if the user continues to hold down the doorbell button. By switching off the solenoid, the power dissipation is reduced, preventing the solenoid from melting. Background My doorbell is not powered with an AC transformer, but from a 12 volt battery. The doorbell was recently damaged, most likely by the following prcess: The doorbell button got stuck in the closed position or was held down for too long. Since the solenoid has a resistance of around 6 ohms, the solenoid dissipated around 24 watts, causing it to heat up significantly. The plastic armature softened and compressed, causing the plunger to stick. The plunger heated up and melted the plastic tips on the plunger that would normally strike the bells. The spring that pulls the plunger back started to lose i...

PWM-based light dimmer/speed controller

Image
A few months ago I modified a window fan to use a light dimmer as a speed controller. I mentioned that at low speeds, a hum could be heard from the motors since the voltage fed to the fan was not a sine wave. I removed the speed control circuit built into the fan and replaced it with an external light dimmer. When the fan was running at full speed, it drew about 70 watts and had a near-100% power factor. However, as the dimmer was reduced to a lower setting, the motors got louder and the power factor dropped. In this article, I will describe a PWM-based dimmer that maintains a near-100% power factor no matter the speed setting of the dimmer. The schematic is shown below: gEDA schematic file | Link to simulation A 555 timer (U1) is used to generate the PWM signal and drive the gate drive transformer (T1). Suppose the capacitor C4 is charged at 1/3 Vcc. The 555 timer switches its output on, and the capacitor is charged through D4 and the upper half of the potentiometer. When the capc...