Picture a production line where predictive maintenance happens directly on a $30 microcontroller, and a natural-language AI agent turns raw sensor data into automated actions — no cloud round-trip, no manual integration code. That's the promise of combining the Arduino Nano BLE Sense with ASI Biont. In this guide, we'll walk through a real-world integration, explaining how the AI agent connects to the board, how TinyML models run on-device, and why this approach is reshaping Industrial IoT.
Why the Arduino Nano BLE Sense?
The Arduino Nano BLE Sense is a compact board built around the nRF52840 SoC (ARM Cortex-M4F, 64 MHz) with an integrated BLE radio, IMU (BMI270), microphone (MP34DT05), magnetometer, and temperature/humidity sensors. What makes it special is its ability to run TensorFlow Lite Micro models directly on the MCU. Thanks to the CMSIS-NN optimizations, a lightweight gesture classifier or vibration anomaly detector can run at just a few milliwatts — something a Raspberry Pi can't match in power-constrained deployments.
For AI-driven automation, this board is a perfect edge node: it collects data, classifies patterns on the spot, and sends a compact inference result (e.g., "gesture": 1 or "vibration": high) over BLE or Serial. That's where ASI Biont comes in.
Connection Architecture: BLE and Serial via Hardware Bridge
ASI Biont connects to devices through industrial protocols or direct serial communication. For the Arduino Nano BLE Sense, the most straightforward approach is a Serial connection over USB using the Hardware Bridge (bridge.py), downloaded from the ASI Biont dashboard. The bridge listens on a COM port and exposes an industrial_command() interface, which ASI Biont's Python sandbox calls to send/receive framed messages.
Here's the launch command for the bridge:
python bridge.py --token=YOUR_TOKEN --ports=COM3 --baud 115200 --rate=10
This opens a bidirectional channel at 10 Hz — fast enough for most TinyML use cases. The board sends JSON frames like {"inference": "gesture_A", "score": 0.93}, and ASI Biont can reply with commands to trigger actions.
Use Case: Gesture-Based Conveyor Stop in a Packaging Plant
A real-world scenario: a packaging line uses a robotic arm to pick items. An operator sometimes needs to stop the conveyor immediately if a box jams. Instead of a physical emergency button, we trained a TinyML model to recognize a "stop" gesture (e.g., hand swipe) using the onboard IMU. The Arduino classifies the gesture and sends the inference over USB. ASI Biont receives that inference, validates it against confidence threshold (e.g., score > 0.9), and sends a Modbus/TCP command to the PLC to halt the conveyor.
Why not do it all on the Arduino? Because the logic for which PLC command to send, error handling, and logging lives in the AI agent — the MCU stays simple and responsive.
MicroPython Sketch (Example Snippet)
# MicroPython on Arduino Nano BLE Sense
from imu import IMU
import json
imu = IMU()
model = load_tflite_model('gesture_model.tflite')
while True:
accel = imu.get_accel()
preds = model.predict(accel, window=50)
if preds.label == 'STOP' and preds.score > 0.9:
frame = json.dumps({"event": "gesture", "label": "STOP", "score": preds.score})
print(frame, flush=True) # Goes to COM port
On the ASI Biont side, the AI agent processes the incoming frame and decides the action:
# ASI Biont execute_python (simplified)
import json, requests
# The bridge returns the latest line via industrial_command
try:
line = industrial_command(protocol='serial', command='read_line', timeout=1)
data = json.loads(line)
if data.get('label') == 'STOP' and data['score'] > 0.9:
# Send stop command to PLC via Modbus/TCP
result = industrial_command(protocol='modbus', command='write_coil',
unit_id=1, address=0x10, value=0)
requests.post('https://api.telegram.org/bot<TOKEN>/sendMessage',
json={'chat_id': '<ID>', 'text': 'Conveyor stopped by gesture'})
except Exception as e:
print('Error:', e)
No while True, no infinite loops — the agent handles the exception and times out gracefully.
How ASI Biont Writes the Integration Code
The real magic is that you don't write this code manually. In the ASI Biont chat, you say:
"Read the serial output from Arduino on COM4, look for JSON frames with 'gesture', if confidence > 0.9 send a Modbus write coil 0x10 to PLC at 192.168.1.50, and send a Telegram alert."
The AI agent generates the Python code, tests it in its sandbox, and runs it. It knows the bridge command syntax and the protocol libraries because ASI Biont's execution environment supports pyserial, pymodbus, paho-mqtt, aiohttp, paramiko, and more. There's no need to wait for a vendor-specific plugin — ASI Biont connects to any device through execute_python. The AI writes the integration script on the fly, tailoring it to your device's protocol, port, and API.
That means a COM port reader, an MQTT broker, or a custom HTTP endpoint can be integrated in seconds, as long as you can describe the device's communication format in plain English.
On-Device vs. Cloud: Latency, Power, Cost
We measured this integration in a mock factory setup. The table below shows the difference between sending raw IMU data to a cloud AI service vs. running TinyML on the Arduino:
| Metric | On-Device (TinyML) | Cloud (MQTT + ML API) |
|---|---|---|
| End-to-end latency | 12 ms (local inference) | 180 ms (network + inference) |
| Power draw per inference | 2 mJ | 50 mJ (including radio) |
| Data sent per minute | ~50 bytes | ~2.5 KB |
| Cloud cost per 1000 inferences | $0 | $0.50 (typical) |
Numbers are illustrative, but consistent with field reports from Edge Impulse's benchmark on the same MCU. For time-critical actions like emergency stops, the on-device classification avoids network jitter.
Other Real-World Scenarios
- Vibration-based predictive maintenance on a motor: Arduino samples the IMU at 1 kHz, runs an anomaly detection model, and sends a "warning" frame via Serial. ASI Biont logs the event in InfluxDB and opens a ticket in your ERP.
- Voice command for warehouse robots: The board's microphone captures keywords, a TinyML keyword spotter detects "stop", "go", "left", and ASI Biont translates that into CAN bus commands for an AGV.
- Wearable safety device: A worker wears the Nano BLE Sense in their pocket; a fall-detection model triggers an emergency message —— ASI Biont receives it and calls a cellular modem via AT commands to send an SMS.
Why This Integration Matters
TinyML devices are becoming ubiquitous, but they are islands of intelligence. ASI Biont acts as the connective tissue, converting their raw output into business actions. Because the AI agent writes the integration code itself, you can prototype and deploy in days, not weeks.
The barrier to entry has never been lower: you need an Arduino Nano BLE Sense, the Hardware Bridge, and a natural-language description of your automation goal. No custom software development, no cloud subscription per device.
Ready to see your edge device talk to an AI agent? Try the integration on asibiont.com — describe your device in the chat, and watch ASI Biont handle the rest.
Comments