Friday, April 29, 2011

KK-Quad setup guide

RCEKK1
A few words before we start:
To get the best stability and flight performance from your KK-controller mount it using a vibration dampening material such as “gyro-tape” or a thick double sided sticky tape. Also make sure to balance you props and motors to remove as much vibrations as possible.

Some general multirotor tips:
Do not use bigger propellers than you need. Light propellers gives faster response resulting in a more stable platform.
When designing your platform try to get it to hover around mid-stick. This means that your platform will have enough power at all time to respond and compensate but not have to much power resulting in a less stable platform. To achieve this use bigger/smaller propellers, lower/higher kV motors, more/fewer number of battery cells or more or less weight.

Safety:
Never have the propellers mounted when setting up your platform! A spinning motor without a prop isn’t dangerous but a prop spinning at wide open throttle cut’s flesh better than a hot sword. Therefore, never ever have the props attached when you’re setting up or making adjustments to you multi-rotor platform.
inkoppling
Hooking up your KK-board:Receiver:The soldered cables coming of the board are the four signal wires that plugs into your receiver.
On a Futaba/Hitec receiver they plug in as follows:
Aileron - Channel 1
Elevator - Channel 2
Throttle - Channel 3
Rudder - Channel 4
On a Spectrum receiver simply plug the aileron into the aileron port, elevator to elevator and so on.

Motors/ESC’s:
Down in the corner there are 6 motor outputs (M1 through M6)
On a Quadcopter the ESC’s are plugged in as such:
M1 - Front motor CW
M2 - Left motor CCW
M3 - Right motor CCW
M4 - Back motor CW
motorsQUAD
Preparing the transmitter:Create a new model memory and make sure that all mixes are disabled, all trims are neutral and that all End Point Adjustments (EPA) and D/R’s are set to 100%

If you have a computer-radio you can chose either airplane or helicopter mode. It doesn’t really matter. The helicopter mode will have the advantage of setting a custom throttle curve for those who doesn’t like a linear response on the throttle. If you use the helicopter mode make sure that the swash is set to; two servos 90°. If you use 120° CCPM mixing your platform will be unflyable!

Arming and disarmed the flight-controller:
The flight-controller has a built in safety feature which disables the throttle stick. This is a great feature that probably will save your platform or face at least once.

The KK-board will on power up be in the “locked”/disarmed position. The LED on the board indicates if the board is armed or not.
LED off = “locked”/disarmed, LED on = Armed.
To arm the board move the throttle/rudder stick down to the right corner and hold it there for about 5 seconds. The LED will turn on indicating that the board is armed and ready. To unarm/lock the board again move the throttle/rudder stick down in the left corner for 5 seconds.


Step by step setup guide:
1. Check if the throttle stick
This is to ensure that the throttle stick is moving the right direction and have enough trow to initialize the flight-controller.
Never perform this step with the props mounted!

- Turn on the transmitter and then the flight-controller
- Move the throttle/rudder stick to the down-right corner
- The LED should turn on, if it doesn’t:
- Try adding a bit of “down” trim on the throttle channel
- Try increasing the EPA on the throttle channel
- Try reversing the throttle channel

2. Calibrating the throttle range on the ESC’sThis is to ensure that all the ESC’s have the same throttle range end points. This step only needs to be performed once. Fail to do this calibration can result in an uncontrollable platform. If you ever install new ESC’s this step needs to be performed again.
Never perform this step with the props mounted!

- Make sure that the flight-controller is turned off
- Turn the Yaw pot to the MIN position
- Turn on the transmitter
- Move the throttle stick to top (full)
- Turn on the flight-controller
- Wait until the ESC's beeps twice after the initial beeps. (Plush and SS ESC's)
- Swiftly move the throttle stick fully down (closed). The ESC’s beeps
- Power off the flight-controller
- Restore the yaw pot to around 50%
RPY

3. Checking the direction of the transmitter channelsThis step is to ensure that the sticks actually perform the action in the way that they are supposed to.
Never perform this step with the props mounted!

- Turn on the transmitter and then the flight-controller
- Arm the controller. (Move the throttle stick to the down-right corner)
- Start the motors by raising the throttle (around 1/4 or so)
- Move the Pitch (Elevator) stick on the transmitter forward. The back motor should speed up. If it doesn’t, reverse the channel in your transmitter.
- Move the Roll (Aileron) stick to the left. The right motor should speed. If it doesn’t, reverse the channel in your transmitter.
- Move the Yaw (Rudder) stick to the left. The front and back motor should speed up. If it doesn’t, reverse the channel in your transmitter. (This will make the arming function reversed as well, meaning that you need to move the stick down in the left corner to arm the controller. This can be corrected, see step 7)

4. Checking the gyro compensationsThis step is to ensure that the gyros compensate in the right direction. If they don’t the platform will be uncontrollable and flip heads over heals.
Never perform this step with the props mounted!
- Turn on the transmitter and then the flight-controller
- Arm the controller. (Move the throttle stick to the down-right corner)
- Start the motors by raising the throttle (around 1/4 or so)
- Tilt the Quadcopter forwards. The front motor should speed up. If it doesn’t, note it, you’ll fix this in the next step.
- Tilt the Quadcopter to the right. The right motor should speed up. If it doesn’t, note it, you’ll fix this in the next step.
- Rotate the Quadcopter to the right (clockwise). The front and back motors should speed up. If it doesn’t, note it, you’ll fix this in the next step.

5. Revering the gyrosThis is how you reverse the compensation direction of the gyros

- Make sure that the flight-controller is turned off
- Turn the Roll pot to the MIN position
- Turn on the transmitter then the flight-controller
- The LED will flash rapidly 10 times and then turn of
- Move the stick for the gyro you want to reverse. (If you want to reverse the roll gyro, move the roll (aileron) stick)
- The LED will flash continually to confirm your choice
- Turn of the flight-controller
- If more gyros needs to be reversed, turn on the flight-controller and repeat the process. If you’ve reversed all the gyros you want, restore the pot to 50%

6. Reversing the pot directionIf you think that the pots turn in the wrong direction you can reverse the direction. This will mean that the MIN and MAX in the picture above will be inverted.

- Make sure that the flight-controller is turned off
- Turn the Roll pot to the MIN position
- Turn on the transmitter then the flight-controller
- The LED will flash rapidly 10 times and then turn of
- Move the throttle stick for the to the top
- The LED will flash continually to confirm
- Turn of the flight-controller
- The pots have now been reversed. If you wish to reverse the pots back you need to turn the Roll pot fully to the other extreme and repeat the process. Otherwise restore the pot to 50%


Final adjustments:- Make sure that all pots are set at 50% (in the middle)
- Make sure that the CG of your platform is correct
- Make sure that all the D/R’s are at 100%

Liftoff procedur:- Place the platform on a plane surface
- The platform should be motionless before takeoff
- Arm the controller by moving the throttle/rudder stick down in the right corner for 5 seconds or so
- Raise the throttle and fly. The gyros calibrate just as the throttle stick leaves the minimum position

Finding the correct gain:- Increase the gain in small steps until the platform starts oscillating (overcompensating making the platform rock from side to side)
- Reduce the gain a bit
- You now have the optimum amount of gain.
- Fast forward flight requires lower gain.
- Too low gain is recognized by a hard to control platform that wants to tip over.
- Too high gain is recognized by oscillations.

EPA, D/R and EXPO:If the platform feels to fast or twitchy you can either reduce the EPA’s (End Point Adjustment) or D/R’s (Dual Rates) or add EXPO (Exponential)
EPA and D/R makes the whole stick less sensitive and makes the platform “slower”. EXPO makes the middle of the stick less sensitive but keeps the throw at the end of the stick. This means that you can have nice control in a hover, which requires small adjustments, but you keep the ability to fly fast and agile.


- It’s not uncommon to need a couple of clicks trim to make the platform hover perfectly leveled. This is due to the small differences in the motors, ESC’s and props.

- Always disarm the platform after you’ve landed. (Move the throttle stick down in the left corner for 5 seconds or so) This little procedure has the potential to save you platform or face, so be sure to make it a habit.

Good luck!

Ref: rcexplorer.se/page14/kkguide/kkguide/quad.html

Thursday, April 28, 2011

KK Flight-controller setup guide



motorsTRImotorsQUAD
 
The interest in my KK flight controllers was bigger than I had anticipated. I’ve actually sold all of the boards that I had parts for, but as so many of you wanted a controller from me, I’ve ordered some more parts and will have another set of boards ready in another week or so (or two weeks if anything I’ve ordered is delayed).

Some people have actually already got their boards and are now asking for the setup guide. I have the great pleasure to tell you that the wait is now over! So far the guide only covers Tricopter and Quadcopter configurations, but more configs are coming soon.

Update: Quadcopter-X configuration guide is now available as well.
Update 2: Y6 and Hexacopter configuration guides are now up and running.
motorsQUADXmotorsY6
motorsHEX
A big THANK YOU! to all of you that has bought a flight-controller from me. I hope that you’ll be pleased with it and that you will share your projects.

Monday, April 25, 2011

Introduction to high pass filter design

Assuming you have mastered the design of low pass LC filters we will now proceed to the design of a high pass filters. A high pass filter is simply the transformation of a low pass filter. For our purposes we will say we need a five pole butterworth filter with a cut off frequency Fc at 2000 Khz. That is we want to pass all frequencies above 2000 Khz but attenuate those below 2000 Khz.
Perhaps this might be required for the antenna input to a receiver where AM Radio interference is proving troublesome.

Design Procedure

Let us first review the design procedure for a similar five pole filter but as a low pass filter. From our design tables we know that for equal source and loads:

BUTTERWORTH - equal termination filters

n stages
C1
L2
C3
L4
C5
L6
C7
2
1.414
 1.414
 
 
 
 
 
3
1.000 
2.000 
1.000 
 
 
 
 
4
0.765 
1.848 
1.848 
0.765 
 
 
 
5
0.618 
1.618 
2.000 
1.618 
0.618 
 
 
6
0.518 
1.414 
1.932 
1.932 
1.414 
0.518 
 
7
0.445 
1.247 
1.802 
2.000 
1.802 
1.247 
0.518 
n stages
 L1
C2
L3
C4
L5
C6
L7
The table above applies to the two low pass filters shown below in fig 1. Note the subtle differences. 
This image is copyrighted © by Ian C. Purdie VK2TIP - low pass filters - equal teminations
Fig 1 - low pass filters - equal teminations".
Which type you choose is a matter of choice which may well be influenced by your needs in some applications to have a DC blocking capacitor in the input or output of the final finished high pass LC filter. In this case use schematic 2.
In the two schematics shown in figure 1 the principal difference is the placement of the first capacitor, denoted either C1 or C2. Depending on the circuit configuration chosen, you read the values from the top of the table or the bottom of the table. Is that clear? Also I have only presented one table, there are hundreds of tables and filter types with varying responses but Butterworth is fairly easy to compute. We said earlier we would use a five pole filter and we will opt for the top type of filter so we should have these values. 
This image is copyrighted © by Ian C. Purdie VK2TIP - low pass filters - equal teminations  - normalised to 1 Hz
Fig 2 - low pass filters - equal teminations - normalised to 1 Hz.
Notice that this low pass filter is normalized to 1 ohm impedance both in and out, a frequency of 1 Hz and capacitor values are expressed in Farads while Inductor values are in Henries.

Transformation to High Pass Filter Prototype

All right we have a low pass filter prototype, what now? We simply want to do the opposite to a low pass with our high pass filter, so we do the opposite and invert everything. Replace each component with it's opposite.
A capacitor becomes an inductor and, an inductor becomes a capacitor and, at the same time the values are also inverted e.g. the first capacitor of 0.618F becomes an inductor of 1 / 0.618H. Cool? 
This image is copyrighted © by Ian C. Purdie VK2TIP - transform low pass filter to high pass filter
Fig 3 - transform low pass filter to high pass filter.
Notice that in the schematic I have already done the reciprocal or the inversion. The first capacitor was 0.618F, converting to an inductor of 1 / 0.618 becomes 1.618H (check it out on the calculator for ALL the components). Now all we have to do is get back to a standard impedance, we'll use 50 ohms but it could be any value which is suitable to our requirements. Also we need to get back to our cut off frequency of 2000 Khz.

Component calculations at Fc and at Zo - Frequency and Impedance scaling

This is the truly simple part if you like doing basic sums on the calculator. If not, then you're in for some bother.
The transformation is effected using the following basic, yet simple formulas:
This image is copyrighted © by Ian C. Purdie VK2TIP - transformation LC formulas
Fig 4 - transformation LC formulas.
Here C is the final capacitor value, L is the final inductor value, Cn and Ln are the prototype element values in Fig 3, R is your final impedance value and fc is the final cut off frequency. It's as simple as that!
So for a cut off of 2000 kHz and a 50 ohms impedance the calculations for the first capacitor and inductor we encounter become, as a worked example for you.
This image is copyrighted © by Ian C. Purdie VK2TIP - final component calculations - high pass RF filter
Fig 5 - final component calculations - high pass RF filter.
Note that the original prototype is always expressed in terms of 1 ohm, 1 hertz (Hz), Farads and Henries.
When you do your sums you get back to numbers with negative exponents, they are the -10 and the  -6 respectively. To bring capacitance to pF we multiply by exponent 12 (that's number 1 followed by 12 zeroes as in 1,000,000,000,000). Why? because 1 Pf is one 1,000,000,000,000th of a Farad.
To bring inductance to uH we multiply by exponent 6 (that's number 1 followed by 6 zeroes as in 1,000,000). Why? because 1 uH is one 1,000,000th of a Henry.
Your final filter comes out as follows:
This image is copyrighted © by Ian C. Purdie VK2TIP - final calculated high pass filter fc @ 2000 Khz
Fig 6 - final calculated high pass filter fc @ 2000 Khz.
Let's look again at our previous oscillator circuit. If you are unfamiliar with oscillators then review my previous oscillator tutorial. It will certainly help you.

Paranoia to avoid with filter values

Firstly don't use an unnecessary precision with your values. A capacitance calculated as 983.5752483 pF is totally irrelevant. In the "real world we would use a standard 1000 pF capacitor, remembering it's tolerance is going to be +/- 5% anyway. Consider also, it is doubtful any impedance will be precisely 50 ohms. Finally, for this type of filter toroids are ideal to use as inductors.
If their is sufficient interest I'll cover designing for unequal impedance terminations. 

Ref: http://my.integritynet.com.au/purdic/high-pass-filters.htm

Friday, April 22, 2011

Receiver design - the fundamentals

Among the first radio receivers ever constructed I suppose must have been the ever so humble crystal set. Just how many have been constructed over the years would be impossible to guess.

It would be fair to say millions of people, especially children had their first contact with electronic construction via the old crystal set.
Without going into a detailed history of radio it is fair to say the modern radio communications receiver (beyond the basic entertainment type) has evolved to the point all of the following characteristics must be considered at length when either purchasing or building a receiver. This discussion is confined to the type referred to as a "communications receiver"

These characteristics (and not in any particular order) are as follows: 
 
1. GENERAL
All receivers of the type being discussed here are for conveying information between 2 or more people but the description could include specialised receivers such as direction finding, radar etc.

2. INPUT CHARACTERISTICS
As silly as it may sound the first requirement of a receiver is to efficiently and with maximum voltage levels possible, transfer electromagnetic energy from the antenna to the input of the first stage of the receiver.
Well that's pretty basic isn't it?.
You would be surprised just how neglected this area becomes when people establish a receiving set up. How many listeners simply hang up as much wire as possible, cross fingers and hope for the best. If nothing is heard on a particular band it must therefore be assumed there is nothing on the air to hear.
That ain't necessarily so.
You could be missing hundreds of good signals!. Why?. Because of a haphazard approach to interfacing your receiver to the real world. Sometimes, and I am presently in this boat myself now, your location will not allow the best antenna set up possible. Maybe you live in an apartment or face some sort of restrictions on what you may be able to erect on the property where you live. Throwing your hands in the air and lowering a few metres of wire out the window is not a terribly scientific approach. No wonder you are likely doomed to disappointment.
You don't need to be a rocket scientist to establish a functional set-up. Certainly you must live within the constraints imposed upon you but you can always strive for the better mouse-trap.
The how-to's I will leave until later. The important thing to remember now is that no matter how classy your receiver is, you just might be choking off all those elusive signals BEFORE they get to the input of the receiver.
The professional receiver designer has no idea what you are going to attach to it. Therefore conventional wisdom dictates it be designed for a 50 ohm (nominal) input. Some receivers also offer an auxilliary 500 ohm input.

2. GAIN, SENSITIVITY AND NOISE FIGURE
Your communications receiver it is hoped will encounter and process a wide range of signals. It must be capable of handling these signals usefully without introducing problems of its own. Consider a signal emanating from your favourite s.w. commercial broadcaster some 10,000 miles (16,000 kM) away.
This signal may originate with a power level of 20 KiloWatts (20Kw). By the time it reaches the input of your receiver the level may only be 1uV (1 micro-volt). The signal has been attenuated (reduced) by 180 dB. That's a one followed by 18 zeros.
For you to usefully and comfortably hear this signal at the output of your speaker, at a quite modest level of say 250 mW (milli-watts), the receiver needs to amplify the signal by about 130 db or have a gain of 130 dB. Now that's a one followed by 13 zero's. I would estimate that about nearly half that gain would come from the audio amplifier section. This would mean about 70 dB of gain  needs to come from the preceding stages.
Now for the moment I am going to deal with an a.m. receiver here. The sensitivity is influenced by the receiver bandwidth so we will assume a bandwidth of 6 Khz. That theoretically means the receiver will not respond to those portions of a signal which are outside plus/minus 3 Khz from the carrier. e.g. a signal on 27.24 Mhz. A good receiver undergoing a test at that frequency would indicate a sensitivity of about 1.5 uV.
Noise Figure is somewhat nebulous and tends to mean different things to different people.

To dispense with any arguments I will quote in part (omitting the later heavy mathematics) Professor Ulrich Rohde from his book "Communications Receivers - Principles and Design" - P68 -ISBN 0-07-053570-1 
 

"Sensitivity measures depend upon specific signal characteristics. NF measures the effects of inherent receiver noise in a different manner.Essentially it compares the total receiver noise with the noise that would be present if the receiver generated no noise. This ratio is sometimes called the noise factor F, and when expressed in dB, the noise figure."

 - bold type is my emphasis alone. 
  
 
3. SELECTIVITY
This simply means the ability of the receiver to separate the signal you want from all the other signals. This selectivity must be sharp enough to differentiate from adjacent channels yet sufficiently wide enough to reproduce the signal at an acceptable fidelity.
Some would say 300 Hz is ideal for C.W. (morse code) while 6 Khz (6,000 Hz) is too wide for serious short wave listening. A T.V. Receiver has a bandwidth of around 7 Mhz (7,000,000 Hz) and F.M. Radio uses 200 Khz channel spacing.
Therefore the selectivity should be consistent with the type of signal you expect to encounter.

4. DYNAMIC RANGE
Here you faithful lecturer jumps on/off high horse.
Just as with noise figure this means different things to different people. Some manufacturers will even omit this figure altogether in their specifications and a lot of people active in radio have never even heard of it.
It is one of the most critical characteristics of a receiver.

It is quite important how it is defined. 
 

Dynamic Range could be defined as:
"The ability of a receiver to survive in the presence of strong signals."
But I feel it should be defined as:

"The ratio of the level of strong out-of-band signals to the level of the weakest acceptable desired signal. The level of strong signal must be such as to cause the weak signal to become unacceptable". 
 
Expressed another way, it means if we are just managing to listen to our favourite elusive signal from far, far away we don't want a nearby channel, occupied by some powerful transmitter situated close by, to swamp out our desired signal and take control of our receiver.

5. GAIN CONTROL
Harking back to our earlier signal of about 1 uV level. In practice this signal level will vary wildly from instant to instant for a variety of reasons but mainly because of the vagaries of propogation.
Obviously it would be unacceptable for the reproduction to vary wildly at the output of your speaker in sympathy with the varying signal input. Also we don't want to continue amplifying the desired signal if it is already a strong signal at our antenna. Hence the need for automatic gain control.
Ideally we would want a constant output from our receiver regardless of the signal level presented at the input. Gain control should generally be logarithmic in response and a range of 120 dB would be ideal. The time constants of the response (i.e. how fast it operates etc.) should depend on the mode of receiving e.g. C.W., S.S.B. or A.M. etc.

6. FREQUENCY ACCURACY AND STABILITY
We all know how difficult sometimes it is to locate a station on a cheap a.m. radio. With a quality communications receiver we should be able to set our frequency of reception with both accuracy and certainty. We should also be able to remain on frequency for any length of time without the need to unduly re-tune the receiver.
The present state-of-the-art is such that these properties are no longer (or should not be) a problem. Even the lower cost receivers offer exceptional accuracy and stability compared say to 20 years ago.

Ref: http://my.integritynet.com.au/purdic/rec_basics.html

Small Signal Amplifiers


THE DESIGN PRINCIPLES OF SMALL SIGNAL AMPLIFIERS

Let's look at one example of a small signal amplifier, perhaps of the type to follow the previous buffer amplifier. We will assume we are buffering and amplifying our signal from thevoltage controlled oscillator tutorial. In those examples we were generating and buffering 1.8 to 2.0 Mhz signals for the 160M band.

A PRACTICAL EXAMPLE

This image is copyrighted © by Ian C. Purdie VK2TIP - small signal amplifier
Fig 1.
Here I've used a pretty standard and cheap transistor for our small signal amplifier. This transistor has some pretty impressive characteristics though.
The configuration is much the same as other class "A" amplifier designs covered in previous tutorials.
The output circuit consists of a low pass filter network which also converts the desired output impedance we want Q1 to see to our standard 50 ohms output.
The 100 ohm resistor, RFC XL2 and the 0.01 uF capacitors are purely for decoupling purposes i.e., to keep RF out of the small signal amplifier power supply as well as other stages. Let's consider firstly the input circuit of our small signal amplifier.
Q1 is biased for DC conditions by R1, R2 and the emitter resistor of 270 ohms in this instance. Alert readers will be aware I like to bias the base voltage of my transistors to about 25% of Vcc (.25 * 12V) or 3V. It follows then that R1 will be about 3 times the value of R2 - think about it!. If the base voltage is around 3V then the emitter voltage is going to be 3v - 0.65V = 2.35V. Don't follow that? Go back to class "A" amplifier designs covered in previous tutorials.
If the emitter voltage is 2.35V approx. then the emitter current Ie through the emitter resistor of 270 ohms must be (from ohms law) 2.35 / 270 = 0.0087 or 8.7 mA. I've also said elsewhere I like base current to be about 1/7th of emitter current - alright these are my foibles and others would disagree. They're welcome to write their own papers.
So base current is going to be about 1 mA and seeing R1 + R2 are connected across 12V it follows that (from ohms law) R1 + R2 = 12V / .001 = 12,000 ohms or 12K. For biasing R1 is 3 times R2 so using simple maths R2 is 25% or 3K and R1 would be 9K which are not necessarily readily available standard values. We will make R2 = 3K3 and R1 = 10K which if you do all your sums is near enough and probably about a third of the values others might use.
So we have our DC conditions satisfied and the 0.01 capacitor in parallel with the emitter resistor means for RF purposes the emitter is at ground potential. This then leaves the output circuit to be discussed. The 22 ohms resistor in the collector circuit is there to discourage parasitic oscillations. RFC XL2 as I said before is only to decouple the power supply and I'd look for a reactance of around 20,000 ohms or at 2 Mhz something like 1 to 2.5 mH.
All this leaves is our low pass filter matching network. First question?? How much output power do we want? Huh? Yep that's how it all works.
Let's say we wanted +17 dBm for a mixer circuit. To the uninformed +17 dBm is a power relationship in milli-watts. Power is always (10 * log of power) so in this case in reverse we divide the 17 by 10 to get 1.7 which is the log of 50 so it follows that +17 dBm is in fact 50 mW of power. Learnt something?
Incidentally a power level of 50 mW into 50 ohms also equates to Erms = SQRT ( 0.05 * 50 ) or 1.58V RMS or 2.828 times that value to get pk-to-pk, which is 4.47V PK-PK.
Alright how do we design to get 50 mW out of our amplifier? By using the formula R = Vcc2 / (2 * Po) or in our case [ (12V * 12V) / (2 * 0.05) ] = 1440 ohms. Want more power? Change the numbers! Obviously there are limits but you get the idea.
From the above the collector needs to see a load of about 1440 ohms which in turn has to be transformed into our 50 ohm load. By the way, if the amplifier doesn't see a 50 ohm load then all these calculations go right out the window. At the end I show my method of ensuring something like a 50 ohm load and more important the method helps the succeeding stage see a 50 ohm source.
If you have done previous tutorials on filters this is easy. If not then you need to do more work. This is a simple "L" network low pass filter designed in this case to transform 1440 ohms to 50 ohms. Follow these steps where SQRT signifies square-root-of:
1. XL = the SQRT of [(R1 * R2) - (R1 * R1)] = SQRT [(50 * 1440) - (50 * 50)] = SQRT [ 72,000 - 2,500] = SQRT of 69500 = 263.6 ohms
2. Xc = [(R1 * R2) / XL] = 72,000 / 263.6 = 273 ohms
Therefore the reactance of our inductor is about 264 ohms at our frequency of interest and the reactance of our capacitor is about 273 ohms at that same frequency. In the beginning I mentioned a requirement for a 1.8 to 2 Mhz small signal amplifier so we will nominally use 2 Mhz as our cut off frequency i.e. we want to pass all signals below about 2 Mhz but not above (filter out harmonics!).
Here I always see what capacitor has a reactance of 273 ohms at 2 Mhz using the standard capacitive reactance formula Xc = 1 / (2 * pi * Fo * C). Which when algebraically rearranged for our purposes becomes C = 1 / (2 * pi * Fo * Xc ). Slipping 273 ohms for Xc into that formula and 2 Mhz (2,000,000) should get you on your calculator 2.91.. -10 which should then be multiplied by exp 12 to arrive at an answer in pF. Doing that we get an answer of 291 pF which doesn't exist in the real world.
Now you have several choices here. (a) just plonk nearest standard components in for XL and Xc and don't worry about tuning - not recommended. (b) make part of Xc variable e.g. Xc comprises a fixed 270 pF capacitor with a 5 - 50 pF trimmer in parallel or (c) make Xc fixed and XL variable. You can only use the latter option if you have suitable slug tuned inductors available (they ain't cheap but could possibly be salvaged if you know what you are doing).
In the event you chose option (b) the required fixed inductor would be determined from the inductive reactance formula XL = (2 * pi * Fo * L). In ALL examples I use 6.2832 for 2 * pi. For our example we can again rearrange the formula as L = XL / (2 * pi * Fo) and plugging in this case 263.6 ohms XL from above and 2 for 2 Mhz we get L = 263.6 / (6.2832 * 2) = 20.98 uH. That is the inductance you would use, possibly with 60 turns of #26 wire on a T68-2 toroid as only one example.
If you elected method (c) - and this is really cool - I would look back at the capacitor required i.e. 291 pf, use the next lower value which is 270 pF and slot in a variable inductor which will tune through 20.98 uH. Feed a suitable signal to the amplifier, ensure the amplifier is terminated in a suitable fixed 50 ohm load (two 1/2 watt 100 ohm resistor in parallel = 50 ohms) and watch the output on a scope as the slug is adjusted. Wow! In fact you should get a similar effect with the variable capacitor method in (b). Certainly you will then understand why method (a) sucks.
I mentioned earlier how I ensure a 50 ohms load and succeeding stages see a 50 ohms source. I use a 50 ohm 3 dB attenuator. This is a resistive pi network attenuator which consumes 3 dB of power but represents a constant load. You put it in circuit after the last 0.01 uF coupling capacitor after the output.
This image is copyrighted © by Ian C. Purdie VK2TIP - resistive 3 dB 50 ohm attenuator
Fig 2.
Now the downside. It consumes power. At - 3 dB that's half the power!!! What the hell just do your sums all over again to produce 100 mW from the amplifier. I would!
In this event your collector load is now 720 ohms, Xc = 197 ohms and XL = 183 ohms. At around 2 Mhz they translate into 403 pF (use 390 pF) and about 14.6 uH.
See - dead easy!

Ref: http://my.integritynet.com.au/purdic/small-signal-amplifier.htm

Monday, April 18, 2011

LED moving font

 LED-Laufschrift

The LED moving font is built up of separate modules consisting of 64 LEDs each (8x8 matrix). The modules can be cascaced according to the desired size of the font. Each module is controlled by the LED display driver MAX7219 (or MAX7221) which can drive 64 LEDs. The display data is transferred serially to this display driver via the pins DIN, CLK and LOAD. The pin DOUT can be connected to the input DIN of the following display driver, all CLK and all LOAD pins are connected together. The datasheet is available on Maxim's homepage.
The modules are controlled by an 8051-compatible microcontroller AT89C51 (LED moving font controller variant 1) or AT89C2051 (LED moving font controller variant 2) from Atmel which provide 4 kB or 2kB flash memory on-chip. The LED display driver MAX 7219 CNG is available from Reichelt or Segor, a free sample can be ordered on the homepage of Maxim. The LED display driver is mounted together with a LED module (8x8 matrix) on the LED module PCB.
The display text is stored in a EEPROM. The text can be downloaded via a serial RS232 connection from a PC. From the PC a text file containing the text is sent. The baudrate can also be set to 600 Baud (via additional jumper), because some PCs have problems with hardware handshaking, which would be necessary at 1200 or 9600 Baud download speed. Dependent on the storage size of the EEPROM up to 2045 characters can be stored. It is also possible to store the text in the flash ROM of the microcontroller. But then it is necessary to reassemble the program code if the text is changed and to reprogram the flash ROM. If an EEPROM is used, changes of the text can be done easily via serial downloading. A maximum of 11 LED modules (each module consisting of 8x8 LEDs) can be used. The moving font is already working with 1 module.

Adjusting moving speed: in EEPROM-Mode, 255 speed values can be set. The selected value can be transmitted via serial interface and will be stored in a byte in EEPROM.
LED moving font controller variant 1 LED moving font controller variant 2
LED module (frontside) LED module (backside)

The schematic and the software can be downloaded here:
Download Project files for hardware and software in ZIP format:
LED moving font V2.3
For the hardware the freeware version of Eagle 3.55 is required. It is available for free from CadSoft.
PCB Printed circuit board:
There are professionally manufactured unpopulated printed circuit boards available for this project, named:
MAT_CON1.BRD (LED moving font controller variant 1 for AT89C51)
MAT_CON2.BRD (LED moving font controller variant 2 for AT89C2051)
LEDMODUL.BRD (PCB for 1 LED module TC23-11EWA)
More information is available here: Printed circuit boards for WOE projects
Programmed microcontroller Programmed microcontroller:
If you are interested in a programmed microcontroller, please send an email including the project name.
Support WOE Did you like this project?
So feel free to support WOE with a small donation. You will support the development of further free projects on this site. Thank you.


Suitable 8x8 LED dot matrix displays for the LED moving font:
For each LED module a 8x8 LED dot matrix display is required with common cathode columns and common anode rows. You can build the dot matrix displays with seperate LEDs on a universal PCB or you can use 8x8 LED dot matrix panels. A suitable type is the display TC23-11EWA manufactured by Kingbright, a suitable unpopulated PCB is available, look ahead. The color of this LED dot matrix display is red, but it is also available in different colors.
Sources of supply for 8x8 LED dot matrix displays TC23-11EWA:
8x8 LED dot matrix displays TC23-11EWA (Manufacturer: Kingbright, color: red, technical data) are available via the distributors of Kingbright, e.g. menges electronic

Ref: woe.onlinehome.de/e_projects.htm

Monday, April 4, 2011

AT89C2051 programmer

Using this programmer you can program the internal flash of the microcontroller AT89C2051 from Atmel. The AT89C2051 programmer is connected via the serial RS232 interface to a PC. In comparison with other programmers, you do not need a special software, a terminal program is sufficient. So there are no platform dependent limitations and it can be used universally.
Generally the programmer supports two different modes:
1. User mode: The desired operation Program (including Erase), Verify, Read or Lockbits can be selected via a BCD switch and started by pressing a button. The desired programming data will be transmitted or received in binary format via the RS232 interface. A special software data handshake is not required. A LED shows the current status.

2. Remote mode: In remote mode, the BCD switch and the button are not required, because the operations are selected via special remote commands from RS232 interface, followed by the binary data like in user mode. When the operation is finished, a status code is transmitted back, so it would also be possible to control the programmer with an own developed software.
AT89C2051 programmer
The schematic and the software can be downloaded here:
Download Project files for hardware and software in ZIP format:
AT89C2051 programmer V1.1
For the hardware the freeware version of Eagle 3.55 is required. It is available for free from CadSoft.
Schematic Schematic and component placement in GIF format:
Schematic of AT89C2051 programmer
Component placement of AT89C2051 programmer
PCB Printed circuit board:
There is a professionally manufactured unpopulated printed circuit board available for this project, named PRG2051.BRD
More information is available here: Printed circuit boards for WOE projects

AT89C2051/ATtiny2313 evaluation board


The AT89C2051/ATtiny2313 evaluation board is suited well for building and testing microcontroller circuits. You can either use an AT89C2051 or an ATtiny2313, both microcontrollers are almost pincompatible, just the reset pin has different polarity. The ATtiny2313 has the advantage that it can be programmed in-circuit via SPI. Furthermore it supports On-Chip-Debugging via the built-in DebugWire interface. Debugging can be done via the reset pin with the "JTAGICE mkII" from Atmel.
The port pins are connected to terminals. A serial RS232 interface is already implemented on board which can also be disabled in order to get further port pins. A serial I²C-EEPROM can be used as a nonvolatile memory for configuration data. Via I²C-Bus other peripheral components can be connected to the evaluation board. A stabilized 5V supply is also implemented on board.
AT89C2051/ATtiny2313 evaluation board
The schematic and the layout of the board can be downloaded here:
Download Project files for hardware and software in ZIP format:
AT89C2051/ATtiny2313 evaluation board V1.1
For the hardware the freeware version of Eagle 3.55 is required. It is available for free from CadSoft.
Schematic Schematic and component placement in GIF format:
Schematic of AT89C2051/ATtiny2313 evaluation board
Component placement of AT89C2051/ATtiny2313 evaluation board
Attention: Please consider the different component placement options according to the selected microcontroller!
PCB Printed circuit board:
There is a professionally manufactured unpopulated printed circuit board available for this project, named AT89_EXP.BRD
More information is available here: Printed circuit boards for WOE projects


Ref: woe.onlinehome.de/e_projects.htm