LoRa/UWB Cat Collar

LoRa Cat Collar

Overview:

I'd like to make a tube collar for a cat with an Arduino Nano and LoRa module, and a handheld seeking device with an Arduino Nano and two LoRa modules. Radio pings determine the distance and direction to the cat, providing auditory feedback (piezo buzzer) to guide the user. Please offer feedback on the component selection. I'm handy with software, less familiar with hardware.

Components:

Target Device (Cat Collar):

  • Arduino Nano V3
  • RA-01 SX1278 LoRa Module
  • 7.4V 250mAh 2S LiPo Battery
  • TP4056 Charging Module
  • 50mm 433MHz Small Pepper Antenna
  • 12MM x 8.5MM Passive Buzzer
  • Waterproof Fabric and Elastic Mesh for the collar
  • Miscellaneous: I'm unsure what I'll need to physically connect everything, but I've looked at 22-24 AWG stranded hook-up wire, JST connectors, Dupont connectors, crimp connectors, heat shrink tubing

Seeking Device:

  • Arduino Nano V3
  • RA-01 SX1278 LoRa Module (2 pieces)
  • 7.4V 250mAh 2S LiPo Battery (planning to carry an extra for extended use)
  • TP4056 Charging Module
  • 50mm 433MHz Small Pepper Antenna
  • 12MM x 8.5MM Passive Buzzer
  • Plastic carrying case with LoRa modules placed at opposite ends
  • Miscellaneous: same as above

Functional Description:

  1. Target Device: Periodically sends a ping signal using the LoRa module.
  2. Seeking Device: Equipped with two LoRa modules to receive pings, measure the time difference of arrival (TDOA), and calculate the distance and direction to the target.
  3. Auditory Feedback: Emits sounds with periodicity based on distance and frequency based on angle. The user turns until hearing the pitch indicating alignment, then moves toward the target. The beeping frequency increases as the user gets closer.
  • Collar: Components secured inside waterproof elastic mesh tube collar
  • Power Management: Using TP4056 charging modules to safely charge the LiPo batteries.

I'm looking forward to hearing your thoughts and suggestions. Thanks in advance for your help!

Really, any evidence or examples that it would work ?

RSSI is close to unuseable for measuring distance.

You might make TDOA might work if the two receivers were extremly accuratly time synced and a very long distance apart a few hundread metres maybe.

1 Like

I don't mind if it turns out the angle detection doesn't work, it will still be a usable device, and it will be helpful for determining what prevents it from working. The principle mechanism of TDOA is well known and reliable. Whether the selected hardware components have sufficient timing and sampling rate, I don't know.

Ideally, this would be an analog computing task, like the seeking of the Sidewinder missile as one example. But that is a more advanced project for later.

What I am more concerned about is whether the components are compatible and how I can connect them.

Even if the constraints you suggest turn out to be true, and such distance is required, then two drones with LoRa can implement the approach, without any specialized hardware. That would be an acceptable variation, but first, I'd like to make sure the simple approach fails.

Bad choice for battery powered circuits. Powering a 5V device with 7.4V means that 33% of battery energy wasted as heat if on-board or external linear regulator is used. DC-DC "buck" converters are more efficient but are bulky. Also, Nano has a USB-serial chip which wastes energy and is not required in general use, only for programming/debugging.

Consider a 3.3V Arduino Pro Mini or Pro Micro. These can run from a 1S Li-Po because they have low-drop-out (LDO) linear regulators which will only waste about 10% of the energy, similar efficiency to a buck converter.

These are 3.3V devices. The 3.3V output of a Nano may not be sufficient because a Nano does not have a dedicated on-board 3.3V regulator. The 3.3V output comes from the USB-serial chip. Regulating 5V down to 3.3V with a linear regulator will waste 34% of the energy as heat, on top of the 33% wasted energy regulating 7.4V down to 5V.

Powering the LoRa from the 3.3V output of a 3.3V Arduino wastes no additional energy.

As already mentioned, inefficient for use with 5V devices. Consider a 1S 3.7V regulator with a 3.3V Arduino.

Can only charge 1S 3.7V Li-Po, to my knowledge. Unnecessary additional bulk for the cat to wear. Li-Po batteries normally contain over-discharge protection circuits, and not all TP4056 modules have over-discharge protection.

1 Like

If it does not run from cr2030 it won't be liked by your cat.

1 Like

As suggested signal strength\RSSI is next to useless for 'calculating' distance.

So if the angle detection also does not work, think whats left ?

You can locate transmitters in open areas with simple FM transmitters and receivers. You can use body fade\blocking to find the direction of a transmitter. These are techniques that have been used for many years by radio amateurs, do a Google search on 'radio fox hunting'

Big leap.

From a simple local device to a couple of acuratly time syncronised and position oriented airborne drones.

But why the project in the first place, they must be heaps of low cost pet trackerts out there ?

Thank you for explaining some of these concepts to me!

If you don't mind, and have the time, I have some follow up questions.

Let's suppose I purchased parts like you suggested, the 3.3V Arduino Pro Mini / Micro, 1S 3.7V Li-Po battery, 3.3V RA-01 SX1278 LoRa.

What connective components do you suggest for getting started? It looks like I'll need to connect the battery to the Pro Micro's RAW pin, and the VCC pin can power the RA-01 on pin 3? And to connect the module to the MCU, looks like the MISO/MOSI pins need to correspond between both. I've been reading the following resources:

https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/hardware-overview-pro-micro

https://microcontrollerslab.com/sx1278-lora-rf-module-pinout-arduino-interfacing-datasheet/

Hopefully I'm understanding the pinout diagrams correctly. One thing I'm initially concerned about is that I would like to connect two LoRa modules to one MCU. This would be an ideal way to synchronize them on one clock. Maybe I need to find an MCU with more SPI pins?

I don't know why you're trying to discuss RSSI here, is anyone interested in it?

The distance detection will work, the angle detection could work.

Thank you for suggesting to read about radio fox hunting, here is an excerpt from the Wikipedia page that you may like, suggesting TDOA:

I don't see why this is a leap to you. But you can think how you like.

I'd like to learn about hardware and the tracker I bought is useless. Thank you for your concern about my interest in a simple piece of hardware.

Isn’t this a good application for UWB?

I recommend the Adafruit Feather MCU/radio modules, as they are self contained. Flexible wire connections will not last long on a moving subject.

Battery life will be poor (a few hours), either with your proposed configuration or with the Feathers, unless you make careful use of sleep modes.

Based on a quick google search, seems you might be right. I could try both LoRa and UWB and compare the results.

Do a quick weigh of the bits and hang them around your cats neck and see what he thinks . You might find you need a bigger cat .
Have a look at the commercial gps based devices *or gps used on drones etc . I’d go that route .
If you don’t want to follow him , just save to SD and upload when he comes home.

  • beware that many GPS trackers aren’t !
1 Like

Yes, and I see there are also self contained MCU/UWB varieties. It would be good fun to try MCU/LoRa and MCU/UWB, to compare results. A few hours would be great to get started.

I guess it is actually as simple as buying the self contained MCU+module and powering it with an appropriate battery, at least for distance finding. I would really like MCU+module+module, where the modules are on opposite ends of the device, but on one clock.

So please explain to us how the 'distance detection' with LoRa would work.

I would rather you explain it. It will be a good exercise for you.

You should build prototypes first. Many changes and iterations will be inevitable as you learn and experiment. Obviously these won't be suitable for feline deployment!

Solderless Breadboards are a popular way to build prototypes. Get larger ones or serveral smaller ones that can be connected for flexibility.

One problem here is that solderless breadboards only accept components with 0.1" pin spacing, so you will need an adapter for many types of LoRa modules like RFM95.

If @srnet doesn't take up the gauntlet, I'd love to hear your explanation how the 'distance detection' with LoRa would work.

1 Like

Well, distance is pretty straight forward, no? If you can ping a device that pings you back, you can time how long it takes to get a reply. Then you can calculate the distance traveled. Assuming simple point-to-point propagation and synchronized clocks, you can timestamp when you send a ping and when you receive a reply, and calculate the distance based on the constant speed of radio waves.

Synchronization is interesting to think about, and is relevant for longer distances and less trivial propagation methods. There are environmental effects that can affect propagation such as reflection, refraction, polarization, diffraction, absorption. There are also sky waves and ground waves, and other even more sophisticated schemes.

Seems to me synchronization can be trivially solved using a radio clock, or traditional clock synchronization algorithms, or more sophisticated statistical methods found in wireless communication protocols.

Another caveat is that the devices are roughly stationary. The error is fundamentally bound by the maximum velocities of both target and seeker, parametrized in principle by how much farther apart the target and seeker can be within one round-trip-time.

Seems to me a proper solution will account for the doppler effect.

Your concept on how networks work is wrong.

You left the refrigerator running.