Thursday, December 30, 2010

Spiderman Birthday Cards

A Fade to bulbs of 12 V direct current A continuous

With the PWM system, that is to say, pulse width modulation, it is possible to gradually turn a light bulb 12 V DC in a time adjustable from 2 to 25 seconds. Very useful in the car (if you have a little mind "tuning") or at home if you use light bulbs low voltage DC (solar house) or if you want to further increase the retro aesthetic of your tube amp .


If we connect a generator of sawtooth wave and a ramp generator to the inputs of a comparator, we obtain circuit PWM (Pulse Width Modulation) for gradually turning on a light bulb in 12 VDC. This assembly will also adjust at will the time it takes for the bulb to go off at the full brightness (adjustable between 2 and 25 seconds).
This circuit can be installed, for example, inside an amplifier (the one that we suggested, why not?) So that the bulb illuminating the VU meter lights gradually (in a tube amplifier, it needed almost). After all audiophiles also have two eyes between ears.
But maybe in your car that you want to mount it then you can turn on the ceiling or even the parking lights and lanterns in a progressive manner (you'll even have the satisfaction of avoiding the light bulbs of vehicle shock heat can shorten their life). Again, if you have a car collection, it almost goes without saying ... Sick of "tuning", you've understood.

Figure 1: This drawing represents the lighting of a lamp at three different times. Its brightness is inversely proportional to the length of time the duty cycle of the signal remains at logic high. In other words, the lamp brightness increases gradually and progressively as the high logic level signal shrinks.

The wiring diagram
soon as power is supplied to the circuit, the current generator IC1 LM334 (see wiring diagram in Figure 2) C3 load up at its terminals and produces a voltage ramp from 0-12 V variable length from 2 to 25 seconds depending on the cursor position trimmer R5. When we cut this supply, the transistor TR1 becomes conductive and discharges C3 so that the next power cycle begins again with the same period, according to R5. The operational
IC2 / A, contained in the LM358 is used as oscillator for generating sawtooth wave at a frequency of about 1600 Hz is the value measured on our prototype, but yours will be be a few hundred Hz above or below (this will not affect the proper functioning of the assembly). The sawtooth wave present across C4 is fed to the non-inverting 3 of IC2 / B, a voltage comparator consisting of second operational amplifier contained in the LM358. The voltage ramp, channeled by the inverting input 2 of the same comparator, determines the variable duty cycle of PWM square wave signal at the output of IC2 1 / B.
The lamp brightness is inversely proportional to the time during which the duty cycle of the PWM signal remains at logic high, as shown in Figure 1: the wider the pulse duty cycle, the longer the signal remains at logic upper and lower the brightness of the bulb; gradually as the pulse width shrinks logically high, the brightness of the bulb increases until it reaches the maximum value. We used a P MOSFET IRF9540 "Beefy": it is indeed capable of withstanding a load up to 10 A, so we can use a bulb very greedy (over 100 watts! Beware the car battery anyway).
In addition, through the PWM, we can connect to our circuit bulbs pretty powerful (and greedy ...) without the MOSFET does not heat excessively because, working as a switch and not in its linear region, it dissipates minimal power and only during the phase of power.
What this does not preclude you however, if you plan to use light bulbs that use multiple amps to mount a heatsink on the MOSFET (type ML26) or well, as shown in Figure 8, against the wall of the metal casing. But this last consideration out of the wiring diagram to enter the ground floor in the practical realization.

Figure 2: Diagram of the PWM circuit for variable light bulb 12 V gradually in a time freely adjustable from 2 to 25 seconds (with trimmer R5). For a PWM system, we connected to the inputs of the comparator IC2 / B generator sawtooth wave (the operational IC2 / A) and a ramp generator (the integrated circuit IC1 with capacitor C3).

Figure 3: Pinouts of the integrated circuit LM358 (dual op-amp) seen from above, the MOSFET IRF9540 front view and the BC557 transistor and integrated circuit LM334 (both boxes TO 92) viewed from below .

Figure 4: Diagram of component layout on the deck of the progressive lighting lamp for 12 V The P-channel MOSFET that we chose to support a load 10 A. To assemble, its sole metal must "watch" R1-R2.

Figure 4b-1: Drawing scale 1, the PCB double sided plated through holes of the plate for the progressive lighting lamp 12 V EN1648 side seams.

Figure 4b-2: Drawing to scale 1, double-sided PCB with plated through holes of the plate for the progressive lighting lamp 12 V EN1648 side components.

Figure 5: Photograph of a prototype of the plate for the progressive lighting lamp 12 V EN1648. The trimmer is visible at the bottom to adjust the duration of the ignition between 2 and 25 seconds.

Iist
R1 ........ 47
R2 ........ 10 k R3
........ 10 k R4
........ 1 k
R5 ........ 10 k
trimmer R6 ........ R7 100
........ 10 k R8
........ 10 k R9
........ R10 100 k
....... R11 47 k
....... R12 10 k
....... R13 100 k
....... 47
C1 ........ 100 uF electrolytic
C2 ........ 10 uF electrolytic
C3 ........ 10 uF electrolytic
C4 ........ 3.3 nF polyester
C5 ........ 100 nF polyester
DS1 ....... 1N4150
DS2 ....... 1N4150 TR1
....... BC557 PNP
MFT1 ...... IRF9540 MOSFETs P
IC1 ....... LM334 IC2
....... LM358

Note: the resistors are 1 / 4 W.


The practical
This arrangement is within the scope of a beginner.
To build this small (but powerful) device, you need the double sided PCB with plated through holes EN1648, where all components are mounted, except perhaps the power MOSFET (see Figure 8) you can fix cons a wall of the metal case, inside: 4b-1 and 2 shows drawings of two faces on the scale 1. Make it or get it.
When you have before you mount the first bracket IC2 and make sure that first job (or short-circuit between tracks or pads or cold solder joints) and then climb all the other components from the lowest (resistors, diodes) the highest (trimmer, capacitor, transistor and LM334 TO packages in 92, IC-see Figures 7 and 8 - and terminals).
Check before welding orientation of polarized components (electrolytic diode-rings to and from C5-R7, transistor and LM334-flats to the left-and the integrated circuit, only insert it into the socket after installation in the case and made the last connection).
No problem if you look closely 4a to 8 and the component list. Check
well, several times, identification and orientation of components and quality of all welds, then go to installation in the housing.

installation in the housing
course, this arrangement in a metal box is optional: if you use it, as we have suggested, for the progressive lighting of the backlit VU meters your amplifier, you climb the small stage directly in the latter.
If this is not the case, take the small aluminum enclosure (see Figures 6 and 8) and drill four holes at the bottom by using the platinum (already drilled) as a template, in the aftermath, drill two holes about 10 mm in the two major opposing sides .
Within four holes, mount four metal spacers of 5 mm in both holes insert two hobbies son rubber; attach the plate on the spacers with four screws and take in / out both son and supply 12 VDC both son going to fly to the bulb. Use of wire whose diameter is commensurate with the current consumed by the load (do not skimp on the diameter).
If you chose the option of fixing the inner wall MOSFET cons "or if you should equip it with a mosfet heatsink, do not forget to interpose between the metal and the metal flange of a sink support kit insulation consists of a bushing for the bolt and a mica surface of the sole.
All connections are made and verified, you can insert the chip into its socket with great care and in the right direction-cue-keyed U to C5. If you are a beginner, take everything away this excellent habit.

Figure 6: Photograph of a prototype of the plate for the progressive lighting lamp 12 V EN1648 MOX30 installed in its case (you'll need to drill to attach the plate to the bottom with four spacers, to let the son of two 12 V power and leave out the two son up to the load).

Figure 7: To ensure the MOSFET MFT1 high heat dissipation, mount it directly on the metal case (Figure 8), without forgetting to use the insulation kit (grommet and mica) .

Figure 8: Before inserting the platinum in the metal casing, drill four holes at the bottom of it (using the deck as a template) and tighten four metal spacers 5 mm (this slight elevation of the plate from the bottom of the metal casing will prevent any short circuit).
Drill two holes for passage of the son of input and output voltage in the two long sides and place of hobbies son rubber. Attach the legs of the SDG MOSFET points of the plate with the son of different colors so as not to invert (see Figure 7).


Figure 9: Tension 12 V to power this circuit is applied to the terminal and left the lamp to the right.

Figure 10: If you sample the voltage 12 V vehicle battery, the son of the negative input as the output can be connected to the chassis (ground) of it.

setting
With a small screwdriver adjust the slider trimmer mid race: thus, upon powering up the circuit you can check the progressive lighting of the bulb.
This course is a 12 V and you feed him in DC (eg vehicle battery or power supply amplifier: in the latter case, if necessary, install a controller 7812). See Figure 9.
Turn: The brightness of the bulb gradually increases at a rate depending on the setting of the trimmer. To set the duration (time it takes for the bulb to reach its maximum brightness), you will proceed by trial and error each time acting on the trimmer, but always proceed with this setting switched off.
Turn the trimmer screw and then powering the device and see if this setting is right for you, otherwise turn off the power and edit the trimmer in one direction or the other and then turn the power on, etc..
If you are considering a used car for a gradual switch, ceiling lights or as position and why not lights, see Figure 10: Mass for the son (both input and output), be sure to link them to the body, but made good ground connection (the metal must be free of paint and rust). If you apply the gradual ignition circuit of the headlights of the car, get two circuits (with one you could melt the MOSFET) and set the duration to a minimum.
If you are not keen, get help from a friendly mechanic (yes it exists!) Or by an auto electrician: this will avoid perhaps disappointments (in the vehicle, what is more dangerous, just after the driver is the fuel tank and electrical system).

Monday, December 27, 2010

What Causes A Copper Discoloration On Dog Coats

player / recorder data on SD card for USB Wireless Microphone

This little editing can write data to a SD card slot and read them again, all from the USB port of a PC. Let's see how this product was developed in terms of hardware and software, through the implementation of a microcontroller with a Universal Serial Bus.


Lately, there are commercially available as standalone devices or provided with digital cameras, devices read / write on sdcard to USB or, more rarely, 1394. As it is economic apparatus, we propose a self that you will return the same price as a commercial purchase, but will give you the satisfaction of an introduction to this sophisticated technology.

Our achievement
This article offers indeed the wiring diagram and the practical realization of such a reader / writer data on SD card for USB read it because it is a good opportunity to experiment theoretical concepts of the SD card (and you must begin to know because we have already published many fixtures using a DS as data memory). Our goal this time is to make a small circuit that allows to write and read blocks of a DS using a USB interface. The final result was achieved through the implementation of a PIC18F2550, surrounded by a few components coomplémentaires, but with an outstanding resident program. Not to mention the program in Delphi running on the PC. This is, again, an experiment ... but whose educational opportunities are numerous changes since a side we integrate a PIC with a huge memory and the other we interfaçons with a system of rapid and efficient as the USB.
It will be a useful and exciting to catch fast everything we have previously acquired in theory, or even to learn some very concrete way just what a DS can do.

The wiring diagram
The circuit in Figure 1 which shows the wiring diagram is decidedly simple! The only problem we encountered was the implementation of a system that can manage best communicate with the PIC: it works, we know, with signals in 0 / 5 V, while the DS requires voltages between 0 and 3.6 V. We resolved again (this problem is not new in fact) so very elegant: for lines from the PIC to the card using a Schottky diode and a resistance to draw.
Thus, when the microcontroller to the SD shows the logical one, the diode is blocked and the voltage on the pin card is due to the pull-up resistor, 3.3 V (even if the PIC provides 5 V) . When the microphone generates a logic low, the LED leads, bringing about zero volts also pin the map. Regarding the connection in the opposite direction, from SD to the PIC, the thing is slightly different: to make the simple translation of logic levels while remaining efficient and accurate, we used a buffer / line driver ( ATPL / buffer) HCT technology, it is a very economical integrated circuit but totally effective.
We used the most current version, the 74HCT125; to enable the outputs, four pins OE1 to OE4 (Output Enable) are used: the input signal is output when the line OE is at logic zero. Since we want the transition to S E happen as quickly as possible, we linked the OE pin directly to ground. Therefore, each pilot line is still active. Input lines are fully compatible with the signals from the SD card because the integrated circuits based on logic ACT / HCT accept entries in levels below the TTL (0/3V example) and present output levels 0 / 5 V when powered with 5 V, they "see" a level of 3 V as if it were a normal 5 V TTL and 5 V supply output, ideal for controlling voltage input lines directly the PIC18F2550. The supply voltage for the PIC is taken directly from the USB port (note that this standard provides for the supply of 5 V 500 mA to connected devices). The regulator LM1086-CT-3.3, from the 5 V, generates a voltage of 3.3 V, sufficient to operate the DS.
To highlight the operations that the microphone should be done, we have endowed the plate three LEDs of different colors: yellow indicates that the circuit is powered, the red one is reading or writing is in progress and the green and the player is ready to develop a command sent by the host. If both LEDs Red and green are lit together is an error condition was detected and a data transfer to or from the SD occurred (the "reset" the system must therefore take place).
You've probably noticed that no temporary memory FRAM or EEPROM is present in the circuit, because we use the U.S. speed bus (Universal Serial Bus) to send directly to the host values read from the card as well, while writing, we are ensuring that the host sends directly to the SD data we want to register. The universality of this serial bus (Universal Serial Bus) allows us to avoid burdening the system with an additional component.
In addition, to make the system effective enough, we should use a "buffer" fast as a conventional EEPROM each byte requires a pause of 10 ms stabilization. The read / write data on SD can be done in blocks of at least 512 bytes: thus for each transaction read / write the PIC awaits the arrival of the 512 bytes, with which it forms a package that sequentially sends the DS (which creates thus a direct interface between the SPI bus and the USB bus. Communication with the DS is in SPI mode, using two serial data lines (one input and one output) synchronized by a clock signal and a line of chip select useful in cases where the we connect multiple cards at the same time, to indicate which one wants to communicate.

Figure 1: Diagram of the player / recorder data on SD-Card with USB.

Figure 2: Diagram of component layout of the player / recorder data on SD-Card with USB.

Figure 2b: Drawing scale 1, the PCB of the reader / writer data on SD-Card with USB.

Figure 3: Photograph of a prototype of the reader / writer with USB data SDCard.

Iist
R1 ...... R2 4.7 k
...... 4.7 k R3
...... 4.7 k R4
...... 1.5 k
R5 ...... 1 k
R6 ...... R7 1 k
...... 1 k
C1 ...... 15 pF ceramic
C2 ...... 15 pF ceramic
C3 ...... 100 nF multilayer
C4 ...... 220 uF 25 V electrolytic C5
...... 100 nF multilayer
...... C6 220 uF 25 V electrolytic
...... C7 220 nF multilayer
D1 ...... D2 BAT85
...... BAT85 D3
...... BAT85
LD1 ..... LED 3 mm green
LD2 ..... LED 3 mm red
LD3 ..... LED 3 mm yellow
U1 ...... PIC18F2550-ET611
U2 ...... LM1086-3.3 U3
...... 74HC125
Q1 ...... 20 MHz quartz
SD1 ..... SD card reader

Miscellaneous:
a support 2 x 14 1
support 2 x 7
1 USB-B
Unless otherwise specified, all resistors are 1 / 4 W 5%.


The TSR
The complexity of this project comes not from the hardware, but the resident program and "front-end written in Delphi. For the resident program, we used PICBASIC to make the simplest explanation that we owe you! If you followed a course in PicBasic, it will seem very simplistic and will be a year you can put into practice the theory learned.
begin by analyzing the most remarkable parts of the device or the file SDUSBdsc.asm. For those who have no idea what a descriptor, it should be noted that the PIC18F2550 is recognized by the PC as a device HID (Human Interface Device) and that in order to communicate properly with the interface USB it is necessary that the computer recognizes it as such. The descriptor is a structure providing the host with any background information on the device and its operating modes.
recall that indeed, on the USB bus, it's always the computer control.
Moreover, the descriptor defines what and how many ports are used for communication (the famous "end-points"): it is therefore essential that the software can send data to the PIC and to receive him.
In the "Listing" 1 we see the most important points: we set the size (in bytes) of the "buffer" for the Endpoint0 (for low speed devices the only value is 8), the dimension of the array ("array") keeping track of alternative configurations of each interface (remember that a device can have multiple interfaces, each with different configurations or "settings", that the host can select), the maximum number of "end-points used in the project (one and only one does not take into account the Endpoint0), the number of configurations and interfaces the device, the method for managing buffers associated with each "end point", the configuration register UCFG (USB Configuration Register) and the membership class of the device (HID).
In particular, as regards the register UCFG, we decided to use the transponder chip and the internal configuration of type "Low-Speed (slow speed). In the table defining the parameters of the class, we have clarified the use of Endpoint1 IN / OUT, with a "buffer" to 8 bytes ("Listing" 2). In the interface descriptor
we specify the number of "end-points used (not counting the Endpoint0 because it is the service). In addition, we use two communication ports, one output and the other input (the "Listing" 3).
In the descriptor of "end-points" (the "Listing" 4) we determine that the issue will have a length of 8 bits (1 byte) and received 5 bytes. Indeed, we found that the software sends commands to the PIC type CODING PARAMETERS + 4 (we were inspired by the structure defined in the specifications for Secure Digital and CMD17 CMD24 or controls reading / writing that are followed by the address to 32 bits of block read / write. On the other hand, the card will respond through sequences of bytes. The range of "polling" (request from the computer) is 10 ms, which is more than enough for the goals we set ourselves. In the descriptor
Report (the "Listing" 5) we used a hierarchical structure. The field definitions of entry and exit, sized according to what we said above, are highlighted. We can see, there are structures to 8 bits for which we set limits on ordinary logic (0-255).
Moving quickly on usage.
Regarding the String descriptor, we used the values described in the "Listing" 6. These values are reported in a panel of the software when the device completes the enumeration process.
For neophytes, note that this process serves to ensure that the host ("host") and the device ("device") to get to know and can then establish a communication channel. Remember also that the name of the file containing the descriptors must be inserted into the file usbdesc.asm so that the compiler properly included in the PBP structure. HEX we then insert into the memory of the PIC.
We used among others for the correct compilation of the software project, File p18f2550.inc duly amended, providing for a division of the incoming oscillation frequency equal to 5 and a division of the system clock frequency equal to 4.
Thus, we get up in the circuit of a quartz 20 MHz and maintain (through the activation of a PLL) a 24 MHz internal clock. To program the PIC we use the MELAB Program Microengineering Labs and maintain configurations visible in the dialog in Figure 4.
That said, the time has come for the code itself. Let's take a look at the "Listing", 7 which contains statements: for communication with the card, we use the SPI mode includes a subset of standard SD protocol commands and is the easiest to implement. It does indeed only three lines to communicate: one for the clock (SCK), one for incoming data (SDI) and one for outgoing data (SDO), in addition, of course, the signal CS ( Chip Select) are used primarily to enter into SPI mode and establish the beginning and the end of a transaction.
We also clarified the pins used for ignition and extinction of two LED lights.
Finally comes the sequence of variables necessary for the process.
The pair IND0, IND1 used to determine the block address to read / write and compose the sequence of 32 bits sent by the host as a parameter list. CMD
The vector, consisting of 5 bytes, contains the sequence + 4 CODING PARAMETERS.
The choice is due to what has been established in the descriptor extension.
As shown in the "Listing" 8, the initialization code is simple. PORTA is set everything out because we only use two lines to control the LEDs, the PORTB pin is provided for the RB2 as input line for data from the card. The extinction of the two LEDs is performed and go to the startup code of the device first and then the DS. Initially the procedure
enumeration of the device is claimed stabilization and a pause of half a second occurs. At the end of the procedure, the ICP is recognized by the operating system of the computer and is ready to enter into communication with the software we use for reading / writing to the card. At the end of this process we are launching an initialization phase of the DS that will allow us to first switch to SPI and to establish the dimensional limits of blocks read / write. To summarize: we can distinguish two basic phases, RESET CARD (CMD0) and BOOT (CMD1).
In the "Listing" 9 This is how you see the code.
Note that the "reset" is preceded by a sequence of clock cycles "empty" (or "Dummy Clock" fictitious clock) as want the Secure Digital specifications.
In particular, the CMD0 is sent by holding the line at 0 CS: This procedure allows you to enter in SPI mode.
Once entered, it starts the initialization of the device and wait for the DS has completed this phase (it checks for the response it sends). Recall that
SPI mode the card is able to send only two types of response, one 8-bit (RISP1) and a 16-bit (RISP2), each with a particular structure of error reporting. Note that these sequences in a period ("time-out") was intended to avoid error in case the system crashes.
In this case, through a counter (CONTA1), we establish the limit beyond which repetition is assumed that the card refuses to answer or the initialization phase échoué.La definition of the number of bytes that make up block read / write the SD is skipped because it uses the standard length of 512 bytes (the "Listing" 10). When this first procedure is completed, we light the green LED (to indicate that the device is initialized and is ready to receive commands from the software running on the computer). We enter
especially in a loop waiting on the USB port, through which we expect to receive a sequence of 5 bytes, the first will contain the codes for the command to execute.
In the "Listing" 11 we see clearly the sequence of logic used to determine which instructions execute according to the first byte received. We intentionally kept the encoding used in the protocol description for SD SPI: the 17 starts playing (in the protocol is used CMD17) and the 24 write (CMD24). If any other command arrives, it is discarded and we return to the reading of a new sequence of 5 bytes. Note that the function USBService, which manages the USB interface module, is regularly called. The resulting code, in fact, no longer based on management interrupt signals ("interrupt"), but only on a continuous interrogation records associated with the port to identify the various operations to be performed.
Regarding the reading process, we have agreed to receive the address of the block to read in the last 4 bytes of the sequence of 5. We are launching
then the read command by transferring 512 bytes on the USB bus through instruction USBOUT. The resulting instructions are visible in the Listing 12. We light the red LED to indicate that the development of the command is in progress. The CMD17 is sent to the DS, passing as parameters the last 4 bytes received from the computer.
When the order is accepted, the card sends a special sequence of bits named "Start-Block", after which the show begins a sequence of 512 bytes, each byte is immediately sent. In the end, through the CMD13, the Status register of the card is read to verify if the operation was successful or if an error occurred.
Then, a jump ("jump") is made to the label AVVIOP where is located the code that will take care of waiting for a new command from the host. The red LED is off, the green turned back to alert the user the ability to send a new request to read / write. And we can SCRIVE label containing the code of writing a block of 512 bytes on SD (the "Listing" 13).
We light the red LED and we value and properly IND0 IND1 with the sector address to write. Through CMD24 we initialize the transaction write and send the "Start Block" ("Listing" 14).
The host ("host") sends us 104 packets of 5 bytes each: the first consists of the identifier of the command to execute followed by the address of the corresponding sector. The remaining 103 consist of values to be written on the card. The last 3-byte packet for closure and, therefore, as shown in the "listing, we are introducing the first two in the card. We therefore conclude the write operation (the "Listing" 15).
Note the logical AND operation to extract said "Data Response Token" sent for each data block written.
This sequence of bits becomes very important in the case of operations such as writing several contiguous blocks (here we will not use it). If, indeed, an error occurs, the PIC should block the transaction through a CMD12.
We do nothing but report the error by turning all the red and green (labels ERROR ERRORE2) and resetting the card. Thus, the circuit does not block and returns to the ring waiting for the command from the host. As for the read operation, also in this case we use CMD13 to know the Status of the DS. At the end we return to the label AVVIOP to await the next command sequence through USB.

   "Listing 1.   

; ********************************************* *************************
; TABLE SETTINGS GENERAL
; ******************************************* ***************************

EP0_BUFF_SIZE 8
# define # define # define MAX_NUM_INT 1
MAX_EP_NUMBER
1 # define NUM_CONFIGURATIONS
# 1 define a NUM_INTERFACES

# define # define MODE_PP _PPBM0
UCFG_VAL _TRINT
; TABLE PARAMETERS CLASS HID
; ****************************************** ********

HID_INTF_ID 0x00 # define # define
HID_UEP UEP1
HID_BD_OUT ep1Bo
# define # define # define HID_INT_OUT_EP_SIZE 8 HID_BD_IN ep1Bi HID_INT_IN_EP_SIZE 8 # define # define HID_NUM_OF_DSC 1



" Listing 3.



; ********************************************* *****
; INTERFACE DESCRIPTOR TABLE 3
; ************************************* *************
Interface1
retlw (HIDDescriptor1-Interface1) / 2; blength
retlw DSC_INTF;
retlw 0x00 bDescriptorType;
retlw 0x00 bInterfaceNumber, bAlternateSetting retlw 0x02; retlw 0x03 bNumEndpoints ;
retlw 0x01 bInterfaceClass, bInterfaceSubClass
retlw 0x02; bInterface Protocol
retlw 0x05; iInterface




"Listing" 4.

; ********************************************* *********************
; DESCRIPTOR TABLE 5 'end-point
; ***************** *************************************************
Endpoint1
retlw (Endpoint2-Endpoint1)/2 ; bLength
retlw DSC_EP ; bDescriptorType

retlw 0x81 ; bEndpointAddress retlw 0x03 ; bmAttributes retlw 0x01 ; wMaxPacketSize (low-b)

retlw 0x00 ; wMaxPacketSize (high-b)
retlw 0x0A ; bInterval
Endpoint2
retlw (EndConfig1-Endpoint2)/2 ; bLength
retlw DSC_EP ; bDescriptorType

retlw 0x01 ; bEndpointAddress retlw 0x03 ; bmAttributes

retlw 0x05 ; wMaxPacketSize (low-b) retlw 0x00 ; wMaxPacketSize (high-b)
retlw 0x0A ; bInterval
EndConfig1



"Listing" 5.

ReportDescriptor retlw 0x06 ; Octet de préfixe (bTag,bType,bSize)
retlw 0x01 ; Usage Page (low-b) (“Vendor Defined Page 1”)
retlw 0xFF ; Usage Page (high-b) (“Vendor Defined Page 1”)
retlw 0x09 ; Octet de préfixe (bTag,bType,bSize)
retlw 0x01 ; Usage (“Vendor Defined Usage 1”)
retlw 0xA1 ; Octet de préfixe (bTag,bType,bSize)
retlw 0x01 ; Collection (“Application”) retlw 0x09 ; Octet de préfixe (bTag,bType,bSize) retlw 0x02 ; Usage (“Vendor Defined Usage 2”) retlw 0xA1 ; Octet de préfixe (bTag,bType,bSize) retlw 0x00 ; Collection (“Physical”)
retlw 0x06 ; Octet de préfixe (bTag,bType,bSize)
retlw 0x02 ; Usage Page (low-b) (“Vendor Defined Page 2”)
retlw 0xFF ; Usage Page (high-b) (“Vendor Defined Page 2”)
retlw 0x09 ; Octet de préfixe (bTag,bType,bSize)
retlw 0x03 ; Usage (“Vendor Defined Usage 3”)
retlw 0x09 ; Octet de préfixe (bTag,bType,bSize)
retlw 0x04 ; Usage (“Vendor Defined Usage 4”)

retlw 0x15 ; Octet de préfixe (bTag,bType,bSize)
retlw 0x00 ; Logical Minimum (0)
retlw 0x26 ; Octet de préfixe (bTag,bType,bSize)
retlw 0xFF; Logical Maximum (low-b) (255)
retlw 0x00; Logical Maximum (high-b)
retlw 0x75; byte prefix (BTAG, BTYPE, bsize)
retlw 0x08; Report Size (8 bits)
retlw 0x95; byte prefix (BTAG, BTYPE, bsize)
retlw 0x01; Report Count (1 campo dati)
retlw 0x81; byte prefix (BTAG, BTYPE, bsize)
retlw 0x02; Input (Data, Var, Abs)
retlw 0x09; byte prefix (BTAG, BTYPE, bsize)
retlw 0x05; Use ("Vendor Defined Usage 5) retlw 0x15; byte prefix (BTAG, BTYPE, bsize)
retlw 0x00; Logical Minimum (0)
retlw 0x26; byte prefix (BTAG, BTYPE, bsize)
retlw 0xFF; Logical Maximum (low-b) (255)
retlw 0x00; Logical Maximum (high-b)
retlw 0x75; byte prefix (BTAG, BTYPE, bsize)
retlw 0x08; Report Size (8 bits)
retlw 0x95; byte prefix (BTAG, BTYPE, bsize)
retlw 0x05; Report Count (5 campi dati)
retlw 0x91; byte prefix (BTAG, BTYPE, bsize)
retlw 0x02; Output (Data, Var, Abs)

retlw 0xC0; End Collection ("Physical")
retlw 0xC0; End Collection ("Application")
end_ReportDescriptor




"Listing" 6.



DEVICE NAME: Reading / Writing SDCARD
MANIFACTURER: Microchip
SERIAL NUMBER: TAU333
CONFIGURATION: CFG1
INTERFACE: EP1/INOUT


"Listing" 7.

‘*********************************
‘*Connexion avec la SDCard
‘*********************************
SCK var PORTB.6 ‘CLOCK-CARD PIN5 (27 PIC)
SDI var PORTB.5 ‘DONNEES-ENTREE-CARD PIN2 (26 PIC)
SS var PORTB.4 ‘SELECTION-CARD PIN1 (25 PIC)
SDO var PORTB.2 ‘DONNEES-SORTIE-CARD PIN7 (23 PIC)
‘******** '* LED '******** ROSSO was PORTA.3' LED ROUGE VERDE was PORTA.5 'LED VERT
'***************
'* Application
'***************
RISP1 was byte' REPONSE TYPE R1 PAR CARD (8bit)
RISP2 was the word 'REPONSE PAR CARD TYPE R2 (16bit)
IND1 was the word 'WORD ADDRESS sdcard HAUTE BIT 16-31
IND0 the word' ADDRESS sdcard WORD BIT BASS 0-15
CAR was byte 'A CARACTERE ECRIRE
CONT VAR BYTE' compteur octets reçus
cmd VAR BYTE [5] 'Séquence Comme + IND0 + IND1
CONTA1 was the word 'COMPTEUR
CONTA2 var word 'COUNTER
CTL var byte' Control byte FRAM
QX var byte 'Data Response 4 BIT ANALYSIS




"Listing" 8.



ADCON1 = 001111 'PIN RA Digital
TRISA = 000000' PORTA output TRISB = 000100
'RB6 RB5 = = CLOCK BACK CARD
' = RB4 RB2 = SELECT CARD BY CARD
PORTA = 0 'Reset LED ROSSO
= 1 = 0
VERDE
USBInit 'Process list at the end the device, enter the configured state Pause 500' Wait



"Listing" 9.



RESET:

SS = 1 FOR = 1 TO 10 CONTA1
SHIFTOUT SDI, SCK, MSBFIRST, [$ FF] 'Send clock cycles vacuum
NEXT CONTA1
SS = 0

PAUSE 50' * ******************************* '* SS 0 CMD0 now '********* *********************** SHIFTOUT SDI, SCK, MSBFIRST, [$ 40, $ 00, $ 00, $ 00, $ 00, $ 95] 'Send CMD0 SHIFTIN SDO SCK, MSBPRE [RISP1] 'Read response from the R1 Card
CONTA1 = 0 WHILE
RISP1 1

SHIFTIN SDO, SCK, MSBPRE [RISP1] 'Read response from the R1 Card
CONTA1 CONTA1 + 1 = IF
CONTA1> = 255 THEN' Time-out expired, he released
GOTO ERROR

ENDIF WEND
SS = 1 PAUSE 50

SS = 0


<>
"Listing 10.



'********************************************* ***********
'* Sends repeat CMD1 until response = 0
'************************ ********************************
CONTA1
RISP1 = 0 = 1 WHILE
RISP1
0
SS = 1 SHIFTOUT SDI, SCK, MSBFIRST, [$ FF] SHIFTIN SDO, SCK, MSBPRE [RISP1] SS = 0 PAUSE 50
SHIFTOUT SDI SCK, MSBFIRST, [$ 41, $ 00, $ 00, $ 00, $ 00, $ FF, $ FF] 'Envoie CMD1
SHIFTIN SDO, SCK, MSBPRE [RISP1]
CONTA1 = CONTA1 + 1
IF CONTA1> = 255 THEN' Time-Out Ecoul, the sort

ENDIF WEND GOTO ERROR
<>



"Listing 11.



AVVIOP:
RED = 0 'Extinction Rouge
GREEN LED = 1' LED Verte allumage
GET:
USBService
COUNT = 5
USBIN 1, CMD, COUNT, GET 'Reçoit séquence commande
USBService IF CMD [0] = 17 THEN' CMD17 = Lecture Secteur GOTO READ ENDIF IF CMD [0] = 24 THEN 'CMD24 = Ecriture Secteur
GOTO WRITE
ENDIF GOTO
AVVIOP




"Listing 12.



read:
RED = 1 'allumage Rouge
GREEN LED = 0' LED Verte Extinction

IND0.BYTE1 = CMD [1]
'Valorisation Adresse à lire

IND0.BYTE0 = CMD [2] ind1 . byte1 = CMD [3] = IND1.BYTE0 CMD [4]


Initialisation Address of the block to read the card through the last 4 bytes of the sequence of 5.

'* READ 512 BYTES ON SDCARD
SS = 1 SHIFTOUT SDI, SCK, MSBFIRST, [$ FF]
SHIFTIN SDO, SCK, MSBPRE [RISP1]
SS = 0
SHIFTOUT SDI, SCK, MSBFIRST, [$ 51,
IND1.BYTE1, IND1.BYTE0, IND0.BYTE1, IND0.BYTE0
, $ FF]

address block to read past the map as a parameter of CMD17.



'Sends CMD17
SHIFTIN SDO, SCK, MSBPRE [RISP1]
CONTA1 = 0 WHILE
RISP1 0 SHIFTIN SDO, SCK, MSBPRE [RISP1]
CONTA1 = CONTA1 + 1
IF CONTA1 >= 255 THEN ‘Time-Out écoulé, il sort GOTO ERRORE
ENDIF
WEND
‘Réception START BLOCK
SHIFTIN SDO,SCK,MSBPRE,[RISP1]
CONTA1 = 0
WHILE RISP1

$FE <>



Réception du Start-Block 11111110.



SHIFTIN SDO,SCK,MSBPRE,[RISP1]
CONTA1 = CONTA1 + 1
IF CONTA1 >= 255 THEN ‘Time-Out écoulé, il sort <> GOTO ERRORE ENDIF WEND
‘Réception BLOC DONNEES
FOR CONTA2= 0 TO 511
SHIFTIN SDO,SCK,MSBPRE,[CAR]
INVIA: USBService
USBOUT 1, CAR 1, INVIA
'Send via USB



reception of 1 byte and writing on FRAM.



NEXT CONTA2
'Receiving CRC SHIFTIN SDO, SCK, MSBPRE [RISP1]
SHIFTIN SDO, SCK, MSBPRE [RISP1]
' As soon as the card has finished reading checks the status of the card
'Sends CMD13
SS = 1
SHIFTOUT SDI, SCK, MSBFIRST, [$ FF] SHIFTIN SDO, SCK, MSBPRE [RISP1]
SS = 0
SHIFTOUT SDI, SCK, MSBFIRST, [$ 4D, $ 00, $ 00 , $ 00, $ 00, $ FF]



Reception card status through the response to 16 bits.



'Get the response status to 16-bit format 2
SHIFTIN SDO, SCK, MSBPRE [RISP2 \\ 16]
CONTA2 = 0 WHILE
RISP2.BYTE0
0
SHIFTIN SDO, SCK, MSBPRE [RISP2 \\ 16]
CONTA2 CONTA2 + 1 = IF
CONTA2> = 255 THEN GOTO ERRORE2

ENDIF WEND GOTO
AVVIOP




<> "Listing 13.



Scriver:
ROSSO = 1 'Red LED Lighting
VERDE = 0' LED goes Green
IND0.BYTE1 = CMD [1] "Address to write Valuation
IND0.BYTE0 = CMD [2] =
IND1.BYTE1 CMD [3] =
IND1.BYTE0 CMD [4]
'------------------------------------------------ ------------ '* WRITE 512 BYTES ON SDCARD '---------------------------- --------------------------------
USBService
SS = 1
SHIFTOUT SDI, SCK, MSBFIRST, [$ FF ]
SHIFTIN SDO, SCK, MSBPRE [RISP1]
'Sends CMD24 block write on sdcard
SS = 0
SHIFTOUT SDI, SCK, MSBFIRST, [$ 58,
IND1.BYTE1, IND1.BYTE0, IND0.BYTE1, IND0.
Byte 0, $ FF]



Passage of the block address to write.



SHIFTIN SDO, SCK, MSBPRE [RISP1]
CONTA2 = 0 WHILE

RISP1 0


Checks if the card is ready to receive data.


SHIFTIN SDO, SCK, MSBPRE [RISP1]
CONTA2 CONTA2 + 1 = IF
CONTA2> 10000 THEN GOTO ERROR <> ENDIF WEND
'Send Start Block% 11111110 = $ FE
SHIFTOUT SDI, SCK, MSBFIRST , [$ FE]


"Listing" 14.



CONTA1 FOR = 1 TO 102
RX5:
USBService
CONTA = 5
USBIN 1, CMD, CONTA, RX5


reception block 5 bytes.
USBService
'Start Writing on SDCARD
FOR CONTA = 0 TO 4

CAR = CMD [CONT]
SHIFTOUT SDI, SCK, MSBFIRST [CAR]



Writing last 5 bytes received.



NEXT NEXT CONTA
CONTA1
RX6: USBService CONTA = 5
USBIN 1, CMD, CONTA, RX6
USBService

CAR = CMD [0] SHIFTOUT SDI, SCK, MSBFIRST [CAR]
CAR = CMD [1]
SHIFTOUT SDI, SCK, MSBFIRST [CAR]




Closing sector.






"Listing" 15.


SHIFTOUT SDI, SCK, MSBFIRST, [$ FF, $ FF]
SHIFTIN SDO, SCK, MSBPRE [RISP1] QX =
000000

RISP1 QX = & $ 0F


4 bits Derniers réponse de la commande d'écriture: DONNÉES ACCEPTEES 0101 1011 1101 DONNÉES REFUSEES erreur CRC
DONNÉES REFUSEES erreur Ecriture



QX 000101 IF THEN
ENDIF GOTO ERROR
'Reçois the busy bit of the écriture pendant la carte SHIFTIN SDO, SCK, MSBPRE [RISP1]
Account2
= 0 = 0 WHILE RISP1
SHIFTIN SDO, SCK, MSBPRE [RISP1]
+ 1 = Account2 Account2
Account2 IF> = 255 THEN GOTO ERROR

ENDIF WEND
<> 'Envoie the CMD13
SS = 1
SHIFTOUT SDI, SCK, MSBFIRST, [$ FF]
SHIFTIN SDO, SCK, MSBPRE [RISP1]
SS = 0
SHIFTOUT SDI, SCK, MSBFIRST, [$ 4D, $ 00, $ 00, $ 00, $ 00, $ FF]

SHIFTIN SDO, SCK, MSBPRE [RISP2 \\ 16]




reception status of the card.



CONTA2 = 0 WHILE
RISP2.BYTE0
0
SHIFTIN SDO, SCK, MSBPRE [RISP2 \\ 16] = CONTA2 CONTA2 IF CONTA2 + 1> = 255 THEN GOTO
ERRORE2
WEND ENDIF GoTo
AVVIOP


PC software
<> Now for the software we'll turn on the computer to control the read / write SD. It was
written in Delphi and uses the main subject TJvHidDevice-Controller: This is a component of a project conceived at the JEDI (Joint Endeavour of Delphi Innovators), that is to say an international community of a thousand developers Delphi, whose aim is to disseminate this environment and his younger brother Kylix. The program interface is very simple to use and it can immediately experience the features we've introduced in the curriculum.
The main screen (Figure 5) displays three panels: one contains data on USB, one can choose the size of map and the third includes the necessary buttons to the functions of reading / writing. This is complemented by a simple grid of 512 cells divided into 32 lines of 16 elements.
It is thus possible to monitor and change values. To avoid errors, there is provided a procedure for checking the congruence of data inserted, when a read / write or export / import is started.
When inserting a value not admissible (incongruously) a message indicating the line number and that of column (or the coordinates of the faulty cell) is viewed. If we
link up the circuit to the USB port (the DS is already inserted in the drive) following the enumeration process, the identifier fields are loaded into the panel (value inserted in the Descriptor String).
In the list of devices appears the word read / write SD card. The Status of the communication is updated (Hardcover or unplug) and if we look at our deck, we see that the first yellow LED (supply voltage reaches well), followed by the green LED (map exceeded the phase reset, the SPI input mode and the initialization process). Note if it connects the circuit without SD in the drive, the LED will glow green and red together (to indicate the error).
After this first phase, you can position yourself on the Settings panel to select the card through the two small arrows capacity of the card.
Thus, the maximum accessible sector is recalculated. The number refers to the amount of sections of 512 bytes used to store data.
can then be positioned on the panel Procedure. Here we insert the number of sectors that we want to develop, of course, modification of these fields is related to the dimensional limit of the card we have just established. Using the buttons of the panel, we can launch 5 basic functions (we will analyze below). Leggi
: Clicking this button launches a reading area that we specified in the field (Let Blocco / Scr); progress of the procedure is controlled by the applet window red (see Figure 5); As to the arrival of the sequence of bytes to the PC, the values are inserted into the grid and are directly visible and editable. Scrivi : Starts writing information sector as we stated in the field (Let Blocco / Scr) and directly support data grid. Cancel: empty grid by inserting the value FFh in all cells.
Importa: load data into the grid from an external file.
Esporta sends the data grid to an external file. Regarding the latter two functions, consider that the files have used an extension type. Ndc, however, that these are text files.
Their structure is very simple: each line represents a value to insert in the grid.
The sequence is generated by reading each row from left to right and top to bottom, as one would read a sheet of paper. With a click on the button Importa it opens a dialog, as shown in Figure 6.
It is therefore possible to select the file and load it by clicking on Apri. Control data inserted is made to signal a possibly erroneous line. The export procedure operates essentially complementary.
Again, a dialog opens where you can insert the name of the file you want to create.
Then, with a click on the button Salva, the grid is transferred to the selected file.





Figure 4: To program the PIC we use the MELAB Program Microengineering Labs, maintaining the configuration visible in this dialog.






Figure 5: The main screen has three panels.

Figure 6: Clicking the button opens the Import dialog.

The practical The practical realization of this player / recorder data on SD-Card USB is the easiest and fastest (the complexity of the device from the resident program and software for PC ). The plate consists of a small single-sided PCB, which 2b gives a scale drawing. Make it through the method known as "blue film" and when you have before you, engraved, drilled, tinned, first insert the two mounting integrated circuits and both "straps" (in R3 and between C4 and C6). Double check your solder (or short-circuit between tracks or pads or cold solder joints). Insert and then solder all components (as shown in Figures 2a and 3), continuing with the resistors, capacitors, Schottky diodes, LED, quartz (standing) and regulator (standing without heatsink metal sole and outward-looking of the plate) and ending with "peripheral" to know the USB-B PCB. Attention to the orientation of polarized components: integrated circuits (marked U-notches facing down well, but put them at the very end), diodes, LEDs, regulator and electrolytic. Remember also to weld the tabs on the shield connector USB-B. Check out all the polarities and (again) the quality of welds.
That's the face "components".
back plate and solder very thoroughly (directly on the slopes of the "copper side) the card reader (or door-SD), SD1. Insert the ICs. The microcontroller is already available in factory programmed (see our advertisers). Check everything again. You can now install the deck in a plastic box of appropriate size: the lid is pierced with three holes for the LED, one of the smaller sides of a square recess for the USB connector and the other short side a slot to insert the SD Card. The supply of 5 V is therefore by the computer's USB port. To connect the turntable to the computer, use an ordinary USB cable.
Conclusion Although physically simple, this device can become familiar with this new storage medium and perform experiments trainers before tackling the more complex arguments: for example, this tour will help you anlysis key sectors Formatting as FAT16 "boot-sector" and "root-directory (see previous articles devoted to arranging implementing an SD-Card).
But apart from this aspect of teaching (which, admittedly, we were once again guided), this player / recorder USB data will be useful to convey to a computer data written by all types of devices in an SD card, or to transfer the same SD of files in the PC.

Thursday, December 23, 2010

Citrus Fruit Bad Liver

863-865 MHz

With two modules UHF 863-865 MHz, a transmitter and receiver are moving the signal from a microphone to an amplifier or mixer remote (up to 40 m). This two units TX and RX is ideal for someone who wants to move in a studio, a gym or on a stage, a stage, etc.., Talking or singing into the microphone. In short, this is a wireless microphone of high quality.





Specifications:
- Working frequency: 863 to 865 MHz.
- Max Range: 40 m - Frequency Response: 50 to 15,000 Hz
- Harmonic Distortion: 2%.
- Dynamic range: 50 dB. - Expander on TX and RX. The association between the entertainment and wireless devices (not to say "wireless", which means exactly the same thing) is now well established and for a decade. One can not deny that the availability of such RF microphones and other signal transmitters for musical instruments, like guitars or bass, or portable keyboards-has changed the lives of musicians, especially in concert, as well as presenters of artistic or television studios. With traditional microphones (strings attached), it was necessary to always be attentive to the movements that we would do, which excluded fantasy and spontaneity, yet so popular with the public! We could at any time in the heat of the speech or gambling scene, to carry the mixer or at least pull the wire, unless spread of self- full length! The wireless microphone gave the artist or entertainer all his freedom. And not only to professional: the market availability of consumer electronics products at low prices, has in a decade an unprecedented development of such equipment.
Recently we had the opportunity to try the modules RF Circuit Design (distributed by Sylcom Service www.sylcom.it) with which we achieved the professional radiomicrophone that this article describes and proposes to construct two units, issuing and receiver. The majority of radiomicrophones works with a carrier located in the frequency standard, free use, one that extends around 434 MHz. Other qualified products emit in the band of 40 MHz or between 174 and 854 MHz (see table in Figure 9). Ours emits between 863 and 865 MHz frequency used freely, provided they remain within the limits of power law (and the modules comply Circuit Design).
The transmitter unit

unit designed to send in ether audio is so simple and compact (see Figures 1-3) it can be easily installed (9V battery included) in " handle " a cardioid or other magnetic micro-called "scene" or it can be mounted in a tiny box to hide in a pocket (an electret alligator clip pinned to the collar of the jacket then routes the call to entry jack box). The wiring diagram of Figure 1 will appear "Spartan" because almost all functions are assigned to module U1 WA-TX-01 Circuit Design (a Japanese). Therefore analyze this circuit, we can see, consists of two functional blocks: a preamplifier transistor and the RF module.
The input stage is used to raise the level low BM taken at the output of the microphone, especially if one uses a capsule electret non-fading or a magnetic microphone, which normally provide RMS voltages of a few millivolts.
The preamp consists of a transistor connected in common emitter configuration: the NPN, polarized by the base through R3, return on its collector the amplified signal. The microphone is connected to the IN, to adapt the sending unit to a microphone "electretcondenser (electret condenser) or magnetic, we have provided the opportunity to provide the driver with" hot "a modest polarization taking on the bridge R1/R2 voltage we need. When using an electret microphone (one capsule "naked and raw" or a microphone clip alligator clip to the lapel or shirt collar), we must close J1 for the desired polarization ( C3 decouples the electrolyte continuously biasing network and the trimmer TR1), the rider must however remain open when the microphone attached to the jack IN is magnetic.
The electrolytic capacitor C4 is used to filter the polarization component in order to clean it of any parasites on line 9 V, which parasites, if not mitigated, would be amplified with the useful signal from the microphone, which would degrade the signal to noise ratio. C4 filter as potential positive returns by feeding the audio signal amplified by T1. Before being amplified by the transistor, the signal coming from the microphone can be adjusted in amplitude to the trimmer TR1 in order to avoid introducing into the transmitter module of BF levels may represent a significant distortion. Capacitor C5 decouples
continuous network bias base by trimmer T1, C6, while the audio signal to U1, while by decoupling pin 1 of the latter's collector of the transistor.
And we have come to the issuer itself: WA-TX-01, it is a component comprising a SAW oscillator internal modulator frequency variable capacitive reactance (varactor diode ...) and an antenna filter lowpass. The modulator stage is controlled by the audio signal, but not by those applied between point I and the ground (G), at least not always, indeed, the LF component introduced in the module goes through a compressor dynamics - a special electronic circuit designed to limit the dynamic range, the excursion between the minimum level of signal and its maximum level.
compression is used primarily for two things: increase the SNR and to avoid over-modulation, the modulation to understand, remember that FM transmitters in the carrier oscillates around the center frequency and deviation on either side of it (the tour or modulation depth) is directly proportional to the amplitude of the modulating signal. As each band defines a radio channel spacing, it is essential that during the excursion produced by the modulation, the transmission frequency does not encroach on one of two adjacent channels For example, if one transmits on 500 MHz and if the channels are separated from each other than 200 kHz, the tour due to the modulation must be less than ± 100 kHz (100 kHz on both of Another of the center frequency). Say that the frequency deviation of FM broadcast must always be less than half the distance between the channels; lower selectivity because of the oscillators and the issue of unwanted frequencies may not modulate down to half the distance , since the emission curve can not have edges perpendicular (infinite attenuation outside the scope of frequencies).
About this compressor, adding that it limits the voltage responsible for modulating the frequency deviation of the oscillator to allow the deviation values to remain within the limits allowed. Strictly speaking, we could obtain this limit by capping the modulating voltage, except that this method would cause a significant distortion of the demodulated signal at the receiver, while with the compressor is a variable gain amplifier circuit, which amplification is gradually reduced when a sensor detects that the level of amplitude of the audio input becomes excessive, however, increased when the signal level is too low.
The compressor compresses dynamics therefore the signal (yes) and does not significantly decapitated, to allow (provided that receipt is implement a balanced circuit) compensation from the flattening of the dynamic and obtain again the original signal. The compression is between -60 and -10 dB, which allows a range of 50 dB and therefore the signals below -60 dB are amplified up to this level and those greater than -10 dB are attenuated in return the magnitude at this level.
In terms of SNR, the compressor amplifies weak signals that the background noise of the FM (typically -60 dB) to put them above this level, therefore when, in the receiver, the Expander decompresses the signal modulating the same audio the lowest level can be used, since its amplitude is at least equal to the noise superimposed on the demodulated component. Module WA-TX-01 is supplied with the crystal oscillator set to one of three proposed frequencies: 863,125, 863,625, 864,500 and 864,875 kHz, and works basically in the range from 863 to 865 MHz, reserved, Europe , audio applications. Just choose the frequency you want and specify when ordering the unit to the dealer.
In the range 863 ÷ 865 MHz emission must be reduced in power: wherefore the transmitter emits only 2 mW, which is quite sufficient to provide a wireless microphone, provided that you also use the receiver module highly sensitive proposed by Circuit Design: we can then rely on a range of about 40 m in open space (without obstacles and using antennas as receiving and sending a piece of copper wire of 8.5 cm or 17 cm long). The transmitter (TX module and the input transistor) is fed with DC 9 V battery removed from a rectangular 6F22; the supply line is protected against accidental reversal of polarity by diode D1 and filtered by C1 and C2. A switch allows us to switch on and off the transmitter radiomicrophone without disconnecting the battery.





Figure 1: Diagram of the issuer.






Figure 2: Schematic implementation of the components of the transmitter.

Figure 2b: Drawing, to scale 1, the PCB of the transmitter.

Figure 3: Photograph of a prototype of the plate of the issuer.

Iist R1 ...... R2 1 k ...... 4.7 k R3
...... 1.5 M
R4 ...... 4.7 k TR1 ..... 10K trimmer C1 MO ...... 100 nF multilayer C2 ...... 220 uF 16 V electrolytic C3 ...... 4.7 uF 100 V electrolytic C4 ...... 47 uF 35 V electrolytic C5
...... 1 uF 100 V electrolytic
...... C6 10 uF 100 V electrolytic D1 ...... 1N4007 T1 ...... BC547
U1 ...... WATX01
SW1 ..... slide switch 90 °

Miscellaneous:
a stereo jack socket for an antenna tuned it
863-865 MHz

a rider taking a 9 V battery
a plastic housing potential

Remember to solder all pins and tabs on the transmitter module.



The receiving unit

See Figures 4-6. The signal from the WA-TX-01 is sensed by the receiver antenna and reaches the receiver module WA-RX-01 Circuit Design. The latter contains a superheterodyne receiver with quartz and SAW filter inserted between the antenna input (pin 6) and the "front-end amplifier (HF) to pass only the single frequency chosen (one of three listed above).
Practically, if the module is tuned to 863.625 MHz, the resonator is also tuned to this value. The filter replaces the varactor tuning circuit to.
The radio frequency signal coming out of SAW between flapping in a blender with that produced by RF local oscillator, quartz and also tuned to a frequency differing from that of SAW antenna of 10.7 MHz. This, of course the value of the MF resulting from the conversion due the beat in the mixer, the difference between the working frequency of the local oscillator and the agreement of the SAW resonator.
The MF is filtered by a ceramic filter to 10.7 MHz, so as to get rid of any parasites, then amplified, filtered again through a second filter to 10.7 MHz, and is then detected by an FM discriminator quartz well.
The audio signal thus obtained, before reaching the pin (1) output goes through an expander dynamics: it is a circuit performing the function parallel to that of the compressor mounted in the transmitter module and used to compensate for the possible attenuation of the signal beyond the threshold level set to avoid saturation.
The expander also has a variable gain amplifier, which it controls to maintain the level of audio output to a predefined value, so if the demodulated AF is too low, it amplifies it and it decreases if it is too strong. The expander provides the audio output signal of constant amplitude, so as to avoid the user of a wireless microphone having to constantly act on the volume control the mixer or amplifier which was connected to the receiver. Using a "buffer", the audio comes out of the expander is routed to pin 1. Note that the module
WA-RX-01 has a muting circuit (muting) internal, used to cut the audio signal output when the received radio signal is too weak to be operated in good conditions, the muffler is based on the level of FM input of the second ceramic filter to 10.7 MHz.
The circuit detects the amplitude of the FM signal and possibly interrupting the audio line driver, using an internal transistor, pin 3: the latter used to light an LED when the receiver has locked onto the frequency of the transmitter.
So if the LED lights is that TX and RX are connected, otherwise the receiver can receive the signal from the transmitter. The signs are useful during the installation of radiomicrophone to control the scope of the system.
Chips Finally a look at the rest of the receptor radiomicrophone: Audio taken from the pin 1 is amplified by operational TL081 voltage mounted non-inverting configuration, whose earnings depend on the position of the slider and the trimmer TR1 may vary between 1 (cursor turned completely to the pin 2) and slightly more than 3 (slider to the output). The amplification is required to raise the level of the audio module outputs WA-RX-01, which normally does not exceed level -10 dBV (about 230 millivolts) to the operational stage is used to lower the output impedance of the receiver module, which is 10 ohms. BM amplified by the TL081 is available between pin 6 and ground: from thence through resistor R5 and the electrolytic C5, it reaches the circuit output, output which can link a table entry mixer and amplifier or recorder audio. Note the resistor R6, used to charge the electrolytic C5 when the circuit is at rest: The purpose of this is to avoid that when the receiver is connected to another audio device, we hear the usual "bump" caused by the impulse derived from the transfer of polarization potential of the output of the operational (exactly half the supply voltage, which makes the bridge R2/R3 ...) when the connection.



Figure 4: Diagram of the receiver.






Figure 5a: Diagram of implantation components of the receiver.

Figure 5b: Drawing scale 1, the circuit board receiver.

Figure 6: Photograph of a prototype of the plate and receiver.

Iist R1 ...... 560 R2 ...... 220 k R3
...... 220 k R4
...... 4.7 k R5 ...... 47 R6 ...... 1 k TR1 ..... 10k trimmer MO / MV C1 ...... 100 nF multilayer C2 ...... 220 uF 16 V electrolytic
C3 ...... 470 nF 63 V polyester
C4 ...... 10 uF 100 V electrolytic C5 ...... 4.7 uF 100 V electrolytic LD1 ..... LED 3 mm green
D1 ...... 1N4007 U1
...... WARX01A
U2 ...... TL081
SW1 ..... slide switch 90 °

Miscellaneous:
a support 2 x 4 1
stereo jack socket for an antenna tuned it
863-865 MHz
taking a 9 V battery
a plastic housing potential

Remember Solder all pins and tabs on the receiver module.



The practical realization of the transmitter and receiver

The practical realization of this radiomicrophone is fairly simple although it must achieve two decks, one for the TX (which involve more or less closely to the microphone itself) and one for the RX (which is placed near the mixer, amplifier or recorder).



Figure 7: The transmitter and receiver modules.





TX.


Module WA-TX-01 is based on an oscillator (stabilized by a SAW resonator) whose frequency can be varied within certain limits, using a frequency modulator to varactor diodes biased by the audio signal level. At the output of the oscillator is an RF amplifier and the output of which was mounted a filter-type antenna low pass to limit the emission of unwanted frequencies. To avoid any phenomenon of overmodulation, the audio signal is processed by a dynamic compressor it is actually an electronic circuit structured to limit the dynamic range, that is to say the trip between minimum and maximum levels of the signal. The module is available in four versions, which distinguishes only the working frequency of the oscillator: 863.125 MHz, 863.625 MHz, 864.5 MHz and 864.875. The transmitted power is 2 mW and stability Frequency is ± 10 kHz; unwanted frequencies emitted in a spectrum of ± 15 kHz about the frequency of oscillation, are maintained at 1 mW. Regarding the audio, the input has an impedance of 5 ohms, and accepts signals whose amplitude lies between -115 and -15 dBu (@ 1 kHz), the compression section of the dynamic pre-emphasis of 50 microseconds. The module requires a supply voltage between 3 and 9 V, it consumes a current of 25 mA. The frequency response ranges from 50 Hz to 15 kHz, which is more than sufficient for most applications (voice and music).

RX.
module WARX-01 is a superheterodyne receiver where the entire floor of agreement is somewhat different from what is typically found: as a fixed frequency, we mounted in series with the antenna input SAW filter tuned to the frequency of the module and not letting it, follows a high-frequency amplifier, whose output is connected to a mixer HF. In the latter part of RF (radio frequency) is mixed with the frequency of local oscillator (quartz, very stable) and we obtain the average frequency equal to 10.7 MHz, prepared by a ceramic filter, then amplified and filtered again through a second filter tuned also on 10.7 MHz. The average frequency is demodulated by a discriminator quartz extract audio, then sent to the expander dynamics and a "buffer" output. The module also includes a level sensor radio signal, taking as reference the average amplitude of the frequency control is a static switch that interrupts the audio line when the RF is too low for quality listening acceptable. This is a "squelch", which cuts the BF if the antenna signal is less than 17 dBmV (RX sensitivity is 21 dBmV). Food is a voltage between 3-12 V (30 mA consumption).


Figure 8: Compress and expanded.
This drawing shows how the "compander" is to say, the compressor and expander ("expander") dynamics of the audio signal: the left section is the process for sending and receiving the right one . As you can see, the transmitter module variable gain amplifier reproduces a wide dynamic range from 0 to -100 dB in the range of 50 dB (-10 to -60 dB): So it compresses a range of 100 dB, reducing it to only 50 dB. This method allows to send signals of high dynamics by modulating the radio carrier while reducing the frequency deviation (or trip, remember that we are on FM). The choice of the compression range is nothing fancy: it was conceived by the designer to keep the weakest signal below the noise threshold determined by the FM signal to the demodulator output at the exit of receiver (-60 dB). On the left side of the drawing we see how the signal remains unchanged when it has a level of -20 dB and is attenuated when other hand is stronger or weaker if it is amplified (eg -100 dB become -60 dB). The compressed audio component is emitted by the TX and received by the antenna RX: there, after demodulation, the expansion takes place through a second variable gain amplifier. In fact the amplitudes up to -10 dB to 0 dB are brought, those from -50 dB to -60 dB, -60 dB to -100 dB. Not remain unchanged as the only signals -20 dB. The first effect of this expansion is that the background noise that appears at the output of FM demodulator with a level of -60 dB (typical), is reduced to -100 dB and becomes almost imperceptible note that the FM noise is of -60 dB, without this operation would expand its presence tedious, which is not the case when it is reduced to -100 dB.

The practical realization of the issuer

The plate consists of a small single sided PCB, which 2b gives a scale drawing. Make it by the method of "blue film" and when it is engraved, drilled and tinned, first insert the jumper J1 (two poles at 2.54), then insert and solder all components (as shown in Figures 2a and 3), continuing with the resistors (mounted upright, folded trombone), capacitors, diode, transistor (in case a half moon), the trimmer and ending with "peripheral" means the jack stand, the slide switch, and decision-9V battery Finally mount the hybrid module transmitter (up to lying, weld pins and securing tabs). Warning orientation of polarized components: diode, transistor and the electrolytic (flat to C6). Place the 9 V battery (watch polarity). A copper wire of 8.5 cm (1 / 4 wave) or 17 cm (half wavelength), welded to the point ANT, is the transmitting antenna. Double check your welds (or short-circuit between tracks or pads or cold weld joints) and identification of components, respect for values, polarities at least twice systematically, you will not regret it because the installation work of the first blow.

The practical realization of the receiver

The deck is also a small printed circuit single sided with 5b gave the drawing to scale 1. Make it by the method of "blue film" and when it is engraved, drilled and tinned, first insert the support of the integrated circuit U2 TL081, then carefully check your welds (or short-circuit between tracks or pads or soldering Cold joints). Insert and then solder all components (as shown in Figures 5a and 6), continuing with resistors, capacitors, trimmer, diode, LED and ending with "peripheral" means the jack stand, the switch fasteners, and decision-9V battery Finally the hybrid module mount receiver (up to lying, solder pins and mounting tabs). Attention to the orientation of polarized components: diode, electrolytics and the integrated circuit (to be installed at the end, keyed reference-oriented U R3). Place the 9 V battery (watch polarity). A copper wire of 8.5 cm or 17 cm, welded point ANT, is the receiving antenna. Check again your welds and the identification of components, respect for values, polarities systematically at least twice, you will not regret not because the installation work the first time. So much for platinum récepteur.Pour TX and RX antennas, you can also use the flexible whip antennas on 868 MHz granted Trade: connect them to the point ANT. Feed the TX with a 9 volt battery 6F22 and install everything (platinum and battery) in the "handle" of the microphone used (kind of micro scene) and then install them in a small box that you slip into your pocket The lavalier microphone is then attached to the collar of the shirt or jacket (if no tie!).
The receiver operates with a voltage between 9 to 12 VDC to be applied to points on 9 V BATTERY, the current consumed is at least 60 mA. Eat it with a 9 V battery (as the issuer) or by a small supply stabilized power supply (this tension may be able to take on the mixer or amp or audio recorder). Besides the plate itself can be incorporated into one of these devices. Do not worry: the receiver module is protected against pests, particularly those from food.



BAND (MHz)


Use



40.980-45 for use Radiomicrophones amateur. 174-223 470-854 Radiomicrophones professional studio and radio broadcasting, recording studio and musical instruments. 862-876 Radio control and wireless audio applications. Currently wireless microphone issue on trade frequency bands allocated by the Ministry in charge of telecommunications for the use of devices short of range, that is to say low-power (usually reserved for communications TX / RX in a studio or an artistic performance, but also used in broadcasting). The table summarizes the frequency bands allowed for this use, for all the transmitter power must not exceed 50 mW. Our radiomicrophone operates in a range between 862 and 876 MHz, for the radio, transmission of data and also to the transmission / reception of audio signals and therefore all-in-fact adapted to the realization of a micro HF. Within this frequency range, our wireless microphone can work through the modules selected from 863 to 865 MHz. You choose what type of microphone if you want hands free. If you want to use a capsule electret preamplified two son, the sending unit can provide the necessary polarization: it is sufficient to close the jumper J1 in order to insert the resistive bridge and apply the bias to the capsule. Taking a microphone or a magnetic electret condense (electret condenser microphone) no fading, the rider will be left open, however: indeed, these microphones require no bias and produce themselves directly an output voltage of electromagnetic origin or piezoelectric.
Radiomicrophones outside professionals.
Figure 9: Frequencies of radiomicrophones (or wireless microphones or wireless microphones).
The choice of microphone Our system can be associated with all types of microphones: the magnetic (there are a few euros) are ideal if you want to keep the microphone in hand (because you want to the tender for a partner or circulate in the room). The capsules are the electret lavalier microphones (tiny microphones mounted on a small alligator clip) the most elegant and most convenient.
trials It remains only to check if everything is okay: Connect the receiver to the mixer or amp, etc.. With a shielded cable terminated with a 3.5mm mono jack (the AUX input of a hi-fi amplifier, for example ...) and, to the jack of the transmitter, insert the microphone jack selected.
Normally the microphones have a 6.35 mm jack, so you should maybe use an adapter from 6.35 to 3.5 mm. Put the cursor trimmers transmitter and receiver half way and lower the volume of the amplifier and then feed the two units, after placing the TX a few meters away from the RX. The receiver LED lights up immediately: this means that the radio link is occurring and that the carrier of the transmitter has a level of listening quality, and if the LED is off, control circuits. Talk
then close to the microphone and verify that the amplifier reproduces the sound of the voice acting needed to adjust the volume of the transmitter (do not produce "feedback") and the receiver gain ( corresponding with the trimmers): turn the cursor clockwise to increase the noise level and vice versa.
Then walk away and check with the TX How far up the LED stays on, to determine the radius range of your wireless microphone system.