• Arduino + MCP9600 + thermocouple help needed

    From Richard Smith@21:1/5 to All on Mon Mar 18 21:55:30 2024
    Hello all

    If this is of any interest to anyone, would be very glad of help.

    Sitation presented here - page on own website.

    http://www.weldsmith.co.uk/computing/embeddev/240318_mcp9600_try1st.html
    "Try 1st - Arduino + MCP9600 + thermocouple"

    So that's
    Arduino + MCP9600 thermocouple amplifier + thermocouple

    The "breakout board" can be seen here https://shop.pimoroni.com/products/mcp9600-thermocouple-amplifier-breakout?variant=21439215272019
    "MCP9600 Thermocouple Amplifier Breakout"

    Image of an Arduino https://upload.wikimedia.org/wikipedia/commons/3/38/Arduino_Uno_-_R3.jpg

    So yes, for sure, guidance would be appreciated.

    Best wishes,
    Rich Smith

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Smith@21:1/5 to All on Tue Mar 19 01:24:49 2024
    Thanks very very much for that.
    Found
    MCP960X-Data-Sheet-20005426.pdf
    and suspected it had value. Now I know "it's it" I will spend time on
    it over time.

    https://learn.sparkfun.com/tutorials/i2c/all
    might have come up on searches - tenuous maybe - but I didn't register
    at all this is a good one.

    This is all so new to me. Before yesterday morning I didn't know of
    "pull-up resistors", for example.
    I altered a circuit to test this http://www.weldsmith.co.uk/computing/embeddev/240318_button_learn_pullup.html "Arduino / embedded-devices - the learning begins"
    Didn't take a video, but the LED is indeterminately going on and off
    when the button is not being touched. etc, etc.

    Better try to get back to sleep for now.
    Thanks.
    Rich S.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Billington@21:1/5 to Richard Smith on Tue Mar 19 02:39:33 2024
    On 19/03/2024 01:24, Richard Smith wrote:
    Thanks very very much for that.
    Found
    MCP960X-Data-Sheet-20005426.pdf
    and suspected it had value. Now I know "it's it" I will spend time on
    it over time.

    https://learn.sparkfun.com/tutorials/i2c/all
    might have come up on searches - tenuous maybe - but I didn't register
    at all this is a good one.

    This is all so new to me. Before yesterday morning I didn't know of
    "pull-up resistors", for example.
    I altered a circuit to test this http://www.weldsmith.co.uk/computing/embeddev/240318_button_learn_pullup.html "Arduino / embedded-devices - the learning begins"
    Didn't take a video, but the LED is indeterminately going on and off
    when the button is not being touched. etc, etc.

    Better try to get back to sleep for now.
    Thanks.
    Rich S.

    I saw that PDF earlier but didn't feel I could add anything to help at
    the time. I recently did my first serious Arduino project doing a bit of
    motor control with a Nano and using a counter to produce a periodic 4Hz interrupt. I found some of the online tutorials vague and talking about
    counter compare and counter overflow in the same article and not clear
    about what examples were for but sorted it in the end after looking more
    into the various register set-ups. Interrupts as well from rotary
    encoder on digital 2 input. 30+ years of C coding in various
    environments meant I was aware of issues with interrupts and the need
    for certain variables to be declared 'volatile' and handled accordingly.

    Make sure your IDE is up to date as mine wasn't and I had and issue with 'digitalPinToInterrupt' not being recognised so removed that IDE and
    installed the latest and all good.

    A classic MC68000 text mentioned some problems are best solved by
    leaving them and having a beer and getting back to them the next day or something like that, it definitely works for me pondering on a conundrum.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Smith@21:1/5 to All on Tue Mar 19 10:43:22 2024
    A classic MC68000 text mentioned some problems are best solved by
    leaving them and having a beer and getting back to them the next day
    or something like that, it definitely works for me pondering on a
    conundrum.

    Yes... ... ...
    And also what these days do to you - well certainly to me. If you can
    relate to it - that was the point I was at - "you've grubbed-around,
    have seen some of the concepts and learned some of the words - now look
    up and outwards and step clear because you cannot do this to yourself".

    I had some cider and watched some abandoned mine exploring videos.
    Crazy that people do this. Must find a network and try it :-)
    One which must be very near where I live had them wading through the
    ochre stuff with reddish liquid looking like what gave the Rio Tinto its
    name - if so the extremely acidic stuff. In vast mined-out galleries
    (normally "our" lodes are narrow, nearly vertical and oriented
    SW<=>NE). Looked to be sulphide ore area (?) -> (?) there were
    "stalagtites" of what looked like the iron-y arsenopyrites we get in the copper-mining areas (?) around here.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Smith@21:1/5 to Jim Wilkins on Tue Mar 19 10:50:57 2024
    "Jim Wilkins" <muratlanne@gmail.com> writes:

    "Richard Smith" wrote in message news:m1ttl3qahq.fsf@void.com...

    "Second picture is where commented-out "pinMode(2,
    INPUT_PULLUP);". Initially LED lighting randomly when button not
    pressed. Then added in the circuit the "pull-up" resistor connected to
    on-board supply voltage and the circuit behaved like the first
    circuit."

    Unconnected inputs are sensitive antennas that pick up secret messages
    from space, or noise from fluorescent lights and radio/TV
    transmitters. Some even float to a middle level where they partly turn
    on both the input high and input low circuits, causing oscillation or
    higher power consumption. They are all best made high or low if not
    used. When you have an oscilloscope touch the probe to your finger and
    see how much electric noise you carry around.

    The traditional initiation rite into electronics is releasing the
    magic smoke. Hopefully it's one-time, like forgetting to lower your
    helmet
    https://www.ntnoa.org/LucasSmoke.htm

    I know of the demonstrable proof that electric circuits run on smoke,
    and the smoke must be retained just like a boiler holds steam.

    It is a bit of a thought that I would need an oscilloscope to proceed
    much further.
    I have seen videos of them used to diagnose even what is happening when
    you push a push-button - all sorts of noise! With the oscilloscope
    showing very clearly.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Smith@21:1/5 to All on Tue Mar 19 10:55:48 2024
    ...

    For US Type K thermocouples, red is (-) and yellow is (+). https://temp-pro.com/2023/03/27/thermocouple-types-and-color-coding/

    Extension wire is a cheaper version with a limited temperature range
    for accuracy. Knowing that got me spools of extension wire for $0.20 /
    Lb instead of $1 / foot, and I ran it from the woodstove all through
    the house to monitor the fire.

    "Compensating cable" - can only handle "room temperatures" but has same thermo-whatever response to temperature in that range and is much
    cheaper than the "real" thermocouple alloy.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Leon Fisk@21:1/5 to Jim Wilkins on Tue Mar 19 10:05:11 2024
    On Tue, 19 Mar 2024 09:12:40 -0400
    "Jim Wilkins" <muratlanne@gmail.com> wrote:

    <snip>
    As an example the specs on this look adequate for troubleshooting I2C >waveforms. >https://www.amazon.com/FNIRSI-1013D-Oscilloscope-Handheld-Bandwidth/dp/B0BB2GTM1J

    I find the test equipment available nowadays truly amazing and
    especially at that price... However my old stuff from ~30 years ago
    still works (some pots and switches could use cleaning) and I wonder
    how long these new items will last. Of course if they were to work for
    another 20 years I'll not likely be around to complain about it😉

    --
    Leon Fisk
    Grand Rapids MI

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Leon Fisk@21:1/5 to Jim Wilkins on Tue Mar 19 11:31:57 2024
    On Tue, 19 Mar 2024 10:44:31 -0400
    "Jim Wilkins" <muratlanne@gmail.com> wrote:

    <snip>
    A 5-1/2 digit Fluke 8800A bench multimeter from around 1980 that I bought >for $25 still matches a calibrated voltage standard to the last count. >Industry dumps equipment (and people) when age makes their reliability >questionable.

    I picked up (Ebay) a Fluke 8010A and a 37 a few years ago. Was
    hoping for the best but they both need work. Would really like to get
    the 37 working. It's a lot like my 87 but not quite the same spec. Has
    a bargraph display which can be handy when tuning circuits. Made to
    sit on a bench or portable. Uses a 9v battery, same as 87 series.
    Suspect the input protection, "Varistors" maybe flakey. I ordered some
    in but have been too lazy to seriously dig into it🤷 The 8010A may need
    some serious switch work/cleaning. Used to see those switches in radio equipment and they were prone for dirt/noise. Royal pain to desolder
    and probably unobtanium to replace nowadays. So need to be carefully disassembled and cleaned...

    I don't lack for projects just the drive to do it😑

    --
    Leon Fisk
    Grand Rapids MI

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Leon Fisk@21:1/5 to Jim Wilkins on Tue Mar 19 14:21:17 2024
    On Tue, 19 Mar 2024 12:37:42 -0400
    "Jim Wilkins" <muratlanne@gmail.com> wrote:

    <snip>
    I have a Fluke 8060A DMM whose self-test (REL while power-on) reports bad >switches, though sometimes it works after spray cleaning. I don't dare touch >those switches with an iron.

    Never used one of those but I saw them in other techs kits now and
    then.

    Per manual here: https://assets.fluke.com/manuals/8060a_3vimeng0200.pdf

    Those look like the same kinda switch as what is in the 8010A. I had
    very little success cleaning that style with any spray in radio
    equipment. Best bet was replacement but they were usually ganged
    together as a multi-switch block. Crap load of solder joints to try and
    get loose all to once😬

    Really tedious but you could pull the retaining clips off the inner
    plastic plunger and carefully pull them out along with the
    metal contact strips. Use an eraser on those strips and similar on the
    standing pins inside the shell they contacted with. Some silicone
    grease used sparingly on the interlock bars...

    --
    Leon Fisk
    Grand Rapids MI

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Leon Fisk@21:1/5 to Jim Wilkins on Tue Mar 19 18:02:56 2024
    On Tue, 19 Mar 2024 17:34:20 -0400
    "Jim Wilkins" <muratlanne@gmail.com> wrote:

    <snip>
    Thanks. I was taught to use an ink eraser to clean contacts. The Army tool >kits for telephone and Teletype repairmen included contact burnishers. The >school concentrated on electronics, ciphony and Modems, and slighted the >mechanical components.
    https://jonard.com/contact-burnishers-burnisher-files

    I was using "burnish" in a general sense. It's really hard to get
    anything inside those switch shells to clean up the contact area. So
    maybe a Q-tip with something on it, bit of cloth held in a hemostat...
    you have to improvise with something depending on how bad they look to
    be🤷

    I have several different erasers, they work pretty good if they can
    reach the problem area🙂

    --
    Leon Fisk
    Grand Rapids MI

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Waldby@21:1/5 to Richard Smith on Wed Mar 20 07:47:03 2024
    Richard Smith <null@void.com> wrote:
    "Jim Wilkins" <muratlanne@gmail.com> writes:
    "Richard Smith" wrote in message news:m1ttl3qahq.fsf@void.com...

    "Second picture is where commented-out "pinMode(2,
    INPUT_PULLUP);". Initially LED lighting randomly when button not
    pressed. Then added in the circuit the "pull-up" resistor connected to
    on-board supply voltage and the circuit behaved like the first
    circuit."

    The webpage pictures and your problem descriptions aren't clear enough
    or specific enough for definitive help. Explicit wiring diagrams and
    complete code listings are needed, as well as context like Arduino
    IDE version number. <https://arduino.stackexchange.com> may be of
    help if you can fully explain what you wired up and give a minimum-working-example for the problem,

    I suggest that when getting started, you first navigate to the Blink
    sketch (run Arduino, then File / Examples / Basics / Blink) and
    compile it and download it. Then, to verify you are able to make and
    install program changes, copy it to a directory of your own with a new
    name, eg Blink2, and try a few simple changes, like substituting 13 in
    place of LED_BUILTIN, or 400 in place of 1000, etc. and download
    again. If you want to try an external LED, connect it to some other
    IO pin (not D13) with eg a 2K resistor, put that IO number into your
    Blink2, test it, etc.

    Then, if you are working with a program like DigitalInputPullup,
    connect a switch between an IO pin and Gnd, say D2 and ground, per
    .png-image schematics in examples/02.Digital/DigitalInputPullup .
    When you download the program to the Uno and it starts running,
    setup() will be called, which will set up serial IO and pinModes for
    D2 and D13. The pinMode(2, INPUT_PULLUP) statement places D2 into
    input mode with a pullup resistor to V+ (say 5V). That is, if D2 is
    in the INPUT_PULLUP state, an internal resistor like 35K ohms (RPU min
    20K, max 50K per spec sheet) is connected between V+ and D2, which
    means that if you leave D2 open, D2 will sit at V+; or if you connect
    D2 to ground, after transients settle (~1us) D2 will sit at 0V, and
    some number of uA, eg 5/35000 A ~ 143 uA, will flow through the pullup resistor. You can measure that current by hooking an ammeter between
    the pin and ground if you want to calculate pullup resistance. If the current's really high or is zero the pin's not in INPUT_PULLUP mode.
    If you have an external pullup and turn on INPUT_PULLUP, the effective
    pullup resistance is the two resistors in parallel. If your external
    resistor is a pulldown (connected to Gnd instead of V+) the open-pin
    voltage [open aside from pull resistors] will be that of a resistor
    divider, instead of 0 or V+.

    Re the I2C problem with your MCP9600 breakout board - Again, wiring
    diagrams and code listings are needed for diagnosis. One comment: You
    could write an if statement to try both addresses, 0x66 and 0x67,
    mentioned in the Pimoroni page, or a loop to try the whole range
    0x60-0x67, proceeding ahead when a ready-test succeeds. Or, for
    simpler programming you could make a program with one address,
    download and test it, then change it for each possible address until successful. The I2C fails I've seen were due to wrong addresses,
    miswiring, bad chips, or in one case wires longer than a few feet.

    Unconnected inputs are sensitive antennas that pick up secret messages
    from space, or noise from fluorescent lights and radio/TV
    transmitters. Some even float to a middle level where they partly turn
    on both the input high and input low circuits, causing oscillation or
    higher power consumption. They are all best made high or low if not
    used. [...]

    Setting an open IO to low or high output like that is one approach,
    but on the Arduino Uno a simpler / less risky approach is to set
    pinMode to INPUT_PULLUP. Note, ATmega328P microcontroller chip
    hardware as on an Uno sets all IO pins to INPUT during Reset, but boot
    firmware changes the modes of some pins like D0, D1, D13 as per eg <https://forum.arduino.cc/t/behavior-of-pins-during-reset-state/640285/12>

    It is a bit of a thought that I would need an oscilloscope to
    proceed much further.

    One can do a lot with indicator LEDs attached to several outputs. You
    can connect a resistor in series with an LED between an IO pin and
    ground or 5V. Eg, a 3.5V LED with a 1.5K resistor will draw 1 mA,
    either when the pin is low if series is between 5V and pin, or when
    the pin is high if series is between Gnd and pin. ( 0.001 A =
    (5V-3.5V)/1500 ohms.) Or, because modern LEDs light up ok (visible
    but not annoyingly bright) with a few microamps, you can connect an
    LED between an IO pin and Gnd; turn it on with perhaps 43 uA, ie (5V-3.5V)/35000 ohms, when you set pinMode to INPUT_PULLUP; turn it
    off by setting pinMode to INPUT. Note, outputting debug data via the
    serial port also is easy to do with Arduino.

    If you are uncertain how much electronics work you'll do, or have to
    really economize, an item like <https://www.amazon.com/dp/B0C6XPVLPZ>
    ($37) would get you at least basic scope function, making it possible
    to see switch bounce, PWM sequences, and other low frequency stuff.
    For a hundred or two more, you can get a 50MHz 2 channel scope like
    previously mentioned, a big step up. If you're into micros for the
    long term, go ahead and get a medium cost 4 channel 100MHz or 200MHz
    scope, somewhere between $300 and $800. Scopes in that range often
    have an input to accept data from optional add-on logic analyzer
    modules, adding 8 or more 0-1 inputs, and often have builtin protocol analyzers. Eg, besides displaying an I2C waveform they show its data
    content as text on the screen.

    I have seen videos of them used to diagnose even what is happening
    when you push a push-button - all sorts of noise! With the
    oscilloscope showing very clearly.

    It's mostly switch bounce, not noise. On some switches bounce will be
    over within just a few milliseconds (ms), on others it can be dozens
    of ms. With search terms = arduino debounce, you can find code
    examples plus simple switch or switch+resistor circuits, and may also
    see pages like below with more-complex Schmitt trigger hardware
    debounce, or with low-pass filters, which in some cases are truely
    awful, amazingly bad. Following link explains bounce problem and
    shows hardware and software debouncing with detailed code notes. <https://www.circuitbasics.com/how-to-use-switch-debouncing-on-the-arduino/>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Smith@21:1/5 to All on Wed Mar 20 10:55:18 2024
    I have learned a bit of other languages.
    Problem is the one-to-many relationship, as a native English speaker.
    It was amazing learning some Turkish when working in Turkey.
    Never took any language that far.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Smith@21:1/5 to James Waldby on Wed Mar 20 16:30:43 2024
    no@no.no (James Waldby) writes:

    Richard Smith <null@void.com> wrote:
    "Jim Wilkins" <muratlanne@gmail.com> writes:
    "Richard Smith" wrote in message news:m1ttl3qahq.fsf@void.com...

    "Second picture is where commented-out "pinMode(2,
    INPUT_PULLUP);". Initially LED lighting randomly when button not
    pressed. Then added in the circuit the "pull-up" resistor connected to >>>> on-board supply voltage and the circuit behaved like the first
    circuit."

    The webpage pictures and your problem descriptions aren't clear enough
    or specific enough for definitive help. Explicit wiring diagrams and complete code listings are needed, as well as context like Arduino
    IDE version number. <https://arduino.stackexchange.com> may be of
    help if you can fully explain what you wired up and give a minimum-working-example for the problem,

    I suggest that when getting started, you first navigate to the Blink
    sketch (run Arduino, then File / Examples / Basics / Blink) and
    compile it and download it. Then, to verify you are able to make and
    install program changes, copy it to a directory of your own with a new
    name, eg Blink2, and try a few simple changes, like substituting 13 in
    place of LED_BUILTIN, or 400 in place of 1000, etc. and download
    again. If you want to try an external LED, connect it to some other
    IO pin (not D13) with eg a 2K resistor, put that IO number into your
    Blink2, test it, etc.

    Then, if you are working with a program like DigitalInputPullup,
    connect a switch between an IO pin and Gnd, say D2 and ground, per
    .png-image schematics in examples/02.Digital/DigitalInputPullup .
    When you download the program to the Uno and it starts running,
    setup() will be called, which will set up serial IO and pinModes for
    D2 and D13. The pinMode(2, INPUT_PULLUP) statement places D2 into
    input mode with a pullup resistor to V+ (say 5V). That is, if D2 is
    in the INPUT_PULLUP state, an internal resistor like 35K ohms (RPU min
    20K, max 50K per spec sheet) is connected between V+ and D2, which
    means that if you leave D2 open, D2 will sit at V+; or if you connect
    D2 to ground, after transients settle (~1us) D2 will sit at 0V, and
    some number of uA, eg 5/35000 A ~ 143 uA, will flow through the pullup resistor. You can measure that current by hooking an ammeter between
    the pin and ground if you want to calculate pullup resistance. If the current's really high or is zero the pin's not in INPUT_PULLUP mode.
    If you have an external pullup and turn on INPUT_PULLUP, the effective
    pullup resistance is the two resistors in parallel. If your external resistor is a pulldown (connected to Gnd instead of V+) the open-pin
    voltage [open aside from pull resistors] will be that of a resistor
    divider, instead of 0 or V+.

    Re the I2C problem with your MCP9600 breakout board - Again, wiring
    diagrams and code listings are needed for diagnosis. One comment: You
    could write an if statement to try both addresses, 0x66 and 0x67,
    mentioned in the Pimoroni page, or a loop to try the whole range
    0x60-0x67, proceeding ahead when a ready-test succeeds. Or, for
    simpler programming you could make a program with one address,
    download and test it, then change it for each possible address until successful. The I2C fails I've seen were due to wrong addresses,
    miswiring, bad chips, or in one case wires longer than a few feet.

    Unconnected inputs are sensitive antennas that pick up secret messages
    from space, or noise from fluorescent lights and radio/TV
    transmitters. Some even float to a middle level where they partly turn
    on both the input high and input low circuits, causing oscillation or
    higher power consumption. They are all best made high or low if not
    used. [...]

    Setting an open IO to low or high output like that is one approach,
    but on the Arduino Uno a simpler / less risky approach is to set
    pinMode to INPUT_PULLUP. Note, ATmega328P microcontroller chip
    hardware as on an Uno sets all IO pins to INPUT during Reset, but boot firmware changes the modes of some pins like D0, D1, D13 as per eg <https://forum.arduino.cc/t/behavior-of-pins-during-reset-state/640285/12>

    It is a bit of a thought that I would need an oscilloscope to
    proceed much further.

    One can do a lot with indicator LEDs attached to several outputs. You
    can connect a resistor in series with an LED between an IO pin and
    ground or 5V. Eg, a 3.5V LED with a 1.5K resistor will draw 1 mA,
    either when the pin is low if series is between 5V and pin, or when
    the pin is high if series is between Gnd and pin. ( 0.001 A =
    (5V-3.5V)/1500 ohms.) Or, because modern LEDs light up ok (visible
    but not annoyingly bright) with a few microamps, you can connect an
    LED between an IO pin and Gnd; turn it on with perhaps 43 uA, ie (5V-3.5V)/35000 ohms, when you set pinMode to INPUT_PULLUP; turn it
    off by setting pinMode to INPUT. Note, outputting debug data via the
    serial port also is easy to do with Arduino.

    If you are uncertain how much electronics work you'll do, or have to
    really economize, an item like <https://www.amazon.com/dp/B0C6XPVLPZ>
    ($37) would get you at least basic scope function, making it possible
    to see switch bounce, PWM sequences, and other low frequency stuff.
    For a hundred or two more, you can get a 50MHz 2 channel scope like previously mentioned, a big step up. If you're into micros for the
    long term, go ahead and get a medium cost 4 channel 100MHz or 200MHz
    scope, somewhere between $300 and $800. Scopes in that range often
    have an input to accept data from optional add-on logic analyzer
    modules, adding 8 or more 0-1 inputs, and often have builtin protocol analyzers. Eg, besides displaying an I2C waveform they show its data
    content as text on the screen.

    I have seen videos of them used to diagnose even what is happening
    when you push a push-button - all sorts of noise! With the
    oscilloscope showing very clearly.

    It's mostly switch bounce, not noise. On some switches bounce will be
    over within just a few milliseconds (ms), on others it can be dozens
    of ms. With search terms = arduino debounce, you can find code
    examples plus simple switch or switch+resistor circuits, and may also
    see pages like below with more-complex Schmitt trigger hardware
    debounce, or with low-pass filters, which in some cases are truely
    awful, amazingly bad. Following link explains bounce problem and
    shows hardware and software debouncing with detailed code notes. <https://www.circuitbasics.com/how-to-use-switch-debouncing-on-the-arduino/>

    Hi James, everyone

    Thanks for the ideas in your reply.

    Do thing of copying the example code then adding features.
    eg. "blink" -> flashes-out morse code with LED on "breadboard"
    At least got that far.

    Addresses hint re. Arduino I2C to breakout board great.

    Maybe accept crawl before tray to walk - do simpler code just to see if
    can get the I2C connection going - forget trying to read the
    thermocouple yet?
    Thinking of the idea of trying the addresses.

    Rich S

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Clare Snyder@21:1/5 to All on Wed Mar 20 16:54:36 2024
    On Tue, 19 Mar 2024 10:05:11 -0400, Leon Fisk <lfiskgr@gmail.invalid>
    wrote:

    On Tue, 19 Mar 2024 09:12:40 -0400
    "Jim Wilkins" <muratlanne@gmail.com> wrote:

    <snip>
    As an example the specs on this look adequate for troubleshooting I2C >>waveforms. >>https://www.amazon.com/FNIRSI-1013D-Oscilloscope-Handheld-Bandwidth/dp/B0BB2GTM1J

    I find the test equipment available nowadays truly amazing and
    especially at that price... However my old stuff from ~30 years ago
    still works (some pots and switches could use cleaning) and I wonder
    how long these new items will last. Of course if they were to work for >another 20 years I'll not likely be around to complain about it?
    I picked up a cheap portable storage scome (single chanel only) for
    that kind of work then stumpled across a primo Tektronics 465 with
    the DM44 add-on for $50. I had been scopeless for a couple decades
    since my old Heathkit blew a couple capacitors (with a big bang and
    lots of smoke)
    Picker it up to do some automotive electronic troubleshooting - and
    made a pressure pulse sensor for it as well.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Clare Snyder@21:1/5 to All on Wed Mar 20 17:12:45 2024
    On Tue, 19 Mar 2024 11:31:57 -0400, Leon Fisk <lfiskgr@gmail.invalid>
    wrote:

    On Tue, 19 Mar 2024 10:44:31 -0400
    "Jim Wilkins" <muratlanne@gmail.com> wrote:

    <snip>
    A 5-1/2 digit Fluke 8800A bench multimeter from around 1980 that I bought >>for $25 still matches a calibrated voltage standard to the last count. >>Industry dumps equipment (and people) when age makes their reliability >>questionable.

    I picked up (Ebay) a Fluke 8010A and a 37 a few years ago. Was
    hoping for the best but they both need work. Would really like to get
    the 37 working. It's a lot like my 87 but not quite the same spec. Has
    a bargraph display which can be handy when tuning circuits. Made to
    sit on a bench or portable. Uses a 9v battery, same as 87 series.
    Suspect the input protection, "Varistors" maybe flakey. I ordered some
    in but have been too lazy to seriously dig into it? The 8010A may need
    some serious switch work/cleaning. Used to see those switches in radio >equipment and they were prone for dirt/noise. Royal pain to desolder
    and probably unobtanium to replace nowadays. So need to be carefully >disassembled and cleaned...

    I don't lack for projects just the drive to do it?

    I've found Stabilant22 can make a HUGE difference in electronic
    connections that are "noisy" or intermitternt. Pricy stuff at about
    $400 an ounce but it goes a long way. 1/4 ounce mixed with 3/4 oz of
    99.9 ethanol makes an ounce of 22E for about $100 - the last ounce
    lasted me about 20 years. Just mixed 2 oz of 22E and 2 oz of 22A
    (mixed with 99% IPA) yesterday. $5 an ounce for the ethanol and $7 for
    half a liter of IPA - (and no, not the hoppy beverage libation 111)

    One drop of the stuff can make a noisy control DEAD QUIET. or an
    intermittent connection rock solid Used on test lead plugs? fantastic
    - electrically virtually identical to a good soldered joint and no
    worries about shorts between pins etc. I stumbled across the stuff
    when working on American Megatrends mother boards back when all the
    memory and most other chips were still socketted and the pin
    connections would get flaky from heat cycling. You could re-seat the
    chips once every 2 months - or use a bit of Stabilant22 and never
    touch them again for 5 years. with 3 year warrany on our machines the
    stuff was worth it's weight in platinum in eliminating over 90% of
    warranty claims

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Leon Fisk@21:1/5 to Clare Snyder on Wed Mar 20 17:16:52 2024
    On Wed, 20 Mar 2024 16:54:36 -0400
    Clare Snyder <clare@snyder.on.ca> wrote:

    <snip>
    I picked up a cheap portable storage scome (single chanel only) for
    that kind of work then stumpled across a primo Tektronics 465 with
    the DM44 add-on for $50...

    Yowza! That's a really nice looking scope👍 I can't beat that deal...

    --
    Leon Fisk
    Grand Rapids MI

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Clare Snyder@21:1/5 to All on Wed Mar 20 17:27:49 2024
    On Wed, 20 Mar 2024 10:55:18 +0000, Richard Smith <null@void.com>
    wrote:

    I have learned a bit of other languages.
    Problem is the one-to-many relationship, as a native English speaker.
    It was amazing learning some Turkish when working in Turkey.
    Never took any language that far.
    Took a bit of French in grade 9 - that's 60 years ago - and a
    conversational Spanish course back in about '76. The 2 languages are
    just close enough I managed to get out SOME "Spenchlish" for a couple
    of years - - -
    My eldest daughter (turnd 42 on Sunday) has worked predominantly in
    French for about 12 years (in charge of programs in a large part of
    French West Africa for a major NGO)
    She's made good use of her French Immersion schooling.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Clare Snyder@21:1/5 to All on Wed Mar 20 17:19:30 2024
    On Tue, 19 Mar 2024 18:02:56 -0400, Leon Fisk <lfiskgr@gmail.invalid>
    wrote:

    On Tue, 19 Mar 2024 17:34:20 -0400
    "Jim Wilkins" <muratlanne@gmail.com> wrote:

    <snip>
    Thanks. I was taught to use an ink eraser to clean contacts. The Army tool >>kits for telephone and Teletype repairmen included contact burnishers. The >>school concentrated on electronics, ciphony and Modems, and slighted the >>mechanical components. >>https://jonard.com/contact-burnishers-burnisher-files

    I was using "burnish" in a general sense. It's really hard to get
    anything inside those switch shells to clean up the contact area. So
    maybe a Q-tip with something on it, bit of cloth held in a hemostat...
    you have to improvise with something depending on how bad they look to
    be?

    I have several different erasers, they work pretty good if they can
    reach the problem area?
    There used to be a "tuner lube" for mechanical TV tuners that had a
    real fine abrassive in it - the stuff was a black paste in a
    hypordermic needle that you very carefully squirted in to the contacts
    of all the wafer switches inTV tuners to "quiet" them down. My lat
    tube hardened up and gat thrownout tears ago - I think it was from M-G Chemicals (same company that manufactures Stabilant up here north of
    Toronto) - Their NuTrol is a pretty decent volume control cleaner too.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Clare Snyder@21:1/5 to All on Wed Mar 20 17:22:17 2024
    On Wed, 20 Mar 2024 07:47:03 -0000 (UTC), no@no.no (James Waldby)
    wrote:

    Richard Smith <null@void.com> wrote:
    "Jim Wilkins" <muratlanne@gmail.com> writes:
    "Richard Smith" wrote in message news:m1ttl3qahq.fsf@void.com...

    "Second picture is where commented-out "pinMode(2,
    INPUT_PULLUP);". Initially LED lighting randomly when button not
    pressed. Then added in the circuit the "pull-up" resistor connected to >>>> on-board supply voltage and the circuit behaved like the first
    circuit."

    The webpage pictures and your problem descriptions aren't clear enough
    or specific enough for definitive help. Explicit wiring diagrams and >complete code listings are needed, as well as context like Arduino
    IDE version number. <https://arduino.stackexchange.com> may be of
    help if you can fully explain what you wired up and give a >minimum-working-example for the problem,

    I suggest that when getting started, you first navigate to the Blink
    sketch (run Arduino, then File / Examples / Basics / Blink) and
    compile it and download it. Then, to verify you are able to make and
    install program changes, copy it to a directory of your own with a new
    name, eg Blink2, and try a few simple changes, like substituting 13 in
    place of LED_BUILTIN, or 400 in place of 1000, etc. and download
    again. If you want to try an external LED, connect it to some other
    IO pin (not D13) with eg a 2K resistor, put that IO number into your
    Blink2, test it, etc.

    Then, if you are working with a program like DigitalInputPullup,
    connect a switch between an IO pin and Gnd, say D2 and ground, per
    .png-image schematics in examples/02.Digital/DigitalInputPullup .
    When you download the program to the Uno and it starts running,
    setup() will be called, which will set up serial IO and pinModes for
    D2 and D13. The pinMode(2, INPUT_PULLUP) statement places D2 into
    input mode with a pullup resistor to V+ (say 5V). That is, if D2 is
    in the INPUT_PULLUP state, an internal resistor like 35K ohms (RPU min
    20K, max 50K per spec sheet) is connected between V+ and D2, which
    means that if you leave D2 open, D2 will sit at V+; or if you connect
    D2 to ground, after transients settle (~1us) D2 will sit at 0V, and
    some number of uA, eg 5/35000 A ~ 143 uA, will flow through the pullup >resistor. You can measure that current by hooking an ammeter between
    the pin and ground if you want to calculate pullup resistance. If the >current's really high or is zero the pin's not in INPUT_PULLUP mode.
    If you have an external pullup and turn on INPUT_PULLUP, the effective
    pullup resistance is the two resistors in parallel. If your external >resistor is a pulldown (connected to Gnd instead of V+) the open-pin
    voltage [open aside from pull resistors] will be that of a resistor
    divider, instead of 0 or V+.

    Re the I2C problem with your MCP9600 breakout board - Again, wiring
    diagrams and code listings are needed for diagnosis. One comment: You
    could write an if statement to try both addresses, 0x66 and 0x67,
    mentioned in the Pimoroni page, or a loop to try the whole range
    0x60-0x67, proceeding ahead when a ready-test succeeds. Or, for
    simpler programming you could make a program with one address,
    download and test it, then change it for each possible address until >successful. The I2C fails I've seen were due to wrong addresses,
    miswiring, bad chips, or in one case wires longer than a few feet.

    Unconnected inputs are sensitive antennas that pick up secret messages
    from space, or noise from fluorescent lights and radio/TV
    transmitters. Some even float to a middle level where they partly turn
    on both the input high and input low circuits, causing oscillation or
    higher power consumption. They are all best made high or low if not
    used. [...]

    Setting an open IO to low or high output like that is one approach,
    but on the Arduino Uno a simpler / less risky approach is to set
    pinMode to INPUT_PULLUP. Note, ATmega328P microcontroller chip
    hardware as on an Uno sets all IO pins to INPUT during Reset, but boot >firmware changes the modes of some pins like D0, D1, D13 as per eg ><https://forum.arduino.cc/t/behavior-of-pins-during-reset-state/640285/12>

    It is a bit of a thought that I would need an oscilloscope to
    proceed much further.

    One can do a lot with indicator LEDs attached to several outputs. You
    can connect a resistor in series with an LED between an IO pin and
    ground or 5V. Eg, a 3.5V LED with a 1.5K resistor will draw 1 mA,
    either when the pin is low if series is between 5V and pin, or when
    the pin is high if series is between Gnd and pin. ( 0.001 A =
    (5V-3.5V)/1500 ohms.) Or, because modern LEDs light up ok (visible
    but not annoyingly bright) with a few microamps, you can connect an
    LED between an IO pin and Gnd; turn it on with perhaps 43 uA, ie >(5V-3.5V)/35000 ohms, when you set pinMode to INPUT_PULLUP; turn it
    off by setting pinMode to INPUT. Note, outputting debug data via the
    serial port also is easy to do with Arduino.

    If you are uncertain how much electronics work you'll do, or have to
    really economize, an item like <https://www.amazon.com/dp/B0C6XPVLPZ>
    ($37) would get you at least basic scope function, making it possible
    to see switch bounce, PWM sequences, and other low frequency stuff.
    For a hundred or two more, you can get a 50MHz 2 channel scope like >previously mentioned, a big step up. If you're into micros for the
    long term, go ahead and get a medium cost 4 channel 100MHz or 200MHz
    scope, somewhere between $300 and $800. Scopes in that range often
    have an input to accept data from optional add-on logic analyzer
    modules, adding 8 or more 0-1 inputs, and often have builtin protocol >analyzers. Eg, besides displaying an I2C waveform they show its data
    content as text on the screen.

    I have seen videos of them used to diagnose even what is happening
    when you push a push-button - all sorts of noise! With the
    oscilloscope showing very clearly.

    It's mostly switch bounce, not noise. On some switches bounce will be
    over within just a few milliseconds (ms), on others it can be dozens
    of ms. With search terms = arduino debounce, you can find code
    examples plus simple switch or switch+resistor circuits, and may also
    see pages like below with more-complex Schmitt trigger hardware
    debounce, or with low-pass filters, which in some cases are truely
    awful, amazingly bad. Following link explains bounce problem and
    shows hardware and software debouncing with detailed code notes. ><https://www.circuitbasics.com/how-to-use-switch-debouncing-on-the-arduino/> The arduino instructions say to tie all unused digital inputs either
    high or low and all analog inputs low to prevent ambiguous outputs.
    and don't forget de-spiking capacitors still work on
    Microprocessors!!!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Clare Snyder@21:1/5 to All on Wed Mar 20 17:47:39 2024
    On Wed, 20 Mar 2024 16:30:43 +0000, Richard Smith <null@void.com>
    wrote:

    no@no.no (James Waldby) writes:

    Richard Smith <null@void.com> wrote:
    "Jim Wilkins" <muratlanne@gmail.com> writes:
    "Richard Smith" wrote in message news:m1ttl3qahq.fsf@void.com...

    "Second picture is where commented-out "pinMode(2,
    INPUT_PULLUP);". Initially LED lighting randomly when button not
    pressed. Then added in the circuit the "pull-up" resistor connected to >>>>> on-board supply voltage and the circuit behaved like the first
    circuit."

    The webpage pictures and your problem descriptions aren't clear enough
    or specific enough for definitive help. Explicit wiring diagrams and
    complete code listings are needed, as well as context like Arduino
    IDE version number. <https://arduino.stackexchange.com> may be of
    help if you can fully explain what you wired up and give a
    minimum-working-example for the problem,

    I suggest that when getting started, you first navigate to the Blink
    sketch (run Arduino, then File / Examples / Basics / Blink) and
    compile it and download it. Then, to verify you are able to make and
    install program changes, copy it to a directory of your own with a new
    name, eg Blink2, and try a few simple changes, like substituting 13 in
    place of LED_BUILTIN, or 400 in place of 1000, etc. and download
    again. If you want to try an external LED, connect it to some other
    IO pin (not D13) with eg a 2K resistor, put that IO number into your
    Blink2, test it, etc.

    Then, if you are working with a program like DigitalInputPullup,
    connect a switch between an IO pin and Gnd, say D2 and ground, per
    .png-image schematics in examples/02.Digital/DigitalInputPullup .
    When you download the program to the Uno and it starts running,
    setup() will be called, which will set up serial IO and pinModes for
    D2 and D13. The pinMode(2, INPUT_PULLUP) statement places D2 into
    input mode with a pullup resistor to V+ (say 5V). That is, if D2 is
    in the INPUT_PULLUP state, an internal resistor like 35K ohms (RPU min
    20K, max 50K per spec sheet) is connected between V+ and D2, which
    means that if you leave D2 open, D2 will sit at V+; or if you connect
    D2 to ground, after transients settle (~1us) D2 will sit at 0V, and
    some number of uA, eg 5/35000 A ~ 143 uA, will flow through the pullup
    resistor. You can measure that current by hooking an ammeter between
    the pin and ground if you want to calculate pullup resistance. If the
    current's really high or is zero the pin's not in INPUT_PULLUP mode.
    If you have an external pullup and turn on INPUT_PULLUP, the effective
    pullup resistance is the two resistors in parallel. If your external
    resistor is a pulldown (connected to Gnd instead of V+) the open-pin
    voltage [open aside from pull resistors] will be that of a resistor
    divider, instead of 0 or V+.

    Re the I2C problem with your MCP9600 breakout board - Again, wiring
    diagrams and code listings are needed for diagnosis. One comment: You
    could write an if statement to try both addresses, 0x66 and 0x67,
    mentioned in the Pimoroni page, or a loop to try the whole range
    0x60-0x67, proceeding ahead when a ready-test succeeds. Or, for
    simpler programming you could make a program with one address,
    download and test it, then change it for each possible address until
    successful. The I2C fails I've seen were due to wrong addresses,
    miswiring, bad chips, or in one case wires longer than a few feet.

    Unconnected inputs are sensitive antennas that pick up secret messages >>>> from space, or noise from fluorescent lights and radio/TV
    transmitters. Some even float to a middle level where they partly turn >>>> on both the input high and input low circuits, causing oscillation or
    higher power consumption. They are all best made high or low if not
    used. [...]

    Setting an open IO to low or high output like that is one approach,
    but on the Arduino Uno a simpler / less risky approach is to set
    pinMode to INPUT_PULLUP. Note, ATmega328P microcontroller chip
    hardware as on an Uno sets all IO pins to INPUT during Reset, but boot
    firmware changes the modes of some pins like D0, D1, D13 as per eg
    <https://forum.arduino.cc/t/behavior-of-pins-during-reset-state/640285/12> >>
    It is a bit of a thought that I would need an oscilloscope to
    proceed much further.

    One can do a lot with indicator LEDs attached to several outputs. You
    can connect a resistor in series with an LED between an IO pin and
    ground or 5V. Eg, a 3.5V LED with a 1.5K resistor will draw 1 mA,
    either when the pin is low if series is between 5V and pin, or when
    the pin is high if series is between Gnd and pin. ( 0.001 A =
    (5V-3.5V)/1500 ohms.) Or, because modern LEDs light up ok (visible
    but not annoyingly bright) with a few microamps, you can connect an
    LED between an IO pin and Gnd; turn it on with perhaps 43 uA, ie
    (5V-3.5V)/35000 ohms, when you set pinMode to INPUT_PULLUP; turn it
    off by setting pinMode to INPUT. Note, outputting debug data via the
    serial port also is easy to do with Arduino.

    If you are uncertain how much electronics work you'll do, or have to
    really economize, an item like <https://www.amazon.com/dp/B0C6XPVLPZ>
    ($37) would get you at least basic scope function, making it possible
    to see switch bounce, PWM sequences, and other low frequency stuff.
    For a hundred or two more, you can get a 50MHz 2 channel scope like
    previously mentioned, a big step up. If you're into micros for the
    long term, go ahead and get a medium cost 4 channel 100MHz or 200MHz
    scope, somewhere between $300 and $800. Scopes in that range often
    have an input to accept data from optional add-on logic analyzer
    modules, adding 8 or more 0-1 inputs, and often have builtin protocol
    analyzers. Eg, besides displaying an I2C waveform they show its data
    content as text on the screen.

    I have seen videos of them used to diagnose even what is happening
    when you push a push-button - all sorts of noise! With the
    oscilloscope showing very clearly.

    It's mostly switch bounce, not noise. On some switches bounce will be
    over within just a few milliseconds (ms), on others it can be dozens
    of ms. With search terms = arduino debounce, you can find code
    examples plus simple switch or switch+resistor circuits, and may also
    see pages like below with more-complex Schmitt trigger hardware
    debounce, or with low-pass filters, which in some cases are truely
    awful, amazingly bad. Following link explains bounce problem and
    shows hardware and software debouncing with detailed code notes.
    <https://www.circuitbasics.com/how-to-use-switch-debouncing-on-the-arduino/>

    Hi James, everyone

    Thanks for the ideas in your reply.

    Do thing of copying the example code then adding features.
    eg. "blink" -> flashes-out morse code with LED on "breadboard"
    At least got that far.

    Addresses hint re. Arduino I2C to breakout board great.

    Maybe accept crawl before tray to walk - do simpler code just to see if
    can get the I2C connection going - forget trying to read the
    thermocouple yet?
    Thinking of the idea of trying the addresses.

    Rich S
    The most I ever accomplished was a remote elevator trim for homebuilt (experimental) aircraft using a large scale Radio control servo driven
    by the arwuino with 2 push buttons for "UP" and "DOWN" and one for
    "reset to neutral" - with a small micro-servo slaved as the trim
    indicator on the panel. Then I had fuel guages using pressure
    transfucers plumbed into the bottom of the tank that calculated the
    volume by the fuel column weight and converted togallons in the tank
    using a table ofvolume per inch of depth (irregular tank shape)

    I just started out with some sample "sketches" and built from there.
    After getting a sketch working to do one part of the job, I'd set it
    asife and work on another function - then link the sketches together -
    calling them as sub-routines as required.

    each project took several weeks of spare time

    There was enough capacity for one Arduino to handle both tasks, but I
    wasn't smart enough to combine the 2 programs and I felt safer with
    the 2 functions on separate controllers in case of a failure - where I
    would only lose one function at a time - - -
    Sold the plane before I got a chance to fly it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Clare Snyder@21:1/5 to All on Wed Mar 20 22:42:20 2024
    On Wed, 20 Mar 2024 17:16:52 -0400, Leon Fisk <lfiskgr@gmail.invalid>
    wrote:

    On Wed, 20 Mar 2024 16:54:36 -0400
    Clare Snyder <clare@snyder.on.ca> wrote:

    <snip>
    I picked up a cheap portable storage scome (single chanel only) for
    that kind of work then stumpled across a primo Tektronics 465 with
    the DM44 add-on for $50...

    Yowza! That's a really nice looking scope? I can't beat that deal...

    It was something of an estate sale. The old guy had been an engineer
    with Square D Canada and Allen Bradley (Rockwell Automation) and
    continued doing some repair work at home after retirement and had
    ammassed a PILE of "stuff" the family had to dispose of after his
    death. I cot boxed of compinents, 8X10X2 inches for $2 Canafian each -
    the scope, a decade resistir sub box, a 10 amp CanLab Powerstat in a
    nice cabinet, Also a brand new foot swith unit with a heavcy magnetic
    contactor - all in nice cabinetry and a brand new Sencore SCR tester
    (but without the required Sencore Megger to use it woith - know anyone
    who needs it?) I think the total was $75 or $80. There was still a
    truck-load in the garage when I left - but I had no room for any more
    - wife's always at me to get rid of "stuff"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Waldby@21:1/5 to Jim Wilkins on Thu Mar 21 05:23:40 2024
    Jim Wilkins <muratlanne@gmail.com> wrote:
    "James Waldby" wrote in message news:ute49n$1ci6f$1@dont-email.me...
    [big snip]
    --------------------------
    Thanks, I'm glad someone whose Arduino experience is less archaic than mine has jumped in. I think in hardware terms, voltage and current, and should have clarified that INPUT_PULLUP is sufficient to make the pin high.

    The $23 one-channel DSO211 oscilloscope I have doesn't seem available and wouldn't capture both I2C signals so I didn't suggest it. I bought it for signals whose return can't be grounded.

    Yes, it's a good feature of battery-powered small cheap scopes that
    they allow ungrounded operation. As you note, some of them can't
    capture I2C, which I didn't think about WRT the cheap scope I linked.
    It does 250 KHz, not good enough for `Fast Mode` I2C at 400 KHz, let
    alone the 3.4 MHz and 5 MHz versions of I2C.

    IIRC the Arduino needed a separate terminal to talk to the user, the IDE didn't provide that function. Does it now?

    I think a decade ago there were some issues with Serial.printf, and
    some serial-over-USB drivers had bugs that hung around a while, but
    for a good while the same USB link used to program an Arduino Uno or
    Nano has been working fine for serial IO to a window that's part of
    the IDE. However, on Linux at least, a not-IDE Python or C program
    can't share a serial link with the IDE; one or the other has to
    relinquish it.

    Note, the IDE now has an easy-to-use Serial Plotter tool. If a sketch
    outputs some numbers on each line of serial output and you open a
    Serial Plotter window, data will be plotted as it arrives, like on a multi-channel scope.

    The simplest switch debouncer I've seen and used is a spare buffer
    or noninverting gate(s) with a feedback resistor from output to
    input that makes it retain its logic level until the switch on its
    input yanks it to the other one. The switch needs to be double
    throw, connected to both power and ground, the resistor limits gate
    output current. In the days of hardwired logic there were almost
    always spare gates available.

    At the time, gates were cheaper than lines of code, vs the other way
    around now. But if an application has lots of switches, software
    debounce may be to much of a challenge for some programmers. So there
    are libraries, eg Bounce2, that can be used to take care of software
    debounce with a not-too-bad learning curve.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Waldby@21:1/5 to Clare Snyder on Thu Mar 21 06:25:07 2024
    Clare Snyder <clare@snyder.on.ca> wrote:
    On Wed, 20 Mar 2024 07:47:03 -0000 (UTC), (James Waldby) wrote:
    Richard Smith <null@void.com> wrote:
    "Jim Wilkins" <muratlanne@gmail.com> writes:
    "Richard Smith" wrote in message news:m1ttl3qahq.fsf@void.com...
    "Second picture is where commented-out "pinMode(2,
    INPUT_PULLUP);". Initially LED lighting randomly when button not
    pressed. Then added in the circuit the "pull-up" resistor connected to >>>>> on-board supply voltage and the circuit behaved like the first
    circuit."
    [snip]
    Unconnected inputs are sensitive antennas that pick up secret messages >>>> from space, or noise from fluorescent lights and radio/TV
    transmitters. Some even float to a middle level where they partly turn >>>> on both the input high and input low circuits, causing oscillation or
    higher power consumption. They are all best made high or low if not
    used. [...]

    Setting an open IO to low or high output like that is one approach,
    but on the Arduino Uno a simpler / less risky approach is to set
    pinMode to INPUT_PULLUP. Note, ATmega328P microcontroller chip
    hardware as on an Uno sets all IO pins to INPUT during Reset, but boot >>firmware changes the modes of some pins like D0, D1, D13 as per eg >><https://forum.arduino.cc/t/behavior-of-pins-during-reset-state/640285/12> [snip]

    The arduino instructions say to tie all unused digital inputs either
    high or low and all analog inputs low to prevent ambiguous outputs.

    That's probably ok advice in general, particularly for an Arduino Uno
    being used for numerous projects. But setting the modes of unused
    inputs to INPUT_PULLUP seems safer, because then they won't be at risk
    of Gnd-to-V+ shorts due to program glitches. That aside, I should do
    some measurements to see which is best among the various INPUT /
    OUTPUT / INPUT_PULLUP modes, with input left open / connected to Gnd / connected to V+. Note, some Arduino inputs don't have internal
    pullups available. For example, A6 and A7 on Arduinos with ATmega -P
    and -PA processors, and most IO pins on ESP8266-based micros.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Smith@21:1/5 to Jim Wilkins on Fri Mar 22 08:04:07 2024
    "Jim Wilkins" <muratlanne@gmail.com> writes:

    To Richard: The IDE is the computer host program that communicates
    with the Arduino. Input pullups are generally harmless except on
    analog inputs making measurements.

    ...

    Lot to learn...
    Mercifully with the current price of devices, can get on with
    applications and learn by trial-and-error.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Leon Fisk@21:1/5 to Jim Wilkins on Fri Mar 22 08:21:08 2024
    On Thu, 21 Mar 2024 17:55:39 -0400
    "Jim Wilkins" <muratlanne@gmail.com> wrote:

    <snip>
    I use Amazon as an aggregator of similar items, for an overview of what's >available with user reviews, not necessarily as the seller I buy from.

    I do this with almost everything new[1] I buy nowadays. Helps to
    determine a fair price and most importantly if a product has some
    serious defects and best to avoid...

    [1] A product new to me, that I haven't bought before or investigated.

    --
    Leon Fisk
    Grand Rapids MI

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)