Get Started

 

Installing neoPLC – Arduino

Intro to neoPLC

Tutorial 1 – “Blink”

Tutorial 2 – “ENV Demo”

Built-in BLE App Connectivity

Project – neoPLC Furnace

Project – neoPLC RC Car

neoPLC microcontroller pinout board for IoT projects
  • Modular square outline 0.8×0.8in. (20x20mm)
  • Drilled for standoff mounts
  • Stack or solder I²C headers
  • 3.3V for easy connection to LiPo batteries
  • Open-source board for custom designs
  • Thousands of chips are ready for I²C

Stackable

neoPLC is stackable, easy solution for IoT

Solder edge-to-edge

neoPLC can be connected by soldering end-to-end

Clip to breadboard

Wire to breadboard

Software Setup

  1. Download and install the newest Arduino IDE for free here.
  2. Download and install the required USB driver: Mac OS (here); or Windows 10 (here).
  3. Open the Arduino IDE. Find ‘Arduino/preferences’, then paste the following line into the ‘Additional board manager URLs’ space, on its own line:
    • https://deftdynamics.github.io/neoPLC-arduino/package_neoPLC_index.json
  4. To install the whole neoPLC microcontroller core:
    • Select Tools/Board/Boards Manager…
    • Search for ‘neoplc’
    • Install the neoPLC core by selecting it, and clicking ‘install’ in the bottom right; note that the tools can take some time to install (the GCC compiler is rather large)
    • Restart Arduino, just to be safe
  5. Choose your board from Tools/Board/neoPLC X.X
  6. Connect your neoPLC microcontroller to a USB port, select it from Tools/Port
  7. Try our examples in ‘File/examples/examples for neoPLC’, or write your own code! Note: when running your neoPLC programs, make sure the baud is set to “115200” (the default setting is usually 9600).

Hardware Setup

The neoPLC concept is based on eliminating the mess that arises when using boards from multiple vendors that are all shapes and size. We use a standard footprint, and standard i2c communication protocol which allows hundreds of sensors to share the same four wires for communication and power. I2C (pronounced eye-two-see or eye-squared-see) uses only four wires to power and communicate with a board: power (V+), ground (GND), Serial Data (SDA), and Serial Clock (SCL). The ‘master’ microcontroller provides power, ground, and drives the SCL clock to provide all sensors with a standard time pulse – think of it like a conductor with a baton. The master controller can send information to any connected ‘slave’ board on the data line SDA, and the slave can respond on that same wire. When the microcontroller sends a specific board’s name (or ‘address’) out on the SDA bus, that board alone will respond. So, many boards can share the same SCL and SDA bus, but only if they have unique addresses – otherwise everyone gets confused about who should be speaking! To allow both the master and slave to use the same SDA line, a unique wiring system is required where the SCL and SDA lines are ‘pulled up’ to V+ by resistors. These resistors are built into the neoPLC, but should be added manually when using neoPLC peripheral boards with other microcontrollers. The SCL and SDA pins on common microcontrollers are listed in the table below:

neoPLC configuration for pinout
neoPLC connects you to the world

Stacking neoPLC boards

The open-source neoPLC board layout standard was designed to allow flexible transitions from testing to prototyping. The layout has a few features which guarantee success. The boards can be clipped into a breadboard, clipped edge to edge, stacked on top of each other, and even soldered edge-to-edge. All boards can be stacked/connected in any order with the exception of the [CHG] Battery Charger – the charger must share the unique Vin line with the microcontroller by connecting it directly next to (or on top of) the master microcontroller.

Creating a BLE connected iOS app

  1. Install XCode on your mac computer
  2. If you are not already an iOS developer, sign up for a free Apple account, and a free developer provisioning profile as described here
  3. To get you started, we have created BLE cores for both neoPLC boards and iOS that make it easy to connect and communicate. However, instead of long tutorials we believe in learning-by-doing, so we have provided very hackable demo code play with. To get started:
    • Load the neoBLE example in the Arduino IDE onto your neoPLC uC. The LED should start blinking, indicating it is waiting for a connection.
    • Test the official neoPLC Demo first – download it from the iOS app store, make sure your BLE is turned on, and use it to connect to the neoPLC uC.
    • For creating your own app, the neoPLC iOS demo is found here. Open it in XCode by downloading, unzipping, and opening “neoPLC demo.xcodeproj”
  4. Connect your iPhone to the computer and allow XCode time to find it. When it is connected, you will see an ‘iPhone’ icon in the top left of the XCode interface
  5. Click the ‘Play’ button in the top left of XCode to load the app. Play with the app to see what is included and to make sure it works now before modifying anything.
  6. Modify or copy the code to get started making your own app! While the Swift language is clean and similar to C, combining all the pieces needed to generate views in an App is overwhelming at first. We have added many comments around the app to help – start by reading through ‘setupViewController’, and play around with the view layouts in ‘Storyboard’. Good luck!