Skip to main content

Posts

ESP12E Relayboard and Alexa

Recent posts

Arduino and RS485 communication done from scratch....

This experiment was bit delayed due to lack of libraries for RS485 for Arduino. After lots of frustrations, i manage to make it work with soft-serial. Master controller send the command in bytes with [slaveid,status,level] and when a specific id slave response to it and lit and LED. Level byte is an analog value sent by master to dim the LED.
RS485 is a long distance communication protocol which is used is several industrial applications so it can be used to monitor and control devices in a twisted pair network.

What is Charlieplexing?

When you use microcontrollers and you are out of PIN's to connect some LED's for status or when you want to drive a binary clock with few pins left in microcontroller, there is a way that can solve this issue.
Its called charlieplexing and if you know multiplexing you will have some idea of how it works. I will do an example using Arduino for demonstration.
Charlieplexing is a method to drive multiple LED's with few pins available in your microcontroller.
Here is the formula to calculate how many LEDs can be drive from N number of pins.

Number of LED's = No. of PINS available ( No. of PINS available - 1)

For example you have only 3 pins left in Arduino and you want to know how many LED's can be drive.

Number of LED's = 3(3-1)
Number of LED's = 3(2)
Number of LED's = 6

So from 3 PINS you can drive 6 LED's.

Since arduino have tri-state output (INPUT, HIGH and LOW) its easy to drive the LED's using this method.
L = LOW (make out pin as LOW)
H = HIG…

TCP communication from NEOWAY M590E- Successful

Some of the GSM/GPRS chips do not support HTTP services and since the modems are controlled via AT commands, the AT command sets are very limited to HTTP commands in NEOWAY M590E.

The only option to communicate with any cloud based or locally hosted server was using TCP protocol. I have used HTTP services in many of my projects and experiments, it is easy and with few lines of code can manage an HTTP requests. For weeks i have been struggling with TCP request and every time it fails to connect or sometimes data is sent but from server side there is no new data fetched.

Basically TCP is transport layer in OSI model and HTTP is in application layer. TCP will do a socket based connection to servers predefined port. For example  test.com:8989. what i mean is it needs a listener to listen to port that you define or open to use.

After weeks of reading articles and AT command sets thoroughly, finally i managed to handle a TCP request from modem. But still it fails sometimes or unable to conn…

SIM900A TCP connection test - 1

I have been working on some real time data acquisition and control application designing. Specially micro-controller based hardware designing and prototyping. For testing purposes i am using SIM900A GSM/GPRS module and FTDI UART converter. 
SIM900A module is connected to PC via FTDI converter. I use putty as a terminal program to communicate with the module. With required baud rates i am able to communicate with the module by sending a simple AT command (AT command set will vary with different modules) just sending AT the module replies with OK. This means module responded to the command sent from PC. Lets go ahead with TCP AT commands to establish a TCP connection to remote server via GPRS connection.

I have run socket test software on remote PC and opened port 7777. You have to check your firewall or router settings to allow your preferred port. While the software start listening to port 7777, lets continue with the sending AT commands to module from the PC connected to module.
Afte…

Pi Zero

After a long Que of waiting for Pi Zero,i have received it. The size of Pi Zero is very small and compact comparing to other versions of Pi. I am not going to give a review on Pi but since i like the Raspberry Pi. i would like to give some information on what i did to test its performance. For technical details go directly to raspberrypi.org.







 For testing purposes i installed OSMC and test as a media player and i am happy with the performance. Later i installed RetroPie and check how the new hardware performed. RetroPie is cool that it enables to play almost all the retro games that we played when we were young. :)

I am not interested of GUI so kept aside all the i candy parts and focused on controlling GPIO and runing python scripts and bash script for external hardware communication. Overall what i can say is the waiting for Pi Zero is not time wasting, Pi Zero is better and faster. Thumbs up for Pi Zero.
What i am thinking is to use the Pi Zero for my home automation project which…

Being away

Due to few technical and other issues i have been away from blogging my electronics project and experiments i do. Lets hope this start will be better than all the past years. I have few things which i would like to write some article that others get the benefit of.
Few months back i got my Raspberry Pi Zero and did some cool things using it. Recently i am on to IoT stuffs so i cam across few new things for me, like MQTT and integration of hardware to MQTT server ruining locally. Possibilities are endless, i can make my light talking to MQTT server and it will handle rest by communicating the hardware like Arduino, ESP8266, Pi etc. I will detail one by one on my next post.
Thank you everyone who support my blog and gain knowledge from my articles. Stay tune for more update from me.