Live data from Hacker News

Rust on RTL8710 running FreeRTOS

polyfractal.com

21–30 of 47 posts

Re: Rust on RTL8710 running FreeRTOS

#22

What is an example use for this chip on its own? Can it be made to run on low enough power to run on a battery?

Most people use these little things for sensor/data loggers (weather stations, power monitoring, indoor temperature, etc) or little widgets that need connectivity and can be tethered to a power outlet (small display showing the weather outside, etc)

The specs say it has 0.9 mA light sleep, and a 10 uA deep sleep. Assuming the specs are correct (I haven't test it yet... not sure anyone else has either) you could definitely run it off a battery if you aren't waking it up too often.

The real problem with the RTL8710 (and ESP8266, and any other chip that uses WiFi) is that WiFi is very energy intensive. It takes a lot of juice to blast out a 2.4Ghz signal.

I don't know what the numbers are for the RTL8710, but the ESP8266 uses 50-170mA when receiving/transmitting data, which will drain a battery very quickly. (Source: http://bbs.espressif.com/viewtopic.php?t=133)

Re: Rust on RTL8710 running FreeRTOS

#23

Soldering tip: tack a pin down on opposing corners of the chip before attacking the rest.

Ah, yeah, I can see how that would have helped tremendously. Thanks for the tip! :)

I cringed when I saw this at the top of HN because I knew the shame that is my soldering skill would be seen by a few hundred people :)

Re: Rust on RTL8710 running FreeRTOS

#24

Soldering tip: tack a pin down on opposing corners of the chip before attacking the rest.

Ah, yeah, I can see how that would have helped tremendously. Thanks for the tip! :) I cringed when I saw this at the top of HN because I knew the shame that is my soldering skill would be seen by a few hundred people :)

Been there done that myself. My early works are masterpieces of kapton-tape strain relief because the joints were so bad.

Re: Rust on RTL8710 running FreeRTOS

#25

What is an example use for this chip on its own? Can it be made to run on low enough power to run on a battery?

Most people use these little things for sensor/data loggers (weather stations, power monitoring, indoor temperature, etc) or little widgets that need connectivity and can be tethered to a power outlet (small display showing the weather outside, etc) The specs say it has 0.9 mA light sleep, and a 10 uA deep sleep. Assuming the specs are correct (I haven't test it yet... not sure anyone else has either) you could defin…

thank you. I suppose the critical factor is, how long and how often does it have to wake up, and more importantly, how many milliseconds of wifi power is needed to transmit whatever data was gathered.

Re: Rust on RTL8710 running FreeRTOS

#26

What is an example use for this chip on its own? Can it be made to run on low enough power to run on a battery?

Most people use these little things for sensor/data loggers (weather stations, power monitoring, indoor temperature, etc) or little widgets that need connectivity and can be tethered to a power outlet (small display showing the weather outside, etc) The specs say it has 0.9 mA light sleep, and a 10 uA deep sleep. Assuming the specs are correct (I haven't test it yet... not sure anyone else has either) you could defin…

Pretty much all WiFi transceivers are indeed power-intensive, but it is actually receiving that often takes more juice.

ESP8266 consumes ~70mA with both CPU and WiFi running but idle, and 15mA with CPU idling and WiFi powered down [1]. That's 55mA or (@3.3v) ~180mW for _idle_ (i.e. receiving) WiFi circuitry. Again - that's WiFi only, with exactly zero RF power transmitted.

Now transmit. EU restricts amount of RF power radiated by a WiFi station/AP to 100mW. In US and few other places you can go slightly higher, but then other challenges arise, so for practical purpose most WiFi chipsets top out at 100 mW (a.k.a. 20dBm). Assuming RF power amplifier has efficiency of 32% [2], transmit duty cycle of 50% (that's transmitting half of the time and receiving for another half - pretty intense traffic here), we get:

(100/32%)*50% = just 156mW consumed towards "blasting out" some RF.

Clearly, receiving WiFi takes more. And there is a good reason for that. Most modern designs implement Rx as: Low-noise amplifier with some bandpass filtering -> Zero-IF mixer -> quadrature ADC -> DSP. It's the latter that does FFT, I/Q constellation tracking, demodulation, forward error correction, etc. essentially in software. And that takes a lot of power.

[1] http://bbs.espressif.com/viewtopic.php?t=133

[2] http://ww1.microchip.com/downloads/en/DeviceDoc/75003C.pdf

Re: Rust on RTL8710 running FreeRTOS

#27
post #26

Earlier quoted context omitted.

Most people use these little things for sensor/data loggers (weather stations, power monitoring, indoor temperature, etc) or little widgets that need connectivity and can be tethered to a power outlet (small display showing the weather outside, etc) The specs say it has 0.9 mA light sleep, and a 10 uA deep sleep. Assuming the specs are correct (I haven't test it yet... not sure anyone else has either) you could defin…

Pretty much all WiFi transceivers are indeed power-intensive, but it is actually receiving that often takes more juice. ESP8266 consumes ~70mA with both CPU and WiFi running but idle, and 15mA with CPU idling and WiFi powered down [1]. That's 55mA or (@3.3v) ~180mW for _idle_ (i.e. receiving) WiFi circuitry. Again - that's WiFi only, with exactly zero RF power transmitted. Now transmit. EU restricts amount of RF powe…

Ah, neat. Thanks for the analysis! I always assumed it was the transmit that ate the power, simply because you need `x` amount of energy to broadcast the signal out. But I can absolutely see how it's the circuitry associated with getting a signal back into digital that could be costly instead

TIL :)

Re: Rust on RTL8710 running FreeRTOS

#29

It's going to be really great as Rust spreads further and further into the embedded world. I know enough C to get by, but I'm always second guessing myself when things start to get complicated, and Rust has really made lowish-level programming a lot easier for me. The safety features in addition to exposing a C ABI make it a great language for build once, run everywhere (everywhere that LLVM supports, anyway). Exciti…

Unfortunately, there's little chance for Rust to make inroads into the embedded market, tho I wish it were otherwise. C++ has had many benefits over C for embedded s/w for many years and has similarly failed. Note that contrary to popular belief, C++ does not result in larger, more inefficient s/w than C (for the correct C++ subset). The momentum behind the C ecosystem is so overwhelming that Rust simply will not get…

> The momentum behind the C ecosystem is so overwhelming that Rust simply will not get a foothold anytime soon.

You could also say this for C on Unix in 1990. Or x86 assembly for PCs in 1985. In 1990, the idea that, 25 years later, we would be deploying network services written in JavaScript was unthinkable.

Change takes time, and C won't die, ever—but history shows that change eventually does happen.

Re: Rust on RTL8710 running FreeRTOS

#30
post #17

Earlier quoted context omitted.

Unfortunately, there's little chance for Rust to make inroads into the embedded market, tho I wish it were otherwise. C++ has had many benefits over C for embedded s/w for many years and has similarly failed. Note that contrary to popular belief, C++ does not result in larger, more inefficient s/w than C (for the correct C++ subset). The momentum behind the C ecosystem is so overwhelming that Rust simply will not get…

My company uses a C++ subset (no STL, no malloc) on all of our embedded projects, which are mostly on ARM Cortex-M4. I'd love to learn and start using Rust in our work, but we are client-project-driven, so it will be hard to justify the investment and productivity drop. I think it would make it easier to attract top talent, though things are weird in the embedded world.

I'm a C++ enthusiast interested in embedded programming but I have very little experience. What is the rationale for your company's avoidance of the STL, is it primarily binary size?
Post reply on HN