Keyboard Shortcuts
Likes
- BITX20
- Messages
Search
Re: Flutter Fix
Jack, I do appreciate you taking an interest in the code snippet I sent out. ?You will likely see a fair bit more hideous code from me in the near future. I agree about the 50L vs 50l, was minimizing hacks to Ashhar's original. ?I might agree with #define's for 5 and 50L, especially since they get used in more than one place and are constants somebody might want to twiddle. ?But I'd put those #define's just above where they get used, if they only get used in one area of code. ?Otherwise it takes me an hour to connect the dots, and figure out what all those stupid names are. ? Could be just a number, could be some humongous macro. ?A real programmer hits some key sequence and his editor jumps to the definition off in some *.h file, I've never learned those vi tricks. We'll probably butt heads here some on coding style. ?I'm a digital hardware engineer (FPGA's and VHDL mostly these days) firmly set in my ways, learned to code in C nearly 40 years ago from the K&R book. ? ?When I write code for a uC, I want to know what every line will compile down to. ?(Arduino is new to me, I can see where me and random Arduino libraries are not going to get along very well.) ?Your conventions are the more conventional, and it's ok with me if you rewrite my code into something you are comfortable with. ?Just keep in mind, whoever touches it last gets to maintain it. ? ?;-) And no, it really should be a "+" in ? ??frequency = baseTune + (50l * knob); Jerry, KE7ER On Tue, Feb 21, 2017 at 06:31 am, Jack Purdum wrote:
I'm not a fan of "magic numbers" in code, as it makes it harder to read and understand what's going on. So, near the top of the code file, perhaps around line 100, and after the #include preprocessor directives, I'd write: ? |
no matching function for call??
Hi All, Got the Raduino sketch from:? Loaded up the Si5351 library into the libraries. ?Started verify... I got the error message that "no matching function for call" ?for 'Si5351::set_freq(long long int, long long unsigned int, si5351_clock)' ? Has this error been fixed by anyone. ?If so, how? ?Did a search of the messages, but came up empty. Thanks. 73, Kent KC9LIF |
Re: bitx output harmonics
Farhan, This may be a duplicate post, I replied to the group a bit earlier but haven't seen it come through. Just to double check, I disconnected the parallel cap, turned the drive down well below the point where power started to drop and retested the output.? At the bottom of the band the second harmonic was still only -40 dBC. The two section half wave output filter was pretty standard, especially for QRP rigs, before the rule change in 2003 that required transmitters installed after that time to have all spurs suppressed to more than 43 dB below the fundamental.? After that time more effective output filters were needed, especially in transmitters with single ended PAs.? Push pull amps suppress their even harmonics when properly balanced so you may still see the half wave filters used with them. When the rules changed in 2003 I went back and installed a parallel cap across one of the inductors in every one of my homebrew rigs that used the half wave filters, and simply selected a value that would closely resonate the inductor in use to the second harmonic.? This worked well in every case and had no effect on the output at the fundamental. In this case, if L7 is indeed 1.1 uH then the 100 pF cap resonates it to some 15 MHz which reduced the second harmonic in my Bitx40 to -56 DBC on the low end of the band and some 60 dB below the fundamental on the high end.? A 110 pF cap would resonate it to about 14.4 MHz but the 100 pF was close enough. In terms of voltage rating we usually see 100V units in output filters for rigs of 5 t0 10 Watts or so, 200 Volt units in rigs of 25 Watts or so, and 500 Volt or higher caps in rigs of 100W and up.? In this case a 100V unit is fine if the PA is run off 12 to 13.8 Volts. Whether or not you have the means to test your unit, if you parallel L7 (or L4) with a 100 pF NP0 (C0G) 100V cap you can rest assured your second harmonic will no longer be a problem. It is simply good amateur practice to ensure that our transmitters meet current specs. 73, Wayne ? |
Re: bitx output harmonics
Farhan, Just to double check, I disconnected the parallel cap and ran the drive level down well below the point where power started to drop, and the second harmonic was still only -40 DBC. The two section half wave output filter was pretty standard, especially for QRP rigs, before the last rule change (2003) where all TXes installed after that time were required to have suppression of all spurs to better than 43 dB below the fundamental. Since that time more effective output filters have been needed for transmitters with single ended power amps.? Push pull amps suppress their even harmonics when properly balanced so that is why you may still see the two section half wave filters used with them as the second harmonic is suppressed in the amp. When the rules changed in 2003, I went back and added parallel caps to one section of every half wave output filter in my homebrew rigs and simply selected whatever value was needed to closely resonate the inductor in use to the second harmonic.? This worked very well in every case and made no difference in power output on the fundamental frequency. For info, if the value of L7 is indeed 1.1 uH, then a 110 pF cap paralleling it would resonate at approximately 14.4 MHz.? The 100 pF cap resonates at some 15 MHz, but is still close enough.? In my tests it dropped the second harmonic down to -56 dBC at the low end of the band and about -60 dBC at the top end. And, for info, the addition of the parallel cap will not harm or otherwise change normal operation of the rig. In terms of the voltage rating of the C0G (NP0) cap, you typically see 100 volt caps in rigs of 5 to 10 Watt output or so, 200 Volt caps in rigs of 25 Watts or so, and 500 volt or higher rated caps in amps of 100 Watts or more.? In this case a 100 Volt rated cap will be just fine and perhaps even a 50 volt rated unit as long as the PA is operated with a 12 to 13.8 Volt supply.? It is simply good amateur practice to ensure that our transmitters meet current standards. Whether or not you have the means to test your rig for second harmonic suppression after adding the cap, if you parallel L7 (or L4) with a 100? or 110 pF NP0 100 Volt cap you can rest assured that your second harmonic will no longer be a problem. 73, Wayne |
Re: BitX40 R3 schematic
Yes, I do recall someone reporting R104 being 10k instead of 2.2k. ? Raj, any news about that emitter resistor at Q13? ?Is it being left at 100 ohms? ?Fine with me, as the few reports we've gotten of Q13 blowing have likely been due to a nearby transmitter. ?But once mine arrives, I'll likely be replacing that SOT23 2N3904 at Q13 with the larger TO92 for better heat dissipation. ?And add your dual diode hack. On Tue, Feb 21, 2017 at 07:00 am, Raj vu2zap wrote:
|
Re: Flutter Fix
Jack Purdum
My bad: I didn't look at the code closely enough. The symbolic constant: #define FREQJUMP ? ? ? ? ?501 should be: #define FREQJUMP ? ? ? ? ?50L ? ?// Note uppercase 'L' which is the 50Hz increment that Jerry mentions in his narrative. My error in interpretation also illustrates why it's a good idea to use uppercase letters when using a data type modifier with constants. The 'l' (ell) looks too much like a one '1'. The alternative line he suggested: ????frequency = baseTune + (50l * (knob>>1)); is based upon the fact that any bitshift to the right divides the value by 2, while a bitshift to the left multiplies the value by two. This makes sense since the computer is doing everything in base 2 arithmetic (e.g., 5 = 101 in binary, and 10 = 1010; bitshifting fills in with zeroes). However, you could also use: ? ? frequency = baseTune + (50l * (knob / 2)); The compiler hiding under the Arduino IDE is the Open Source Gnu C++ compiler. (Yep, it can compile either C or C++ code, which is why most of the libraries are written in C++, yet cause no problems.) The code optimizer in that compiler is pretty good so it would translate the (knob / 2) into the bitshift expression (knob >> 1) either way. I always pick the one that's easiest to read, but both will produce the same output from the code generator. The choice is yours. I, too, am implementing a rotary encoder for tuning simply because I am also adding a menuing system for some options used with the TFT display instead of the 2x16 LCD display. That's the good news. The bad news is that I had to move from the Nano to a Mega 2560 Pro Mini. While I probably could have squeezed the code into the Nano flash memory space, I was running into ?stack collisions with the heap space (i.e., out of SRAM) so the shift was necessary. Jack, W8TEE From: Jerry Gaffke via Groups.Io <jgaffke@...> To: [email protected] Sent: Tuesday, February 21, 2017 9:48 AM Subject: Re: [BITX20] Flutter Fix The new code from my previous post does away with the constant flicker between adjacent frequencies due to noise in the ADC when the knob is not being rotated, but otherwise leaves functionality and feel exactly as Ashhar had coded it. ?Works on my Nano, I monitored the frequency value through the Arduino serial port. ?Remove the extraneous final 3 lines about the tone and replace them with a closing "}". ?(It was getting late.) ? The new code replaces this part of Ashhar's original code: // the tuning knob is at neither extremities, tune the signals as usual else if (knob != old_knob){ frequency = baseTune + (50l * knob); old_knob = knob; setFrequency(frequency); updateDisplay(); } It works by inhibiting a reverse in direction of the tuning pot until that reversal has traveled through what would normally be 5 steps in frequency of 50hz each. ?For example, assume we have been tuning up in frequency and stop the knob at 7200.000 khz. ?A bit of noise comes in from the ADC, and the frequency pops up to 7200.050 khz. ?Another bit of noise comes in that would normally bring it back down to 7200.000 khz, but this is ignored because it does not reach the 5 tick threshold. ?A light touch on the knob might bring it a bit further up to 7200.100 khz. ?Reversing the direction of the knob, it travels through 5 steps before any change in frequency occurs, on the 6'th step the frequency goes back down to 7200.050 khz. ?If we leave the knob in that position, a bit of ADC noise might lower it further to 7200.000 khz, but noise will not raise the frequency. ? I recommend operating with the original code at first until the noise at the pot has been evaluated and minimized with bypass caps and perhaps short shielded wiring. ?Then enable this new code by recompiling the sketch. The frequency will still move a little bit after taking your hand off the knob, but can only move in one direction. ?If that is unacceptable but you otherwise like the current method of tuning, then perhaps reduce the tuning rate by a factor of two by replacing this line: ? ? ??frequency = baseTune + (50l * knob); with this frequency = baseTune + (50l * (knob>>1)); Me, I'll likely go to Don Cantrell's shuttle tuning scheme as described at? But use an encoder instead of a pot so I can feel a click when it moves between positions. Jerry, KE7ER On Mon, Feb 20, 2017 at 11:04 pm, Jerry Gaffke wrote:
?
|
Re: BitX40 R3 schematic
R104 ?
toggle quoted message
Show quoted text
At 21/02/2017, you wrote: This is likely about as good as it gets:?? |
Re: Flutter Fix
I thought about it pretty hard, and did test the code. ?Worked as posted, makes a smooth transition when changing knob direction. ? A first cut, admittedly a bit inelegant. ?? On Tue, Feb 21, 2017 at 06:31 am, Jack Purdum wrote: // I changed to minus sign. Correct?? ? |
Re: Flutter Fix
The new code from my previous post does away with the constant flicker between adjacent frequencies due to noise in the ADC when the knob is not being rotated, but otherwise leaves functionality and feel exactly as Ashhar had coded it. ?Works on my Nano, I monitored the frequency value through the Arduino serial port. ?Remove the extraneous final 3 lines about the tone and replace them with a closing "}". ?(It was getting late.) ? The new code replaces this part of Ashhar's original code: // the tuning knob is at neither extremities, tune the signals as usual else if (knob != old_knob){ frequency = baseTune + (50l * knob); old_knob = knob; setFrequency(frequency); updateDisplay(); } It works by inhibiting a reverse in direction of the tuning pot until that reversal has traveled through what would normally be 5 steps in frequency of 50hz each. ?For example, assume we have been tuning up in frequency and stop the knob at 7200.000 khz. ?A bit of noise comes in from the ADC, and the frequency pops up to 7200.050 khz. ?Another bit of noise comes in that would normally bring it back down to 7200.000 khz, but this is ignored because it does not reach the 5 tick threshold. ?A light touch on the knob might bring it a bit further up to 7200.100 khz. ?Reversing the direction of the knob, it travels through 5 steps before any change in frequency occurs, on the 6'th step the frequency goes back down to 7200.050 khz. ?If we leave the knob in that position, a bit of ADC noise might lower it further to 7200.000 khz, but noise will not raise the frequency. ? I recommend operating with the original code at first until the noise at the pot has been evaluated and minimized with bypass caps and perhaps short shielded wiring. ?Then enable this new code by recompiling the sketch. The frequency will still move a little bit after taking your hand off the knob, but can only move in one direction. ?If that is unacceptable but you otherwise like the current method of tuning, then perhaps reduce the tuning rate by a factor of two by replacing this line: ? ? ??frequency = baseTune + (50l * knob); with this frequency = baseTune + (50l * (knob>>1)); Me, I'll likely go to Don Cantrell's shuttle tuning scheme as described at? But use an encoder instead of a pot so I can feel a click when it moves between positions. Jerry, KE7ER On Mon, Feb 20, 2017 at 11:04 pm, Jerry Gaffke wrote:
? |
Re: BITX 60 Cap Stack Hack
¿ªÔÆÌåÓýThe 60 meter hack sounds really good to me, I have plenty of 40 meter rigs already, I must look into this. Joel? KB6QVI On Feb 21, 2017, at 3:39 AM, Bill Meara via Groups.Io <n2cqr@...> wrote:
|
Re: Flutter Fix
Jack Purdum
I'm not a fan of "magic numbers" in code, as it makes it harder to read and understand what's going on. So, near the top of the code file, perhaps around line 100, and after the #include preprocessor directives, I'd write: #define TUNEUP ? ? ? ? ? ? ?1 #define TUNEDOWN ? ? ? ?????0 #define MINCHANGE ? ? ? ? ? 5 #define FREQJUMP ? ? ? ? ?501 Then make small changes to the code: ? // the tuning knob is at neither extremities, tune the signals as usual ? else if (knob != old_knob){ ? ? static char dir_knob; ? ? if ( (knob > old_knob) && ((dir_knob == TUNEUP) || ((knob-old_knob) > MINCHANGE)) ||? ? ? (knob < old_knob) && ((dir_knob == TUNEDOWN) || ((old_knob-knob) > MINCHANGE))) ? { ? ? ? ?if (knob > old_knob) { ? ? ? ? ? ? dir_knob = TUNEUP; ? ? ? ? ? ? frequency = baseTune + (FREQJUMP * (knob-MINCHANGE)); ? ? ? ?} else { ? ? ? ? ? ? dir_knob = TUNEDOWN; ? ? ? ? ? ? frequency = baseTune - (FREQJUMP * knob); // I changed to minus sign. Correct?? ? ? ? ?} ? ? ? ?old_knob = knob; ? ? ? ?setFrequency(frequency); ? ? ? ?updateDisplay(); ? ? } o // Remove?? ? ?tone(CW_TONE, sideTone); ? ?tone(6, 1000); As I have said before, my B40 is in pieces so I cannot test the code.? The advantage of using symbolic constants is that, if you need to change one, you don't need to use the error-prone global search-and-replace feature of the editor. Simply change the #define at the top of the page, recompile and unload, and you're done. I have not studied the code, so it is likely that you can think of more descriptive terms for each #define. No problem: Make the rename to the constant (convention makes them uppercase) and also in the code. Jack, W8TEE From: Jerry Gaffke via Groups.Io <jgaffke@...> No Raduino here, but do have a Nano to play with. ?Here's a code scrap to replace that final clause in doTuning() to give the tuning pot a bit of hysterisis. ?Perhaps somebody could try it out. // the tuning knob is at neither extremities, tune the signals as usual else if (knob != old_knob){ static char dir_knob; if ( (knob>old_knob) && ((dir_knob==1) || ((knob-old_knob) >5)) || (knob<old_knob) && ((dir_knob==0) || ((old_knob-knob) >5)) ) { if (knob>old_knob) { dir_knob=1; frequency = baseTune + (50l * (knob-5)); } else { dir_knob=0; frequency = baseTune + (50l * knob); } old_knob = knob; setFrequency(frequency); updateDisplay(); } o tone(CW_TONE, sideTone); tone(6, 1000); Also, if you want a 1000hz square wave on pin 6 as a test signal, just execute this line somewhere: ? ? tone(6,1000); That sets up a counter-timer to continuously generate the square wave while the Nano goes off and does other things. Shut it down with ? ? noTone(); Jerry, KE7ER
|
Re: BitX40 R3 schematic
This is likely about as good as it gets: ?? A few minor changes: ? The two diodes D15 D16 are now a single BAT54S, so the balancing pot at R105 is not not needed or stuffed. ? ?No C103, no L4, all BC849's are actually MMBT3904's. That should be pretty close. ?Are you seeing anything else? On Mon, Feb 20, 2017 at 11:21 pm, N7PXY wrote:
I have looked at a number of schematics but do not seem to find the one matching the current Bitx40 R3 transciever being sent from India. ? |
Re: BitX40 R3 schematic, and Mechanical CAD Layout dimensions and hole sizes
¿ªÔÆÌåÓý? Hi, ? My BITX40 PCB measures 114.3 x 128 mm. But in case you will leave on the cooling profile on the PA FET you need an extra 5 mm. , making it 120 x 128 mm! ? 73, Cor PA4Q ? ? On Tue, Feb 21, 2017 at 2:52 PM, Fred Finster via Groups.Io <wb7odyfred@...> wrote:
Thank you for the PNG files of the schematics.?? Do you have the mechanical layout of those two boards dimensions and hole sizes and hole mounting positions (x,y in milimeters)?? I am creating a drawing for a Metal Box Enclosure and want to create a drill holes for mounting the boards to the metal enclosure.? I do not have a Bitx40 Kit, to just directly measure the board and create the CAD Layout directly.?? Thank you for your help with outer dimension of the board, and the hole sizes and the hole pattern layout in a x,y format in milimeters (or inches).? Sarma vu3zmv Board dimensions:? It¡¯s a bit larger than some of my existing 40m homebrew transceivers at 128 x 114 mm for the main board.? Is this correct measurement? See files here: /g/BITX20/files/Enclosures_Metal_or_Plastic/Metal_Box_files/Metal%20Box%20Files /g/BITX20/files/Enclosures_Metal_or_Plastic/Metal_Box_files/vu2xes_Aluminum_Case Photos of Hand Made Aluminum Case: ?
Regards |
Re: BitX40 R3 schematic, and Mechanical CAD Layout dimensions and hole sizes
Fred, ?On Tue, Feb 21, 2017 at 2:52 PM, Fred Finster via Groups.Io <wb7odyfred@...> wrote:
--
Regards
Sarma ? |
Re: BitX40 R3 schematic, and Mechanical CAD Layout dimensions and hole sizes
Thank you for the PNG files of the schematics.?? Do you have the mechanical layout of those two boards dimensions and hole sizes and hole mounting positions (x,y in milimeters)?? I am creating a http://LibreCAD.org drawing for a Metal Box Enclosure and want to create a drill holes for mounting the boards to the metal enclosure.? I do not have a Bitx40 Kit, to just directly measure the board and create the CAD Layout directly.?? Thank you for your help with outer dimension of the board, and the hole sizes and the hole pattern layout in a x,y format in milimeters (or inches).? Sarma vu3zmv Board dimensions:? It¡¯s a bit larger than some of my existing 40m homebrew transceivers at 128 x 114 mm for the main board.? Is this correct measurement? See files here: /g/BITX20/files/Enclosures_Metal_or_Plastic/Metal_Box_files/Metal%20Box%20Files /g/BITX20/files/Enclosures_Metal_or_Plastic/Metal_Box_files/vu2xes_Aluminum_Case Photos of Hand Made Aluminum Case: |
Re: BitX40 R3 schematic
On Tue, Feb 21, 2017 at 7:21 AM, N7PXY <hickspj467@...> wrote:
--
Regards
Sarma ? |
New file uploaded to [email protected]
[email protected] Notification
Hello, This email message is a notification to let you know that a file has been uploaded to the Files area of the [email protected] group. File: lcd_Metalbox_bottom.dxf Uploaded By: Fred Finster Description: You can access this file at the URL: Cheers, |
Flutter Fix
No Raduino here, but do have a Nano to play with. ?Here's a code scrap to replace that final clause in doTuning() to give the tuning pot a bit of hysterisis. ?Perhaps somebody could try it out. // the tuning knob is at neither extremities, tune the signals as usual else if (knob != old_knob){ static char dir_knob; if ( (knob>old_knob) && ((dir_knob==1) || ((knob-old_knob) >5)) || (knob<old_knob) && ((dir_knob==0) || ((old_knob-knob) >5)) ) { if (knob>old_knob) { dir_knob=1; frequency = baseTune + (50l * (knob-5)); } else { dir_knob=0; frequency = baseTune + (50l * knob); } old_knob = knob; setFrequency(frequency); updateDisplay(); } o tone(CW_TONE, sideTone); tone(6, 1000); Also, if you want a 1000hz square wave on pin 6 as a test signal, just execute this line somewhere: ? ? tone(6,1000); That sets up a counter-timer to continuously generate the square wave while the Nano goes off and does other things. Shut it down with ? ? noTone(); Jerry, KE7ER |