Shop OBEX P1 Docs P2 Docs Learn Events
How to clamp an input signal to propeller? - Page 2 — Parallax Forums

How to clamp an input signal to propeller?

2»

Comments

  • Tracy AllenTracy Allen Posts: 6,656
    edited 2020-05-18 18:08
    About the wire stub in the picture, I see that it exits through a hole in the back of the box. How does it get from there to the Prop input, how far? It doesn't look like coax, but it could be, with the shield to fix the ground point right on the box, and the center wire to form the pickup stub. Then the bias established by the voltage divider sets the operating point at the Propeller. You can include the additional 100pF capacitor, but the 8.8pF already provides isolation.

    Are other ground connections between the Prop and the system, say, from the directional coupler? That kind of complication along with grounds to measuring instruments can create loads of confusion!

    8.8pF has a reactance of around 600Ω at 30Mhz, so it is not capable of injecting a lot of current into the Prop. If I were to put Schottky diodes on an SMT circuit board, I'd probably choose a head to tail dual, something like a BAT54.

  • jcfjrjcfjr Posts: 74
    edited 2020-05-19 19:42
    It is coax, and I do not have the shield grounded to anything. I had it grounded, but the signal into the prop was too weak to measure. Once it goes into the hole you see, it is about 2 inches of coax to my board, then a one inch trace into the prop.

    The prop ground is common to throughout the system except for the 24v for the motors, it uses a separate ground. Ground is common to directional coupler and tuner. Coax shield acts as ground connecting antenna, tuner, coupler, transmitter.
    If I were to put Schottky diodes on an SMT circuit board, I'd probably choose a head to tail dual, something like a BAT54.

    Something like attached picture, with no additional coupling cap?
  • Tracy AllenTracy Allen Posts: 6,656
    edited 2020-05-19 21:08
    The circuit is fine, but I'd want to emphasize that Vdd to Vss needs to be bypassed with a low ESR capacitor right at the point where the diodes connect.

    It wouldn't hurt to include the additional 100pF capacitor in series with the 1kΩ resistor, just in case by some mistake the input signal happens to touch the feed line. Ouch! Don't want the Prop to connect to a 1000W xmtr!

    RG174 coax presents about 30pF per foot, and the short length you have, say 10pF. If that is connected to ground, it would act as a capacitive voltage divider referenced to Vss. Maybe that is why the signal was too weak to measure when the coax was grounded. A resistive voltage divider to the center conductor should be able to pull the signal up to near the switching threshold, with or without the shield grounded. Have to solve the circuit, the signal source to load impedance.
  • A low ESR capacitor is new to me. The only caps with a ESR rating at Digikey are electrolytic, and the smallest one is 2.2uf. This seems too high. Can you suggest a type and capacitance that I should use to bypass Vdd to Vss? Should this be a SMT also? When you say a resistive divider to the center conductor, are we back to the original design with resistors as Ariba suggested earlier in this thread? I don't know how to solve circuit signal source to load impedance. My new boards are to arrive today that are designed to the first idea of a resistor divider, so I will populate this board and do some testing.
  • Oh, the capacitor would be an X5R or X7R ceramic type, which as a class have low ESR. Maybe you have 0.1uF SMT ceramics already on your circuit board? That's it. The idea is to have one across the supply close to the where the diodes attach. The diodes will dump excess current into that capacitor, like fast in and out.

    Yes, the circuit that Ariba suggested above. Be prepared to experiment with the 12kΩ value, to tweak it for sensitivity.
    As he pointed out, the chip itself does have protection (substrate) diodes that can shunt excess voltage and current over to the power supply. Power supply bypass capacitors are critical. If you go for adding the Schottky diodes, they have a lower threshold voltage and will shunt the current away from the Prop. Security blanket. The 100pF capacitor is not necessary, but it is a good addition for safety. 100pF in series with 8.8pF is still 8.8pF.

    The 12k / 10k divider has an effective parallel impedance of 5.5kΩ (10*12/(10+12)) when it loads the signal, with a bias of 1.5V (=3.3 * 10/(10+12)). The signal comes in via the 8.8pF, the reactance of which varies with frequency, from 5050Ω at 3.5Mhz to 620Ω at 28.5MHz (1/2piFC). On that basis, more signal will pass through at the high end of your frequency range. That analysis is not the whole story though. There is also stray capacitance and inductance, and if you add in capacitance of Schottky diodes, the capacitance of those would tend to level out the response at high frequencies. And when you measure those voltages, the probes themselves likely affect the outcome.
  • Turns out that the simple voltage resistor worked just fine. I am still able to measure the frequency with only 10 watts, and max voltage at 1500watts is a little over 3v. We're good to go. Thanks for the input all, and thank you Tracy for your patience and explanations why this works.
  • Tracy AllenTracy Allen Posts: 6,656
    edited 2020-06-07 16:26
    That's great, the simple solution is best.

    I wanted to follow up on the bias that can be created by this circuit.
    posedge_FB_bias.gif
    The output can be made to oscillate in DUTY mode with exactly the right proportion of high and low to charge the capacitor junction to a voltage near the switching threshold of the input pin, just like what you get from your resistor voltage divider. Snippet:
      ctrb := DUTY + OUTPUT_PIN   ' this generates the voltage
      ctra := POSEDGE + INPUT_PIN.   ' this is used to count the input frequency, as you do with the resistor divider.
      frqb := 1822425125.    ' on my FLIP, this value value generates a voltage about 30mV above the switching threshold
    
    That value of frqb generates a voltage about 30mV above the switching threshold, sufficient to keep the counter from seeing any noise and only responding to an external input. On the other hand, choosing frqb := 1883242504 generates a voltage that is right on top of the switching threshold, so the ctra picks up huge amounts of switching noise, on the order of 20MHz. That might be a problem. However, the 10k resistor isolates the bias from the input pin. An external signal of a couple hundred millivolts can largely override the noise. The filtering capacitors could be increased in value. I was modifying an existing sigma-delta pcb.

    Overriding the noise is critical for using cog counter mode POSEDGE with feedback. I'd always wondered what might be a good use for that mode. Feedback closes the loop and automatically enforces a bias voltage that exactly right on top of the threshold. In Spin it is set up as follows. Note that only ctra is defined, and it defines both the input and the output pin. Just like for a sigma-delta ADC.
    PUB DoFeedbackBias
      dira[INPUT_PIN]~
      dira[OUTPUT_PIN]~~
      frqa := 1
      ctra := POSEDGE_FB_MODE + (OUTPUT_PIN << 9) + (INPUT_PIN)   ' posedge with feedback
    
    Even with zero external input, there are high frequency transitions on the input due to the action of the feedback plus noise. As above, an external input of sufficient amplitude and frequency can overdrive the input, so that the count reflects the input frequency rather than the noise. I got it to lock to external frequency from about 2MHz to 16MHz and amplitude 0.4V. The noise does creep into slowly changing signals. I think better considred choice of components and layout could extend the range.
    426 x 390 - 11K
Sign In or Register to comment.