0

I've built the following circuit on my MKR Zero enter image description here

I've also uploaded, compiled and deployed the code from the associated article (https://www.arduino.cc/en/Tutorial/AnalogToMidi) with no errors.

Note: I won't reproduce all the code here because you can see code listing at the previous link.

The main part of the loop never gets hit:

void loop() {
  float frequency = meter.getFrequency();

  if (frequency > 0)
  {
...

The frequency is never > 0 so the main body of code never gets hit.

What I've Tried

  1. I put in a few extra Serial.println() calls and I know the loop code is in fact running but as I've said frequency never seems to be > 0.
  2. I also measured current in the circuit just to see if current is flowing. (I only have a multimeter (no oscilliscope).
  3. I measured voltage at a couple of places and read about 1.6V over each of the 47K resistors (about 3V across both).
  4. I measured current on op amp out 1 and it varied between .44mA and .55mA as I turned the 10K pot.

I'm just wondering if there is anything that seems obviously wrong about the circuit or if there are some additional suggestions about what I might check to determine where the failure is.

Arduino.cc Circuits Are Sometimes Wrong

I know that at times these Arduino.cc provided circuits are incorrect and was wondering if something here is obviously wrong.

I don't know much about the lm358 and it seems curious to me that they have input on Input1 and output to A0 on Out2.

Additional Tests?

Also are there some additional tests (via multimeter) I could do to determine where the circuit may be failing? Any suggestions?

  • 4
    I don't know much about the lm358 and it seems curious to me that they have input on Input1 and output to A0 on Out2. -- indeed. It certainly looks like they have the output at the wrong place. It should be on Out1 along with the feedback connection. Whoever drew that circuit is a prized plum. There is only one site I trust less that Arduino.cc for circuits: instructables. – Majenko Oct 12 '18 at 12:54
  • @Majenko Thanks so much for the quick answer, you should write it up as an answer so I can upvote. I really thought that might be the problem and was very confused by it. I should've tried last night but didn't get a chance. I will try switching the output to the Out1 tonight and testing it. Thanks so much. – raddevus Oct 12 '18 at 12:56
  • 1
    I will when you have confirmed that it's the only problem with that circuit... – Majenko Oct 12 '18 at 12:57
  • Interesting. I just looked more closely at the breadboard circuit and noticed that the breadboard does not match the schematic. Doh!! That's arduino.cc for you. The breadboard does indeed have the Out1 going to A0. I didn't look at it before because building circuits from breadboard pictures is a pain. :| I will still report back after testing the actual circuit. – raddevus Oct 12 '18 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.