Udostępnij za pośrednictwem


IOT: Arduino or Particle Photon?

Hard question, the Arduino can be built for next to nothing and use about the same amount of current.  The Particle Photon is quite the device, you have a 32-bit Cortex processor, so you can add security that you would have to add a device to the Arduino for security.

There are many reasons to use an Arduino, I have a small Arduino Micro, that also has a Bluetooth LE or Bluetooth Smart (same thing)  on chip, AND voltage regulation.  Along with 20 digital input/output pins, 7 can be used a PWM outputs and 12 as analog inputs, it is only an 8 bit microcontroller.  That latter point means that the ability to encrypt the datastream is limited.  This means you have to carefully design your circuit for lowest exploitability.  One of the major upstream attacks might be to insert incorrect data out from your device because the encryption on the chip cannot be done using good practices.

Bear in mind your sensor may be an upgrade for a PLC HVAC system, or a filtration system, similar to an osmosis filtering.  In this case, a hacker could get access to the HVAC system and then is able to gain access to customers of the HVAC system.  After all your PLC might be in a locked box, with a lock similar to your high school locker, or at least have that level of security.  PLC, programmable logic  control, which is used in industrial control applications, and physical security may have flaws that allow direct access to the central control system, or other controllers with network access. 

Using PLC

You can find tutorials online, for example UCLA:

These types of circuits may control lights, motors, but the completely pure PLC does not do “if” statements.  For instance you can control one light with two switches.  To do control one light with three switches, here a designer may consider using PLC.  The language, such as it is, usually uses a superset of symbols from Allen-Brady, check out the site at Arena Basic.  This is definitely cool, as it one of those products that fully uses the value of Visio.  Using Arena Basic, you can simulate your PLC circuit prior to building it.

I definitely could on, but back to comparing the two devices.

Particle Photon

This device somewhat angered me with the conversion from Spark to the Photon, changing out the TI chip may affect some of the government contractors, and angered me mildly.  Over it now.  Particle is knocking it out of the baseball park, this device is $19 WITH WiFi, and connections for Mesh and Bluetooth/Bluetooth LE (there are three small squares on the top of the chip).  It is a 32 bit Cortex processor, which means that some level of encryption can be built directly into the chip.  Use a certified encryption system, pay the software tax. 

Comparison of processors

ATmega32U4, from the website:

The low-power Atmel 8-bit AVR RISC-based microcontroller featuring 32KB self-programming flash program memory, 2.5KB SRAM, 1KB EEPROM, USB 2.0 full-speed/low speed device, 12-channel 10-bit A/D-converter, and JTAG interface for on-chip-debug. The device achieves up to 16 MIPS throughput at 16 MHz. 2.7 - 5.5 Volt operation.

The Cortex-M3 Processor (Photon), from the ARM website:

The ARM® Cortex®-M3 processor is the industry-leading 32-bit processor for highly deterministic real-time applications, specifically developed to enable partners to develop high-performance low-cost platforms for a broad range of devices including microcontrollers, automotive body systems, industrial control systems and wireless networking and sensors. The processor delivers outstanding computational performance and exceptional system response to events while meeting the challenges of low dynamic and static power constraints. The processor is highly configurable enabling a wide range of implementations from those requiring memory protection and powerful trace technology to cost sensitive devices requiring minimal area.

Both of the processors are robust and functional, and fulfill different requirements.  The Atmel device to be secure would need an extra component to provide encryption, adding cost on the I/O side.  The Cortex is a more complex device, which means more design costs.

 

Which one if it is your first processor?

Depends… If you are a student, you will need to use the device that is being used in labs, etc.  If you are buying your own, both are compelling.  You should be able to connect to your device via Bluetooth, Bluetooth LE, Mesh and WiFi.  Haha just kidding, Which ever one you pick will work out, but you should know how to set up your system to use encryption.

What about coding?

Both devices can be coded using online tools, both can use Arduino Wiring Language.  The ARM 32 Bit Cortex CPU on the Photon though is quite powerful.  In this case you can implement

Conclusion

Why did I mention PLC, just teasing things to come.  But both of these devices will likely be used to interface with an Allen Brady PLC system, or one using a similar design process.  So you might want to play around with PLC and learn a little about it.

As to which chip?  If you are careful with the Arduino Micro w/BLE it will work well for Bluetooth applications, but is pricey in small unit prices.  The Particle Photon, with the 32 bit ARM Cortex Processor does allow encryption on chip, and for $19 base price, this is a deal, you don’t even have to solder the headers on the device.