Current consumption CubeCell HTCC AB-01

Hello, I am developing a project to remotely control the movement of a motor (left or right) using LoRaWAN protocol. I have a CubeCell HTCC AB-01 module and a UG87 gateway. I already have the code ready in Arduino IDE using the LoRaWan_downlinkdatahandle example as a base, I just have to implement it. By sending a downlink message from TTN I can control the movement of the motor, I already did the tests with LEDs and it works perfectly. I have thought about using a battery to power the CubeCell HTCC AB-01 module, the integrated H-bridge and the motor. Taking into account that I am going to use an H bridge L293D, the motor can be powered from 9-24 VDC and its maximum power is 2 W, and according to the specifications the CubeCell module consumes 10 mA (LoRa Rx Mode), 70 mA ( LoRa 10dBm output), 90 mA (LoRa 14dBm output), 100 mA (LoRa 17dBm output), 105 mA (LoRa 20dBm output) I have the following questions:

  • How should I measure the current of the module?
  • How to know in which mode the module is working (LoRa dBm output)?
  • What battery do you recommend for feeding the circuit?
  • How should I perform the consumption calculations to find the duration or independence of the battery?

Any information you can offer me will be very helpful. Thank you.

This sound like (almost) real-time control for which LoRaWAN class A (which the TTN community network implements) is not suited. The community network also limits you to max 10 downlinks a day, is that sufficient for you use case?

1 Like

A decent multimeter will tell you - but you’ve quoted most of the figures and the product page has more detail.

You set it using an AT command, so you know what output it is using because you’ve set it.

Impossible to say without knowing what the duty cycle of the motor is.

This will be a sequence of duration * current for each element, added together:

(motor on time x motor current) + (module transmit time x module transmit current) + (module receive time x module receive current)

Once you know that, you can match a battery that has sufficient life span for your needs.

But as Jac says, you need to be sure that being able to send up to 10 messages a day needs to be considered. And what should happen if the device doesn’t receive a message - what happens then?

Hi, thank you for you answer.

To be honest, I have tested the project and I have sent more than 20 daily downlink messages in TTN and I have not had any problems. Also, I don’t need to send many downlink messages to a single device, for my project I need to send one downlink message per day to the device. Does the restriction apply if I have more devices connected to TTN? What would happen if I connect more than 1000 CubeCell HTCC AB-01 devices to the same TTN application?

Again, thanks for your help.

Hi, thank you for you answer.

What more details do I need to know?

Where exactly can I find that information? Reviewing the app’s TTN data console I get the following information:

{
   "time": "2020-07-28T13: 56: 36.820326197Z",
   "frequency": 905.3,
   "modulation": "LORA",
   "data_rate": "SF7BW125",
   "coding_rate": "4/5",
   "gateways": [
     {
       "gtw_id": "eui-24e124fffef0a153",
       timestamp: 146691044,
       "time": "",
       "channel": 7,
       "rssi": -71,
       "snr": 10.8,
       "rf_chain": 1,
       "latitude": 2.9330997,
       "longitude": -75.287636,
       "location_source": "registry"
     }
   ]
}

How can I interpret it?

The code implements it in such a way that the motor turns to the right or to the left only 5 seconds.

As I replied to Jack: I have tested the project and I have felt more than 20 daily downlink messages in TTN and I have not had any problems. Also, I don’t need to send many downlink messages to a single device, for my project I need to send one downlink message per day to the device. What would happen if I connect more than 1000 CubeCell HTCC AB-01 devices to the same TTN application?

Again, thanks for your help.

That depends on how accurate you want the calculations to be - maybe there are other power uses you should take in to account that may be included in the product detail.

Not on TTN that’s for sure! You want to know what power level the device is transmitting at and I said that YOU decide that using an AT command - the same commands you used to setup the device …

Duty cycle is on period + off period + frequency. So we now know it is on for 5 seconds. How long is it off for? How often does it come on for?

Do you tell traffic cops you were only doing 100% over the speed limit too?? :wink:

You would need to think very very very carefully about what information you want back from your devices, as a gateway can’t hear transmissions when it is itself transmitting. And as nice as it is, I’m not sure I’d want to be using TTN to manage 1000 devices, something customised to your use case. And I’d seriously look in to just using LoRa so you can setup broadcast commands to a group of devices rather than sending 1000 downlinks each time you need to run a motor.

What is this motor connected to and do you need any sensor information uploading?

1 Like

Or: do you also drive too fast when nobody is checking on you…?

Indeed. And this also affects other users. And if a gateway is transmitting, it needs to adhere to any local duty cycle regulations. So, if many downlinks are scheduled at almost the same time, you may run into no gateway being available.

OK, I understand. But as I mentioned earlier, you only need to send a maximum daily downlink message to the device.

Regarding the motor duty cycle, it turns right or left only 5 seconds, and the rest of the time would be incative, I only need the motor to turn only when instructed to do so. As I mentioned, I would rotate 1 time per day, maximum. The time in which the idle motor lasts I cannot define at the moment. In fact, the project is focused on replacing the motor with a motorized valve of the same characteristics, to control the filling of a tank.

It was an example to register more than 1000 devices to a TTN application, I wanted to know what would happen considering that with my family we have a country lot where we need to fill a certain amount of tanks and filling those tanks would be from time to time , without definite time. Also if the project works for me, I could offer the same solution to our neighbors, as long as they buy the equipment themselves (cubecell module, valve, bridge and battery), the gateway I do not think is necessary since I buy one (Gateway UG87 ). Obviously I would not send downlink messages to all devices at the same time, I am not even interested that when sending the downlink message the motor (or valve) is activated immediately (real time), it is enough if it is activated 1 hour later, or two hours after or 5 hours later, if it is activated the same day that I send the downlink message there is no problem.

If you think TTN could not help me with this, what other network could you use for this project?

Regarding AT commands, I did not configure the device using AT commands, I simply loaded the Arduino IDE code to the device based on the LoRaWan_downlinkdatahandle example. I did not enter any AT command on the Arduino serial port, everything is supposed to be defined in the code. What AT commands could I use to configure it? o What part of the code should I modify or add to it?

Hello, I already explained everything related to this topic when I answered Nick McCloud. :grinning:

Hello, regarding this. I need the CubeCell HTCC AB-01 module to send me messages every 6 hours where it includes: a code that I defined for it (such as the device code: 12345678), the battery voltage and the state of the valve (1 valve open, 0 valve closed).
For this reason I am using LoRaWAN Class A, since I do not need to send and receive messages in real time. You would need to manage multiple devices.

When I receive a message in TTN, in the device’s data console, I can see that a latitude and longitude data appears. Does that data show the exact location of the device? In other words, if the module is moved, will that data change?

First you should throw away the horrible L293D and get an FET based driver.

Do pay careful attention to the quiescent current of the driver you select, which is what it will draw when your MCU commands it disabled in between need.

Then you need to find a very low quiescent current regulator to power your MCU and LoRa radio from your battery.

In terms of the power consumption of the LoRa radio and MCU, what matters is not really so much what they draw while transmitting or receiving, but what they draw doing the 99.9% of the time when they should be are doing neither.

You need to make sure you are getting the MCU into a true low power suspend mode at least between polling uplinks (and ideally also in the interval between uplink and downlink windows).

You need to make sure that the MCU is correctly configuring everything else to a minimum power mode.

You need to make sure that you have no signals asserted against pulling resistors.

You need to make sure that you have no signals feeding to powered-off components, ie where the signal voltage is outside of the range of the recipients power supply pins.

Measurement is ideally done with something that can log over time. You can buy devices for this, or you can get something like an Arduino INA219 shield, modify it with a larger sense resistor and add some capacitors to stabilize, then write yourself an arduino sketch which totals and averages both vs overall time, and for the brief excursions above baseline involved in transmitting and receiving.

To accurately measure the very low current during full suspend with an ordinary meter, you may need to do something like put a clip lead across your meter while it is set to the most sensitive microamp scale, wait until the processor has entered a minutes-longs period of suspension and then remove the clip lead to get a reading. Chances are if the processor wakes up, the impedance of a the meter on such a scale will cause a brownout.

You also need to make sure during measurements that there is nothing connected to the target system which could donate or steal tiny amounts of power - although it is out of spec, ultra low power parts can in fact by powered through I/O pins like a serial UART, up until they try to do something power hungry like transmit or receive.

What reference would you recommend to replace it?

I wouldn’t, especially if you are going to spread this amongst your neighbours, with that sort of number of nodes replicated over a confined geographical area, I’d use my own protocol. Or setup my own Network/Application server. But as I’d want to use broadcast messages and have enough control to send a sync time so that devices can listen for commands to a schedule, I’d definitely go my own LoRa way.

You really need to read the documentation for the CubeCell so you can find the AT command I’m referring to - along with your request to specify a FET driver you seem to be hoping we are going to refine your design - which is the hard part of this sort of project. Do you want to rely on something only other people understand?

This is why you need to read the documentation - that will be the gateway location. If you want to track a devices location you either need a high end gateway or put a GPS on the device.

I would not fully trust, but those who know the subject would make recommendations based on their experience, which I would take as options that I would take into account when developing the project. It is about the dissemination of knowledge, explaining or providing sufficient study tools or material to people who do not know so that they can understand. Thanks for your help and willingness.

I agree, but we are volunteers here so we rather hope people will go away and do some research & learning rather than asking us for definitive answers. Which was why I was encouraging you to look at the Heltec docs. You can research motor drivers. And you can review the TTN documentation for what the console is showing you.

Yes, I know I have a lot to read. I respectfully tell you, it is somewhat annoying that you are constantly reminding me of that. For this reason I go to these forums, to look for a guide, study material and the documentation I need to be able to develop my project.

Thank you very much for taking the time to answer my questions. :grinning:

I will, thank you very much.