Wireless bluetooth distance sensor questions

hey there, i’m working on a project to change processing visuals based off of distance. so far i’ve got things working using the hc sr04 ultrasonic distance sensor connected to the arduino uno, hooked up to my computer through the USB A/B cable, sending distance over serial to processing to change contrast/sound.

the next thing i need to tackle is how to do this without the arduino connected to my computer.

i was thinking about using a power bank (just a mobile charger) as the power supply and using an hc 06 as the bluetooth module to send the distance to my computer wirelessly.

does this sound like a feasible solution? i drew up an example diagram:

these are the components i’m using:

  • arduino uno
  • hc sr04 ultrasonic distance sensor
  • hc 06 bluetooth module
  • this power bank

i’m really new to this, so any help is greatly appreciated!!!

It is entirely feasible, but probably not as you have wired it. Check the back of your Bluetooth board. They usually work off 5v, and Uno doesn’t have the power at 3.3v anyway.
Also, it is good practice to provide a 1k/2k divider Arduino Tx pin.

No change in code is required, but note that, if you do make changes, disconnect Bluetooth before you upload.!!

I connect my Bluetooth modules through a software serial port. That saves the hardware serial port for program upload, program output and debugging.

thank you for the schematic!! would i need to use a breadboard so i can connect multiple things to the 5v pin? since i also need to connect the hc sr04 there.

Unos have at least one extra 5v pin, so you can prove it up without a breadboard. Breadboards are not a bad solution for temporary work, but not that great. Just be aware of their limitations.

i don’t think my uno has another 5v pin, it does have the vin pin but that is a bad solution for output because it’s supposed to be input…do you think a prototype expansion shield (mini breadboard) would work? thank you for all the help!!

You can use the 5V from the IOREF pin or the 5V pin on either of the 2 the ICSP connectors. So there are actually 3 more places to get 5V for low current applications.

I believe you are alluding to a little square breadbooard stuck onto a blank proto shield. I don’t think there are any connections between the breadboard and the Arduino headers, so you might as well just buy the breadboard - two for a dollar. You will always be better off with a properly soldered proto shield. If you cannot solder, now might be a good time to start. If you are disinclined, just be aware that breadboards are not that reliable.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.