Keyboard Shortcuts
Likes
- SoftwareControlledHamRadio
- Messages
Search
Re: Mystery board??
The mystery green board is a VSWR bridge. I bought it from kitsandparts?
The original VSWR kit was discontinued but a replacement may be available from kitsandparts. As an alternative one can buy all parts from them and assemble the circuit on a perforated PCB. The instructions for the original (discontinued) kit are attached.? The output of the bridge is meant to drive forward and reverse analog meters through the series variable resistors. But I modified my kit to make the variable resistors work as voltage dividers to feed the forward and reverse voltage samples into two analog inputs of the Arduino Nano. The two voltage divider potentiometers are used to calibrate the bridge's forward and reverse voltage outputs. I have not yet finished the code to display the forward and reverse SWRs on the LCD display as one tunes across the 40m band. This idea here is very similar to Jack's DDS VFO Antenna Analyzer, however in this case it will show antenna SWR measurements for 40m only. Hope this solves the mystery :-) 73, Farrukh |
||||||||||||||||||
40m QRP Transmitter Success
Afternoon to all. With everything finally completed, I fired up the first prototype of the 40m QRP Transceiver with the DDS VFO and the 49-er. Happy to report that the unit is up and running. Receive is working as it should and the rotary encoder is working as well. The radio is receiving and transmitting. Some additional testing is in the works for tonight, but for now, very pleased with the initial outcome. Great project!! Best 73s Aaron - N2HTL |
||||||||||||||||||
Re: Increment Problems
The class name is capitalized, which is why you see the line: Rotary r = Rotary(2, 3); ? ? ? // Create encoder object and set the pins the rotary encoder uses. ?Must be interrupt pins. in the VFO source code (around line 97 in the VFO.ino source file). However, you also see: #include ? // From Brian Low: https://github.com/brianlow/Rotary at line 12 in the same file. So, the header file is rotary.h (small 'r') but the class name is Rotary (large 'R'). If you look in the Rotary library, you will see the files: rotary.cpp rotary.h plus the Examples directory. I looked in the file that Farrukh has and it does have a capital 'R'. I'm attaching the three files I have to see if that makes a difference. Copy your library Rotary to a temp directory and then copy the two rotary files to the libraries\Rotary directory and see if they make a difference. I can't even compile the file Farrukh has! However, with these files, it should compile if the include uses a small 'r'. Let me know what happens. 73, Jack, W8TEE |
||||||||||||||||||
Re: Increment Problems
Gary White
开云体育Jack,Now I am confused. The rotary library that came with the DDS-VFO is capitalized as is the include in the DDS into file. As is Brian Low’s include library. 73 Gary
|
||||||||||||||||||
Re: Increment Problems
You are still using the wrong encoder library. I know this because the include does not use a capital 'R' for the file; it should be lowercase 'r'. Delete the Rotary library that comes with the IDE and install: this library in its place. If you lose this email, the VFO source file has this line in it: #include ? // From Brian Low: https://github.com/brianlow/Rotary That should make a difference. Jack, W8TEE From: "Dennis Stage dennisstage@... [SoftwareControlledHamRadio]" To: "SoftwareControlledHamRadio@..." Sent: Thursday, April 7, 2016 10:16 AM Subject: RE: [SoftwareControlledHamRadio] Re: Increment Problems
?
Just got back. Been at my mountain property trying to get a cabin built.? Will all that you suggest later today. Thanks for the input. To: SoftwareControlledHamRadio@... From: SoftwareControlledHamRadio@... Date: Tue, 5 Apr 2016 20:22:04 -0500 Subject: RE: [SoftwareControlledHamRadio] Re: Increment Problems ?
Dennis,
Well I’m stumped then. Bye the way, I hooked up a bare encoder without the external pull-up resistors (that is what is on the pcb) and it worked fine. Can you load the example called ‘INTERRUPT’ that came with the library. Pull the Nano off the DDS VFO. Run the encoder to pins 2, 3, and ground (no 5 Vdc needed). Open the serial monitor (make sure it is at 9600 baud) as you turn the encoder it should print out CW or CCW. Here is the code for it: /* Rotary Encoder - Interrupt Example The circuit: * encoder pin A to Arduino pin 2 * encoder pin B to Arduino pin 3 * encoder ground pin to ground (GND) */ #include Rotary r = Rotary(2, 3); void setup() { Serial.begin(9600); PCICR |= (1 << PCIE2); PCMSK2 |= (1 << PCINT18) | (1 << PCINT19); sei(); } void loop() { } ISR(PCINT2_vect) { unsigned char result = r.process(); if (result == DIR_NONE) { // do nothing } else if (result == DIR_CW) { Serial.println("ClockWise"); } else if (result == DIR_CCW) { Serial.println("CounterClockWise"); } } |
||||||||||||||||||
Re: Increment Problems [1 Attachment]
Dennis Stage
开云体育Gary, Thanks for going to the trouble of developing a wiring check sheet.? I completed all of the tests and it all checks out. I still think this may be a sketch problem: the fact that when I download the rotary file and unzip it the h file extension is missing concerns me. Can you email me the entire rotary file you are using? If that doesn't work, I am going to lay out all of the components on a bread board and conduct tests. BTW, I tested the rotary switch with a logic probe and it indicates "Low" when the switch is activated (pressed in). You may not live far from my sister: she lives in Round Rock. Thanks again, Dennis To: SoftwareControlledHamRadio@... From: SoftwareControlledHamRadio@... Date: Wed, 6 Apr 2016 14:25:27 -0500 Subject: Re: [SoftwareControlledHamRadio] Re: Increment Problems [1 Attachment] ? |
||||||||||||||||||
Re: Increment Problems
Dennis Stage
开云体育Just got back. Been at my mountain property trying to get a cabin built.? Will all that you suggest later today. Thanks for the input. To: SoftwareControlledHamRadio@... From: SoftwareControlledHamRadio@... Date: Tue, 5 Apr 2016 20:22:04 -0500 Subject: RE: [SoftwareControlledHamRadio] Re: Increment Problems ?
Dennis,
Well I’m stumped then. Bye the way, I hooked up a bare encoder without the external pull-up resistors (that is what is on the pcb) and it worked fine. Can you load the example called ‘INTERRUPT’ that came with the library. Pull the Nano off the DDS VFO. Run the encoder to pins 2, 3, and ground (no 5 Vdc needed). Open the serial monitor (make sure it is at 9600 baud) as you turn the encoder it should print out CW or CCW. Here is the code for it: /* Rotary Encoder - Interrupt Example The circuit: * encoder pin A to Arduino pin 2 * encoder pin B to Arduino pin 3 * encoder ground pin to ground (GND) */ #include Rotary r = Rotary(2, 3); void setup() { Serial.begin(9600); PCICR |= (1 << PCIE2); PCMSK2 |= (1 << PCINT18) | (1 << PCINT19); sei(); } void loop() { } ISR(PCINT2_vect) { unsigned char result = r.process(); if (result == DIR_NONE) { // do nothing } else if (result == DIR_CW) { Serial.println("ClockWise"); } else if (result == DIR_CCW) { Serial.println("CounterClockWise"); } } |
||||||||||||||||||
Re: Antenna Analyzer
I've already started it...that's where the photo came from (simulated data). Right now I have it working on a breadboard, but the new part of the circuit is on the homemade board you see in the photo. Farrukh is laying out a new board that will have the Nano/DDS/analyzer on one side of the board, and the header socket for a 3.95" color display on the other side. He's looking into the newer AD9851 chip, as that can go up to 70MHz, which would also allow 6M coverage. If we can get some quantity price breaks, it should be about $50 to build. I expect to write an article on it similar to the Forty-9er article in that it will have a separate construction manual and source code. I want to keep the Nano, but already I'm pressing on the memory limits, and that's without using the TFT display card's onboard SD card for data storage. The Teensy 3.0 would be a good choice, but I haven't been able to get it to work with the display and it's $20 versus $2 for a Nano. I'll keep everyone posted. Jack, W8TEE From: "white512@... [SoftwareControlledHamRadio]" To: SoftwareControlledHamRadio@... Sent: Wednesday, April 6, 2016 9:40 PM Subject: [SoftwareControlledHamRadio] Antenna Analyzer
?
Any thoughts to developing an antenna analyzer using the DDS VFO as the core of the analyzer?
|
||||||||||||||||||
Re: Increment Problems [1 Attachment]
Glad to see this up on the site...I'm sure it will be helpful. Jack, W8TEE From: "Gary White white512@... [SoftwareControlledHamRadio]" To: SoftwareControlledHamRadio@... Sent: Wednesday, April 6, 2016 3:25 PM Subject: Re: [SoftwareControlledHamRadio] Re: Increment Problems [1 Attachment]
?
[ from Gary White included below]
A continuity matrix for your encoder issue
|
||||||||||||||||||
Re: Increment Problems
Yeah, something strange has to be going on, but it's hard to tell what. Jack, W8TEE From: "Gary White white512@... [SoftwareControlledHamRadio]" To: SoftwareControlledHamRadio@... Sent: Tuesday, April 5, 2016 10:00 PM Subject: Re: [SoftwareControlledHamRadio] Re: Increment Problems
?
Jack,
I agree about your conclusion - I’m guessing bad connection or solder joint on the DDS VFO board. Just wanted to test the encoder separate from the DDS VFO to confirm it is okay and then point Dennis back to the DDS VFO board for more troubleshooting. But, I have had bad encoders before. Usually just one side tho and a shot or two of DeOxit clears them up. Also, good point about ISR. 73 Gary W5GW |
||||||||||||||||||
Re: Increment Problems
Gary White
Jack,
I agree about your conclusion - I’m guessing bad connection or solder joint on the DDS VFO board. Just wanted to test the encoder separate from the DDS VFO to confirm it is okay and then point Dennis back to the DDS VFO board for more troubleshooting. But, I have had bad encoders before. Usually just one side tho and a shot or two of DeOxit clears them up. Also, good point about ISR. 73 Gary W5GW |
||||||||||||||||||
Re: Increment Problems
FWIW: you shouldn't use a Serial.print() call in an ISR, since that method uses interrupts itself. Something is definitely out of whack here, since there are over a hundred of these boards out there being used with the software. I'm starting to think there's a bad component somewhere in the chain. Jack, W8TEE From: "Gary White white512@... [SoftwareControlledHamRadio]" To: SoftwareControlledHamRadio@... Sent: Tuesday, April 5, 2016 9:22 PM Subject: RE: [SoftwareControlledHamRadio] Re: Increment Problems
?
Dennis,
Well I’m stumped then. Bye the way, I hooked up a bare encoder without the external pull-up resistors (that is what is on the pcb) and it worked fine. Can you load the example called ‘INTERRUPT’ that came with the library. Pull the Nano off the DDS VFO. Run the encoder to pins 2, 3, and ground (no 5 Vdc needed). Open the serial monitor (make sure it is at 9600 baud) as you turn the encoder it should print out CW or CCW. Here is the code for it: /* Rotary Encoder - Interrupt Example The circuit: * encoder pin A to Arduino pin 2 * encoder pin B to Arduino pin 3 * encoder ground pin to ground (GND) */ #include Rotary r = Rotary(2, 3); void setup() { Serial.begin(9600); PCICR |= (1 << PCIE2); PCMSK2 |= (1 << PCINT18) | (1 << PCINT19); sei(); } void loop() { } ISR(PCINT2_vect) { unsigned char result = r.process(); if (result == DIR_NONE) { // do nothing } else if (result == DIR_CW) { Serial.println("ClockWise"); } else if (result == DIR_CCW) { Serial.println("CounterClockWise"); } } |
||||||||||||||||||
Re: Increment Problems [1 Attachment]
Gary White
Dennis,
Well I’m stumped then. Bye the way, I hooked up a bare encoder without the external pull-up resistors (that is what is on the pcb) and it worked fine. Can you load the example called ‘INTERRUPT’ that came with the library. Pull the Nano off the DDS VFO. Run the encoder to pins 2, 3, and ground (no 5 Vdc needed). Open the serial monitor (make sure it is at 9600 baud) as you turn the encoder it should print out CW or CCW. Here is the code for it: /* Rotary Encoder - Interrupt Example The circuit: * encoder pin A to Arduino pin 2 * encoder pin B to Arduino pin 3 * encoder ground pin to ground (GND) */ #include <Rotary.h> Rotary r = Rotary(2, 3); void setup() { Serial.begin(9600); PCICR |= (1 << PCIE2); PCMSK2 |= (1 << PCINT18) | (1 << PCINT19); sei(); } void loop() { } ISR(PCINT2_vect) { unsigned char result = r.process(); if (result == DIR_NONE) { // do nothing } else if (result == DIR_CW) { Serial.println("ClockWise"); } else if (result == DIR_CCW) { Serial.println("CounterClockWise"); } } |
||||||||||||||||||
Re: Increment Problems
Dennis Stage
开云体育In case I did not mention it earlier, I tested the sw circuit with a DMM and pressing the switch sends D4 on the Nano to ground. ? Tomorrow, I am going to test the pulses with an?oscilloscope. ? Dennis ? To: softwarecontrolledhamradio@... From: SoftwareControlledHamRadio@... Date: Tue, 5 Apr 2016 20:51:19 -0400 Subject: RE: [SoftwareControlledHamRadio] Re: Increment Problems ? Voltage on the + connection of the KY 040 measures 5.07vdc ? To: SoftwareControlledHamRadio@... From: SoftwareControlledHamRadio@... Date: Tue, 5 Apr 2016 18:22:53 -0500 Subject: RE: [SoftwareControlledHamRadio] Re: Increment Problems [1 Attachment] ?
[Attachment(s) from Gary White included below]
Dennis,
Does your encoder have a small printed circuit board like this? These are the common KY-040 encoder. You may also have the encoder without the pcb. If you have this type, run a line from 5 Vdc on the DDS VFO board (pick it off J1) to the pin marked plus (+) on the pcb. This line is not shown on the DDS VFO schematic.? These types of encoders seem to conflict with the internal pull down circuit in the Nano and prevent incrementing or decrementing frequency unless you supply them with a 5 Vdc source. I have not tried using a bare bones encoder (one without the pcbs) but I have a few in my junk box and might try one later tonight. 73 Gary W5GW ?
|
||||||||||||||||||
Re: Increment Problems [1 Attachment]
Dennis Stage
开云体育Voltage on the + connection of the KY 040 measures 5.07vdc ? To: SoftwareControlledHamRadio@... From: SoftwareControlledHamRadio@... Date: Tue, 5 Apr 2016 18:22:53 -0500 Subject: RE: [SoftwareControlledHamRadio] Re: Increment Problems [1 Attachment] ?
[Attachment(s) from Gary White included below]
Dennis,
Does your encoder have a small printed circuit board like this? These are the common KY-040 encoder. You may also have the encoder without the pcb. If you have this type, run a line from 5 Vdc on the DDS VFO board (pick it off J1) to the pin marked plus (+) on the pcb. This line is not shown on the DDS VFO schematic.? These types of encoders seem to conflict with the internal pull down circuit in the Nano and prevent incrementing or decrementing frequency unless you supply them with a 5 Vdc source. I have not tried using a bare bones encoder (one without the pcbs) but I have a few in my junk box and might try one later tonight. 73 Gary W5GW ?
|
||||||||||||||||||
Re: Increment Problems [1 Attachment]
Dennis Stage
开云体育Gary, ? Thanks. Yes, mine has a pcb (it is a KY-o40) and I am feeding 5 vdc to it. ? To: SoftwareControlledHamRadio@... From: SoftwareControlledHamRadio@... Date: Tue, 5 Apr 2016 18:22:53 -0500 Subject: RE: [SoftwareControlledHamRadio] Re: Increment Problems [1 Attachment] ?
[Attachment(s) from Gary White included below]
Dennis,
Does your encoder have a small printed circuit board like this? These are the common KY-040 encoder. You may also have the encoder without the pcb. If you have this type, run a line from 5 Vdc on the DDS VFO board (pick it off J1) to the pin marked plus (+) on the pcb. This line is not shown on the DDS VFO schematic.? These types of encoders seem to conflict with the internal pull down circuit in the Nano and prevent incrementing or decrementing frequency unless you supply them with a 5 Vdc source. I have not tried using a bare bones encoder (one without the pcbs) but I have a few in my junk box and might try one later tonight. 73 Gary W5GW ?
|