Subscribe
Showing posts with label * Elektor 2005. Show all posts
Showing posts with label * Elektor 2005. Show all posts

Electronic building block

Posted by Circuit Labs on Thursday, November 13, 2008

Modular design and construction using E-blocks

 e05b050Author: Evelien Snel & David Daamen

We often hear from our readers that they don’t have enough time to solder all those parts in a constructional project. Or that there are too many complex microcontroller projects in Elektor Electronics, for which you have to be a genius to program them. It is indeed difficult to make modern technology accessible to everybody. But the best comes to those who wait… join us to discover the numerous possibilities that EBlocks offer!

       Some time ago the editorial team became aware of E-Blocks. At first we wondered what we could do with them. Some didn’t see the point of them, others thought they were fantastic. In due course the balance shifted to the ‘yes’ camp, as the designers and editorial staff began to admit that ‘it was all thoughtfully and well designed’.

Figure 1. The USB Multiprogrammer is at the heart
of the system.e05b050[25]

      But why did people have all these reservations about E-Blocks? Was it due to the fact that the hardware was already completed? Was it because you no longer had to solder? Was it because you ‘only’ had to program? Not everybody is convinced yet, and it will take time to get used to the idea.

      In any case, we decided to let you make up your own mind because there was one thing everybody agreed with: E-Blocks are very handy when you want to design something very quickly, and without much soldering. You can first build a prototype using a handful of E-Blocks, test the design and only then start with the design of the PCB.

       But what exactly are these E-Blocks? They are a collection of interchange-able boards that can be used to quickly and easily put a microcontroller system together. Apart from several microcontroller boards, there are many other EBlocks available from the manufacturer, our long-time advertiser Matrix Multimedia. There are input boards, output boards and combined I/O boards. Last but not least, a whole range of sensors is provided that can be plugged into the E-Blocks system.

USB Multiprogrammer
Let’s take a look at the E-Blocks USB Multiprogrammer (see Figure 1). This E-block makes the perfect starting point for your own projects. The Multiprogrammer can use many different
types of PICs (see inset) and also has a USB port that can be used to connect the E-Blocks system to a PC. The USB connection is not only there to program the system, but it can also be used with most computers to provide a simple system with power. In many cases there is therefore no need to use a mains adapter. There is of course a socket on the board that takes an external power source for those projects that require more current than the USB port can provide.

e05b050[3]<< Figure 2. Mobile telephone application - USB Multiprogrammer (1), keypad (2), RS232 board (3), LCD board (4), GPRS unit (5), loudspeaker (6) and SPI board with D/A converter (7).

 Plug and Play
The I/O lines of the PIC are made available along the edge of the board. There is a maximum of five ports, each with a maximum of 8 lines, depending on the type of PIC used. The connections between all E-Blocks have been standardised, making it very easy to combine the parts to form a system. A peripheral is connected to a port of the microcontroller simply by plugging in a board. This distinctive method of construction has many advantages, since in virtually all microcontroller systems the majority of the hardware consists of a combination of standard building blocks. Instead of redesigning these blocks for every prototype and then constructing them, you can now simply pick them out of a spares box. When you have completed your project you can easily dismantle it and use the individual blocks again. Or not of course: the E-Blocks are also perfectly suitable for use in a permanent design. A sturdy metal base plate has been designed for just this purpose. It has a grid of mounting holes, which correspond with the holes present on all EBlocks. We should however point out that a system built this way with E-Blocks will always be physically larger than isstrictly necessary, but the extremely short development time certainly makes up for this.

Programming: frightening or challenging?
Part of the design naturally involves some programming of the hardware. For some of you this aspect of the design is a bit of a challenge that makes the project more interesting. For others this is the main reason not to get involved with a microcontroller project in the first place. In any case, even those of you who are comfortable with microcontroller design are not necessarily expert programmers. Programming is a completely different branch of design compared to electronics. It would therefore be very useful if there was a way that made the programming simpler and also reduced the development time. Matrix Multimedia has designed a programming suite especially for use with E-Blocks that satisfies both of these
requirements.

Flowcode
Even if you have no prior experience of programming microcontrollers, you’ll find that you will be able to program even complex systems with the help of Flowcode. It is literally ‘programming with the mouse’. You choose the required functionality from a menu and in this way create a program flowchart. When the flowchart has been completed, the Flowcode program can be simulated on the PC. You can then see on the screen how peripherals such as
LEDs and LCDs behave. This all happens before a single line has been compiled or assembled and has been sent to the microcontroller. Flowcode also make this process of the design a lot easier. The Flowcode automatically includes all the extra required software routines. This doesn’t mean that all background processes remain hidden from view. Flowcode first translates a flowchart into C, after which another process converts this C code into assembler.
At both of these stages you are able to make modifications. Not only can you inspect the code generated, but you can also edit it. It all depends on your preferences: do you want to quickly create a prototype or would you rather program in C, or even assembler? Whichever choice you make, Flowcode won’t get in your way. Quite the opposite.

From idea to systeme05b050[5]

<< Figure 3. Ultrasonic measurement system - USB Multiprogrammer (1), LED board (2), sensor board (3), 7-segment display (4), ultrasonic sensor (5).


The usefulness of this system is ultimately determined by the possibilities it offers. We could go into detail about the inner workings of the USB Multiprogrammer and which processors are supported. But we feel it’s more important to know what you can use it for and have picked a few examples. How about a system that uses mobile phones for remote measurement and control (Figure 2)? If you connect a microphone to the A/D converter of the processor you could use it as a wireless baby monitor. With the addition of your own GPS module you could turn it into a vehicle tracking system. Somewhat simpler, but no less interesting, is the ultrasonic measurement system shown in Figure 3. You could use this to take measurements within the home or as a parking aid in your car. Are you curious about the state of your health? With the help of E-Blocks and Flowcode you can build an advanced
PC controlled ECG and heartbeat monitor in a jiffy (Figure 4).

e05b050[7]Figure 4. ECG and heartbeat monitor — USB Multiprogrammer (1), keypad (2), RS232 board (3), RS232 serial cable (4), LCD board (5), sensor board (6), ECG unit (7), ECG cables and electrodes (8).

 

 

 

 

 

Sensors
We could continue like this for a while. The possibilities really seem to be endless. One of the biggest advantages of the whole E-Blocks system is that it isn’t limited to just the microcontroller boards, displays and pushbuttons, but that a lot of thought has gone into interfacing with the outside world. The communications facilities, for example, include a GPRS unit and an Internet board. There is also a huge range of sensors available. The list of medical sensors incorporates a respiration monitor, which can be used to measure the lung capacity, and a blood pressure sensor that provides electronic measurements of the systolic and diastolic values. There are also ECG sensors and heartbeat monitors, which can be used to display the rate and shape of your heartbeat.

There are also a number of sensors available that come under the category of process technology. These include a flow rate sensor, oxygen sensor, pH sensor and a gas pressure sensor. Then there are sensors such as radiation detectors, accelerometers, motion detectors and magnetic field strength sensors. Sensors that have a more everyday use such as a microphone, temperature sensor and relative humidity sensor are also included in the range.

Hit or miss?
Well, you tell us. We are now convinced that E-Blocks and Flowcode are a magical combination that adds a new dimension to the way that you approach microcontroller design. We purposely said it adds a dimension, since it is your own creativity that leads to a unique design. And even here E-Blocks can help you out: there are also two prototype boards available, which have a pair of standard connectors (Figure 5). One is like a standard experimenter’s board with a matrix of holes; the other also includes a breadboarding area. These last EBlocks complement the system perfectly. With only a little soldering and without having to choose individual components or delve into the internal registers of a microcontroller, you can still be very creative in modern electronics.

e05b050[9] e05b050[11] << Figure 5.
You can still experiment with designs even though you’re using standard building blocks

USB Multiprogrammer

The E-Blocks USB Multiprogrammer supports the following PICs:

PIC12F629, PIC12F675, PIC12F635, PIC12F683
PIC16F627A, PIC16F627, PIC16F628A, PIC16F628,
PIC16F630, PIC16F648A, PIC16F676, PIC16F684,
PIC16F688, PIC16F636, PIC16F716, PIC16F72,
PIC16F737, PIC16F73, PIC16F747, PIC16F74,
PIC16F767, PIC16F76, PIC16F777, PIC16F77,
PIC16F818, PIC16F819, PIC16F83, PIC16F84A,
PIC16F84, PIC16F870, PIC16F871, PIC16F872,
PIC16F873A, PIC16F873, PIC16F874A, PIC16F874,
PIC16F876A, PIC16F876, PIC16F877A, PIC16F877,
PIC16F87, PIC16F88
PIC18F242, PIC18F248, PIC18F252, PIC18F258,
PIC18F442, PIC18F448, PIC18F452, PIC18F458,
PIC18F1220, PIC18F1320, PIC18F2220, PIC18F2320,
PIC18F2331, PIC18F2410, PIC18F2420, PIC18F2431,
PIC18F2439, PIC18F2455, PIC18F2510, PIC18F2515,
PIC18F2520, PIC18F2525, PIC18F2539, PIC18F2550,
PIC18F2585, PIC18F2586, PIC18F2610, PIC18F2620,
PIC18F2680, PIC18F2681, PIC18F4220, PIC18F4320,
PIC18F4331, PIC18F4410, PIC18F4420, PIC18F4431,
PIC18F4439, PIC18F4455, PIC18F4510, PIC18F4515,
PIC18F4520, PIC18F4525, PIC18F4539, PIC18F4550,
PIC18F4585, PIC18F4586, PIC18F4610, PIC18F4620,
PIC18F4680, PIC18F4681

A few of the available E-Blocks modules

e05b050[13]

Sensor interface board
It’s not just the E-Blocks that have standardised connectors; all E-Blocks sensors have them as well. They can be connected to the E-Blocks system via the sensor interface board. This interface board already contains an LDR sensor.

 e05b050[15]

LED board
This board has eight LEDs that are individually driven via an I/O line. When a ‘1’ is written to an output line, the LED
will turn on. This board can be linked to another board.

 e05b050[17]

LCD board
This board has an LC display with two lines of 16 characters.

 e05b050[19]

Switch board
This board contains eight pushbuttons. When a button is pressed, a ‘1’ will appear at the corresponding I/O line. This board can be linked to other E-Blocks.

 e05b050[21]

Quad 7-segment display
This board contains four 7-segment displays. The displays are multiplexed, so only 2 I/O ports are required to control the 32 segments.

 e05b050[23]

SPI board
This E-Block has an 8 KB SPI (Serial Peripheral Interface) compatible serial memory chip as well as a D/A converter.

The full E-Blocks catalogue, further information and special introductory offers can be found at www.elektorelectronics.co.uk/eblocks

(Elektor Electronics Magazine - 11/2005)



Download this article
#e05b050.pdf >> or SkyDrive link.

--> Read more...

Programming in pictures

Posted by Circuit Labs on

Coding without keywords

Author: Burkhard Kainka

e05b044

Microcontrollers are particularly hard for beginners to program. Graphical user interfaces
help to show interdependencies, but they have their limitations. We look at a couple of systems and some simple application examples.

<< Figure 1.Schematic diagram of a PSoC and its functional blocks

      Everyone has had the experience of recognising a face, but being unable to put a name to it. It is just the same in programming: commands and keywords, register names, the names of all the various control flags: it is a lot to hold in the mind at once. It is often easier to think in a ‘graphical’ way, for example describing the operation of a microcontroller in terms of a flow chart or an equivalent circuit diagram, before embarking on the work proper.

     This is almost the same as using a graphical interface: instead of typing in program text, you can simply click on logic functions and connections, draw lines between objects with a sweep of the mouse, and set properties of various elements by simply selecting from a list.

    Some manufacturers of microcontrollers have recognised this demand. In the struggle for market share it is no longer enough just to compete on performance figures; the product must also be easy for potential customers to use. The value of making a user’s first experience with a new chip a success makes the (high) development cost of graphical programming tools entirely justifiable.

Download PDF version for larger diagram

Figure 2. The analogue blocks that are in use are highlighted in colour in PSoC Designer’s Device Editor.

     We frequently have the choice between a graphical and a text-oriented programming environment. In general the graphical environment will seem simpler since in many cases decisions have already been made behind the scenes to make it harder for us to make mistakes. This can, however, be a limitation in more complex projects. The immediate experience with graphical programming environments and the ready-made projects supplied with them is indeed positive: it looks so easy that anyone could use it. However, this overlooks the fact that the interface is hiding many decisions. It is possible, for example, that objects have been given various properties that can only be revealed by clicking on them with the mouse. If you take a working example project, it is not always immediately obvious how many properties and decisions are hidden away in the background. Perhaps only when you try to build your own project from the ground up will it become apparent that you are standing before as great a mountain of information as if you had used a text-based interface.
     

      In other cases you might embark confidently on an ambitious programming task, seemingly made child’s play by the graphical interface. Then suddenly an insurmountable obstacle crops up. The problem could be solved with three lines of program code; but unfortunately the whole project would then have to be restarted from scratch in text form. Whether a graphical programming interface is worth using, and whether it makes work any easier, can only be decided easily in a handful of cases. Nevertheless, it is worth familiarising oneself with this style of programming. The reports of our experiences below will give an overview of the possibilities. In this article we will not be covering the microcontroller building-block system EBlocks, whose Flowcode programming interface (shortly to become available at http://www.elektor-electronics.co.uk) is suitable for use even by beginners: more on this system will be found elsewhere in this issue.

PSoC Designer
     The PSoC family from Cypress is a series of microcontrollers equipped with an extra mixed-signal array. Each PSoC controller includes highly-reconfigurable analogue and digital blocks (see Figure 1) with programmable interconnections. This architecture allows the user to match the external interfaces of the device to the requirements of the application. The device also includes a fast CPU with in-circuit programmable Flash ROM, RAM, and configurable ports. Programming and connecting the various blocks is very complex, since there are countless configuration possibilities, as well as many constraints. Finally, hidden behind the configuration of each PSoC block and the connections that form a circuit is a large number of registers and corresponding switches. Programming all these bits by hand is a job beyond mere mortals, and so the only practical approach is to develop the circuit graphically.

Download PDF version for larger diagram

Figure 3. The sine wave generator project also uses the digital block Counter8_1.

       The user is assisted in this by ‘PSoC Designer’, a complex programming environment which even includes an assembler and a C compiler. Generally, most of the time is taken in constructing the circuit. With small projects at least, the amount of text-oriented programming is relatively small.

        The quickest way to start using the system is to take a ready-made PSoC project and expand and alter it. In this way all the necessary settings for a project will have already been made correctly. In our case, we took the example project asm_example_dac_adc.SOC configured for the CY8C27443. The program turns the device into an adjustable sine wave generator, taking data from a lookup table of sine values and passing them to a D/A converter. An A/D converter measures the voltage at an analogue input and sets a timer appropriately so that a potentiometer can be used to control the frequency of the output sine wave. To expand this project, create a new project with its own name, making a clone of the example project.

       Once the project has been loaded it is possible to select between the Application Editor, which shows the assembler source code, and the graphical Device Editor. Figure2 shows a section of the Device Editor screen (here showing only the analogue PSoC blocks and their connections). Four configured blocks can be seen: PGA_1 is a programmable amplifier, here used as an input buffer with gain set to 1. The input is connected to pin Port_0_1. The output of the buffer amplifier is connected to the input of the ADC block DELSIG8_1, a delta-sigma
converter with 8-bit resolution. The third PSoC block is the 6-bit D/A converter DAC6_1, whose output is connected to pin Port_0_5. In addition to the analogue blocks, this project also uses the digital block Counter8_1 (see Figure 3). The timer sets the rate at which the sine values are output, but is not itself connected to an output pin. The digital part of the delta-sigma converter can also be found in the digital section.

Pin overview
         The complete circuit as seen from the outside has one input, where a potentiometer is connected (VR), and one output for the sine wave signal (AnalogOutBuf_1). The selected pins can be seen in the Device Editor (see Figure 4). This is practically the complete circuit: of course VSS and VDD need to be connected, but there is no crystal and no reset circuit. The microcontroller operates from an internal 24 MHz RC oscillator with an accuracy of +/–2.5%. Each PSoC block has a large number of configurable parameters, which can be set at the design stage. The parameters can also be changed under program control. Whenever a new block is added to the circuit, PSoC Designer adds the necessary code to the project in the form of a library module. The main program main.asm then remains very high-level and can be examined in the Application Editor view. The blocks which are used must first be enabled, which is done using standard calls. The program then runs in a simple loop (see listing).

         The project can now be built using ‘Build’. The result is the file ‘Sine.hex’ in the ‘Output’ subdirectory of the main project directory. This file can now be transferred to the target system, for example using MiniProg (see box). MiniProg is controlled by its accompanying software ‘PSoC Programmer’ (see Figure 5). It is important to select the correct device family (27x43-*XI) and device type (CY8C27443). Set the acquire mode to ‘Reset’ and then apply power to the device using ‘Power Device’. When programming has been successfully completed, set ‘Power Device’ to off and then on again. The necessary potentiometer is already present on the CY3210 MiniEval evaluation board (see box), connected to the correct input. The sine wave signal will now be present on pin P05, and its frequency can be set as desired between approximately 15 Hz and 260 Hz.

PSoC Express
       Using the PSoC Express graphical development tool is is possible to develop applications for the Cypress PSoC mixed-signal devices without writing a single line of C or assembler code: the complete program is created automatically. One reason that PSoC Express was brought out by the manufacturer was perhaps that using PSoC Designer is very efficient, but not always completely straightforward. Presumably it was not at the right level for some potential users. The purely graphical interface of PSoC Express can fill that gap, since it is very simple and motivating to use, and results can be achieved with very little effort and in a very short time.

e05b044[7] 
Figure 4. Device Editor gives an overview of the selected pins.
 e05b044[11]

Figure 7. The desired threshold values can be entered into the ‘valuator’.

e05b044[9]

Figure 5. MiniProg (see box) is controlled by the PSoC Programmer software.

 e05b044[13]

Figure 6. The work area of PSoC Express shows the input and outputs as well as a ‘valuator’.

       There are just four steps to using this new tool:

1. Select the input and output blocks from a catalogue. For inputs this includes such things as temperature sensors, analogue voltage inputs, switches and buttons as well as I/O pins; for outputs it includes MOSFET switches, relays, LEDs and fans.

2. Configure the function of each block using its parameters.

3. A simulation mode allows the design to be verified. Input values can be set using sliders or knobs and the behaviour of the outputs can be observed.

4. In the final step a suitable PSoC device is selected and the hex file containing the programming data is generated.

       PSoC Express is of course a specialised tool, which cannot cover all the potential uses of the PSoC family. Rather, it is oriented towards constructing analogue and digital controllers and displays. If, for example, it is desired to indicate a given voltage range using LEDs or turn on a fan at a specified temperature, PSoC is the right tool for the job. In our example we will build a display for monitoring a battery, indicating voltage over a set range using LEDs.

      The ‘undervoltage’ range is below 2.2 V, and is to be indicated by a red LED. The range up to 2.9 V is to be indicated by a yellow/green LED, and the range above 2.9 V by a flashing green LED. The first step is to create an input suitable for measuring from 0 V e05b044[15]to 5 V in the work area (see Figure 6). The second step requires a ‘valuator’ of type ‘Setpoint Region’, in which the necessary threshold values are entered (Figure 7). Finally, the outputs are dragged onto the work area. A transfer function must be defined for each output. In each case a ‘TableLookup’ type is suitable. You can then decide on which input or valuator the output state is to depend, and then define the individual states (Figure 8).

Figure 8. The transfer function
for the green LED is set using a lookup table.

No soldering

Programming for the project is now complete, and it can be simulated on the screen, as shown in Figure 9. A slider is used to adjust the input voltage and the state of the outputs can be observed.

Figure 9. The completed project can be
simulated on the screen.e05b044[17]

           When the simulation has completed satisfactorily, the project can be built using ‘Build’. At this point the controller type needs to be selected. Building the project takes a little time: behind the scenes, PSoC Express is creating a complete PSoC project in C, launching the C compiler in PSoC Designer, and creating an executable program. A circuit diagram and a data sheet with the pinout and a tabular functional description are also produced.

        All that is left to do is transfer the code to the target system. We can use the MiniEval board, and control the input using the potentiometer. Output 2 and the flashing output 3 are suitably connected to LEDs on the board, so that operation can be checked without any extra soldering.

           The curious user can examine the C project that has been created using PSoC Designer, if for no other reason than to learn a little about C programming and program structure. The kernel of the program is an infinite loop which reads the inputs and drives the outputs.

       The program created is always built around an infinite loop which includes all the decision and control processing. It is not possible to add processes that run at specified times or to use special-purpose analogue blocks such as filters. If all that is wanted is a simple permanent linkage between input and output, this interface is, however, entirely adequate. PSoC Express is available for free download from www.cypress.com/psocexpress.

MiniProg and MiniEval

e05b044[19]

The low-cost CY3210 starter kit includes: the MiniProg1 programming device, which has a USB interface; a small miniEval printed circuit board for the processor, with a 28-pin IC socket; and two PSoC sample devices, a CY8C27443 and a CY8C29466. A manual, a CD containing the complete PSoC Designer and PSoC Programmer software, and a USB cable are also included. It is possible to get started immediately with this kit. The printed circuit board includes four LEDs, a pushbutton and a potentiometer. Power can be taken from the USB port via MiniProg1, or the controller (once programmed) can be powered from a separate 5 V supply.

The PSoC family
e05b044[21]The figure shows the PSoC architecture divided into four main blocks: the processor core, the digital peripherals, the analogue peripherals, and system resources. Configurable global buses allow these to be connected to form a complete system.

     One member of the PSoC family is the CY8C27443, which can use up to five I/O ports as analogue and digital inputs and outputs. There are eight digital blocks (8 to 32-bit timer, counters, PWM generators, up to two full-duplex UARTs, SPI masters and slaves etc.) and twelve analogue blocks (A/D converters up to 14 bits, D/A converters up to 9 bits, programmable amplifiers, filters and comparators etc.). The device has an M8C processor core running at up to 24 MHz and has an internal 24 MHz/48 MHz oscillator, 16 kbytes of Flash program memory and 256 bytes of data RAM. The PSoC Designer software is free.

Sine wave generator output loop

loop:
lcall DELSIG8_1_fIsDataAvailable // if ADC conversion complete then.....
jz loop
lcall DELSIG8_1_cGetDataClearFlag // get ADC result and convert to offset binary
add A, 0x80
mov [bADCvalue], A // store value for debug watch variable
cmp A, 0x0F // counter period less then 0x03 is invalid due to
jnc LoadCounter // excessive interrupt servicing
mov A, 0x0F
LoadCounter:
lcall Counter8_1_WritePeriod // update DAC update rate
jmp loop
area lit
SINtable: // 64 entry SIN lookup table
db 31, 33, 36, 39, 41, 44, 46, 49, 51, 53, 55, 56, 58, 59, 59
db 60, 60, 60, 59, 59, 58, 56, 55, 53, 51, 49, 47, 44, 42, 39
db 36, 33, 31, 28, 25, 22, 19, 16, 13, 11, 9, 7, 5, 3, 2, 1, 0
db 0, 0, 0, 1, 2, 3, 4, 6, 7, 10, 12, 14, 17, 20, 23, 26, 29
area text

(Elektor Electronics Magazine - 11/2005)



Download this article #e05b044.pdf  >> or SkyDrive link.

--> Read more...

Remote control by mobile phone

Posted by Circuit Labs on

Switch & Control using DTMF signalling

Author: Heikki Kalliola

e05b040        Many of you will have an old mobile phone gathering dust. The circuit shown in this article gives the old mobile a new lease of life, enabling it to switch an electrical appliance on and off in or around the home. The circuit will even talk to you on in reply to predefined commands.

        The overall complexity of the circuit is greatly reduced by the use of a PIC microcontroller. The addition of a speech synthesizer chip allows the control unit to return spoken information to the user on the calling phone.

The system
     The schematic of the Remote Control by Mobile Phone is given in Figure 1. The connector for the headset is plugged into the mobile phone and the wires to the earphone pieces are connected to the input of a DTMF decoder IC type 8870 (IC1). The received signals are amplified by T1 and then applied to pin RB2 of the central microcontroller, a PIC16F84 (IC2). DTMF stands for dual-tone multi-frequency, a tone coding/decoding system that’s been in use on wired telephone sets for almost 30 years now. Each key on the DTMF keypad is linked to a combination of two (nonharmonically related) tones in the audible range. At the receiving side, the tone pairs are decoded into the matching number (0-9, #, *).

        For our application, the mobile phone is set to auto-answer mode. In operation, the PIC micro will continuously monitor the level at RB7 (pin 13). A ring signal will wake up the PIC from its sleep state and cause it to activate the speech chip (IC3) which supplies a ‘spoken’ message to the mobile phone via the microphone connector of the headset. At the calling end, the user hears the welcome message and is prompted to enter the system password (MSG1). The level of the audio signal may be adjusted on preset P2. The selection of spoken text stored in the speech chip is determined by the logic state of control lines A6, A7 and A8.

Figure 1. The circuit contains just three ICs: a DTMF decoder, a PIC micro looking after the internal control functions, and a speech chip.Click to enlarge or download PDF version for larger diagram

      Next, the program running inside the PIC will wait for certain DTMF tones entered by the user on his/her phone (mobile or landline). The received DTMF signals are decoded into the matching numbers by IC1, which supply binary output information on outputs Q1-Q4, with output STD (pin 15) flagging reception of a valid code to the PIC.

      Having received a valid 4-digit password (which is being compared to the one stored in the PIC’s memory), the system will request a function code (MSG2). Depending on the information received in response to MSG2, the micro will pull its RB5 control line logic Low or High. This signal enables a relay to switch a suitably wired up electrical appliance in your home to be switched on or off (for example, a coffee machine or the central heating). The relay may be a solid-state device (which allows direct control from RB5), or a traditional solenoid-based switcher that’s controlled via a transistor buffer. The action executed at the receiving side is confirmed with a spoken message (MSG4 or MSG5). The speech chip contains yet other text messages (MSG3, MSG6 and MSG7) for the processing of situations ‘out of the ordinary’.

The speech chip
      The spoken messages are supplied by a type ISD25120 speech synthesiser which has storage capacity for about two minutes worth of speech. Different memory areas inside the ISD25120 may be selected using address lines A0-A9. Here, the memory has been divided into eight chunks of about 15 seconds that can be individually addressed over A6, A7 and A8. This allows the PIC to select any individual spoken messages and have it played back by pulling the CE control input Low. The spoken messages may be recorded and checked using a microphone and a small loudspeaker connected to IC3. Switches S4, S5 and S6 select the relevant memory area. The relevant message is then recorded on the chip via MIC1 while S2 is pressed. The pushbutton should be released at the end of your message, which can be listened to by briefly pressing S1 (this requires switch S7 to be closed). If you are not satisfied with the result, the text may be re-recorded. During recording ad playing back the messages (for checking) the PIC has to be removed from its socket, else IC3’s address lines cannot be set manually. The inset ‘Messages’ gives examples of texts you could use for the voice feedback, including the associated address settings.

Password changing
    In an application like this, where equipment is controlled from a remote location, it is essential to prevent unauthorised access. In any case, password protection is required. You, the user, may pick your own 4-digit password using the number keys on your mobile phone’s keypad. For this to work you have to open switch S3 (which is closed during normal use). In that case, the four numbers entered on the calling phone after the welcome message has finished will be accepted as the new password, and subsequently stored in the PIC’s RAM memory. If mains outages are common in your home, we recommend powering the circuit from a battery system with mains charging, else the password will be lost. 

e05b040[5] 

Figure 2. Copper track layout and component mounting plan of the PCB designed for the remote control. Be sure to use sockets for the ICs, as the PIC has to be removed during recording of the spoken messages.

COMPONENTS LIST

Resistors:
R1 = 390kΩ
R2 = 1kΩ
R3,R5,R12,R15,R17-R23 = 10kΩ
R4 = 100kΩ
R6-R10 = 33kΩ
R11 = 470kΩ
R13 = 220kΩ
R14 = 47kΩ
R16 =2kΩ2
P1 = 1MΩ preset H
P2 = 25kΩ preset H

Semiconductors:
D1,D2 = 1N4001
T1,T2 = BC547B
IC1 = MT8870BE
IC2 = PIC16F84A-20/P (programmed, Publishers’ order code 040415-41*)
IC3 = ISD25120P (Winbond, Digikey # ISD25120P-ND)
IC4 = 7805CP

Capacitors:
C1,C3,C6,C7,C15,C17-C20 = 100nF
C2,C13 = 1μF 16V radial
C4,C5 = 27pF
C8 = 2μF2 16V radial
C9,C10 = 220nF
C11,C14 = 22μF 16V radial
C12,C16 = 10μF 16V radial
C21 = 1nF

Miscellaneous:
K1 = 4-way SIL pinheader
LS1 = 16Ω miniature loudspeaker
MIC1 = electret microphone capsule
S1,S2 = pushbutton, 1 make contact
S3-S7 = on/off switch, 1 make contact
X1 = 3.579MHz quartz crystal
Mobile phone with headset (see text)
PCB, Publishers’ order code 040415-1*
Disk, PIC source and hex code files,
Publishers’ order code 040415-11 or
Free Download #040415-11.zip
* see Elektor Electronics SHOP pages or
www.elektor-electronics.co.uk

Construction
The above article text having largely described the operation and practical use of the circuit, you should know the function of all switches and other controls and use this information to fit the relevant parts on the case in such a way that the unit is easy to operate in practice.

The source code of the PIC control program written by the author is available as a free download from our website, as well as on floppy disk (order code 040415-11). Those without access to a suitable PIC programmer may also buy the PIC micro ready-programmed as
order code 040415-41.

The PCB artwork is shown at true size in Figure 2. With all components fitted (insert the ICs in sockets) the controls may be connected up via short lengths of stiff wire: S1, S2, S3, S4, S5 and S6, the electret microphone capsule and (if required) the loudspeaker (together with S7). The latter parts are mainly needed to check the spoken messages, switch S7 allowing the loudspeaker to be switched off during normal use. Next, the mobile phone link may be hooked up on connector K1. The output relay for the electrical appliance you wish to control (literally from anywhere in the civilised world!) is connected to the terminals beside S3 on the board. The circuit is happy with a 6-15 VDC supply voltage from a mains adaptor capable of supplying 100 mA or so. There is only one adjustment in the circuit: preset P1 determines the input sensitivity of the DTMF IC. The setting is not critical however and the circuit will usually work with the wiper at mid travel.

What mobile phone?e05b040[7]
When selecting a mobile phone for use with this project, the following should be noted:

1. You will require a mobile with a headset. The headset may be faulty or incomplete — basically we only need the connector.

2. Some mobiles will not detect the headset when no microphone is connected.

3. The mobile has to support ‘auto-answer mode’, that is, it has to be able to answer an incoming call on the first ring signal. Some mobiles will not show this option until a headset is actually connected.

4. The ring signal has to be audible in the headset, too, as it its function is to ‘wake’ the PIC via T1/RB7. The first pulse edge on the PIC’s port pin indicates that DTMF odes are imminent and also causes IC3 to play back the welcome message. If the ring signal is not sent to the headset the circuit may also be activated by saying something into the calling phone.

 e05b040[9]

(Elektor Electronics Magazine - 11/2005)


Download this article #e05b040.pdf >>or SkyDrive link
  #040415-11.zip >> or SkyDrive link

--> Read more...

Pot as interrupt generator

Posted by Circuit Labs on

Author: Eric Vanderseypen

      In battery-powered, microcontroller driven circuits, as well as with microcontrollers operating in cars, it is desirable to switch the micro into power-down mode once a task has been completed. An interrupt request is then required to wake up the micro. This circuit allows an interrupt to be generated in a simple way using a common potentiometer.

In the example circuit, the pot may also copy its spindle position to the ADC. This enables the pot to  be used for continuously variable settings (like volume) as well for getting the micro out of its power-down mode.

Click to enlarge or download PDF version for larger diagram

        IC1A is configured as a differentiator with R3 preventing oscillation by keeping the gain down to 10 times. Because the opamp operates off a single-rail supply voltage, an 18k/10k potential divider (R1/R2) is able to create a virtual ground level at +1.75 V. This can be done because the LM358 can handle input levels of up to 3.5 V when supplied at 5.0 volts. IC1A supplies a brief High pulse at a falling input voltage, and a similar Low pulse when the input voltage rises. In order to get a High pulse when the potentiometer spindle is turned cw or ccw, IC1B is set up as an inverter. Next, each opamp output drives the base of a BC547 transistor.

      The 5 V-to-0 V transitions at both collector outputs are shaped and combined into a usable interrupt pulse by three NOR gates IC2A, IC2B and IC2C.
       If the potentiometer spindle is turned very slowly, it is possible that the circuit does not respond. That is why an LED has been added that lights briefly when a pulse is generated.
      Finally, a tip: a 100-pF capacitor may be connected in parallel with R5 for additional suppression of self-oscillation.

(Elektor Electronics Magazine - 10/2005)



Download this article #e05a075.pdf >> or SkyDrive link

--> Read more...

Flash Lock for PCs

Posted by Circuit Labs on

  Author: Anthonie Botha

e05a068This system was designed to eradicate the anarchy that reigned on a school’s computers. Conventional
password protection could not be utilized and the old key lock was too easily tampered with and bypassed. Highly objectionable information was being downloaded from the Internet and files being deleted all the time. To no avail, the guilty party was always conveniently dead or in hyperspace! A failsafe physical lock was urgently needed with total control and hence the Flash PC Lock was born!

The PC Flash Lock device should have a lot of applications. For example, the author implemented this lock at a friend’s Internet café. Also, a small software company employs this versatile lock together with an OCX incorporated into their software to prevent pirating and multiple software installations. The author himself employs it on his PC’s to prevent his children from giving him heart failure when they “accidentally” destroy valuable source code. The software controlling the Flash Lock is a resident utility, hiding in the root of the operating system and waking up on startup. It also interfaces with the Flash Lock hardware via the serial port, exchanging data every second. For the person that is fanatical about security of his or her files, this is a cost effective solution. After an error, the system will shutdown (if that option was selected) allowing you 60 seconds to attempt to solve the problem. Instead of shutting your PC down, you can merely remove the Flash Lock. The device works on Windows XP machines only!

How does it work?
By using your computer, an open serial port and the Flash Lock software, written with Visual Basic 6 there are various options at your disposal. The circuit is very basic and will fit into a standard 9-pin serial port plastic housing. A hole can be made in the plastic housing and the Flash Lock fitted to a key ring. As you may have guessed at this point, the power behind the circuit is the software.

Hardly hardware
The circuit diagram of the PC Flash Lock, Figure 1, is down to a microprocessor, some passive parts and diodes. e05a068[3]The supply voltage to the microprocessor is limited to about 5.6 V by zener diode D2. As the RS232 port is specified to supply an internally limited maximum 20 mA of line current, no series resistor is required to keep the zener diode and the (PIC) from harm. The other diode in the circuit, D1, prevents the PIC supply voltage from becoming negative. The PIC I/O pins being used by the software are protected by 1-kΩ resistors. Admittedly that’s close to what a PIC can take for abuse but then the circuit has toe remain as simple and cheap as possible. Knowing from the PIC datasheets that the pins can sink or source up to 20 mA each, we get 12 V/1,000 Ω = 12 mA under worst case conditions so it’s cheeky but still within spec. This excess current will flow from the VDD or the GND pin, the zener diode acting as a sink. The oscillator inside the PIC16F628ASO chip operates at the frequency governed by an external 4-MHz ceramic resonator, X1.

Construction — wick it!
e05a068[5]The tiny printed circuit board designed for the Flash Lock is shown in Figure 2. With some force and possibly some strong words it  can be pushed between the pins of a 9-way sub-D socket (yes that’s the female version). Check if the case fits around the tiny board and if necessary trim the sides by filing. If you hate SMDs, you should know that the PIC chip also exists in a DIP case, hence the circuit may also be built on a piece of veroboard. You will, however, have a hard time fitting the lot in a 9-way sub-D connector shell. A lot has been said and written on the subject of soldering SMD parts and some advice is repeated here for the benefit of beginners. Absolute requirements for success in the SMD department include good quality tools, a clean desk and a steady hand. We’ll shortlist some more aspects below.

 Figure 2

* Use a low-power solder iron with a tip diameter of 1 mm maximum. Alternatively, use a larger tip and wind 1-mm solid copper wire around it.
*  The same applies to the solder tin — use the thinnest you can get —0.6 mm or 0.5 mm is recommended.
* Precision tweezers from specialised pharmacists — much smaller and accurate than the ‘pair of tongues’ you normally get at Woolworth’s.
* Desoldering braid (a.k.a. wick), if necessary with it its suction power boosted by a bit of colophonium.
* Fit the 0805-ca se components by first generously tinning one PCB pad. Using the tweezers and the solder iron, position the part and secure one end by pushing it into the solder. No extra tin is required at this point. Next, solder the other end. If necessary, reflow the solder at the first end.
* The IC is first aligned on its footprint, then secured by soldering one corner pin. Check the alignment of the other pins. If ok, solder the pin at the other side of the chip, and so on. Do not panic if adjacent pins get interconnected by excess solder — remove the solder by applying a length of fresh wick.

Finally, inspect your work using a magnifying glass. Tell your friends about it.

COMPONENTS LIST

Resistors:
(all SMD, 5%, case shape 0805)
R1,R2 = 22kΩ
R3,R4,R5 = 1kΩ

Semiconductors:
D1 = 1N4148, SMD, case shape 0805
D2 = zener diode 5.6V 500mW, SMD,
MiniMelf case
IC1 = PIC16F628A-I/SO, SO18 case,
programmed,
Publishers order code 050107-41*

Miscellaneous:
K1 = 9-way sub-D socket (female),
straight pins
9-way sub-D connector shell case
PCB, ref. 050107-1 from The PCBShop
CD-ROM, PIC source and hex code files,
PC resident software, Publishers order
code 050107-81* or free download
(approx. 20 MB)
Flash PC Lock Software Guide, free
download # 050107-12.zip
* See Elektor SHOP pages or
www.elektor-electronics.co.uk

PIC bit options
The PIC16F628A-SO to be used in this project needs to have its configuration bits programmed as shown below.

0 F OSC0: 1 xt oscillator
1 F OSC1 0 xt oscillator
2 WDTE 0 watchdog disabled
3 PWRTE/ 0 powerup timer enabled
4 F OSC2 0 xt oscillator
5 MCLRE 0 memory prot off
6 BOREN 1 brownout enabled

7 LVP 1 low voltage program enabled
8 CPD/ 1 data memory protection off
9
10
11
12
13 CP/ 1 code memory protection off

The software

e05a068[9] 

Figure 3. The first option in the PC software (device manager) allows you to read or change your username and password. This password is written to the EEPROM using “write to device”.

e05a068[11]
 e05a068[13]

Figure 5. After software installation, the Elektor Toolbar will be installed in the top of the screen. Left or right clicking on the icon will display the Accounts menu.

Figure 4. The fourth option (application manager) allows you to manage individual rights. The fourth option (application manager) allows you to manage individual rights.

  The simplicity of the PC Flash Lock hardware belies the sheer power and complexity of the associated software developed by the author.

The complete Software Guide available for this project comes as a free download (no. 050107-12.zip). It is 21 pages in all, and comprehensive by any standard, covering not only everyday use but also advanced items like URL history storage and File Encryption. The Software Guide comes as a page indexed Word document. What’s conveniently called ‘software’ here actually consists of two components: (1) PIC-resident software and (2) PC-resident software.

The PIC software is available as an .asm or .hex file. Provided you have a programmer for SOIC PICs you can burn your own device at home or at school. If not, you will have to rely on
our Readers Services by ordering a ready-programmed PIC (order code 050107-41. The PIC configuration bits, so often a source of confusion to our readers, are given in the inset. This software allows the PC to check, at 1- second intervals, for the presence of the Flash Lock dongle, or, more accurately, for the right code in the PIC’s EEPROM memory.

The PC software is a massive 20 MB of tools and an installation program supplied on a CD-ROM, order code 050107-81. Alternatively, if you’re on broadband Internet, the PC software
may also be downloaded from our website. An impression of the PC Flash Lock software in action is given by Figures 3, 4 and 5. As you can see, there are lots of options to enable you to adapt this project to your specific needs. Once installed on the PC, the resident Flash Lock utility will display a small, semi-transparent toolbar at the top of the screen. This will give access to all functions including accounts management and passwords. The software has a 10-digit ASCII password, 10-digit user name, 10-digit guest password and a 20-digit password hint. The dongle may be plugged into the COM1 or COM2 RS232 serial port on your PC and is automatically found by the software. In some cases, however, you will need to use the ‘scan ports’ option to locate the RS232 port with the dongle on it. The program provides a one-time offer to create a rescue disk and produce hard copy of essential data.

Famous last words
Finally, a word of caution: we sincerely recommend installing and using the Flash Lock device and control software on a ‘scrap’ Windows XP PC that’s not essential to serious work. By no means install the device on a PC that’s required for daily use, as even a small mistake in the PC Lock configuration will permanently bar you from access to all your files and programs! Yes, it happened to us while engineering this project towards publication. Forewarned is forearmed!

(Elektor Electronics - 10/2005)


Download this article #e05a068.pdf >>or SkyDrive link
 #050107-11.zip >>or SkyDrive link
#050107-12.zip >>or SkyDrive link

--> Read more...

Cascode stage or “collector follower”

Posted by Circuit Labs on Wednesday, November 12, 2008

Author: Jean-Paul Brodiere05a074[5]

 All microprocessors from the 8051 family have inputs and outputs that are ‘quasi-bidirectional’. This means that when power is first applied, the ports behave as inputs with a logic high level and a weak pull-up.

Glitch
When driving a relay or some other load such as an optocoupler or LED, there is a problem at power on: the NPN transistor in the common emitter connection (Figure 1) causes an undesirable excitation of the load
from the moment power is applied until the microprocessor has had the chance to turn the output low. In addition, logic high outputs are seldom able to
deliver enough current to drive the transistor into saturation because they have been designed to be active low. To solve both of these problems in one hit, we have to make the active level logic low. This can be done in three different ways: use an emitter follower as a buffer stage (Figure 2a), an inverter in a common emitter circuit (Figure 2b) or an inverter/open collector circuit (Figure 2c). The disadvantage of solution 2a is the fact that the voltage to the load is reduced. In the case of a relay with a 5-V coil there is the risk that the resulting voltage is too low. The disadvantage of examples 2b and 2c is that they require more parts.

e05a074[3]

Collector follower
That leaves the open collector buffer in the form of an IC type 7404. This solution, however, also has a few disadvantages. You do not always need all of the 6 buffers in one IC. Also, the SMD version can only handle 12 V. This is too low and dangerous if we happen to supply the load from an unregulated voltage. The solution presented here combines in one transistor the advantages of the emitter follower (inactive when power is first applied) and open collector (higher power supply voltage, lower current). This circuit has been known since the valve era by the name cascode (drive via the cathode). The goal was to reduce the Miller-effect of the internal (parasitic) capacitances. Not having the option of reducing the capacitance between the internal electrodes, a lower voltage was used instead. The cascode circuit is often used in powerful transmitters (tens of kW) to minimise the Miller-effect. This circuit was also used to limit transistor conduction and to keep the dissipation within bounds, which increased the life of bipolar transistors. This was in the IGBT and VMOS era.

e05a074

The transistor conducts only when the output from the microprocessor is low (refer Figure 3). The base current is limited by resistor R. This current is determined by the current flowing through the load. When the power is switched on, both the base and emitter see the same potential, VCC, so the transistor remains blocked. One thing we have to keep in mind: we may not exceed the current rating of the microprocessor output because it has to cope with all the current flowing in the emitter of the transistor. In the case of the quite common 80C51, this maximum current is typically 3.2 mA (two LS TTL loads).

This is sufficient to drive an LED without overloading the 5-V regulator, or for driving a PNP power stage at the high side (Figure 3b). The parallel Philips PCF88574 I2C interfaces can handle 25 mA. For the Atmel AT89Cx051 as well as for the Philips P89LPC9xx the limit is 20 mA. For the latter type the cascode circuit or ‘collector follower’ is even more interesting when the outputs are configured as open-drain because the nominal voltage is only 3.6 V. In all cases we have to make sure that the maximum dissipation of the package is not exceeded. Should this be the case, then the number of open collectors required will probably justify resorting to a 7404.

A current of around 20 mA at 24 V is sufficient to energise a half Watt relay coil, which in turn can drive a load of 16 A at 230 V. For loads driven from the positive side, the voltage and current limits are determined by the power PNP (or VMOS) transistor. The cascode transistor can be a ‘digital’ type with integrated base and emitter resistors.

(Elektor Electronics - 10/2005)



Download this article #e05a074.pdf  >>or SkyDrive link

--> Read more...

Remote Control Operator

Posted by Circuit Labs on

Enhancing remote controlled lighting

 Image 1Author: Peter Verhoosel

Remote controlled light switches are becoming more and more common. DIY stores have inexpensive sets consisting of several light switches and a remote control unit. It’s then easy to control everything from your armchair. But how can you control the lighting when you’re away, as a deterrent to burglars? With the help of this little circuit that is no longer a problem.

With modern technology it sometimes happens that you replace one problem with another. Or as Johan Cruyff, the greatest Dutch soccer player of all times eloquently said: “every advantage have its disadvantage”. The circuit described here has been designed to overcome a shortcoming of wireless remote controls for domestic lighting. The problem is this: when people go way on holiday they often connect ordinary lights directly to time switches to turn the lights on and off at certain times. This gives the impression that the house is still occupied, but it can also come in useful when visitors, who stay till the small hours of the night, need a little hint that it’s time to go! But when these lights are controlled wirelessly it is unfortunately no longer possible to switch them on and off with a time switch. The light switches work with a signal that is transmitted via radio or infrared by the remote control handset. And herein lies the problem: who controls the remote control in your absence? You can’t expect your neighbours to do this for you, even if you get on very well with them. Fortunately, with a little inventiveness and some electronics we can get round this problem.

Figure 1. The circuit consists entirely of discrete components. (click to enlarge)

Click to enlarge or download PDF version for larger diagram

 Electronic control of switches
With this circuit we can add electronic switches in parallel with the buttons in the remote control. Of course your remote control has to be suitable for this modification. This will be covered in detail later, in the section “Modifying the remote control”. To keep things simple, we have catered for a maximum of four lights. The remote control unit we bought had one on-switch and one off-switch for each light. For four lights we therefore need to control eight switches externally. The receivers are turned on by closing the four ‘on’ contacts equentially, with a short pause in between. They are turned off again by closing the four ‘off’ contacts sequentially, with a short pause in between.

The circuit

Figure 2. The copper track and component layout of the PCB designed for the project.

  PCB layout

As you can see from Figure 1, this time we found a solution without the use of a microcontroller. It does mean that a fair number of components are used in the circuit, but they are all without exception easily obtainable and inexpensive. In the original design we wanted to control this circuit via an ordinary switch or the switch inside a time switch.

This means that we would first have to open up the time switch to disconnect the internal microswitch from the mains. Apart from the fact that this involves a lot of tinkering, it is not always possible. We would also have to make sure that all safety regulations were adhered to!

It is much simpler to control the circuit with a voltage and use a separate mains adapter; you probably have one left over from an old mobile phone or other device (5 V to 9 V DC). This also keeps everything safe, since the adapter simply plugs into the time switch! You then set the time switch to the required times when the lights should go on and off, and the mains adapter provides a control signal to the circuit. For other (low voltage) applications the facility is still there to control the circuit with a switch. This should be connected to JP2. In this case you should remember to put a jumper onto JP1. The switch or adapter puts a logic high level at the input of NAND IC2a.The circuit.

The combination of C3/R2 and C2/R4 feed a positive or negative edge to monostable multivibrator IC1a every time the input level changes. The RC network of R3 and C4 keeps the Q output of IC1a (pin 6) high for long enough for NAND-gate IC2b to generate four pulses. The length of these four pulses determines how long the contacts of the switches in the remote control are closed and it depends on the values of R5/C5. At the same time, the preset input of the 4-bit down-counter (IC3) receives a preset pulse from the Q output. During the time that the Q output is high, IC3 receives four pulses and then stops until the state of the input to the circuit changes.

The logic level on pin 3 of IC2a determines which part of analogue switch IC4 is active. In this way only the first four switches are active when there is a low level at pin 9 of this analogue switch, whereas the last four switches are active when there is a high level at pin 9. The enable input (pin 6) of IC4 is active low and is made high for a short period by NAND IC2b. This ensures that there are distinct gaps between each of the (electronic) key presses. Due to the tolerances of the RC networks it is possible for the last switch to be pressed twice. In principle this doesn’t really matter, since turning a light on twice still leaves it on! If you find this a problem, you can fix it by reducing the RC time of IC1a a little bit by lowering the value of R3.

Power supply
To keep the circuit as compact as possible we’ve used an external mains adapter rated at 12 V AC or 15 V DC, which connects to K2. For completeness there is also a 12 V output via K1 (pin 1 is ground and pin 2 is +12 V), which can be used to supply the remote control unit. In this case you must make sure that the batteries are removed before you connect the circuit! If your remote control doesn’t work at 12 V, then all you need to do is to replace IC6 with one that outputs the correct voltage.

Modifying the remote control
As we mentioned earlier, this circuit was designed for use with a specific type of remote control. This circuit will only work with types where one side of the switches is connected to one common track (and the other side of the switches is connected to separate parts of the circuit). If your remote control unit is the same, you should solder eight plus one wires for the switches and two wires  for the supply to connector K4. Then solder the wires to the contacts of the switches.image 2

Before connecting this to the circuit you should test that you soldered all wires correctly to the remote control. Short pin 3 (M) of K4 with one of the other pins (1a to 4b) of K4. The remote control should then function just as if you pressed the corresponding key. If it all went satisfactorily you can connect K4 to K1. Don’t forget to remove the battery if you use the circuit to provide a power supply to the remote control!

Construction
The construction shouldn’t give rise to any problems. In any case, always start with the wire links (including those underneath the ICs). During the design we had a particular enclosure in mind (see parts list). If you 10/2005 - elektor electronics 57 use the same enclosure you should mount the voltage regulators as close to the board as possible, in order to keep the height to a minimum. It may help if you change the mounting holes to an oval shape with the help of a 1 mm drill. Connector K1 is used to connect the PCB to the remote control. It is of course also possible to mount the circuit complete with the mains adapter and remote control into a different enclosure. Either way, this circuit adds a useful function to your wireless lighting control!

COMPONENTS LIST

Resistors:
R1,R2,R4 = 10kΩ
R3 = 680kΩ
R5 = 47kΩ
R6,R9 = 100kΩ
R7 = 1kΩ
R8 = 3kΩ3

Capacitors:
C1,C4 = 10μF 10V radial
C2,C3,C8 = 15nF
C5 = 100μF 10V radial
C6,C7,C9 = 100nF
C10 = 470μF 25V radial

Semiconductors:
B1 = B80C1500 bridge rectifier in
round case (80 piv, 1.5A)
D1 = zener diode 4.3V 500mW
D2 = zener diode 4.7V 500mW
D3 = LED, red, low current
D4 = LED, red, low current
D5 = 1N4148
IC1 = 4538
IC2 = 4093
IC3 = 4029
IC4 = 4051
IC5 = 7805
IC6 = 7812

Miscellaneous:
JP1 = jumper
JP2 = S1, see text
K1 = 11-way SIL pinheader
K2 = 6-12 V adaptor socket, PCB mount
K3 = 5-9 V adaptor socket, PCB mount
K4 = 11-way SIL socket
Time switch 230V
Mains adaptor 12 VAC or 15 VDC
Mains adaptor 5-VDC
Case, e.g., Hammond type 1591-A
PCB, ref. 050173-1 from The PCBShop

(Elektor Electronics Magazine - 10/2005)


Download this article #e05a054.pdf or SkyDrive link
Download PCB layout #050173-PCB.pdf


--> Read more...

Subscribe to: Posts (Atom)