I’m a web developer and don’t know a lot about embedded/iot. Just found out about Particle and trying to wrap my head around the offering.
For my project, I just need:
One device over cellular
Receive a number 0 - 255 and pwm an output pin accordinly
Rate: Ideally 25 times per second, maybe 10/sec minimum
16 hours a day
Running the math…
This page says a short particle.publish is 128 bytes. So 128 bytes x 25/sec x 60 sec x 60 min x 16 hours = 184 megabytes. Just per day.
At that rate, it’s looking like it would be cheaper for me to get a sim and data plan through Verizon, even if I were to use a heavier websocket connection, rather than Particle’s platform.
Am I correct that I could buy an Electron and swap out the sim, though? I kind of like that it would be lower power consumption and maybe easier to dev than a raspberry pi for this application. But would websockets still make the most sense if I go this route, or is there a more primitive protocol that would be easier to send just a single number in this way?
@josh.peterson, is the 25 per second requirement because the Electron is part of a control loop? Perhaps explaining the need for that rate would help.
The particle platform is limited to one publish per second so is not usable in your scenario. This leaves you with a TCP/Websocket approach which is totally possible with the Electron. The data requirements will also drop considerably. One thing to note is that the Electron does not natively support TLS/HTTPS encryption.
Ah thanks @peekay123! That 1/sec requirement would be a dealbreaker.
I need to do 10 to 25 updates per second because the device is providing realtime visual feedback on an audio source, essentially. So I’m ballparking off 24 frame/sec in video but allowing for some slack.
Is there documentation on how to TCP/Websockets with the electron? Googling gives me some mentions of a TCPClient but I’m having trouble tracking that down. Websockets would be closest to what I already know and am using for other pieces of the project.
Is this latency due to something particular to the Electron, or is it just because of how 3g/4g networks behave? I thought this might be a possibility but wasn’t sure how much latency was going to be there until I was able to test. It sounds like you might have an idea of what I can expect though?
@josh.peterson any wireless protocol will “suffer” latency issues. The internet and the wireless service providers don’t offer guaranteed latency so you will need to take this into consideration in your design. I don’t believe NASA uses cellular networks for their rocket telemetry!
Following up - I had mentioned Verizon in my original post, but Verizon in the USA is actually not compatible with the electron. AT&T and T-Mobile work in the USA because they run on GSM, and the Electron is GSM only. Initially I had missed this. I’m looking into whether Ting will work as a provider.