I have made a simple temp sensing circuit that lights an LED when it reaches a certain point. It works perfectly when powered by a USB plugged in to the laptop but when I connect it to a 5V supply with a mini-USB connection nothing happens.

Is this correct and do I need to send power directly to the board on the 5V pin?

Many thanks, Jack

  • You can use the computer or a 5V USB charger to power the Arduino via the USB connector. If it does not work, then something else is the problem. What kind of 5V supply is that ? Is there something weird with it ? Is it from a well known brand or a cheap unreliable power supply. Try another USB 5V charger, it should work. – Jot Sep 19 '17 at 18:22
  • Is that with a TMP36 ? And the 5V as reference ? That will never be accurate. The temperature could be 10 degrees wrong. Do you have a multimeter to measure the 5V ? – Jot Sep 19 '17 at 18:45
  • And how exactly are you connecting that mini-USB to your circuit? – gre_gor Sep 19 '17 at 19:53
  • 1
    @Mike the sensor outputs a voltage. That has to be measured (as if using a multimeter to measure the voltage). The Arduino used default the 5V as voltage reference. If the 5V changes, so will the resulating calculated temperature change. When the Arduino is powered via the USB cable, the 5V could change a lot. In such situations, I always use the internal analog reference of the Arduino, which is reasonably accurate. Even better is to avoid all this analog reference hassle and use a DS18B20 with a digital interface. – Jot Sep 23 '17 at 15:46
  • 1
    I'm voting to close this question because it was an hardware problem (bad USB adaptador), not an Arduino problem. – user31481 Nov 22 '17 at 10:01

Thanks all. I found a different power source with a mini-usb connector and it works fine. I think when plugging it in to the PC the Nano makes some faint clicking noises but when direct to 5v plug it does not? I'm not sure so I'll re-test. It was the lack of clicking that lead me to believe it wasn't working as I can't see the on board LEDs using my enclosure.

I don't know about the accuracy but it seems to work for my situation - it is to be placed in a fridge that recently turned itself in to a freezer but has since fixed itself. This project is an early warning system in case it decides to do it again.

Thanks again. Jack

  • 4
    Accept your own answer making click in the "approve" symbol to close this question. – user31481 Sep 23 '17 at 8:54
  • "I think when plugging it in to the PC the Nano makes some faint clicking noises but when direct to 5v plug it does not?" ... more probably, the PC makes this noise when recognising the Nano's USB<->Serial converter chip as additional USB device. – gone Sep 23 '17 at 9:32
  • I found that the noise may be from the little piezo speaker that I added in series with the USB. If it is this then it is gently chirps whilst the red LED on the Nano is flashing when connecting it to the USB. The red LED only flashes once and no sound from the piezo when connecting to an AC 5v adaptor. – Jack Sep 24 '17 at 22:53
  • This sounds like the 5v PSU didn't have enough amps to run the Nano and the few attachments. The USB power doesn't generally have many amps, so that PSU mush have been dead/a dud or seriously under powered. – computercarguy Oct 18 '18 at 18:23

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.