We seek to understand and document all radio transmissions, legal and otherwise, as part of the radio listening hobby. We do not encourage any radio operations contrary to regulations. Always consult with the appropriate authorities if you have questions concerning what is permissible in your locale.

Author Topic: HF Beacon, design questions  (Read 6481 times)

Offline greator

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
HF Beacon, design questions
« on: June 01, 2020, 1500 UTC »
Hello Everyone!

I have started to build an HF beacon, and thought someone here might be able to help me with parts of the design. The beacon will have a simple 10W transmitter, and be controlled by a arduino and have a few sensors, the antenna will be a less than perfect longwire with a counterpoise. Placement will be on tree. There will probably be a 10-20W solarpanel and a 12v led-acid battery with 5-10Ah. Frequency will be in the range 2-8MHz.

Communication protocoll:
The beacon will have a name, that will be transmitted in CW. Lower speed will make it easier to read on fldigi/DM780 etc.. The values for voltage, temperature and lightlevel on the other hand, might be better to send in dits(0-10 dits = 8-15volts etc...) A timed pulse would also be usefull, but consume more power. What is the normal transmittion interval of a HF beacon these days?

Power management: I live in a Scandinavian country, in the winter its only about 5-6hours of daylight. A lower limit on transmittion will prevent deep discharge of the battery, but perhaps transmittion intervals should be proportional to the voltage? 11-14v = transmition each 5 to 1 minute? At the lower frequencys, its perhaps better to save battery power for the night, when there is better propagation.

Solarpanel: To prevent overcharging(havent got a power regulator), it might work to simply disconect the solar panel when voltage is above 14volts.

Protection: I am thinking about using some kind of epoxy to protect the transmitter and control circuit from water. Does any epoxy work?

Offline Stretchyman

  • Hero Member
  • *****
  • Posts: 659
    • View Profile
Re: HF Beacon, design questions
« Reply #1 on: June 01, 2020, 1649 UTC »
I'd go for less power than 10W as it's going to draw around 1A at key down, 1W should be plenty for a beacon but I'd improve the antenna as much as possible to compensate.

Using this circuit is about as simple as it gets, driven with a CPP oscillator from Cardinal.

https://circuitsaladdotcom.files.wordpress.com/2015/07/qrp-rf-amp4.jpg

The beacon keyer from G4JNT is also about as simple as it gets too.

http://www.g4jnt.com/BcnKeyer.htm.

Solar panel charging wise will not need anything fancy as SLA batteries withstand mild abuse so just a simple 14V5 regulator will be fine but you do want to stop it discharging beyond 10V or so.

Shame you cant use LiPo, but they dont like the cold at all!

Good luck with your project, it was another thing I intended to build but never found the time.

Regards

Stretchy.

'It's better to give than receive' so why Rx when you can Tx!

                                              ;)

Offline greator

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: HF Beacon, design questions
« Reply #2 on: June 02, 2020, 1605 UTC »
I got the battery and solar panel, the battery is 12v/5Ah and the solar panel is 20w. Its a bit difficult to calculate the power production, it might produce 240Wh a good day in the summer, and about 20Wh a bad day in the winter. The battery can store approx 60Wh. There will probably need to bee some kind of overcharge protection.


I thought i would program the beacon to send its callsign in CW(10 speed), followed by voltage, temperature and lightvalue. The values will probably be sent in dits, 0-10 = 8-15v. One transmittion should be able to be done in about 30s, and consume about 0,15Wh. That would mean that 24 transmit sessions per 24h would use far less than the 20Wh available in the winter, only 3,6Wh. The limit would be approx 100 transmit sessions per day, one every 15 minutes.



Offline redhat

  • DX Legend
  • ******
  • Posts: 1592
  • USA
  • Music is my drug.
    • View Profile
    • Email
Re: HF Beacon, design questions
« Reply #3 on: June 02, 2020, 1636 UTC »
Keep in mind, it snows up there right  ;D  You might get 2WH after a good storm comes through and leaves 2" on your panel.

+-RH
Somewhere under the stars...
Airspy HF+, MLA-30/Mini-whip/Chi-Town Loop
Please send QSL's and reception reports to xfmshortwave [at] proton [d0t] me

Offline greator

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: HF Beacon, design questions
« Reply #4 on: June 02, 2020, 1834 UTC »
That is a good point, and i also thought about dialing the transmitter down to 1W to avoid any unnecessary interference. Low battery voltage during the winter is also a bad thing with led-avid batteries since they tend to freeze easier then. I will probably set a "hibernation voltage" on 11v or so, that will stop all transmissions and save the power for the CPU and controlling unit.

Offline greator

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: HF Beacon, design questions
« Reply #5 on: June 04, 2020, 1741 UTC »
I started with the controlling circuit, im using a Arduino Nano clone. I really love these circuits, cost near to nothing and makes setting the hole thing up much easier than having to handle all the circuitry separate as if you were using a PIC or AVR. I added a voltage divider to the mains, to be able to messure battery voltage with the ADC. There is also an external 7805 voltage regulator to be able to use the full battery voltage.


Offline greator

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: HF Beacon, design questions
« Reply #6 on: June 05, 2020, 1731 UTC »
The code for the beacon has started to come together, its basic function is as follows.

1. Check voltage, pause while voltage is below 10,5v
2. Delay 15 minutes
3a. Send beacon name
3b. Send voltage in beeps(0-8)
3c. Send temp in beeps(0-8)

I also found a smaller solar panel that wont damage the battery so much without a regulator, its 6 watts.

Some "Psudo code"
Code: [Select]
void setup() {
  Serial.begin(9600);
}

//
void loop()
  {
  int voltage = analogRead(A7); //init voltage ADC
  int temp = analogRead(A6); //init temperature ADC
  int beeps;

  if (voltage < 382) //if voltage is below 10,5v hybernate
    {
    while(voltage < 394) //wait until voltage is above 11v
      {
      }
    }
  delay (15UL * 60UL * 1000UL); //delay 15 minutes
 
  send([name of beacon]) //send name of beacon
  delay(1000); //short break
    while(beeps < (voltage - 474)/18) //send one to 8 beeps, equals 11-15v
      {
      send(beep) //send short beep
      beeps = beeps + 1; //increment beeps
      }
   beeps = 0;
   
   delay(1000); //short break
   
    while(beeps < (temp-124)/2) // send one to 8 beeps, equals -10 to +30 degrees
      {
      send(beep) //send short beep
      beeps = beeps + 1; //increment beeps
      }
    beeps = 0; 
  }
}

Offline syfr

  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: HF Beacon, design questions
« Reply #7 on: June 05, 2020, 2315 UTC »
There's a lot you can do with those $2 Nano's to reduce standby consumption. Simple things like turning off I/O's rather than leaving them active, as well as using the various sleep modes as well as turning OFF your transmitter Vcc when not transmitting.   It's pretty easy to make a voltage measurement of your battery and make some decisions on when to next transmit , or adjusting your transmit duty cycle,

My guess is that you might be able to do most of what you need with an ATTiny for even less power consumption. 

Also google charge controllers or charge controller circuits . THey're easy to find and cheap and made for this purpose.

You're building on a good ground plane. Yes, youll need to waterproof things!  This turns out to be trickier than first thought.
« Last Edit: June 05, 2020, 2319 UTC by syfr »
Kiwsdr x 2. TenTec Paragon/NRD535

Offline greator

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: HF Beacon, design questions
« Reply #8 on: June 06, 2020, 1320 UTC »
I took your advice and tried to get powerconsumption down on my Arduino Nano, with the voltage divider and the tempsensor(simple 1n4148 diode) it was about 27mA. I changed a few of the resistors and installed a "sleep mode" on the arduino, called LowPower. After that i got down to 11mA. If i  desolder the power-on led, i will get down 1-2mA more probably.

The updated code checks voltage, if below 10,5v goes into sleep mode, wakes up 8s later and checks again. When the voltage is OK a transmit session is started. The transmitted code is simply "BMX1 [voltage 0-8 beeps] [temp 0-8 beeps]" followed by a pause.


Code: [Select]
#include <LowPower.h>

int len = 80; //set speed to 15 wpm

void setup()
{
  Serial.begin(9600);
  pinMode(13, OUTPUT);

}

//
void loop()
  {
  int voltage = analogRead(A7); //init voltage ADC
 
  if (voltage < 382) //if voltage is below 10,5v hybernate
     {
     LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF); 
     }   
  else
    {
    sendbeacon();
    }
   
  delay (15UL * 60UL * 1000UL); //delay 15 minutes
 
  }

int dot()
  {
  digitalWrite(13, HIGH); //send short beep
  delay(len);
  digitalWrite(13, LOW); //send short beep
  delay(len);
  }

int dash()
  {
  digitalWrite(13, HIGH); //send short beep
  delay(len*3);
  digitalWrite(13, LOW); //send short beep
  delay(len);
  }
 
int sendbeacon()
  {
  int beeps = 0;
  dash();
  dot();
  dot();
  dot();
  delay(len*3);
 
  dash();
  dash();
  delay(len*3);

  dash();
  dot();
  dot();
  dash();
  delay(len*7);

  dot();
  dash();
  dash();
  dash();
  dash();
  delay(len*7);
 
  int voltage = analogRead(A7); //init voltage ADC

 beeps = 0;
  delay(1000); //short break
    while(beeps <= ((voltage - 384)/18)) //send one to 8 beeps, equals 11-15v
      {
      digitalWrite(13, HIGH); //send short beep
      delay(240);
      digitalWrite(13, LOW);
      delay(240);
      beeps = beeps + 1; //increment beeps
      }
   beeps = 0;
   
   delay(560); //short break
  int temp = analogRead(A6); //init temperature ADC   
    while(beeps < ((16 -(temp -126)))/2)// send one to 8 beeps, equals -10 to +30 degrees
      {
      Serial.println(temp);
      digitalWrite(13, HIGH); //send short beep
      delay(240);
      digitalWrite(13, LOW);
      delay(240);
      beeps = beeps + 1; //increment beeps
      }
    beeps = 0; 
 
  }

Offline syfr

  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: HF Beacon, design questions
« Reply #9 on: June 06, 2020, 1509 UTC »
I'd have to look back at my notes, but as I recall that 27 mA range is roughly what I recall too.   There's a lot of opportunity to sleep the uP between transmit cycles, etc to save power .  Removing the LED is a winner too.   I can't recall what benefit underclocking might bring in regards power consumption , but switching loss is real, so it should help too.

You might look at the brownout detect functions too.


Added: The version without the microusb is yet less power hungry. IIRC I got it to sleep with a consumption of 2mA or so. 

 
« Last Edit: June 06, 2020, 1824 UTC by syfr »
Kiwsdr x 2. TenTec Paragon/NRD535

Offline Charlie_Dont_Surf

  • Hero Member
  • *****
  • Posts: 868
  • Charlie's Point, California
    • View Profile
Re: HF Beacon, design questions
« Reply #10 on: June 06, 2020, 1704 UTC »
The updated code checks voltage, if below 10,5v goes into sleep mode, wakes up 8s later and checks again. When the voltage is OK a transmit session is started. The transmitted code is simply "BMX1 [voltage 0-8 beeps] [temp 0-8 beeps]" followed by a pause.

Good. As I was reading these comments, I was going to suggest to make sure that once the conditions are appropriate and the uP powers up fully, just be sure that everything (all circuitry) turns on correctly but it sounds like you have looked at this and have it under control.
I don't STRETCH the truth.

cdsurf attt protonmail d0t com

Offline Charlie_Dont_Surf

  • Hero Member
  • *****
  • Posts: 868
  • Charlie's Point, California
    • View Profile
Re: HF Beacon, design questions
« Reply #11 on: June 06, 2020, 1725 UTC »
Protection: I am thinking about using some kind of epoxy to protect the transmitter and control circuit from water. Does any epoxy work?

Please understand that when you apply "conformal coating" to the completed PCB, you are also affecting the power dissipation of the circuit; the various components will not be able dissipate the heat with an epoxy over them as well as they do with air around them. It also makes repairing the beacon later very difficult.

Instead, I suggest that you might try some sort of waterproof plastic box around the PCB. Any cables that enter/exit the box can have epoxy applied around the entry/exit holes to keep moisture and insects out of them. It may not be completely sealed but I would prefer this to applying a coating to the PCB.
I don't STRETCH the truth.

cdsurf attt protonmail d0t com

Offline syfr

  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: HF Beacon, design questions
« Reply #12 on: June 06, 2020, 1742 UTC »
Yeah, I agree with CDS.... I'd be leery of anything like conformal coating.  It's a major PITA to deal with afterwards, it's rarely as inert as advertised and it's a rework/repair nightmare.  I think it's more meant to avoid condensation and dirt in industrial electronics rather than actual waterproofing.  Find an ammo box, or a plastic snap on container or the like to waterproof your electronics. There's lots of solutions for short money. The crappy part is, most waterproof containers are almost impossible to glue to when you need to.

I'd also consider putting more hysteresis in your undervoltage logic. If Vbattery is low, I'd sleep for an hour or so to get the voltage >> your threshold of concern voltage.  I'm thinking you want to stay further away from brownout conditions than the 8 sec tolerance.

Just my inexpert 0.02$!

** Edit- was looking at ATTiny specs last night and it looks like one can get the standby current in "sleep" mode down to the uA range!      I have some dev boards I'm going to play with for some keying functions.  I think there's 5 I/O's on those boards too.

Fun project!
« Last Edit: June 07, 2020, 1216 UTC by syfr »
Kiwsdr x 2. TenTec Paragon/NRD535

Offline greator

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: HF Beacon, design questions
« Reply #13 on: June 07, 2020, 1254 UTC »
I connected the transistor for keying, and also one for a relay to power up/down the transmitter during transmit sessions. I found and ordered some switching(bi stable) relays that doesn't need power once shifted. Hopefully a short pulse of 80mA will switch the relay over to power the transmitter.

One idea i am thinking about is if the battery and temperature value perhaps could be sent using only 4 pulses each, in binary mode. It would keep power consumption as low as posible, 4 "dots"/bits should be able to communicate a value from 1-16.  Im looking if i can find some code to do that.


Offline greator

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: HF Beacon, design questions
« Reply #14 on: June 07, 2020, 1735 UTC »
I did some major updates to the code.

Temperature and voltage is sent binary with 4-bits each. Dot = 0, Dash = 1. This equates to 0000 = 8 volts, 1111 = 15 volts and 0000 = -10c and 1111 = +30c.

Hibernation is now the normal state, each cycle is 8 seconds long(the longest the code seams to offer), after 8 seconds the Arduino wakes up, and checks if enough sleep cycles has passed(112 cycles for 15 minutes) and if the voltage is above 11v. If not, a new period of 15m sleep is initiated.

Each transmission takes about 10s at 15wpm speed.

Code: [Select]
#include <LowPower.h>

int len = 80; //set speed to 15 wpm
int sleeps = 0;
void setup()
{
  Serial.begin(9600);
  pinMode(13, OUTPUT);

}

//
void loop()
  {
  int voltage = analogRead(A7); //init voltage ADC
  //Serial.println(voltage);
 
  if ((voltage > 382) && (sleeps > 2)) //if voltage is below 11v hybernate
     {
      Serial.println("sending beacon");
      sendbeacon();
      sleeps = 0;
      }   
  else
      {
      LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF); 
      sleeps++;
      }
   
 
 
  }

int dot()
  {
  digitalWrite(13, HIGH); //send short beep
  delay(len);
  digitalWrite(13, LOW); //send short beep
  delay(len);
  }

int dash()
  {
  digitalWrite(13, HIGH); //send short beep
  delay(len*3);
  digitalWrite(13, LOW); //send short beep
  delay(len);
  }
 
int sendbeacon()
  {
  int beeps = 0;
  dash();
  dot();
  dot();
  dot();
  delay(len*3);
 
  dash();
  dash();
  delay(len*3);

  dash();
  dot();
  dot();
  dash();
  delay(len*7);

  dot();
  dash();
  dash();
  dash();
  dash();
  delay(len*7);
 
  int voltage = analogRead(A7); //init voltage ADC
  int myNum = (voltage - 288)/16; // 8v = 0000, 15v = 1111
  int zeros = String(myNum,BIN).length();
 
 //below is convertion to binary string from decimal integer for voltage
  String myStr;
    for (int i=0; i<zeros; i++)
      {
      myStr = myStr + "0";
      }
  myStr = myStr + String(myNum,BIN);         
                     
  for(int i=4;i<8;i++)
      {
      if(myStr[i] == '1')
        {
       
        digitalWrite(13, HIGH); //send long beep = 1
        delay(len*3);
        digitalWrite(13, LOW);
        delay(len);
        }
      else
        {
       
        digitalWrite(13, HIGH); //send short beep = 0
        delay(len);
        digitalWrite(13, LOW);
        delay(len);
        }
       
      delay(len*3);
      }
delay(len*7);
//Send temperature

int temp = analogRead(A6); //init voltage ADC
  myNum = 17 - (temp - 124); // 0 = -10 and 16 = +30
  zeros = String(myNum,BIN).length();
 //below is convertion to binary string from decimal integer
 
 

    for (int i=0; i<zeros; i++)
      {
      myStr = myStr + "0";
      }
  myStr = myStr + String(myNum,BIN);         
             
  for(int i=4;i<8;i++)
      {
      if(myStr[i] == '1')
        {
        digitalWrite(13, HIGH); //send long beep = 1
        delay(len*3);
        digitalWrite(13, LOW);
        delay(len);
        }
      else
        {
        digitalWrite(13, HIGH); //send short beep = 0
        delay(len);
        digitalWrite(13, LOW);
        delay(len);
        }
       
      delay(len*3);
      }


   
 
  }

 

HFUnderground T-Shirt
HFUnderground House Flag
by MitchellTimeDesigns