Date   
Re: Confused about how AGC works?

digger AB3XU
 

Makes sense. Thanks Jerry

Re: Ubitx batteries / charger #ubitx

Arv Evans
 

I have and use several of the 3S and 4S charge controllers.  These have between-cell connections
for charge balancing.  Seems to work well because I have rebuilt a number of old Ni-Cad drills
so that they now use Li-Ion cells.  Drills work really well with Li-Ion or Li-Po battery packs.  

From on-line anecdotes it seems that people trying to use Ni-Cad chargers on Li-ion cells is culprit
in many of the horror stories. 

My one complaint about the Ebay sourced 3S and 4S charge controllers is that they usually like
source voltages that are only a couple of volts above the string you are trying to charge.  This
limits what voltage wall-wart you can use to trickle charge your Lithium based battery packs. 

This Li-Ion thing has spawned some research and design work here to see just how much radio
can be powered from a single 18650 cell.  The current is more than adequate but making sensitive 
circuits that run on 3.4 to 4.0 volts is a challenge.  End result I seem to be looking for is ability
to use a simple 1S charge controller (they are less than US$1.00 from Ebay) to manage several
18650 cells in parallel.  Transmitting using MOSFETs in class-C or class-E is not difficult but
at low voltages there is not much margin for noise immunity and overload in receiver circuits. 


If doing much work with 18650 type cells it is probably worthwhile to make a simple spot-welder
for attaching the cell connectors. 


Arv
_._


On Fri, Apr 19, 2019 at 4:39 PM Jerry Gaffke via Groups.Io <jgaffke=yahoo.com@groups.io> wrote:
Daniel's three cell lithium ion 18650 holder with protection from fasttech.com looks promising.
Unfortunately, from the "discussion" section there, I doubt it does charge balancing across the cells.
Would like to hear of a 3S or 4S holder like this that does do charge balancing,
and is designed for standard issue 4.2v max lithium ion 18650 cells.

Arv said:  "Most Li-Ion and Li-Po 18650 type cells include built-in FET switching
that prevents discharge
 to less than 2.0 volts." 
Arv must be spending more money on his cells, the ones I get generally don't have protection.

Arv also says:
"If using multiple 18650 Li-Ion or Li-Po cells you have to manage the voltage on each individual  
cell during charge to insure that no cell exceeds the rated voltage.   While I abhor the "it won't 
work" and the "it will explode" scare tactics, this is one place where the nay-sayers may be justified"

The model aircraft guys might discharge a battery in 5 minutes or less of aerial acrobatics.
Then land it, and do a quick charge to almost full capacity in 3 minutes or so from 
a 100 Amp source, send it back up for more fun. 
That's the usage case where most of the explosions come from.
If charging at a fraction of an amp, explosions are much less likely.

Charge balancing is a very good idea, but if starting out with a set of all new
cells from a quality manufacturer, they will all charge and discharge at about the same rate.
Maybe back off from the spec max of 4.2v per cell, 4.1v max per cell would be safer.
Unlike lead-acid batteries, a fully charged lithium ion cell can get damaged if you push
a charge current through it while any slower cells catch up. 

If I were to buy that 3S 18650 fastech.com holder, I would charge the cells in place
from a 3*4.1v=12.3v voltage source, limited to a max of perhaps half an Amp.
Could use an adjustable 3 terminal regulator set to 12.3v, plus a series resistor to a 20v supply.
And check for balance across the cells with a voltmeter every few charge cycles.

But looks like most of the balance boards are sold separately from the the cell holders.
That's fine, just an extra 4 wires to solder.

Here's a cheap 3S balance board, though from the user's comments, the balance function is rather weak:
    https://www.amazon.com/11-1V-Balance-Lithium-Battery-Protection/dp/B075D96HVV

Here's another, totally different design (don't see the big FET's),
has a somewhat better description even if it is rather mangled:
    https://www.newegg.com/Product/Product.aspx?Item=2S7-00MH-048Z3

Too bad they don't include a schematic of the thing so I can figure out what all it does.

Any suggestions for a good balance board along these lines?
Can it charge the string of batteries from something like a 20v source
without any external voltage regulator?  Without external current regulation?
How large can the balance currents be?
That sort of thing is often missing from the description.

Jerry, KE7ER



On Fri, Apr 19, 2019 at 12:45 PM, Daniel Conklin wrote:
You need a 3 cell protected holder, like this one:  https://www.fasttech.com/product/1161200-3s1p-18650-11-1v-battery-holder-case-li-ion-pcm

Re: No Boot-Up (after spikes)

John (vk2eta)
 

Also, and still assuming the symptoms are that at boot up the display stops at the version and call sign being shown, in the Ian Lee's software version the i2c address of the si5351 can be changed for non standard Raduinos.

I can't check now but I suspect there must be a field in the uBitx memory manager for that data.

The default is 0x60 hex or 96 decimal.

73, John

Re: Confused about how AGC works?

Jerry Gaffke
 

Digger previously wrote:
    Does the delay in part prevent oscillations by introducing a phase shift? 
 
I guess didn't quite answer your question

Consider an amp with positive feedback and no delays anywhere.
It would instantly ramp up to infinity.

If you want it to oscillate, you need to have a delay in that feedback loop
that gives a full 360 degrees of phase shift at the frequency of interest.
So the next cycle at that particular frequency gets reinforced by feedback from the previous cycle.
And other frequencies don't get this positive reinforcement at exactly the right time, so they die out.

If you want the oscillation to be stable, the gain around the entire loop
must be exactly 1.0  (so no gain and no loss).
If it is less than 1.0, the oscillation will die out.
If it is greater than 1.0, the amplitude of the oscillation will keep getting bigger till it swallows the universe.
However, any practical amplifier will have reduced gain as the oscillation gets too big,
so we will soon reach a steady state when the oscillation is so big that the amplifier gain is reduced to 1.0.
In this way the amplifier is considered non-linear, since it treats big signals differently than small signals.

The diagram on that wikipedia page shows a pure amplifier with a voltage gain of A (and no delays).
There is also a feedback network with a transfer function of Beta (a Greek B).
The transfer function mathematically describes all the phase shifts (delays) and attenuations at all possible frequencies,
all wrapped up in a nasty equation.  This is the part that keeps EE students drinking coffee the night before an exam.
But that transfer function is linear, and could be described by a bunch of resistors and capacitors and inductors
all wired up into a big rats-nest.  For example, here's a fairly simple model of the 12mhz quartz crystal
used in the feedback loop of the BFO oscillator on the Bitx40:  
    https://www.maximintegrated.com/en/app-notes/index.mvp/id/2127

Jerry, KE7ER




On Fri, Apr 19, 2019 at 03:45 PM, Jerry Gaffke wrote:
> Does the delay in part prevent oscillations by introducing a phase shift? 

Re: Confused about how AGC works?

digger AB3XU
 

Thanks again Jerry. I used to work with electronics decades ago and have forgotten almost all of it. Not in design but with repair and maintenance of telemetry and then audio equipment. The uBITX has been a great way to get reintroduced to all of it.

73, digger AB3XU

Re: No Boot-Up (after spikes)

Ted
 

Hi, John. 


I got a Nano generic to load up the diagnostic sketch, attached it to the Raduino (out of the radio), and ran through the control function tests. It saw the i2c bus and the si5351.  I ran through it kind of fast and didn't take notes on what ports were connected on each. I wanted to try a $18 genuine Nano board for kicks, as I've been skeptical of using that up to now. 

It seems I can program both the generic and the genuine board just fine but, after that initial test, I can't the the comm port monitor to see Nano output from either board, Of course I swapped comm ports to match the two different boards..  The first time I connected, I received menu lines immediately (you know, like old TNC work or with dial-up modem setups). Since then,no readback.  It seems like the more simple stuff is the most frustrating.  Maybe some sleep will fix this.  See you in the AM.  

And, thanks for the tip on the diagnostics. It's just what I was hoping for, actually, as it takes away a lot of guesswork.


- Ted

Re: No Boot-Up (after spikes)

Ted
 

Joe,

After fixing the first Raduino shorting, no luck. Maybe it's done, not sure yet. Somewhere along the line of hooking up a spare, I got pin 3 (Clock #2) and pin 4 (Gnd) a bit close for a while. It probably remained that way for 10 minutes or so while trying to trace any reasonable answer to the original problem. Anyway, the 2.8" Nextion is toast (reason unknown) and when I hook this radio to my other uBitx 3.5" screen, that screen likewise sits on the initial boot-up with zeros where the Nano information should show up.

As to your question, if I press screen buttons, I get the same false action that one gets while in the Debug mode in the Nextion software.  Ig's powered up but not speaking to anything, same as the original screen, 5 (now toast) Nano boards, and two Raduino boards (one might be dead). 

I can't wait unitl it's warm enough to go sailing again.  


With appreciation,

Ted
K3RTA

Re: Confused about how AGC works?

Tom, wb6b
 

HI,

An additional, somewhat oversimplified, way to look at the AGC control loop is this:
 
If you consider the transistor (or other type of amplifier in the control part of the loop) provides 180 degrees of phase shift then an addition delay of 180 degrees is all that is needed for the control loop to go from being a control loop to an oscillator. This can be done with as little as two equal RC time constant type delays chained together. 
 
Assuming there are delays in the AGC control loop due to other components not being infinitely fast, or other circuit compromises, you can make sure one of the RC time constant delays is much larger than the rest. That will swamp out the effects of the other delays. Many AGC circuit go even further by causing the AGC to cut in fast but restore the gain at a slower rate. 
 
If there was no delay in the control loop the AGC might be so good as to adjust the gain microsecond by microsecond and result in an output signal (audio) of zero volts AC, across every cycle of the audio. 
 
Finally if you are controlling a system with a lot of inertia (such as the hot water temperature to your shower head, air conditioning, motors or the melting temperature of the heated head of your 3D printer) another type of control loop, called the PID loop, is used.
 
In the PID loop the rate of change of the temperature/speed/whatever is fed into the control voltage to help the loop anticipate when to shut off (or turn on) just ahead of the desired value, so the temperature/…/…  will arrive at but not overshoot the desired value (set point).
 
The PID loop would likely not be as beneficial in an AGC circuit when your neighbor down the street keys up his kilowatt with his beam pointed your way, at there is nothing gradual to anticipate. So simpler control loops are the better choice for AGC.

Tom, wb6b

Re: No Boot-Up (after spikes)

Joe Puma
 

Sounds like you’ve had some bad luck. Order some new parts and just push through it. 

73
Joe
KD2NFC 




On Apr 19, 2019, at 9:52 PM, Ted via Groups.Io <k3rta@...> wrote:

Joe,

After fixing the first Raduino shorting, no luck. Maybe it's done, not sure yet. Somewhere along the line of hooking up a spare, I got pin 3 (Clock #2) and pin 4 (Gnd) a bit close for a while. It probably remained that way for 10 minutes or so while trying to trace any reasonable answer to the original problem. Anyway, the 2.8" Nextion is toast (reason unknown) and when I hook this radio to my other uBitx 3.5" screen, that screen likewise sits on the initial boot-up with zeros where the Nano information should show up.

As to your question, if I press screen buttons, I get the same false action that one gets while in the Debug mode in the Nextion software.  Ig's powered up but not speaking to anything, same as the original screen, 5 (now toast) Nano boards, and two Raduino boards (one might be dead). 

I can't wait unitl it's warm enough to go sailing again.  


With appreciation,

Ted
K3RTA

Re: Confused about how AGC works?

Jerry Gaffke
 

All the AGC circuits proposed in this forum (and there have been many) have a fast attack and then a relatively slow decay.
That way when the QRO guy across town keys up, it saves our ears as much pain as possible, and keeps the gain throttled
back in case he decides to utter yet another syllable.  The fast attack and slow decay thing is non-linear, and thus harder
to model with equations.  

The PID algorithm is worth knowing about, an ideal approach to many feedback loops for us punters:
    https://en.wikipedia.org/wiki/PID_controller
No nasty math, easy to understand. 
You get three knobs, and you twiddle them till the system starts to behave itself.
A good example of where you might want to use PID would be on a heater for an oven-controlled-crystal-oscillator, or OCXO.
A processor such as the Nano would be entirely adequate for implementing the algorithm.
The goal would be to add enough heat when the oven is cold to quickly bring it up to temperature,
but not leave the heater on so long that the oven temperature overshoots and gets too hot.
Note that there will be a time lag between when the heater shuts off and when the
sensor near the quartz crystal sees the temperature stop rising.
This system could easily oscillate if the knobs are set wrong,
with the temperature alternating between too high and too low. 


> The PID loop would likely not be as beneficial in an AGC circuit when your neighbor down the street
> keys up his kilowatt with his beam pointed your way, at there is nothing gradual to anticipate.


In that case, you want the "D" knob turned way up, for a very fast AGC attack.
However, since the PID loop is a linear system, the AGC decay will be equally fast, and that is not what you want.

Jerry, KE7ER


On Fri, Apr 19, 2019 at 07:30 PM, Tom, wb6b wrote:
Many AGC circuit go even further by causing the AGC to cut in fast but restore the gain at a slower rate. 

Re: Confused about how AGC works?

MadRadioModder
 

I tend to use the definition of AGC from the Radio Amateurs Handbook and other IEEE sources that pertain to the Radio-Electronics industry specifically rather than Wiki… which is typically diminished science for the masses from random writers who may or may not actually understand the topic.  The Wiki article you refer to discusses AGC applied to Audio systems, Power systems (generators), Process Control systems (like PID controllers), and even biological systems. While a tiny bit of this definition is applicable to radio systems (feedback with variable gain in some form), it’s by no means specific or useful.  Historically (that being from the late 1930’s and early 40’s when the first patents for AGC were granted), AGC was defined as a closed-loop system that provides attenuation to one or more RF-IF gain stages of a receiver.  The goal was to keep the output level of the receiver constant and prevent gain stages from saturating at high RF front-end input while increasing gain for weak (low voltage) signals yet irrespective if the input.  The underlying algorithms to do this generally consist of signal measurements in the IR-RF chain and post detector, filter and integrator for response shape, to be fed back to a variable attenuator of some type.  Our ears are logarithmic in response (a second outcome of Fletcher-Munson) and since we can (and do often) define signal strength as logarithmic voltage, the feedback algorithm can be linear or semi-linear (logarithmic).  This is called Input-VGA or IVGA (attenuator-amplifier) as opposed to Output-VGA (which is fixed gain amplifier followed by a passive attenuator).   I believe Zenith held one of the first patents on AGC, but it was contested early and proliferated by others while in litigation… and it was evident on a myriad of AM receivers starting in the 50’s and forward.  This is what I know with 45+ years of designing AGC circuits for commercial and military receivers.

 

I don’t know much about AVC other than it was used in the audio industry and proliferated there for recording and delivery (dBX had a compression form of it).

 

I have no idea what “Transmit AVC is”…

 

 

From: BITX20@groups.io [mailto:BITX20@groups.io] On Behalf Of Jerry Gaffke via Groups.Io
Sent: Friday, April 19, 2019 1:58 PM
To: BITX20@groups.io
Subject: Re: [BITX20] Confused about how AGC works?

 

From 
    https://en.wikipedia.org/wiki/Automatic_gain_control
"Automatic gain control (AGC), also called automatic volume control (AVC), is a closed-loop feedback regulating circuit in an amplifier or chain of amplifiers, ..."
A google search for "AGC vs AVC" shows they are considered synonomous in radio design (but not for power grids), and that AGC is the more modern term.

In this forum, all such circuits for receivers have been getting referred to as AGC.
For some reason, the term AVC has only been used in this forum for automatic level control while transmitting
(Except for these posts from MRM.)
Works well for me, as few of us care that much about AVC while transmitting.
I suggest we keep it that way. 



 


Virus-free. www.avg.com

--

…_. _._

Re: Confused about how AGC works?

Jerry Gaffke
 

Do a google search for "AGC  AVC"
Let me know if you find any hits that draw a distinction.
I only see entries that state they are synonyms.

My 2015 ARRL Handbook has no index entry for AVC,
Perhaps yours is an older edition?

AGC systems, oscillators, and PID algorithms are all closely related as feedback systems.
Learning about one can help understand the others.

Jerry, KE7ER


On Fri, Apr 19, 2019 at 08:16 PM, MadRadioModder wrote:

I tend to use the definition of AGC from the Radio Amateurs Handbook and other IEEE sources that pertain to the Radio-Electronics industry specifically rather than Wiki… which is typically diminished science for the masses from random writers who may or may not actually understand the topic.  The Wiki article you refer to discusses AGC applied to Audio systems, Power systems (generators), Process Control systems (like PID controllers), and even biological systems. While a tiny bit of this definition is applicable to radio systems (feedback with variable gain in some form), it’s by no means specific or useful.  Historically (that being from the late 1930’s and early 40’s when the first patents for AGC were granted), AGC was defined as a closed-loop system that provides attenuation to one or more RF-IF gain stages of a receiver.  The goal was to keep the output level of the receiver constant and prevent gain stages from saturating at high RF front-end input while increasing gain for weak (low voltage) signals yet irrespective if the input.  The underlying algorithms to do this generally consist of signal measurements in the IR-RF chain and post detector, filter and integrator for response shape, to be fed back to a variable attenuator of some type.  Our ears are logarithmic in response (a second outcome of Fletcher-Munson) and since we can (and do often) define signal strength as logarithmic voltage, the feedback algorithm can be linear or semi-linear (logarithmic).  This is called Input-VGA or IVGA (attenuator-amplifier) as opposed to Output-VGA (which is fixed gain amplifier followed by a passive attenuator).   I believe Zenith held one of the first patents on AGC, but it was contested early and proliferated by others while in litigation… and it was evident on a myriad of AM receivers starting in the 50’s and forward.  This is what I know with 45+ years of designing AGC circuits for commercial and military receivers.

 

I don’t know much about AVC other than it was used in the audio industry and proliferated there for recording and delivery (dBX had a compression form of it).

 

I have no idea what “Transmit AVC is”…

 

 

Who has AGC... Fun Facts

MadRadioModder
 

Well I was wrong about Zenith having the first AGC.  It was RCA that sued Zenith over a similar AGC design (now ancient history).  I had to read my old papers again.

 

This is fun fact from the Antique Radio forum circa 1970:  “RCA's Radiola 64 (below, 1929) is credited for being the first radio with AGC. Since the tubes in it were triode 27s, they were difficult to control with a simple rectified carrier, as later circuits had. This set, as well as others in those early days, had to have a DC amplifier to provide the voltage swing to bias the RF and IF stages from normal bias to near cutoff. This circuitry was tricky, but it worked. RCA also had a tuning meter on these sets, supposedly another first. In a couple of years, variable-mu tubes (35/51) came along and made AGC a lot easier. And it got better after that.  Now in general, superheterodynes had AGC, but there were some exceptions. In about 1931, Western Electric made their 10A AM high fidelity tuner. It's monstrous, but it was a TRF with AGC and a tuning meter”.  The Antique Radio guys would eat us alive for not knowing the distinction between AGC and AVC.

 

 


Virus-free. www.avg.com

--

…_. _._

Remote Head?

Dexter N Muir
 


uBitx is a bit difficult to *really* remote: its control and display are done by Arduino, but the unit supplied by default in the 'kit' has that as the 'Raduino", with the 'VFOs' part of that, being the on-board SI5351. This puts RF generation at the 'control head', so any distance of 'remote' has to be minimal.
The solution, it would seem, is homebrewed Arduino control, where the SI5351 can be controlled by the likes of its I2C-bus connection. By this means frequency control can be a non-critical function, with distance achieved digitally: 3 wires (2 active and earth) which do not behave as transmission-lines needing such radical shielding (and can even be optically-isolated)!. This leaves Audio (By 'dongle'?) and PTT/Keying (likewise able to be opto-isolated but also perhaps able to be encoded into the I2C bus?). Some (most?) of these modifications are already being worked on by folks here (and others?)

It's only a short step from the above to full-USB or HDMI - or LAN/internet. Who needs megabuck rigs or even SDR?

I posted most of this on SolderSmoke :)

Re: Who has AGC... Fun Facts

Jerry Gaffke
 

I can believe there is a historical basis for drawing a distinction between AGC and AVC.
And that there are still a few folks that might maintain this difference.
But in 2019, it seems almost everybody just lumps it all together as AGC.

Jerry, KE7ER


On Fri, Apr 19, 2019 at 10:12 PM, MadRadioModder wrote:

The Antique Radio guys would eat us alive for not knowing the distinction between AGC and AVC.

 

Re: Who has AGC... Fun Facts

Jerry Gaffke
 

A curious tidbit about 1920's era radio:
They used to use a rheostat (a big honking pot) on the filament current to vary the gain.

A bit off topic, as I don't recall anybody closing the loop
by driving a servo motor to control that rheostat based on received signal strength. 

Jerry, KE7ER

Re: Who has AGC... Fun Facts

MadRadioModder
 

Schematic of the Radiola 64

 

From: BITX20@groups.io [mailto:BITX20@groups.io] On Behalf Of Jerry Gaffke via Groups.Io
Sent: Saturday, April 20, 2019 12:54 AM
To: BITX20@groups.io
Subject: Re: [BITX20] Who has AGC... Fun Facts

 

A curious tidbit about 1920's era radio:
They used to use a rheostat (a big honking pot) on the filament current to vary the gain.

A bit off topic, as I don't recall anybody closing the loop
by driving a servo motor to control that rheostat based on received signal strength. 

Jerry, KE7ER


Virus-free. www.avg.com

--

…_. _._

Re: Remote Head?

Ted
 

Dexter,

Please see my photo folder on this forum. There are other formats by others, maybe not as long an extension but this is one permutation that works so far.

My first attempt at mobilizing a uBitx was with the original 20x2 LED screen. I extended the volume, tuning & function knob, mic of course, and the LED screen by means of a 25-wire printer cable. The Arduino/Raduino stuff remained with the mainboard in a box under the pax seat.

The current model uses a 2.8" Nextion LCD screen on a 4-wire shielded keyboard cable so I can see it at dashboard height. One could have run the rest of the controls to the same location though the screen data nose gets hard to isolate... plus, I wanted the finger controls at a convenient arm-rest position rather than at  a reaching position.  There's also one less microphone cable flopping around right in front of other things.  The tuning/function knob etc are therefore...



...located in a separate control head that's fed with a separate, VGA monitor extension cable.

One nice thing about the latter cable is that it has four separate, shielded paths along with some extras, all shielded again by the outer layer. These can  protect the audio path and stuff.  I can still hear some of the Nextion activity, chiefly the data streams associated with the 2nd Nano and spectrum/s-meter action but mainly on weaker signals with the volume up.

I find the speaker audio, even with a Motorola public-safety type radio speaker,  a bit mild for 70mph highway use so I'm adding a 15-watt amp to it. 



Good luck,

Ted
K3RTA



More Nextion 3.5" tweaks to do

Ted
 

If you're good with C++, here's a good way to spend a rainy morning on a weekend if you know how to do this.  I've done some graphic resizing, as have others, and yet I have not gotten into the nuts and bolts of chart placement with regard to where the programming itself wants to display an image.  I see the subroutine most likely to control this but have been a bit slow on the uptake with regard to results expected.

Here's what I'm trying to do, to complete the full 3.5 " screen polishing:   The CEC screen .htm file for the 3.5" screen was really just a 2.8" screen compiled for a 3.5" window, with unfilled space around it. Likewise, the 3.2" screen was a 2.8" screen that's top-to-bottom the same height but has wasted space to the right of it  That wasn't so difficult to remedy so far as background graphics and button placement, sizing, etc. The sticky point is that, in the cases of spectrum scope displays and such, active graph displays show up on the 3.5" screen where they would have showed up if the 2.8" drawings were still around them.  This is where I've stopped, inasmuch as I can only seem to handle a couple of potentially hemmorage-inducing stressors at once in this hobby.

See these, and consider if your skills in programming might help to expand,relocate, and/or shift the red rectangles into the green ones.





Full credit will be given when I post the result - or if you post, I'll be happy to download them from your repository :)  Tnx in advance.



Later,

Ted
K3RTA

Re: Remote Head?

bobolink
 

On Sat, Apr 20, 2019 at 12:16 AM, Dexter N Muir wrote:
It's only a short step from the above to full-USB or HDMI - or LAN/internet.
-or wireless WiFi/internet or Bluetooth Low Energy (both with appropriate security).