Solar Mailbox project

photo_1

The purpose of this project is to develop a self sufficient Mailbox (real one) that will be powered only by the sun and that will display the number of the house, but only in accordance with the battery level. The system must work autonomously when there is or not enough light to charge the battery.

photo_2

At night: Central Digit On, other one in PWM Modes

 

This type of unique mailboxes are powered by a 5V/80mA Polysilicon solar cell. The sun energy is used to charge a 3 AA NiMH battery.
At night, when there is no light, the PIC is driving the 3 Digit according with a sequence which is defined in its program given in Annex.

Schematic Explanation

schematic

Charger_Control: The Solar Cell is charging the 3 AA NiMH cell trough the “Sziklai pair” composed by the T5 (2N2907) and T4 (1N1711). This is necessary to ensure a very low reverse current when the sun is off and the battery at full charge. Control of the charge can be applied on D5 with a “1” level from the PIC , which will reverse the T6 that define the current in T5 base. For Battery protection purpose, the value of Zener diode DZ6 must be 4.6V to prevent the battery for over-charging which will degrade significantly its life time. This function is not yet managed by the PIC program and is reserved for further use.

LED_OR_control: The 3 digits are controlled by 3 separate 2N1711 (each digit is compose about 20 white LED). The control signal is the OR between a PWM signal, that ensure a constant background level of light plus a “blinking” part which is the sequence generated by the PIC.

Sun_Sense: Just a low pas filter composed of R8 and C6. Beware that leakage current from the PIC can affect the level. This prevent R8 to be bellow 39KOhms.

Vbat_sense: These 2 diodes in serial create a 1.3V constant voltage that can be measured by the PIC to determine the level of the battery. This function is not yet managed by the PIC program and is reserved for further use.

Cpu: The PIC16F628 operates with a 32.768KHz crystal oscillator. This frequency have been selected, not to consume too much. In this condition, the PIC is able to operate down to 3V.

photo_3

Internal Wiring

photo_4

PCB zoom

Behavioral Explanations

Apart when the Battery is totally low, the PIC is running and infinity loop which period is approximately 1 second, the red led is blinking accordingly.

During day light the SunSense signal is high and the PIC is not performing any operation (than the 1 second blinking loop). The Green led is on. If the battery voltage is low enough, the Solar cell is charging it. If the Battery voltage is above 4.6V (3 times 1.3V), then the DZ6 is drawing the current to ground protecting the battery cells. In the future Vbat_sense and Stop_Charge should be used.

During night the SunSense signal get low and the PIC is programmed to:

  • Generate a PWM signal (100Hz, Duty Cycle of 5%) on the PWM pin
  • Generate a “blinking” sequence on the 3 separate control signals (1 minute period)

PIC Source code

source_code_1

source_code_2

 

MAX6953 Development board

MAX6953

The MAX6953 from Dallas Maxim is a compact cathode-row display driver that interfaces a microprocessor (like PIC or AVR) to four 5×7 dot matrix LED display trough an I2C compatible serial interface. The chip includes some features that can help us to handle easier the displaced data. These features are included on chip ASCII 104 character table and also fond data for 24 user definable characters, low-power shutdown mode, segment blinking that can be synchronized across multiple drivers if desired, test mode that forces all LEDs on (so that we can handle led problems) and also 16-Step digital brightness control that maybe differs from panel to panel.

1

In every MAX6953 we can set a 4 bit address via only two pins (AD1 and AD0) and with that way we can connect 16 drivers controlled from the same channel building huge LED displays. The chip is available in 36 pin SSOP and 40 pin DIP Packages.

Photos

2

3_th

4

Schematic

MAX6953_Dev_Board_Schematic

4 channel infrared remote relays

Description

4 Channel Infrared (IR) Remote controller is  using  HT12A and HT12D encoder / decoder chips from Holtek.

Features

  • Supply – Transmitter : 3 to 5 VDC, 5 V @ 20 mA & Receiver : 5 VDC @ 200 mA
  • Output : 4 channel Latch or Momentary on board Jumper for selection
  • Crystal based oscillator for reliability of operation
  • Jumper selectable 8 bit address code
  • LED output to indicate reception
  • On/Off slide switch in the transmitter
  • Power-On LED indicator in the Receiver / Transmitter
  • Valid transmission indicator
  • 4 LED for Relay On/Off status
  • Four mounting holes of 3.2 mm each
  • PCB dimensions – Transmitter : 43 mm x 56 mm & Receiver : 80 mm x 73 mm

Schematic

 

 

 

Parts List

Receiver BOM

 

Transmitter BOM

HT12A/HT12E Datasheet

Video

Dual Relay Driver Board

photo

Description

Dual Channel Relay Board is a simple and convenient way to interface 2 relays for switching application in your project.

  • Input – 12 VDC @ 84 mA
  • Output – two SPDT relay
  • Relay specification – 5 A @ 230 VAC
  • Trigger level – 2 ~ 5 VDC
  • Berg pins for connecting power and trigger voltage
  • LED on each channel indicates relay status
  • Power Battery Terminal (PBT) for easy relay output connection
  • Four mounting holes of 3.2 mm each
  • PCB dimensions 49 mm x 68 mm

Schematic

schematic

Parts List

parts

Solid state relay switch

photo

Description

Solid State Relay Switch is a simple kit which will help you control (ON / OFF) a single high power circuit from a low power drive.

  • Load – 24 to 240 VAC @ 500 W
  • Trigger voltage – 2 to 5 VDC (TTL) @ 10 mA
  • Input isolated with use of Optocoupler
  • Power Battery Terminal (PBT) for easy input 230 VAC mains and load connection
  • Terminal pins for connecting input trigger signal
  • Heatsink for TRIAC
  • Four mounting holes of 3.2 mm each
  • PCB dimensions 29 mm x 74 mm

Schematic

schematic

Parts List

parts

Audio VU meter 9 leds

photo

Description

5 LED VU Meter kit is based on LB1409 IC from SANYO, which will indicates the volume level of the audio signal it senses

  • SUPPLY 12V DC @ 50mA
  • PR1 REF SET
  • PR2 AUDIO LEVEL SET

Schematic

schematic

 

Parts

parts

 

Flyback Transformer Driver

flyback

General Description and circuit operation

This is an efficient flyback driver for modern cylindrical rectified television flybacks. Many sites doesn’t provide circuits driving these transformers, they simply say that they are bad.

I don’t agree. In fact I built this circuit. I spent a lot of time for finding resonant frequency (around 15Khz) and duty cycle. These transformers best work at around 90% duty cycle. You may notice corona breakdown at terminals and pfffff sound (as well as the ozone smell) when adjusting the off time trimmer to near 500-300 ohms. Of course it will work for other tipes of flyback as frequency and duty cycle have a large range.

Frequency range can be increased using multiposition switch for other values of C3 capacitor ,for example 2 nF for 80KHz-200000KHz, but didn’t found flybacks with so high resonant frequencies, in addition with higher values of c3 , eg 200nF, 2uF the
frequency will drop making possible the use of ignition coils, and rectified power transformers @50Hz to charge high voltage electrolitic caps at 300-400V). Unfortunately my ignition coil died because insulation breakdown (too long drawn arcs)…

I was able to power a small (20cm) Spark Gap tesla coil Using these dc rectified flybacks to charge primary tank capacitor.

The operation is simple

The 555 is wired as an astable and the capacitor is charged only through the 4,7Kohm trimmer (notice the diode) and discharged only through the 2.2 Kohm trimmer, making the duty cycle full adjustable. The square wave is then feed in a totem pole made up of a 2N3904 and a 2N3906, which are cheap, and easy to find. The totem pole ensures the gate being charged and discharged very fast (approx 50nS i think). The IRF840 is a cheap (i found it for 4euros) reliable and powerful power mosfet, it has current capability of 8 A continuous and 32A pulse, 800V drain source voltage, protecting internal zener diode.  There is a snubbing network to ensure that voltage spikes are kept low (unless the insulation of the  transformer start to leak) protecting both transistors and 555 IC. 100 ohm is a compromise between decay time and voltage spike.

Comments and specifications

The 100 ohm snubber must me a 5W resistor, or it will burn at long operations
The led is only for safety purposes
Use a dead man switch (pushbutton) for safety
The power supply must supply at least 2-3 A if you want decent arcs (20000 KV)

Dangers

The flyback driven in this way can supply a significant current, aldough the heart fibrillation starts at 30mA I recommend caution to avoid painful arc-burns. The arc is a hot plasma, never operate the circuit in presence of flammable substances. Charging high voltage capacitors is a serious life threat, so if you arent unexperienced just draw arcs and no more This device when rectified generates static voltage that can be a little annoying…. (or fun, i sprayed with corona a plastic pen from positive terminal and then i was able to attract little pieces of paper)

Disclaimer

I don’t assume any responsibility of the damages or discruptions dove by this device, to persons or things. Any irresponsable action would be a serios danger. This is high voltage threat it with respect.

Tiny DDS – Open source DDS generator

68747470733a2f2f7261772e6769746875622e636f6d2f6865727074726f6e69782f74696e792d4444532f6d61737465722f646f63756d656e746174696f6e2f6464732e6a7067

This project is an open source (hardware & software) DDS generator, based on: smart TFT module, AD9834, LM7171 fast amplifier.

Description

The homemade function generator is a quite common project on the internet. We can find different ways to do it:

  • The quick & dirty way based on a DDS module bought on eBay
  • The analog version based on a MAX038 / XR2206
  • The “clean” way based on a FPGA and a fast DAC (e.g. http://www.circuitben.net/node/14)
  • The software way (e.g. Arduino + R/2R DAC)

From my side, I wanted a small one which could fits my needs without being too expensive. According to me, such generator should at least:

  • Be easy to use
  • Output a signal from 1Vpp to 10Vpp (+/-5V), from 0 to 1MHz
  • Have a low profile
  • Without electric hazard (shall work on a 12V DC)

Schematic

dds_schematics

Choosing the DDS chip

I first started to look for a cheap DDS chip on eBay; you have to be careful because most of DDS chips have only a sinusoidal output. Since I also want a triangular output, I have chosen the AD9834. According to its datasheet, this component is able to output a frequency of 37.5MHz from a clock of 75MHz… But do not expect a clean waveform at such frequency: without an internal PLL, this signal would be defined by only 2 points.

From my personal experience, I consider that a waveform shall be defined by 10-20 points to be well restituted. Relying on a 75MHz clock, the maximal output frequency would be 7.5MHz… This is not a very good performance for a professional equipment (even if the cheapest generators do not go above 4MHz), but it is quite reasonable for a hobbyist project.

The AD9834 can be found at $5 on eBay.

Amplitude control

The amplitude of the AD9834 can be controlled through different ways:

  • Constant amplitude of 1Vpp (by default on most COTS), by wiring a resistor between the FS_ADJUST pin and the ground: this is quite annoying because an additional external amplifier will be need to set the amplitude to a desired level.
  • Variable amplitude, by wiring a potentiometer between the FS_ADJUST pin and the ground: this solution is really easy to implement, but it will not allow a software management needed, for example, by the amplitude modulation.
  • Software variable amplitude, by wiring a DAC to the FS_ADJUST pin. This solution is a bit more complex, but it will allow to implement some useful functionalities. I choose this way.

The amplitude will be set by the microcontroller of the smart TFT module (PIC32MX795). Unlike the other manufacturers (Atmel, ST…), Microchip did not include a DAC on their $10 chip… An external DAC is needed (an AD5310 found on eBay for $0.8 – 10 bit / SPI, SOT23-6 package). A small voltage divider is put between the DAC and the FS_ADJUST pin in order to transform the 0-3.3V of the DAC into 0-1.2V handled by the AD9834:

dds_vpp_ctrl

Notice: the logical levels are reversed: the minimal amplitude is reached when the DAC output is 3V3 and the maximal amplitude is reached when the DAC output is 0V.

AC coupling

The AD9834 generates a signal with a non-null offset, variable according to the amplitude. At this point, this offset is very annoying and shall be removed. Two possible ways:

  • A high pass filter (a simple RC filter): this solution ensures an ideal AC coupling, but is problematic for the low frequency signals (a huge RC filter would be needed for frequencies below 100Hz)
  • A differential amplifier: it is possible with the AD9834 because this component already has a differential output (IOUT / IOUTB pins). This solution makes the AC coupling effective even for very low frequencies, even for a DC signal. Therefore, the AC coupling will not be “ideal”: a small offset will be injected, and possibly some additional distortions due to the tolerance of the components (OPAMP & resistors). Nevertheless, it remains the best way according to me.

dds_ac_coupling

The ratio R15/R12 is set such as the maximal voltage outputted by U6 is +/-3.3V.

Offset control

Nothing difficult here: we just have to generate a DC signal between -3.3V and +3.3V. I use another AD5310 with a small OPAMP:

dds_offset_ctrl

Notice: here again, the logical levels are reversed: the minimal offset is reached when the DAC output is +3.3V and the maximal offset is reached when the DAC output is 0V.

Final stage

Here, we have 2 signals: the one coming from the DDS (between -3.3V and +3.3V, AC coupled) and the one coming from the offset control (between -3.3V and +3.3V too). We just have to mix these 2 signals and amplify them to get a +/-5V output:

dds_final_stage

The LM7171 is able to output more than 100mA; nevertheless, the current is limited through a 100R resistor. A small LC filter is also implemented before the main output for filtering the 75MHz clock residual.

PWM output

Nothing complex here: a simple CMOS gate for buffering the PWM output of the microcontroller. I tried to use a fast comparator on the triangular output of the DDS, but the jitter was too important; I finally gave up this solution.

dds_ttl_output

Analog input

Very minimalist… A simple resistor for limiting the input current, and a common Pi filter. The sampling frequency is not very high (~ 1KHz) because the internal ADC of the microcontroller is also used by the touchscreen inside an ISR.

dds_analog_in

Power supply / regulators

The generator is powered by a standard 12V plug. Some switching regulators produce the 5V (for the smart TFT module) and the +/-7V (used by the analog stage). The 3.3V comes directly from the smart TFT. The LT1616 are an expensive components on Farnell, but I found these on eBay for $0.8. Notice that any buck regulator should do the job here (+5V@200mA, +/-7V@200mA).

PCB

The whole schematic can be easily routed in a small PCB (smaller than a credit card). The PCB is composed of 2 layouts, with a common GND plan. The LM7171 shall be routed with care: due to its topology (fast OPAMP – 400MHz), a bad layout will make it oscillate. For this reason, I also add a footprint for a small 1pF capacitor: if the layout is not correct, I should be able to limit the oscillations with it.

dds_pcb_3d

Assembling the board

The PCBs (from SeeedFusion):

dds_pcb

The finished board:

dds_board

Assembled with the smart TFT:

dds_tft

dds_final

Software

After a first quick & dirty attempt, I had to enhance the interface look; this one is working properly, but I admit that the old win95 look is really outdated. Moreover, there is a flickering issue on some widgets which are highly solicited (e.g. the frequency valueBox). The new interface is based on a brushed metal background, with dark widgets. I have also implemented the double buffering for the concerned widgets:

dds_new_gui

The new look is more modern (according to me; I’m not a graphic artist :s). The interface is still very reactive, but the memory footprint literally explodes (more than 90% of the flash memory is used). The user interface is composed of 4 “pages”:

  • DDS (sinus/triangle waveform, with frequency / amplitude / offset control)
  • PWM (PWM signal only)
  • ARB (arbitrary waveforms & modulations)
  • A menu page

dds_ui_page

Sinus / triangle waveform generation

These waveforms are directly generated by the AD9834, just by configuring its internal registers through the SPI bus. Nevertheless, a small detail shall be handled by the program: the frequency register is coded on 28 bits, split on two 16 bits registers. The access to the frequency register is not an atomic operation and shall be buffered first (through the FREQ0 / FREQ1 registers).

Arbitrary waveforms generation

I use the internal DAC of the AD9834 to generate these signals: this solution allows to keep the whole analog stage as is (same amplitude / offset control). For using the internal DAC, I configure the AD9834 with a triangle signal of 0Hz; then, I set the phase register to obtain the desired output voltage.

Some basic waveforms are available, such as saw tooth, exponential, noise, sin(x)/x… It is also possible to draw a waveform and play a wav file. However, there is a bandwidth issue: the AD9834 is accessed through a SPI bus, and even with a 20MHz clock, several microseconds are needed to send a single sample on the output. At the end, the microcontroller cannot provide more than 100kSPS (kilo Sample Per Second). Above this rate, the program is ran very slowly (most of the CPU time is spent into the ISR).

Go further

Even if this generator works properly, I have to admit that its electrical characteristics are closer to a gadget than a professional equipment (SNR below 45db). However, it would be easy to enhance its performances by modifying some components:

The DDS chip

A DDS such as the AD9102 is much more powerful than the AD9834; besides its more accurate DAC (14bits vs 10bits), its internal LUT can be reprogrammed: where the PIC32 can only provide 100kSPS, the AD9102 can provide up to 180MSPS (1800 time more). Unfortunately, this device is more expensive ($15/u at 100u) and is available only in LFCSP package (quite hard to solder).

The analog stage

The power supply should be changed first: the +/-7V coming from the buck regulators are obviously problematic (the output signal has some noise – 1.5MHz @10mVpp). A simple power supply based on a toroidal transformer and some 78xx / 79xx would be better. The LM7171 OPAMPs should also be changed by a more appropriate chip (a current feedback OPAMP for example).

DAC

The 10 bits of the AD5310 might not be the wisest solution for this application: for 10Vpp, 1LSB is equivalent to ~10mV, which is pretty good… if you use the whole range of the DAC! I reduced the range from 0-1023 to 0-920 due to the tolerance of the components, leading to an 11mV/LSB resolution. A 12 bits DAC would be a better solution here, thus a true voltage reference (the current one is derived from the 3.3V supply).

NiCad-NiMh Battery Monitor

NICAD_NIMH_BATTERY_MONITOR

 

This project is a NiCad-NiMh Battery Monitor based on LM3914 IC

Description

The simple project can be used as test gear. Its easy way to monitor the battery voltages, especially dry cell, NICAD, NIMH, supply up to 1.5 Voltage. Battery Monitor range 0.15V to 1.5V. The project is built around Texas instruments LM3914, The LM3914 senses the voltage levels of the battery and drives the 10 light emitting diodes based on the voltage detected on input connector. Circuit works on 5V DC. J1 Jumper is used to select the DOT mode or bar graph mode.

Schematic

NICAD_NIMH_BATTERY_MONITOR_SCHEMATIC

 

Parts

NICAD_NIMH_BATTERY_MONITOR_BOM

 

TOP PCB Companies