-->
Page 1 of 1

Confusion about Throughput Numbers

PostPosted: Sat Aug 01, 2015 1:45 pm
by tooz
Hello everyone.

I'm trying to build a (soft) real-time application that has mild throughput requirements. It's going to be a little while until I receive my first ESP8266-12 in the mail for testing, so I was hoping I could see if I could figure out ahead-of-time if the ESP8266 fits my needs.

My plan was to fill use the ADC pin to sample a signal at 8000kHz (at the very least) and save it all into a buffer. Then the ESP8266 would send the data in the buffer once it's full. So, for example, the device would take 8000 samples in 1 second (all of them should fit in memory), send all the data in the buffer out, and then start sampling again. If we assume the samples take 32 bits, then can the ESP8266-12 achieve wifi TX throughput of 256kbps (or 32KB/s)? Moreover, I'd really like to program everything through the Arduino, if possible.

Obviously, if I can achieve this with TCP, then I'd be more than happy. This thread makes it look like it's very easily achievable (you may need to scroll down to see the netio results). This thread also suggests that it should easily be possible (although it seems to only report the most optimistic measurements). However, [url=http://zonerobotics.com/wordpress/?p=456]this page[/ur] suggests it's no where even near possible. So then which throughput numbers should I use?

I'd probably be fine using UDP or raw sockets (both offered by the most recent sdk), if that could give me the wifi throughput I need. I haven't found any numbers regarding these (except for the very poor UDP performance above). Any help would be greatly appreciated! If I could do this project on a $5-7 low(er)-energy microcontroller with a cheap little analog sensor, I'd be beyond happy. Other popular MCUs like the RN-171 or CC3000 of course give much better performance (and possibly even power consumption), but cost $25+.

Re: Confusion about Throughput Numbers

PostPosted: Sat Aug 01, 2015 3:19 pm
by pvvx
TCP = over 1 MegaBytes per second (half-duplex, Web server).
ADC sample (default PLL, quartz 26MHz) max ~21kHz

Sample UDP wave 1...20000Hz 14 bits
UDP_wave.gif

1kHz clipped sine:
1kHz_sq.gif

Sample traffic TCP (Web HTTP):
1.1Mbps.gif

https://github.com/pvvx/esp8266web

Re: Confusion about Throughput Numbers

PostPosted: Sat Aug 01, 2015 9:29 pm
by tooz
Wow, I can't believe you got 1.12MB/s over TCP! The ADC sampling rate is more than enough for me, too. Sounds like the ESP8266 fits the bill perfectly for me then.

And thanks for the project link. I'll look through the repo and see if I can try to set everything up similarly to get comparable throughput results (if just naively using Arduino platform or SDK doesn't work).

Re: Confusion about Throughput Numbers

PostPosted: Sun Aug 02, 2015 12:09 am
by ridge
@pvvx , esp8266web is a very impressive project for the esp8266.

The esp8266web software can handle HTTP-Web services to more than 10 simultaneous open connections.

This is amazing to me for a USD $2.50 general purpose embedded microcontroller!
I have never heard of PVFS2 (Parallel Virtual File System) until looking through the esp8266web source code.
From what little I can understand, PVFS2 is usually used by research scientists for cluster computing.
Is this the first time PVFS2 is is running on a microcontroller without a linux kernel?
Will the tiny esp8266 be able to be used for cluster computing in the future?

Thank you for your time for a simple layman's explanation.