This concerns powering an Uno project board. The project is a PIR-activated audio file. When motion is detected, such as a person entering the room, the device plays a audible message. A link to the original project demo is copied below. The project works for me. I am making an enclosure for it. The problem I have run into is how to do the power supply. The Uno board has a barrel plug. The problem is that when the Uno board is plugged-in to a power adapter by the barrel plug, the sketch does not repeat (loop), unless the board is re-set by pressing the re-set button on the board. I notice that when the Uno board is powered by plugging it into the power adapter by the serial connector, the program repeats (loops) without re-setting the board. The serial plug takes an older version of the Uno with a USB-1 "Thunderbolt" serial connector. I can make the power connection through the USB port to finish the project. My question is why the program does not repeat when it is powered through the barrel plug?
Thanks. Also, I am interested in comments about the project not pertaining to the power issue. Please direct message me about anything not directly concerned (off-topic) with the power supply question. Project source: youtube.com/watch?v=c_oYsKU8RxE&t=320s&pp=2AHAApACAQ%3D%3D
In the IDE click on Edit and then on Copy for Forum and paste your code here.
Sorry I do not follow you tube links.
To ensure we can provide the most accurate assistance, please include detailed information about your setup. Specify the exact board, shield, wiring configuration, and power sources you are using. An annotated schematic is ideal, as it provides a clear overview of your setup, but be sure to also include links to the technical specifications of your hardware components.
Before posting your code, please review the forum guidelines and use code tags for better readability. Also, provide links to the technical information about your hardware, and include a preliminary schematic that shows all power, ground, and connections. For additional guidance, you can refer to this link: Useful Links and Tutorials. Note that in this context, breadboard diagrams are not considered proper schematics.
When connected to the serial port with USB a reset in done on the board as part of the serial connection.
Which voltage do you apply to the barrel?
Be aware that the power on the barrel (or Vin) goes through a voltage regulator with limited current capacity due to lack of a heatsink. The higher the input voltage, the less current you can pull from the 5V (and 3.3V) pin.
Thanks for your considerate reply. It may not be obvious how your answer is correct -but it worked. You wouldn't know it unless you read the script for the project, but code calls for serial print -which can't happen if the serial port is dead (because power is through the barrel plug port (DUH)). I apologize for failing to post all documents for the project. I feared it would make a cluttered and confusing post. If you read the script (GitHub download link on the developer's YouTube page), it includes the following lines:
void AudioPlay() {
tmrpcm.speakerPin = 9;
Serial.begin(9600);
if (!SD.begin(SD_ChipSelectPin)) {
Serial.println("SD fail");
return;
Sorry if that code is not formatted nicely. I'm writing on my 'phone. This scripting is where the program stops - until the board is reset. Now I know why. Many thanks, old curmudgeon.
An Uno will happily spit out data over the UART / USB if nothing is connected. It just falls out at the end of the USB
No arduino or espressif board that I know of uses Thunderbolt or USB-4. The old UNO uses a USB-B plug.
Thanks! I guessed by searching USB plugs, and picked the one that looked like my plug. I may need your information again.
Before you come back please read this