MEET DASDUINO CONNECT

Dasduino CONNECT (ESP8266)-Dasduino & Arduino

INTRODUCTION

Unlike a classic board on which the microcontroller is already well known Atmel ATmega328, for example Dasduino Core, it’s time for something new. True, there is Dasduino Lite, a small circuit board with Amel ATtiny processor, but practically it is Atmega328 with weaker capabilities, and Lite is innovative in the sense that it can be used as wearable cause of it’s batteries.

We need something new. Something * different *. What do you think of a microcontroller, which is connected to the Internet? And not through an Ethernet cable, but over WiFi? Very interesting, isn’t it? It is time for Dasduino Connect, microcontroller board with advanced specification with the option of connecting to a WiFi network. Linking the physical world to the Internet has never been easier!

WHAT IS DASDUINO CONNECT?

Dasduino Connect is, therefore, microcontroller board with the possibility of connecting to the WiFi network, and therefore to the Internet. Its base is chip ESP8266, already well known around makers. ESP8266 is a SoC (System on Chip), we will say microcontroller manufactured by Espressif. The team from listed company managed to put in one small chip a complete microcontroller (very impressive feature), the ability of connection to a WiFi network and a complete TCP / IP stack that supports DNS (this we need to connect to and use the Internet). Which means, a powerful microcontroller with wifi.

How capable the ESP8266? Well, if we compare it with Atmegom328, ESP would beat it. The form of ESP which Connect uses is ESP 12 / ESP-12-E and has following specifications:
• 80MHz frequency clock signal (compared with 16MHz to Atmega328). Yes, ESP8266 works five times faster than Atmga328! This means that in one second, Connect is able to handle five times more operations than the Core.
• 1020Kb (about 1MB) flash memory (compared with 30.5kB on Atmega328). Of all that, 194kb goes to bootloader, so the user is left with 826Kb for his program. With 27 times more flash memory than the Core, this means that you’ll probably never write such a huge code that will take all of the flash memory.
• 82kB of RAM (compared with 2KB to Atmega328). The bootloader uses some RAM while the user is left with 49kB to use for its variables. It is 24.5 times more than the Atmegi328 and you will be able to work with a lot more variables and complex data.

Connect connects to the computer via USB, and the programming is identical to all Dasduino boards. It also corresponds to the experimental board, so prototyping is even easier.

WHY IS CONNECT SO INTERESTING AND WHAT CAN I DO WITH IT? (IOT)

So, this is a microcontroller that can easily connect to the internet. Okay, but why is it interesting to connect to the Internet with a microcontroller? It allows us to use IoT or Internet of Things (Croatian wiki). IoT is a term that describes physical, tangible electronic devices that are connected to the Internet. IoT is very popular, and it will be more and more popular. Today, more and more things are connected to the Internet, such as for example: your watch (Pebble, Apple Watch, Moto360), thermostat (Nest), a car (Tesla), and there is a lot of those trivial examples such as diapers for babies that alarms us when they are no longer clean. There are big plans for IoT so in the future we can expect eg. IoT cities (which have a bunch of sensors throughout the city and provide timely responses; when there is fire, firefighters come automatically, when a certain road is crowded, cars are automatically redirected to another road, ensuring high security and even have the ability to let us know when it’s time to come and take out the trash). In fact, we can expect that almost everything we use will be connected to the Internet in some way.
What Connect allows is that you can make an IoT device out of almost anything. Here are some examples of various projects:
• You can make a small lamp which connects to an Internet service for weather and color change shows us how is the weather going to be tomorrow (or the day if you look in the morning). Never forget the umbrella!
• Install Connect to a motion detector to get an email when someone moves in your area outside the permitted time
• Manage your home with a cell phone. Raise the blinds, dim the light or turn up the air conditioner just with the touch on a smartphone
• Connect Connect to the thermal printer so each email address with a “To Do” subject (or whatever title you want. Or any email from a particular sender) will be printed immediately.
• connect the sensors to Connect (you can make a small weather station), and send it’s readings to the Internet where they will always be able to access! Now your far away greenhouse or wine cellar is not so far away from you.
• Every time you have a message on Facebook / new mail / Your hashtag is mentioned or you get a new like, a little lighting in your home will show it to you (eg. The LED strip lights up blue when you have a message on Facebook)
• You can let your imagination run wild or google “IoT projects ideas”. Connect anything the internet!

IT CAN BE PROGRAMMED FROM ARDUINO? JUST LIKE ANY DASDUINO?

This is cool. Seriously. Connect this microcontroller, just like any other Dasduino board, via USB to the computer, turn on Arduino and program it! Yes, using the C language and using the already well-known Arduino syntax, all methods and libraries. This allows direct transfer to those who are already familiar with Arduino, and simpler learning for those who are not.

Is it really that easy? Let the code speak for itself, this is an example for a new one that connects to a WiFi network and opens the soldered.com:

#include "ESP8266WiFi.h"
const char* ssid     = "your-ssid";  // name of your WiFi
const char* password = "your-password"; // password for your WiFi
const char* host = "soldered.com"; // web page we want to open
void setup() {
  Serial.begin(115200); // starting serial communication
  delay(10);
  
  WiFi.begin(ssid, password); // for start, we connect to the WiFi
  
  while (WiFi.status() != WL_CONNECTED) { // until NOVA connects to WiFi
    delay(500);                           // we write dots in Serial monitor
    Serial.print(".");                    // just for us, so that we know what is happening
  }
  Serial.println("You are connected to WiFi! IP address is: "); 
  Serial.println(WiFi.localIP()); // prints local WiFi addres of NOVA
  Serial.print("Now connecting to ");
  Serial.println(host); // URL of a webpage we are connecting to
  
  WiFiClient client; // create an object of class WiFiClient for TCP connection
  if (!client.connect(host, 80)) // 80 is a port on which we are connected, and you will almost always use 80
  { 
    Serial.println("Can't connect to a webpage.."); // if the connection was not successful
    return; // complete the execution of the program
  }
  
  String url = "/hr/"; // since we are now connected to the server(web page),
                       // we need to open something from it (path)
                       // if we want home page, url would be just /
                       // here, we open e-radionica in croatian
  
  Serial.print("Connected to a webpage. Now, we will open URL: ");
  Serial.println(url);
  
  // This sends a request to a webpage
  client.print(String("GET ") + url + " HTTP/1.1\r\n" +
               "Host: " + host + "\r\n" +
               "Connection: close\r\n\r\n");
  delay(10);
  
  // We read the response from the server at our request, and the same answer we print in Serial monitor
  while(client.available()){
    String line = client.readStringUntil('\r'); // prints line by line
    Serial.print(line);
  }
  
  Serial.println("Finished. Stop the connection.");
}
void loop() { // we don't do anything in a loop, it is enough to load webpage once

WHAT CAN BE FOUND ON CONNECT?

form of PCB (printed circuit board) that corresponds to an experimental board

• ESP8266 Module (ESP-12 (S), equipped with a PCB trace antenna for WiFi)

• CH340C USB connection

• Five LEDs: red to indicate charging, blue for rx, white for tx, purple to indicate power and RGB

• 9 input / output pins of which all 9 supports PWM

• 1 analog input pin (ADC). Pin labeled A plate supports voltages up to 1V, while pin labeled A_e supports input voltages up to 5V. A A_e are connected to the same ADC (and only one) pin, or A_e is connected via a voltage divider to support input voltages up to 5V.

• I2C, SPI and serial communication

• 3.3V voltage regulator

• circuit for automatically setting the ECJ in flash mode when uploading code of Arduino (without it, user needs to connect GPIO0 to ground, but because of it, it is not necessariy)

• two pushbuttons, one for reset ESP, one that sets GPIO0 on a low logic level

• ESP-12 has CE and FCC certifications

Connect works on logic level of 3.3V, unlike most other Dasduino boards which are working at 5V (or can operate at 3.3V). Connect has to work and works solely at the 3.3V! Caution should be exercised because 5V may permanently destroy Connect. Maximum current for one input-output pin is 6mA (with the absolute maximum of 12mA), so in case of larger loads, we need to think it through.

 

HOW TO START?

1. To start, you will need one Dasduino Connect or Dasduino set for beginners IoT (which has Connect inside).
2. Add settings for your Dasduino Connect within your Arduino software. Tutorial for this can be found here.
3. That’s it, you’re ready! Start the project! You can find inspiration on our site.