Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 11:54 25 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite VGA

     Page 2 of 2    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5714
Posted: 07:45am 28 Sep 2022
Copy link to clipboard 
Print this post

Ah - it may have internal forward-biased diodes to VCC and you are seeing leakage. You'd be better using a simple BS170, 2N7000 or similar MOSFET on each output, driving the gate directly from the pin, then switching them on & off. You'll get a good open drain output then, at the expense of a bit of board space.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3654
Posted: 07:59am 28 Sep 2022
Copy link to clipboard 
Print this post

  OA47 said  What I was trying to achieve is an auto ranging resistor network to measure DC voltages on the Analog IN pin. I have used this circuit on the ARMites and MicroMites.




OA47

Should R4 be connected to the input (like the other resistors)?

John
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1781
Posted: 08:04am 28 Sep 2022
Copy link to clipboard 
Print this post

Try another pin, perhaps that one has become faulty during testing.

Here is what I get.

> setpin 20,dout     <---2.4mV
> pin(20)=1          <---3.3v
> setpin 20,din      <---315mV of random noise.
>

Edit.
Are you certain the diode is cathode to +?
Edited 2022-09-28 18:09 by phil99
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 899
Posted: 08:21am 28 Sep 2022
Copy link to clipboard 
Print this post

  Quote  Should R4 be connected to the input (like the other resistors)?


Sorry John I had left off the junction spot.

OA47
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 899
Posted: 08:32am 28 Sep 2022
Copy link to clipboard 
Print this post

  Quote  Try another pin, perhaps that one has become faulty during testing.


Was using pins 5,6 & 7 for the switching so tested with pin 20 (not used previously)
SetPin 20 dout.........0V
Pin(20)=1 .............3V3
Pin(20)=0 .............0V
SetPin 20 din .........0.5V

All measured to Analog GND

No circuitry attached to Pin 20

Similar results to Phil99
  Quote  Are you certain the diode is cathode to +?


I am using a schottky diode and the anode is definitely to 3V3.

OA47
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5714
Posted: 08:39am 28 Sep 2022
Copy link to clipboard 
Print this post

A DIN pin should be high impedance unless you've used the PULLUP or PULLDOWN option when using SETPIN. Anything else would point to external miswiring (or a damaged pin).
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 899
Posted: 09:02am 28 Sep 2022
Copy link to clipboard 
Print this post

Humble pie for supper  

The protection diode is no longer a protection diode but more of a resistor. Will chase round the workshop and see if I can find another.

OA47
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3510
Posted: 09:39am 28 Sep 2022
Copy link to clipboard 
Print this post

Don't forget: all DOUT pins must be DIN before you can measure how high impedance one single pin is....
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5714
Posted: 09:55am 28 Sep 2022
Copy link to clipboard 
Print this post

Perhaps you need something a bit meatier than a OA47. ;)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 899
Posted: 10:17am 28 Sep 2022
Copy link to clipboard 
Print this post

Point taken. The original diode was a glass encapsulation.

OA47
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5714
Posted: 10:27am 28 Sep 2022
Copy link to clipboard 
Print this post

Don't let that fool you nowadays. The 1N4148 / 1N914 is a brilliant diode, hence its popularity. :)  I do like the old glass diodes though, having got through a few in my time. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1781
Posted: 11:39am 28 Sep 2022
Copy link to clipboard 
Print this post

Volhout said:
" For this diode to work, it should be a shottky diode. And these tend to have high leakage (1uA). "

Could that leakage be the problem?
Temporarily remove it, leave the input open circuit then measure the voltage on the pin in all conditions.
If that is it then some other protection measure will be needed.

Edit
Ignore that I missed the post where you found the problem.
Edited 2022-09-28 21:57 by phil99
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1781
Posted: 10:47pm 28 Sep 2022
Copy link to clipboard 
Print this post

Assuming this input attenuator is for a scope, frequency compensation will be needed to get the best out of it.
Since the Pico input has capacitance you need a capacitive divider that matches the resistive one.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3654
Posted: 07:14am 29 Sep 2022
Copy link to clipboard 
Print this post

Roughly what value capacitor?

John
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5898
Posted: 07:26am 29 Sep 2022
Copy link to clipboard 
Print this post

  JohnS said  Roughly what value capacitor?

John

To answer that, you have to know the input capacitance of the device the probe is connected to.

Jim
VK7JH
MMedit   MMBasic Help
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3510
Posted: 07:32am 29 Sep 2022
Copy link to clipboard 
Print this post

I am not sure OA47 is going to build an oscilloscope, so the capacitor may not be needed.

About the capacitor: If you want to measure 50/60Hz or DC it is not needed.
The capacitor is needed to balance against the input capacitance of the pico ADC, and the impedance of the circuit board. The balance (ratio) should be identical to the ratio of the resistor divider.

Since the resistor divider is switching, you will have to switch the capacitance also.
What they do in oscilloscopes is that they add capacitors everwhere. Practical values in your case would be (look at the schematics OA47 provides).

If C1 = 15pF, and the input capacitance of the pico and board layout is 7pF (estimate)

Capacitor parallel to R1 is 22pF (1M R1/1M R2 attenuator)
Capacitor parallel to R3 is 200pF (2x100pF) (1M R1/100k R3 attenuator)
Capacitor parallel to R4 is 2200pF (1M R1/10k R4 attenuator)

But again, for DC and 50Hz this is not needed.
PicomiteVGA PETSCII ROBOTS
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 899
Posted: 03:51am 30 Sep 2022
Copy link to clipboard 
Print this post

  Quote  I am not sure OA47 is going to build an oscilloscope, so the capacitor may not be needed.


Here is a screen shot of the project. Not a desktop DVM but a shelftop DVM, one I can monitor from many meters away.





OA47
Edited 2022-09-30 15:35 by OA47
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3510
Posted: 05:56am 30 Sep 2022
Copy link to clipboard 
Print this post

Nice project! A monitoring system.
And yes, readable from a distance...
PicomiteVGA PETSCII ROBOTS
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 899
Posted: 06:03am 30 Sep 2022
Copy link to clipboard 
Print this post

The use of an old LCD TV makes things easy as it can supply the pico from USB, has VGA input and audio input all readily accessible and the system can be powered down via IR remote.

Here is a pic of the prototype pcb so far.

 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024