The neoPLC MicroController (uC for short) is the heart of the neoPLC ecosystem. Designed around a powerful Cortex M4F with built-in Bluetooth Low Energy, the uC provides a platform to create powerful app-connected embedded systems with ease.
A fully integrated Bluetooth BLE soft-device makes it easy to connect your project to a custom interface app. We realize there is a steep learning curve to programming iOS or ANDROID apps, especially with BLE communication, so we have created a custom messaging system and software drivers for both the microcontroller and app side to make communication easy. Usually the uC board is used as a BLE ‘peripheral’ while the phone or computer acts as the ‘central’. However, this board can be programmed to behave as either one, allowing multiple uC boards to communicate with each-other.
Completely programmable over USB with the Arduino IDE, the high-speed Cortex M4F processor with floating point unit allows blazing fast calculation and communication. As engineers and developers, not computer scientists, we often find it frustrating when most embedded hardware (like Arduino) requires designers to convert sensor signals from raw integers to useful numbers to use. Taking advantage of the added power of a floating-point core, most of our libraries take care of this conversion and provide users with the most meaningful number possible since computing power is not a limit with this system. We also built in native support for the Eigen matrix math library – Kalman filters and modern control laws are easily within reach without fighting the clumsy syntax of normal C/C++ matrix math.
neoPLC was created to allow developers, engineers, and hobbyists to create great apps that are connected to the real world without spending too much time writing boilerplate code just for low-level communication. But the internet-of-things isn’t only about software, it’s about connecting apps to the real world via sensors and other peripherals. Our open-source neoPLC board ecosystem provides a wide range of sensors and other peripherals and allows stacking, soldering, clipping boards together into any shape that fits your project, with no wiring mess – perfect for building prototypes you can present to other designers or even to future customers and investors without the need to fabricate expensive custom PCBs. Deft Dynamics built the neoPLC ecosystem to help quickly develop engineering prototypes, but soon realized it was too valuable to keep to ourselves. We now offer it, open-source, for all to use and enjoy. We hope this system helps you to build great things.
SPECS:
- Cortex M4F (with FPU)
- S132 Bluetooth Low Energy (Bluetooth 4) Softdevice
- neoPLC standard i2c headers
- Supports UART, i2C, SPI, i2s, BLE central and peripheral
- Measures only 0.8″x0.8″, with drilled holes for easy mounting
- 6 GPIO pins can be used as digital input/output, PWM output, ADC input, and interrupts
- 3.3V operation
- microUSB connector for USB communication with a computer and for power
- Arduino IDE programming and USB bootloading
- Pin 13 has a programmable red LED
- Fully tested, loaded with demo code that communicates with our open-source iOS app
DATASHEET: nRF52832
uC Quickstart Code
// *************** Serial communication with the computer ************** // print text or numbers to the serial terminal void Serial.print(x); // print text or numbers to the serial terminal with new line ending void Serial.println(x); // print formatted strings to the terminal void Serial.printf(format,x,...); // Format Guide // %d - integer // %X.Yf - float, X is total minimum precision, Y is precision right of the decimal place // %c - ASCII character // \n - new line // \t - tab // check number of bytes available in the Serial buffer int Serial.available(); // read a character from the buffer char Serial.read(); // write a character to the outgoing buffer void Serial.write(char c); // **************************** Bluetooth Low Energy **************************** // include the neoPLC-BLE library #include <neoBLE.h> // create an instance of the BLE UART system neoBLE ble = neoBLE.uart(); // --- SETUP --- // initialize the BLE UART service void ble.begin(); // --- METHODS --- // check number bytes available int ble.available(); // read a character from the buffer char ble.read(); // write a character to the outgoing buffer void ble.write(char c); // **************************** Pin Control **************************** // --- SETUP --- // initialize a uC pin as input or output // set the mode of pin 'pin', 'mode' must be either 'INPUT' or 'OUTPUT' void pinMode(int pin, int mode); // --- METHODS --- // read the logical state (0/1 = LOW/HIGH) of input pin 'pin' bool digitalRead(int pin); // read the voltage in bits (0-1023) of input pin 'pin' int analogRead(int pin); // set the output state 'state' (0/1 = LOW/HIGH) of output pin 'pin' void digitalWrite(int pin, bool state); // set the duty cycle 'duty' (0-255) of output pin 'pin' void analogWrite(int pin, int duty); // ************************* Timer Interrupts ************************** // include the neoPLC-Timer library #include <neoTimer.h> // --- SETUP --- // create a timer that runs the function 'ISR' every 'delayMicros' microseconds // up to 6 timers can run simultaneously: each timer needs a unique 'ID', from 0 to 5 void Timer.addTimer(int ID, int delayMicros, [function] ISR); // create a timer that runs the function 'ISR' every 'delayMillis' milliseconds // up to 6 timers can run simultaneously: each timer needs a unique 'ID', from 0 to 5 void Timer.addTimerMillis(int ID, int delayMillis, [function] ISR); // --- METHODS --- // after a timer has been created, the Timer must be 'started' to begin void Timer.start(); // after a timer has been started, the Timer can be stopped for convenience or // to perform timing-critical tasks. It can be restarted with 'start' any time void Timer.stop(); // ****************** i2c (DDC, 2-wire) communication ****************** // include the neoPLC-BLE library #include <Wire.h> // --- SETUP --- // initialize the i2c library Wire.begin(); // --- METHODS --- // request x bytes from IC with address 'addr' char Wire.requestFrom(int addr, int x); // check number bytes available int Wire.available(); // read a character from the buffer char Wire.read(); // start a transmission with address 'addr' char Wire.beginTransmission(int addr); // write a character over i2c char Wire.write(); // stop transmission and release the bus char Wire.endTransmission();
Be the first to review “neoPLC UC – Fast, Arduino-compatible Microcontroller with Built-in BLE”