Sunday, May 2, 2021

Indiana QSO Party Portable Operation - 2021

This year I wanted to try to put in some extra effort into the Indiana QSO party. In prior years I've only done marginal effort, with only maybe a couple of hours of time dedicated to it - typically not even submitting my log. This year I wanted to activate a rare county in Indiana where there are either inactive hams, or maybe no hams residing in those counties. I decided to choose Newton county because it was relatively close and was only one county south of my home county of Lake.

I put a lot of effort into my mobile setup on my recently acquired a new vehicle, so I really wanted to use this as an opportunity to give the whole system a shake out and try everything to make sure it works for future mobile ops. A couple of weeks before the QSO party, I had a chance to make a couple of contacts, even picking up some DX, so it seemed like the system was working perfectly.

I wanted to maintain a portable designation, because I was really looking forward to making an attempt at activating one of these rare counties and potentially winning a major award for doing so. There are two possible awards that will be issued for stations that set up as portable and embark on significant effort for activating these counties.  Well, we will see, but I think its safe to say I likely didn't win anything except for a good time!

So, where to go?  I decided to make use of the LaSalle Fish and Wildlife Area, a nature preserve located just over the border in Newton County.  I reached out to the Department of Natural Resources for the State of Indiana, and I found out that I didn't need a permit and I only needed to fill out some basic paperwork.

In order to go portable, I made use of my BuddiPole antenna and strapped it to the rear of my truck. I needed to assemble guy lines and support in order to battle some of the strongest winds we have had in a while. I found out later that peak winds were reported at 51 MPH. In this setup, it would not be possible to drive, which would force my category into the portable class. I did take an opportunity to do some antenna testing between the BuddiPole dipole, and my Yaesu ATAS120. It seems like the dipole did much better, which was to be expected. I was listening to a couple of stations that came in at S5 or S7, and when I switched over to the ATAS120, they were more like S2, S3.

I spent a significant effort calling CQ, but I did go up and down the band looking for a stations for contacts. I even moved to phone and grabbed a couple of QSOs, but since I'm really not a phone operator, I didn't do very well and I'm really out of practice tuning up SSB signals.... Besides, with my marginal setup, CW was probably the best route - I only heard about 10 stations on USB.

I tried different positions in the parking lot giving me different exposures with my dipole. I wanted to see how it would perform when it was further away from the tree line, or closer up against the tree line. I needed to rotate it manually, which this seemed to help only a little bit.

After some time, I got bored and there were not many stations responding to my calls, and it seemed like I worked just about everybody I could hear up and down the band. I even got a call from another station - in Newton County - WA9LEY -how fun! He parked in another part of the same park, but we never saw each other. He did mention his excitement for activating a POTA (Parks on the air) Park - I didn't even think about that.  I looked it up and it looks like this park is K-4213.

All in all, I made 99 QSOs - had a good time and will do it again next year now that I have more experience with portable operations. I wanted to crack 100 QSOs, but when I reviewed the log, there was ONE dupe.  Oh well, next year I have a new target - DOUBLE my score this year.  Should absolutely be doable based on my new experiences and the fact that I will likely go Mobile or Rover.  

My final score was 5,539.

Wednesday, April 21, 2021

Stone TFT touch display interfacing with the ESP32

I tried to make a video describing this since it would be a quite lengthy blog post.  Check it out on YouTube here:

https://youtu.be/V0ELo9Pt5Ns

Sunday, March 14, 2021

Garage Parking Helper - ESP32 and Ultrasonic Distance Measuring Device

Looking through my box of miscellaneous electronics, I noticed that I had one of those Ultrasonic Measuring devices that typically come with Arduino kits.  It was probably banging around in one of my overflow boxes labeled "Keep until 2025 then garbage".   Just kidding - I would never throw a good piece of electronics away! (maybe...)

Trying to think about what I could possibly use this for, I go out to the garage to get something out of my car, which requires me to navigate around my wife's vehicle, which continues to be a challenge since it is always parked way too close to the front wall.  My attempts at placing a tennis ball on a string were futile, as my wife eventually just started treating it like a game - seeing how fast she could hit the tennis ball with the windshield as she pulled into the garage.  So much for low-tech parking assist!

So, I started to think - maybe I can fix this situation.... maybe I can use an ESP32 and strategically place the HC-SR04 so that it will count out the distance on a LCD screen!  Besides, I have no less than a dozen different LCD displays.  Nah - the screen would be way to small no matter where I put it.  Plus, trying to remember the distance, might be tough - especially being gone for a while.

How about use an ESP32 with a red/green LED and hard code the distance in the chip, and just pull forward until the green light turns red!  <-- I think that's the ticket!

This was one of my Sunday morning quick projects, so I decided to breadboard it and drop some code into the Arduino IDE (yeah, I use the IDE to program my ESP32 chips).  Only an ESP32, a HC-SR04, and I placed a resistor on the ground side of the LED.

Here is a diagram of what I ended up doing (forgot the resistor in this drawing):



You will see that if you rotate the HC-SR04 by 180 degrees, you can line up the Ground, Trigger and Echo pins... I created a jumper to the 3.3v pin.  Note: There are "5v only" HC-SR04 units out there, so if you aren't getting any indication, you might have to power the HC-SR04 with the 5v pin and use a voltage divider set of resistors from the echo pin so you don's smoke the ESP32.  A keen eye in the photo below will show that I ended up having to do this with mine - my vcc pin goes to the 5v ESP32 pin, and have some resistors on the bottom to bring the echo pin down to 3v.

I used a proto board I had from a surplus box of equipment a friend of mine gave me - Soldered it all together using the ugly solder bridging method, and it turned out great!


Here is my code - for those that are interested.  I pulled some ideas from various places and came up with the distance algorithm, which is really just arbitrary.  I just figured out what distance I wanted the car to be at while watching the output on the serial monitor, and placed it in variable parkingDist:

const int trigPin = 14;

const int echoPin = 5;

const int redPin = 21;

const int greenPin = 19;

const int parkingDist = 100;

long duration;

int distance;


void setup() {

   pinMode(trigPin, OUTPUT);

   pinMode(echoPin, INPUT);

   pinMode(redPin, OUTPUT);

   pinMode(greenPin, OUTPUT);

   Serial.begin(115200); 

}


void loop() {

   digitalWrite(trigPin, LOW);

   delayMicroseconds(2);

   digitalWrite(trigPin, HIGH);

   delayMicroseconds(10);

   digitalWrite(trigPin, LOW);

   duration = pulseIn(echoPin, HIGH);

   distance= duration*0.017;

   Serial.print("Distance: ");

   Serial.println(distance);

   if (distance<parkingDist) {

    digitalWrite(greenPin,HIGH);

    digitalWrite(redPin,LOW);

   }

   if (distance>=parkingDist) {

    digitalWrite(greenPin,LOW);

    digitalWrite(redPin,HIGH);

   }

   delay(100);

}

Now its time to design and print an enclosure!




 

Sunday, February 28, 2021

Momentary Push Button Soft Latching Relay

I've been wanting to install my ham radio in my vehicle for a while now, and I started to research options for using a master switch to turn on and off the radio.  I planned on running the power for the radio directly to the battery, so I was thinking a relay to interrupt the power line to the radio was in order.  I didn't want to use a switch to interrupt the power line since the radio is rated at 22 Amps on transmit, so the switch would likely look beastly mounted on my dash - so a relay it is!

Looking at the switches available to actuate the relay, I wasn't too impressed with the selection.  I wanted something lighted when turned on and I certainly didn't want to put some 1986 looking switch in my dash.

Browsing the options on Amazon, I saw a series of momentary contact switches that looked great, but those wouldn't be very helpful with my project unless I had some kind of latching relay, or something to hold the relay closed.  

All I did was dream about those momentary contact switches - they would fit in my vehicle perfectly.  So, I ordered one... and started to look for a latching relay or even some kind of board that would control a relay with my new cool momentary contact switch.  I really didn't find anything that I thought would work. The latching relays needed a pulse on another set of pins to unlatch the relay, and some of the boards I found had a built in relay that was too small and didn't have some of the capabilities I was looking for - mainly a clean and easy to connect package.

So, I decided to make my own.

Looking through a box of old integrated circuits I got from a friend of mine - KC9QLO - I decided to make use of one of these old 4017 decade counters - the exact chip I used to use when I made Knight Rider sequencing lights back in the 1980s.  

The heart of the circuit is the 4017 decade counter chip.  The 4017 is a counter that counts from 0 to 9.  Once it hits 9, it restarts at 0 unless the reset pin is tied to an output before 9.  The decade counter will turn each pin high (then low) in sequence with a triggered input on the clock pin.  I tied output 2 (pin 4) to the reset pin, so that when the counter got to 2, it would immediately reset to output 0 (pin 3).  There is nothing connected to output 1 (pin 3), so nothing turns on.  Once a pulse (from the switch) occurs on the clock pin, the counter will then switch to output 1 (pin2) that turns on the relay.  Again, pressing the button again would sequence it to the next pin (pin 4), but since that is tied to reset, the next sequence would go back to 0 (pin 3) and the whole thing repeats.  What a waste of a decade counter that only counts to 2!




So, what we have here is a circuit, that when powered up, will give voltage on output 0 (pin 3) - so nothing turns on.  Once the switch is pressed, we sequence to output 1 (pin 2) which supplies voltage to the base of the transistor - effectively turning it on and providing power to one of the screw terminals as well as the relay. I used this transistor since its rating was such that it would easily power the relay coil I wanted to use as well as a relay.  I'm using a flyback diode (just a general purpose diode) to prevent any reverse voltage spikes from the coil when releasing.  

The other parts of the board consists of three two-port screw terminals for attaching 12v/Ground, LED+/Ground, and Switch.  Sure, you could have just one terminal screw for ground, but like I mentioned - I wanted this to be fool proof as I was going to offer this completed project to other folks looking for a similar package. The LED built into the switch will have to come back to these screw terminals to show status properly and wont be able to be connected to the switch's power leads like you might in a latching switch - it wont work properly with a momentary switch.

The only thing left are the couple of resistors and a capacitor on the clock pin.  Since the clock pin not only looks for a voltage pulse to move the counter forward, but it actually works on the leading edge or rise of the pulse - which will be an important distinction when I explain further below.  Two things are happening with this part of the circuit: 
1) Because mechanical switches aren't perfect, and neither are us humans, as we start to push the switch, it might engage the contacts a couple of times before we get a steady push on it.  Because the decade counter is very sensitive, that will move it forward a pulse or two, and create a situation where it appears erratic.  One of the resistors and one of the capacitors acts as a "debounce circuit".

2)  The other resistor (that connects to 12v) is called a pull up resistor.  It is recommended to make sure you either tie the clock pin either high, or low (by connecting to ground via a resistor). In this configuration, the resistor presents voltage on the clock pin when the switch is not pressed.  Once you press the switch, it closes the circuit and grounds the clock pin.  Once you release the switch, it gives voltage back to the clock pin therefore sequencing the counter.  

Wait a second here - I think we need some clarification on the second item above.  Why wouldn't you just use a pull down resistor to bring the clock pin to ground when not in use, and then just make the switch introduce voltage to the clock pin to cycle the counter? That makes all the sense in the world, and I don't have a great reason for why I did it this way, but I thought it would be cool if the counter would sequence "on the release" of the switch.  Doing the opposite (using the switch to introduce voltage to the clock pin instead of grounding it) would sequence as you started to depress the switch.  Preference I guess.  

The nice thing about this set up is that when you turn off the vehicle, if the voltage is connected to an accessory line, the circuit, and therefore the radio turns off.  Also nice, is that when you turn the vehicle back on, the radio will continue to be off until turned back on again.  If you don't think this is cool, then a latching switch is for you... certainly not a momentary contact switch.

JLCPCB comes through again with my board order.  

Its an amazing time to be into electronics and prototyping.