Arduino Power to the sensors

Hello everyone, I am a beginner in Arduino. I am using an Arduino nano, ultrasonic sensor, and Hc-05 module. My concern is that the Arduino is being powered by two 3.7 V batteries connected in series. So, the net total is 7.4V. I gave the connection to the Arduino via a VIN. My concern is that the Arduino is functioning properly but the sensors are not due to lack of voltage via 5V pin. please help me out. Thank you

It should be o.k. with 7.4V on Vin. What voltage are you measuring on the 5V pin? Are the batteries fully charged?

If you post the code you are using and a schematic showing how everything is connected it will be easier to help.

Steve

chakreesh_minnal: Hello everyone, I am a beginner in Arduino. I am using an Arduino nano, ultrasonic sensor, and Hc-05 module. My concern is that the Arduino is being powered by two 3.7 V batteries connected in series. So, the net total is 7.4V. I gave the connection to the Arduino via a VIN. My concern is that the Arduino is functioning properly but the sensors are not due to lack of voltage via 5V pin. please help me out. Thank you

You have tested with the Arduino Nano only and write that that works properly. Why not tell us the results when you add the ultrasonic sensor to the Nano. Did that test ok?

Did you check the 7.4 volts on Vin while running the above test? Did the volts stay at 7.4?

What are the Vin volts when you run the whole system with the ultrasonic sensor and the Hc-05?

You have to debug the problem one step at a time. The truth is, the 5 volts from the Nano is very unlikely to be able to supply enough current to run the Hc-05. So what do you have that can supply the 5 to 6 volts necessary for the Hc-05?

Paul

Thanks a lot! The problem was with the Arduino nano. the regulator was not functioning on the board. I simply swapped in a new board and it functioned pretty well.

Chakreesh

I am new to Arduino. I made a sanitizer dispencer using Arduino nano and ultrasound sensor. By learning some basics i even made a programing done. But i have an issue that what would happen if one keeps hand there even after one doze of liquid.....the doses keep coming as long as hand is obstructing sensor.

That will waste the liquid. As my kids are also very naughty.

Pls. Please help me out, how can i include the code or instruction so that in one cycle only 1 or max. 2 doze of disinfectant comes & one has to move away the hand to start next doze.

Hi , it would be useful to post your existing code , so people can suggest an approach .

Generally I would look at using time delays - so if the sensor is triggered it runs for a specific time then stops and ignores the ultrasonic sensor for a time period . “delay” should work well in this circumstance. ( google “Arduino delay”)

Eg: in loop : detect with ultrasonic sensor, dispenser “On”, delay , dispenser “off”, delay .