Today, my Teensy-LC and ESP-12E just arrived and I am so excited to experiment with them over the weekend. I have not decided which of the two MCU's should I use for my DIY Smartwatch Project.So I want to list down their strength and weaknesses to help me which I should choose.
1. Microcontroller(MCU) Speed
Teensy uses MKL26Z64 ARM Based Chip rated at 40Mhz while ESP-12E uses ESP8266 which is rated at 80Mhz but can be overclocked at 160Mhz. Clearly, ESP-12E is the winner.
2. Arduino Compatibility
Recently ESP-12E and its variant can already be programmed using the Arduino IDE and while Teensy-LC is already programmable in the same IDE so both are tied on this. But I still don't know if all commands in Arduino is supported by both MCU's all I know is in the case of Teensy, some are not supported.
3. Power Consumptions in Sleep Mode and Normal Mode
I am totally new to this microcontrollers so I cant compare them based on this category. Probably when I get to program them, that will be the time for me to be able to decide which one is better than the other.
4. GPIO/Ports/Availability of Libraries
Teensy has so many GPIO's(dont know exactly how many), PWM Pins, 3 Serial Ports, 1 SPI Port and No built in RTC and since it can be programmed in the Arduino IDE, I assume the SPI, I2C libraries will work, while ESP-12E has very few exposed GPIO and PWM pins, 1 SPI and 1 I2C port and I also assume that the Arduino SPI and I2C libraries will work. It seems I have a problem here because I need at least 2 SPI ports(the LCD Display and SD Card uses SPI ports) because I have not tried connecting 2 devices in 1 SPI port but I have read somewhere that it is possible for several devices to share 1 SPI port. The smartwatch does not need too much GPIO and PWM pins. I give the credit to Teensy in this category though.
In conclusion, I am still not able to decide which one is better than the other although ES-12E has built-in wifi radio and while the Teensy do needs ESP-12E.
Showing posts with label arduino. Show all posts
Showing posts with label arduino. Show all posts
Thursday, May 5, 2016
Friday, October 24, 2014
More Fun with HM 10
I got more curious about how to use the HM 10 BLE(Bluetooth low energy) module and asked myself if it will really be able to pair with arduino and instruct the arduino to do some tasks via an android phone. So did some research if anyone from the internet has posted similar project and I was so lucky that I found one that I thought is easy and would simply answer my question.
The original post can be found through this link: Control RGB lights from Android with Arduino & Bluetooth LE (BLE)
Aside from following the processes exactly as described in the article, I also did some twist to adapt it to what is available in my chest. The first thing I did is to deactivate the ibeacon function by issuing the following AT command:
Ibeacon is activated if it returns 1 and deactivated when it returns 0.
Here are the materials and components I used:
1. HM10 BLE module
2. Arduino Pro Mini 8Mhz and 3.3V
3. Dupont wires
4. The RS232-TTL Adaptor that I used to upload sketch on the Pro Mini
5. Li-Poly Battery
6. BreadBoard
I will still be using the same connection just like what I did in my previous testing of HM-10 and was described in detail in my previous post. If you haven't read it yet, you may click on this link: HM10 BLE Module with Ibeacon .
With that set-up, all I need is to upload the sketch as described in the reference article but since I don't have an RGB LED, I could just use the LED in the arduino pro mini which is connected to digital pin 13. Digital pin 13 is not a PWM pin so I can only turn it on or off and not able to dim it.
I also downloaded the android app in the reference article and installed on my android phone.
Test Result:
It was awesome!!!
Here's the video of my testing:
This is the sketch that I used:
I am still using the software serial library because that was my previous setup and I wanted to use the original serial port to communicate with the pc when ever it is needed or necessary.
The original post can be found through this link: Control RGB lights from Android with Arduino & Bluetooth LE (BLE)
Aside from following the processes exactly as described in the article, I also did some twist to adapt it to what is available in my chest. The first thing I did is to deactivate the ibeacon function by issuing the following AT command:
AT+IBEA0To check whether ibeacon function is activated or not, this AT command is used:
AT+IBEA?HM-10 will respond: OK Get 1|0
Ibeacon is activated if it returns 1 and deactivated when it returns 0.
Here are the materials and components I used:
1. HM10 BLE module
2. Arduino Pro Mini 8Mhz and 3.3V
3. Dupont wires
4. The RS232-TTL Adaptor that I used to upload sketch on the Pro Mini
5. Li-Poly Battery
6. BreadBoard
I will still be using the same connection just like what I did in my previous testing of HM-10 and was described in detail in my previous post. If you haven't read it yet, you may click on this link: HM10 BLE Module with Ibeacon .
With that set-up, all I need is to upload the sketch as described in the reference article but since I don't have an RGB LED, I could just use the LED in the arduino pro mini which is connected to digital pin 13. Digital pin 13 is not a PWM pin so I can only turn it on or off and not able to dim it.
I also downloaded the android app in the reference article and installed on my android phone.
Test Result:
It was awesome!!!
Here's the video of my testing:
This is the sketch that I used:
#include <SoftwareSerial.h>
int bluetoothTx = 3; // TX-O pin of bluetooth mate, Arduino D2
int bluetoothRx = 2; // RX-I pin of bluetooth mate, Arduino D3
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
const int redPin = 13;
const int greenPin = 5;
const int bluePin = 6;
void setup() {
// initialize serial:
Serial.begin(9600);
// make the pins outputs:
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
bluetooth.begin(115200); // The Bluetooth Mate defaults to 115200bps
delay(100); // Short delay, wait for the Mate to send back CMD
bluetooth.println("U,9600,N"); // Temporarily Change the baudrate to 9600, no parity
// 115200 can be too fast at times for NewSoftSerial to relay the data reliably
bluetooth.begin(9600);
}
void loop() {
// if there's any serial available, read it:
if(bluetooth.available()) // If the bluetooth sent any characters
{
while (bluetooth.available() > 0) {
// look for the next valid integer in the incoming serial stream:
int red = bluetooth.parseInt();
// do it again:
int green = bluetooth.parseInt();
// do it again:
int blue = bluetooth.parseInt();
// look for the newline. That's the end of your
// sentence:
if (bluetooth.read() == '\n') {
// constrain the values to 0 - 255 and invert
// if you're using a common-cathode LED, just use "constrain(color, 0, 255);"
red = 255 - constrain(red, 0, 255);
green = 255 - constrain(green, 0, 255);
blue = 255 - constrain(blue, 0, 255);
// fade the red, green, and blue legs of the LED:
analogWrite(redPin, red);
analogWrite(greenPin, green);
analogWrite(bluePin, blue);
}
}
}
}
I am still using the software serial library because that was my previous setup and I wanted to use the original serial port to communicate with the pc when ever it is needed or necessary.
Friday, December 6, 2013
The Clock is Simple No More
Well it is really awesome to say that the clock is no longer that simple because I added a few more features to make it a nice clock, it is not yet the final version because I have tons of ideas to make a one hell of a device which I can call one of my best projects ever!
The New Features
I've added 3 new features which are as follows:
1. 2 new buttons to control the brightness. This is just a temporary version, I just want to check whether it is nice to have a button and to control the brightness. It turns out that yes, it is indeed needed. I still am thinking if I will make this permanent because I plan to control the brightness, contrast, set time and date, store important dates and alarms using the pc. I connected the 2 buttons using the schematic below:
2. A back-up battery with Charger and DC-DC Step Up converter. The clock will not be connected to the pc 90% of the time so a battery is needed to power it up and must be rechargeable just like cellphone. I used the AREF pin to bypass the on board regulator of the arduino because it is not efficient. The battery is rated 3.6V so it is not enough to power-up the arduino that is why I need to bost that voltage to 5V using the DC-DC Step-up converter. Below is the connection diagram I used:
3. A software feature to monitor the battery charge. Using the diagram above, I connected A1(analog pin 1) of the arduino to the positive terminal of the battery to measure current charge of the battery. I used the following codes:
Here's the actual pictures of the components I used:
Some of the components I used can be bought from my sulit shop http://n92seller.sulit.com.ph
The New Features
I've added 3 new features which are as follows:
1. 2 new buttons to control the brightness. This is just a temporary version, I just want to check whether it is nice to have a button and to control the brightness. It turns out that yes, it is indeed needed. I still am thinking if I will make this permanent because I plan to control the brightness, contrast, set time and date, store important dates and alarms using the pc. I connected the 2 buttons using the schematic below:
2. A back-up battery with Charger and DC-DC Step Up converter. The clock will not be connected to the pc 90% of the time so a battery is needed to power it up and must be rechargeable just like cellphone. I used the AREF pin to bypass the on board regulator of the arduino because it is not efficient. The battery is rated 3.6V so it is not enough to power-up the arduino that is why I need to bost that voltage to 5V using the DC-DC Step-up converter. Below is the connection diagram I used:
3. A software feature to monitor the battery charge. Using the diagram above, I connected A1(analog pin 1) of the arduino to the positive terminal of the battery to measure current charge of the battery. I used the following codes:
val3 = val3 + analogRead(1);analogRead(1) will return values between 0 to 1023 which is summed up to val3 40 times and the average is taken and converted to voltage reading.
charglim++;
if(charglim>40)
{
val3 = val3/charglim;
val1 = val3/204.6; //0-5V
charglim = 0;
val3 = 0;
}
Here's the actual pictures of the components I used:
Some of the components I used can be bought from my sulit shop http://n92seller.sulit.com.ph
Subscribe to:
Posts (Atom)


