I connected an Arduino Uno, a BlueTooth board, an ultrasound board and 4 relays on a breadboard. All worked at once, I was so impressed by Arduino. I was feeding the system through computer USB. Arduino 5V was output to the breadboard.
I then made a copy of the wiring and boards and hope to run it off the computer. I have connected a 5V transformer to all boards. Now the Arduino 5V pin is an input pin. It was output in the first attempt.
The Arduino flashes diodes, I don't remember if it is the same as in the first version. The ultrasound card is flashing and I believe it is making measurements. The relays clicked when I applied voltage which seems normal to me.
But the Bluetooth board does not show up. I can not pair it. I exchanged it for the BT card in the first wiring that was already paired but that card will not connect either.
I had expected to find 5V between Vcc and ground on the BT card. But I only find varying between 2 and 1.4 V.
The signal to BT-board goes through a voltage divider (5 -> 3.3 V) but not the Vcc.
This is the first time I connect an Arduino outside USB so I wonder if there is something I should check och some major thing I have misunderstood? Or should I just go through the wiring again. I really think I did that but obviously something fails.
Don't connect external 5V supply at 5V-point of UNO R3. Connect 7V - 12V DC supply at Vin-pin of UNO3 or through the barrel jack (Fig-1). Connect the BT with UNOR3 similar to Fig-2.
I intend to put this in my bike where 12 V is available.
How do you advice me to connect it?
Should I connect 12V bike battery to Arduino barrel port? But then voltage regulator will heat up?
The 12V to 5 V step down regulator I plan to use seem useless to me since I need 7 V. These are cheap. Should I instead buy a 12V to 9V step down and feed 9V into barrel port or Vin pin?
If I do this, can I then use Arduino 5V for output to the other boards or must I use the 5V step down regulator too for the other boards.
When "all worked", the relays were not connected and the other cards connected to Arduino 5V pin and Arduino fed from computer USB. I believe the board is called a "4 channel Songle optocoupler relay, 5V"
How do I best connect
Arduino Uno r3
HC 06
Ultrasound card. JSN SR 04 T
Songle relays
The onboard 5V regulator of UNO R3 are designed to handle upto 12V input. So, there is no need to worry about it. You connect 12V of your bike into the barrel jack using the following connector.
Please, follow standard practices to make your BT working. 1. Remove all connections from UNO R3. 2. Power up UNO R3 from PC using USB Cable. 3. Connect BT with UNO R3 as per Fig-2 of post #2. 4. Uplaod a simple sketch into UNO R3. 4. Pair BT with your Android phone. 5. Check that data exchnage takes place between Arduino UNO R3 and Phone via BT. 6. Remove USB cable and connect 12V supply at the barrel jack. Check that BT is working.
I switched the Bluetooth cards between the functioning installation and the copy. Both BT cards work in the original installation but not in the new.
I don't have the red diode lit in the functioning installation.
Can the Arduino board be broken?
I ran a test program. I am sorry the link to my dropbox comes up blank. I can see it if I paste it into my browser. The video shows what the test program does. Two quick flashes of L and RX diodes while a red beside 13 is constantly lit.
void setup() {
Serial.begin(9600);
for (int i = 2; i <= 13; i++) {
pinMode(i, OUTPUT);
}
}
void loop() {
// Test Serial Monitor
Serial.println("Testing Pins 2-13...");
// Cycle through pins
for (int i = 2; i <= 13; i++) {
digitalWrite(i, HIGH);
delay(100);
digitalWrite(i, LOW);
}
Serial.println("Cycle complete.");
delay(500);
}
DuPont connectors are an endless source of poor connections and intermittent problems - in particular in environments subject to vibration etc
as far as possible attempt to find a development module with as much of the system requirements onboard as possible, e.g. in your application maybe worth looking at a ESP32 4-Channel Relay Module with has an ESP32 microcontroller with onboard WiFi, Bluetooth Classic and BLE, DC5-30V power input, etc etc
DuPont wiring is often used for prototyping which when complete is implemented in a custom PCB
Running the test program flashes red diodes on the board of the malfunctioning installation and yellow on the new.
I may have ruined the board when I put shrink tube around it. These larger shrink tubes demand more heat and I may have held the air gun too long. I already then found out that just taping them shut is an alternative.
I haven't wired up the installation yet but I hope I found the error.
I also see that the components of the two boards are different. I assume it makes no difference. I haven't explored the boards further.
The problem was that a copy of the working breadboard installation did not connect to Bluetooth.
After switching components I finally had to switch the Arduino board itself. And the error followed the Arduino. When I ran test program on the working board alone a green diod lit. But a red lit on the non working.
I could have used the hot air gun too long to shrink tube around the Arduino in the copied installation and thereby I cooked it.
Now that I start switching components around I realize there are more things to learn. There were loose connections in the breadboard connectors. The identically looking JSN SR 04T in the copied installation gives the program an unexpected reaction etc. But I think it will be better to start separate threads about other problems.
The circuits of the Arduino Uno that communicated with the Bluetooth card had broken. Exchanging the board cured the problem. I thought it was due to excessive use of the heat gun for shrink tube.
There is another possibility. I was using a transformer to power the entire installation. But I had connected it to the Arduino 5V pin. I supported this on what e.g. Google says.
The 5V pin can be used as an output to power components, but it should not be used as an input unless it is a tightly regulated 5V.
I used a small transformer input from the grid and carefully turned it up to 5V.
But from what I now have learnt here it is not advisable to input via the 5V pin. So I will not do that the next time I run off the computer USB.
So I must feed the Arduino and the 3 other boards (those three are 5V).
Is it a good idea to use a 7805 voltage regulator I already have?
I use my 12V transformer for the Arduino barrel jack/Vin pin and separately connect the three other 5V boards to the transformer via the 7805.
I may then need capacitors? Are these critical? I will have to order and wait for them.
You can connect 12V the the Uno barrel jack and use the Arduino 5V output pin to power the Bluetoth module and Ultrasonic sensor but you will need a separate 5V supply for the relay board. A 12V to 5V buck converter would be a good idea.
If you had bought the 12V relay board, you would be all ready to go.
Thanks, I will connect it that way.
There is one more signal. A button on the handlebar sends 12V signal that must be converted to 5V separately and read by an Arduino pin over a pull down resistor.
Which is the best way to convert to 5V? A 7805 and capacitors or another buck converter. Or just a voltage divider?
Just on the bike. I have to rewire it all now that I can't use 5V for the Arduino.
It is separate from the feed was what I wanted to say. Two separate conversions to 5V must be made.
One to feed the relays, I'll use the buck converter.
And one for this 12V to 5V Arduino pin. What can I use here?