Freeing up a pin on the arduino

Previously Don ND6T used pins D0 and D1 as a means of accessing two additional digital pins on the Raduino for other purposes. These are used in USB and serial communications and are mostly available for use (except when programming the arduino or using CAT).

Another interesting approach is to use another arduino nano as an i2c slave while at the same time functioning as a backpack to your 1602 display.

 Allison KB1GMX has come up with another way of reclaiming pins. 

Looking at the relay tree it is notable there are only 4 used states and one that is “don’t care”.  That “don’t care” state allowed me to remove C155, R151, and Q17. That is replaced with two diodes to the collector of both Q18 and Q19 (cathode to the collectors) and anodes to the formerQ17 collector.

What that does is any time Q18 or Q19 is active KT1 is activated.  If that seems odd the relays are a partial decoding tree so if we encode the controls correctly we get the needed result and one free IO pin. To make it work Relay KT1 must be activated when we leave the 20-30mhz region for 20/17M or lower. Since to go lower than 20mhz we must have a signal the TXC is used as that controls the 40/80M relay KT3 but means nothing unless KT2 is activated Using two diodes as a logical OR we can then use Q18 and Q19 to force KT1 to be active. So for 20M and down KT1 is active and the other three select what bands below that. I got the IO pin and the firmware got simpler.

The code changes from:
/**
* Select the properly tx harmonic filters
* The four harmonic filters use only three relays
* the four LPFs cover 30-21 Mhz, 18 – 14 Mhz, 7-10 MHz and 3.5 to 5 Mhz
* Briefly, it works like this,
* – When KT1 is OFF, the ‘off’ position routes the PA output through the 30 MHz LPF
* – When KT1 is ON, it routes the PA output to KT2. Which is why you will see that
* the KT1 is on for the three other cases.
* – When the KT1 is ON and KT2 is off, the off position of KT2 routes the PA output
* to 18 MHz LPF (That also works for 14 Mhz)
* – When KT1 is On, KT2 is On, it routes the PA output to KT3
* – KT3, when switched on selects the 7-10 Mhz filter
* – KT3 when switched off selects the 3.5-5 Mhz filter
* See the circuit to understand this
*/
void setTXFilters(unsigned long freq){
if (freq >= 21000000L){
digitalWrite(TX_LPF_A, 0);
digitalWrite(TX_LPF_B, 0);
digitalWrite(TX_LPF_C, 0);
}
else if (freq >= 14000000L){
digitalWrite(TX_LPF_A, 1);
digitalWrite(TX_LPF_B, 0);
digitalWrite(TX_LPF_C, 0);
}
else if (freq >= 7000000L){
digitalWrite(TX_LPF_A, 1);
digitalWrite(TX_LPF_B, 1);
digitalWrite(TX_LPF_C, 0);
}
else {
digitalWrite(TX_LPF_A, 1);
digitalWrite(TX_LPF_B, 1);
digitalWrite(TX_LPF_C, 1);
}
}

To this.

/**
* this version version uses two diodes to get rid of needing TX-A
* and takes advantage of TX_LPF_C having an meaningless state
* unless KT2 is active (TX_LPF_B=1).
* tx-b tx-c band
* 0 0 10m
* 0 1 20M we enable TX-A, and get 20m, KT2 is not active.
* 1 0 40m make KT2 active and KT3 selects 40 or 80m.
* 1 1 80m
*/
void setTXFilters(unsigned long freq){

if (freq >= 20000000L){
digitalWrite(TX_LPF_B, 0); // 10m
digitalWrite(TX_LPF_C, 0);
}
else if (freq >= 14000000L){
digitalWrite(TX_LPF_B, 0); // 20M
digitalWrite(TX_LPF_C, 1);
}
else if (freq >= 7000000L){
digitalWrite(TX_LPF_B, 1); // 40m
digitalWrite(TX_LPF_C, 0);
}
else {
digitalWrite(TX_LPF_B, 1); // 80m
digitalWrite(TX_LPF_C, 1);
}
}

Reference

Nextion Display not communicating?

Björn PD5DJ  used his Nextion screen on previous projects, and this changed the fixed baud rate programmed into the unit.  If your Nextion screen was used previously for other projects you may have the same issue.

This problem was fixed by placing the command “bauds=9600” on page 0 in the Preinitialize Event panel.

Tip!, Every Designer should place this in their code.

Reference

Another Raduino Replacement – this time with a Blue Pill

Joe W3JDR is working  on a  Raduino Pill board which is a direct replacement for the stock Raduino, but with an STM32F103 processor and much more I/O. I think it hits all the points on your wish list. I released the PCB to fab a few weeks ago and am waiting for boards to arrive from China. Assuming it functions without major rework, I’ll post the CAD files and Gerbers on my web site and encourage others to develop for it. I plan to immediately mod the stock uBITX firmware to run on it, then will expand functionality to incorporate the work I’ve done with TFT displays, hi-res encoder and software S-meter & AGC. I’ve cleared my bench in anticipation of arrival and am checking the mailbox every day.

Reference

Sudden loss of power

 

Jim Sheldon, W0EB, while prepping a V3 uBITX, he had already built up to give to a friend, all of a sudden observed the RF Power output went to ZERO.

He thought for sure that he’d somehow blown one or both of the IRF510’s, but  nothing is always as it seems.

He checked voltage to the drains of the IRF510’s — ZERO (yes it was hooked up and turned on). Tracing the voltage back, he had nothing on the supply ends of L8 OR L9.  He checked continuity between those same points of L8 and L9 and had good connections there.

He found that he had +12V on the PA Power pin of P1 but nothing on the supply end of L8 which gets connected by a short trace to a very small VIA through the board and a short trace to L8 on the underside.  Looking at the underside, the trace was not burned but it turns out that tiny little VIA was open — possibly from poor plating through the hole.

He put a piece of 30 gauge wire wrap wire through the via and soldered it on both sides. This brought the +12v back to the supply side of L8, L9 and subsequently the drains of the IRF-510’s . After putting it all back together again he now had full power restored.

A few people have observed similar problems with loss of power. This might be the cause in these cases as well, and is definitely worth checking.  There will be no visible indication of anything bad between the PA Power pin on P1 and the rest of the PA circuit.

Reference

Do you like those CEC Buttons on this build?

Nextion 3.2″ and 3.5″ Display Firmware

Allan KN4UD has put together display firmware for the Nextion 3.2″ and 3.5″ displays that represent “works in progress”.

Downloads

[wpdm_package id=’2740′]

[wpdm_package id=’2745′]

[wpdm_package id=’2748′]

[wpdm_package id=’2751′]

[wpdm_package id=’2754′]

[wpdm_package id=’2758′]

[wpdm_package id=’2760′]

[wpdm_package id=’2762′]

Reference

Replacement to Q70 for more audio gain, less overload

Tom W1EAT  has noted that Q70, the audio pre-amp, has a really big job in the uBITX and sometimes gets overdriven by very strong signals.   Tom also replaced the 2822 audio amp with an LM380 and lost around 8db in audio gain.

So he though he would try another transistor to try and improve this situaiton.

He had some 2SC945 transistors marked with the highest “beta”(AKA hfe) rating, so I took one with a 360 hfe and replaced Q70.   He made no other component changes. The 2SC945 is supposed to be specially designed for audio pre-amps, so it ought to be a good replacement.

With RX voltage of 13.6, the Q70 collector voltage is 4.67 on the 2sc945.

I should mention that I added a 16K resistor from the base to ground when Q70 was a 2n3904, which was suggested by W3JDR to reduce distortion. I did not remove that resistor.

The results were totally positive. Tom has more AF gain, and none of the signals in tje IARU HF contest overloaded it.

Something for experimenters to try out …

Reference