Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

LPF Donation via Stripe | LPF Donation - Other Methods

Links below open in new window

ArcticMyst Security by Avery

Ham radio field box arduino controller :)

vk2fro

0
Joined
Nov 30, 2009
Messages
1,304
Points
63
Been up all night working on a project - stuff 2 radios into one box, along with a power supply and other accessories, and its gonna get mighty toasty in there, especially when transmitting... heres my solution... :)


My first actually useful arduino project. The project sequences the radios to prevent inrush current from blowing the primary input fuse, and will have a key switch on the relay/arduino board VCC line to stop unauthorized use of the rigs. It monitors the temperature using a K type thermocouple linked to a MAX 6675 (pain in the ass to solder - SOIC-8!) IC, and turns on and off two 120mm fans that will mount in the back of the box. More fans can be added if needed.

The box will make my entire setup completely pick up and go. Just pull the mains lead, unhook the coaxes, slap on the front cover and carry away.

On arrival to the field day site or camp site, connect 240V from the generator, or 13.8V DC after flicking the source switch on the back to "DC", unclip and remove the front panel, and insert and turn the key.

It could be used for other close quarters electronics and its easy to change the settings, just adjust the code to your temperature requirements etc.

The box will contain the following items:
Yaesu FT-950
Icom 208H
RM-Italy 300V 400W amplifier
DOSS 40A power supply
This controller
2 desktop microphones
An LDG AT-600 Pro autotuner (connected to ANT-2 on the 950
A headset.

The rear panel will have 2 HF connectors, one uhf connector, 2 fans, one set of DC in connectors, one fused set of DC out connectors, IEC mains input, DC/AC select switch, and 2 primary circuit fuses for the DC and AC.

What do you guys think?
 
Last edited:





Joined
Dec 11, 2011
Messages
4,364
Points
83
Nice work! That'l make a nice go kit! Have you RF tested the Arduino yet to see if it will bugger it out? What happened with the Argon though?
 

vk2fro

0
Joined
Nov 30, 2009
Messages
1,304
Points
63
Argon: finances.

No, I havent RF tested the arduino, but I'll be mounting the arduino, and its associated parts inside a aluminium boxed thats earthed. So that way both the arduino doesnt intefere with reception, and the RF from the radios doesnt schitz out the uC. :)
 
Joined
Dec 11, 2011
Messages
4,364
Points
83
QSL.

I've heard of Field Day DIY units with LCD's going haywire from the RF entering through the LCD. Near field EM density is amazing at a large field day. IIRC they took some metal window screen repair material and used that as a faraday shield for the LCD. I can't help but wonder if the MPE limits were ignored in those cases though, hihi!
 

vk2fro

0
Joined
Nov 30, 2009
Messages
1,304
Points
63
We should be fine here. Our power limits are 400W Peak - not the 1.5Kw those in the US get.

I am also building a digital wattmeter based on a pic18F4450 (its a kit from fox delta). I'll probably run out of space in the 4ru box!

I also need to put several power diodes in series with the DC input - at 12V the little regulator on the arduino board gets bloody hot. Dropping it to 8.5V should fix that problem :)

I'll update this thread as I build the box. I first need to pay for the safety glasses GB, then I'll think about ordering the 4RU flightcase.

Then I'll get busy with my jigsaw and drill punching it fulla holes :p
 
Last edited:
Joined
Dec 11, 2011
Messages
4,364
Points
83
Right, hehe I forgot about your 400W limit. Aye, it's 1500W PEP, but some do 1500W ERP... so before losses they're actually pumping near 2kW. You get a stray 2% leaking out somewhere and it's plenty to fry things lol.

I once saw someone cook a turkey with a 12el 50MHz yagi running 1.3kW PEP. He could have fried and egg on the linear though, hehe.

Anyway, what's the coding side of the Arduino like? I'm a total novice when it comes to digital electronics.
 

vk2fro

0
Joined
Nov 30, 2009
Messages
1,304
Points
63
PRetty much like coding basic. The syntax and statements are a little different, and I bet my last 50c that my code is AWFUL, but its pretty easy to pick up.

Arduinos have modules that you load in, so reading the thermocouple was handled by the MAX6675 module (which someone else coded), driving the LCD was handled by liquidcrystal module (another which someone else coded).

Doing relays is easy. Pull a pin low and a relay will energize. Pull a pin high, and they de-energize. (can be the other way around for different relay boards). My relay board energizes on a low TTL signal.

Then its just a matter of piecing it all together using simple logic e.g.

if (tmp <=30 ){ digitalWrite(fanPin, HIGH);
}

That statement above looks at the temperature stored in the variable tmp, and if its less than 30, cuts out the fans. Yes it looks ass about, but the logic on my relay board is backwards remember (high = off, low = on)

tmp = thermocouple.readCelsius();

that one simply stores the temperature.

The max 6675 does all the hard work, and communicates with the arduino via spi. What? SPI - what an pain to code? not with the wire.h module - give it 3 pins and off you go :)

They really are fun to play around with. I need to bring mine over to the pc and correct that spelling mistake though :p

I dropped the code in below if you want to have a look.

Code:
//vk2fro field box controller. For Sigurthrs benefit I have commented
// the code. The double slases are like rem statements in basic

#include <max6675.h>
#include <LiquidCrystal.h>
#include <Wire.h>

// the above 3 commands tell the programming environment to include
// modules, which are like subroutines. (gosub, return)

int thermoDO = 4;
int thermoCS = 5;
int thermoCLK = 6;
float tmp = 0;

//the above initialize variables. in basic this 
//might be "let tmp=0".

MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
int fanPin = A2;
int hfPin = A0;
int vhfPin = A1;

//The above defines the pins for the MAX 6675 chip 
//and the relays

LiquidCrystal lcd(8, 9, 10, 11, 12, 13);

//and this one above sets the LCD output pins


uint8_t degree[8]  = {140,146,146,140,128,128,128,128};
// make a cute degree symbol for the lcd

// below we begin our initialization. This part only 
// runs once.
void setup() {
  Serial.begin(9600); //debugging port
  pinMode(fanPin, OUTPUT); digitalWrite(fanPin, HIGH); 
// ensure fans are off on power up.
  pinMode(hfPin, OUTPUT); digitalWrite(hfPin, HIGH); 
// turn off the hf rig
  pinMode(vhfPin, OUTPUT); digitalWrite(vhfPin, HIGH); 
// turn off the vhf rig
//above 3 set up the relay pins, for the fans and the two radios.
  lcd.begin(16, 2); //initializes the LCD, 16x2 character.
  lcd.createChar(0, degree); 
//Actually creates the ° Symbol in memory at byte 
//position 0 in the LCD.
  lcd.setCursor(0,0); 
//Throws the cursor to line 1, position 1
  delay(500); 
// give lcd a chance to complete initilization
  lcd.print("Powering up..."); // prints to LCD
  lcd.setCursor(0,1); 
  lcd.print("HF:OFF   VHF:OFF");
  delay(3000); 
// waits 3 seconds for everything to settle
  digitalWrite(hfPin, LOW); 
//Turns on Relay one, and thus the FT-950
  lcd.setCursor(0,1); 
//Moves the cursor back to pos 1, line 1.
// LCD's are always in overwrite mode, 
//so we'll just write over the top :)
  lcd.print("HF:ON    VHF:OFF");
  delay(5000); 
// 5 second delay to prevent inrush blowing fuses. 
// The FT-950 has about a 3 second startup, Gives it time to settle.
  lcd.setCursor(0,1);
  lcd.print("HF:ON    VHF:ON ");
  digitalWrite(vhfPin, LOW); 
// Power up the 2nd relay, and the VHF rig.
  delay(3000); 
// 3 second delay, let stuff stabilize
  lcd.clear(); 
//Clear the LCD
  lcd.setCursor(0, 0);
  lcd.print("VKFRO FIELD BOX"); 
// we wont use line 1 anymore, so we can print this here :)
  lcd.setCursor(8,1); 
// move to line 2, position 8
  lcd.print("Fan: Off"); 
//Print "Fans are off"
}

//Below is the main program. Loops over ad infinitum.
void loop() {
  lcd.setCursor(0,1);
  tmp=thermocouple.readCelsius(); 
// Reads the max 6675 
  lcd.print(tmp);
// below: work out where the degree symbol must go,
// and print it.
#if ARDUINO >= 100
  lcd.write((byte)0);
#else
  lcd.print(0, BYTE);
#endif
  lcd.print("C ");
  lcd.setCursor(8,1);
  if (tmp >= 40){ digitalWrite(fanPin, LOW); lcd.print("Fan: On ");
//line above checks to see if its hotter than 40°C, 
//and if so, turn on the fan.
  }
  if (tmp <= 30){digitalWrite(fanPin, HIGH); lcd.print("Fan: Off");
// Line above turns off the fan below 30°C
  }
  delay(500); 
// without this delay the processor would run so fast
// it would overload and probably kill the max 6675;
// a $9 chip!
}

By leaving a 10°C gap between turning on and off the fans, the program has a large inbuilt hysterises, which stops the fans madly cycling on and off, which would cause a lot of relay clicking. Relay one is cascaded with a 40A car horn relay now, as the FT-950 can draw up to 26 amps full power key down (CW), so it'll melt the baby relays on the relay board. The Icom only draws around 12 amps, being 12% over the top isnt that bad, as the contacts are already engaged, so there will be no arcing, which is what kills relays. I will still cascade it though, with a bigger 15A relay.
 
Last edited:

vk2fro

0
Joined
Nov 30, 2009
Messages
1,304
Points
63
A circuit that reads an external value from a sensor (be it rpm, voltage or temperature etc), is only as good as its calibration.

I decided to see how accurate the thermocouple was. I grabbed the only laser I own (forgot about this), and fired my laser temperature gun at the thermocouple. It was 5°C out, so I modified the program, and popped in an offset value to counter the discrepincy. Its now less than 1 degree out.

I then took my laser gun thermometer and pointed it at my temperature controlled soldering iron. It was at 350°C, a few degrees off the temperature on the screen of the soldering stations base. Then, I sat the thermocouple on the tip. The temperature steadily climbed to 340-350°C, mimicing the temperature guns reading as the iron's controller managed the temperature. So these thermocouples are pretty accurate once you know their error value.

Heating the sensor to that temperature won't hurt it. Its rated to 1200°C. I'd be a bit worried if I had a reading like that in my field box though! "Oh crap my radios are on fire!" :p
 
Joined
Dec 11, 2011
Messages
4,364
Points
83
LOL nice that the thermo has such a wide range and keeps it's calibration linearly. Thanks for the code btw.
 

vk2fro

0
Joined
Nov 30, 2009
Messages
1,304
Points
63
Wow I added a key switch to prevent unauthorized use of the radios. It locks out the main running code unless pin 2 is low (grounded). I didnt know it would take SO MUCH TROUBLE just to add a darn key.

(I wanted it so the key is always obeyed).

Finally, my main loop now consists of 5 lines. All other stuff in now in functions or subroutines, called from the main loop. Yes that key will be obeyed.

Code is complete ladies and gents, and I am very happy with my result :)

I chuck up another youtube video later :)
 

vk2fro

0
Joined
Nov 30, 2009
Messages
1,304
Points
63
Well 500 watts of RF on the 10m band upsets the exposed circuit. The answer to this will be an aluminium project box. That should fix the problem and if not, I'll replace the cables to the lcd with sheilded cable.

oh yeah 500 watts (100 over our limit) into a sirio 2016 really does get out - yes we did wind the wick back to 400 watts once we realised that the Ranger RCI 69FFC4 10m/12m radio (overpolished CB really) was pumping out 500W (we wanted to meter it, and Dans dummy load only does 300 W. OTOH my antenna handles 1.2Kw on those bands and 11m. Its tuned 1.1:1 at the 28.400mhz frequency, and is rock solid all the way up to 29.600, and all the way down to 27.000


Turn off all the bells and whistles (roger, echo, etc) and those rangers actually put out a respectable signal.
 
Last edited:
Joined
Dec 11, 2011
Messages
4,364
Points
83
Aye, hehe I had suspected that would happen. See about fine metal mesh to cover the LCD as well, better safe than fried.
 

Things

0
Joined
May 1, 2007
Messages
7,517
Points
0
Just looking at your code there, I'd probably throw in a fail safe just incase your temp sensor dies/becomes disconnected for some reason. Maybe instead of it turning off the fan when it's below 30C, have it turn off the fan if between a set range, but on for anything above or below that.

Just a thought that could one day protect your equipment! :)
 
Last edited:

vk2fro

0
Joined
Nov 30, 2009
Messages
1,304
Points
63
Good suggestion Things, but I added code to prevent power up at all if the sensor doesnt provide a reading. The only way to bypass it is to remove the back of the field box (opening the interlock switches) and closing the bypass switches. This allows natural airflow through the enclosure (like a set of shelves), but is less handy should inclement weather arrive un announced. I may also include a bypass on the fans (to have them run continiously) should the controller fail.

I shouldn't have any issues with it though, once I get it boxed up. Heres another project I built from a kit, and this one interfaces with rf directly - its a wattmeter/SWR meter with alarm. Second shelf, above the CB radio masquerading as a ham set! (note thats its first power up. I initially took this photo to show my new toy for a radio forum. Its advertised as a ham rig but look where it powered up... right in the middle (well top end) of 27mhz CB :p)

img0080ok.jpg


At 200 watts on 10m from that radio (yes it actually does do the ham bands!), the meter doesnt crash or reboot or carry on, and it has an LCD. I just need to box mine up, add some RF chokes and I'll be set for the station controller. Then just buy the 8RU rack box to put it all in (along with new fans - I gave them to danny to cool his 400 watt radio - bloody thing was hitting 50°C on 10 second overs. It needs a tune :p) One thing that doesnt need a tune - my antenna - dead on 1.0:1 @ 28.500mhz :)
 

AUS

0
Joined
Apr 12, 2012
Messages
565
Points
28
I have a 400W PEP 144-148MHz AM17 amplifier sitting in the lounge room i haven't fired up in about 10 years, plus a an AWA P5 500W AM on 765kHz I have been meaning to put on 160 metres *sigh*....

I'm almost tempted to get back into it, problem is when i spend all day fixing 10kW FM's and have a 6kW AM TX in bits, the last thing i want to see when i get home is another bloody transmitter!
 




Top