EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: ChrisGreece52 on September 29, 2020, 08:19:25 pm

Title: Measuring Distance and Relaying information between microcontrollers
Post by: ChrisGreece52 on September 29, 2020, 08:19:25 pm
Hello everyone, a friend of mine is building a bunch of small robots with ATTINY84's MCUs on board. The robots are battery-powered using a 3V coin cell battery.

The design utilized green LEDs and LDRs in order to get the distance between the robots and my friend was planning to add IR diodes and receivers in order to relay information between the robots.

The main problem with this technique was the usable range and the fact that the LDRs were not reliable because they picked up every visible wavelength.

So I suggested skipping the visible light LEDs and relay information between the robots using only IR LEDs and IR Photodiodes.

That would help reduce the number of components as well as make the distance signal more reliable.

I designed the attached schematic but when she tried building it on a breadboard she said it would not work.

So before ditching this solution once and for all I would like to get your feedback on my circuit as well as alternative solutions for this issue.

The budget we have to work with is 10 USD for communication between the MCUs and distance sensing.

Other solutions I have thought of but do not cover all basis are:
433MHz transceivers for communication but that solution would not be adequate to measure the small distances between the robots.
Ultrasonic sensor for distance: that would provide accurate distance measurement but cannot be used for communications.
I even thought of using something like this HB100 Doppler radar to get distance but same as the previous example we would not be able to relay any messages.

So basically i need a solution that is cheap and uses the least amount of parts.

Thank you in advance.
Title: Re: Measuring Distance and Relaying information between microcontrollers
Post by: Doctorandus_P on September 29, 2020, 09:54:50 pm
Ultrasonics can be used for communications also.
It's just the same as with IR. Measure pulse widths and timing between pulses.

In the '70ies and '80ies there were some televisions with ultrasonic remote controls. IR probably "won" because it was the cheapest.

Another problem was that the remote control stopped working if the TV was too loud. But that was with electronics from those day's.

You may also want to look into "time of flight" sensors. These emit a pulse of (IR) light, and measure the time before reflected light is received I seem to rember a part number with "VS" and "53" or similar.

Another possibility could be that each robot has a blinking LED on the top, and you have a supervisor with a webcam hanging on the ceiling looking down, which records all positions, and communicates them back to individual robots.
Title: Re: Measuring Distance and Relaying information between microcontrollers
Post by: JustMeHere on September 29, 2020, 09:59:18 pm
I know some of those sumo fighting robots use IR, because one counter tactic is for the other robot to flash random pulses to confuse the first one.


https://www.youtube.com/watch?v=vMngI_ue5qg (https://www.youtube.com/watch?v=vMngI_ue5qg)

Title: Re: Measuring Distance and Relaying information between microcontrollers
Post by: ChrisGreece52 on September 29, 2020, 11:11:49 pm
I had no idea that PIR sensors could be used that way.... ill suggest creating a radar-like system by attaching 2 of these on top of a small stepper (like a micro stepper) and use it as a kind of radar.

It won't just rotate due to the wiring but it could work if it were to rotate counterclockwise and then clockwise basically a full rotation.

Ill search about the time of flight sensors as well in order to get a better view of other solutions.

The issue with using IR leds though would be the distance limitation. From experiments she conducted the maximum working distance of the LEDSs was around 10cm.

The overhead camera while feasible is not something that could work in this scenario. Although I have not given up hope on the IR LEDs just yet.