Friday, 20 October 2017

Android Voice Controlled Servo Motor Controller : IOT Version using ESP8266


Last week, I created a Voice Controlled Servo Controller using Bluetooth HC-05. This week, I created an IOT version of the Voice Controlled Servo Controller.

Used Strategy Design Pattern (both on Python and C++) to achieve flexibility to switch between the Bluetooth module and ESP8266 module.

Sunday, 15 October 2017

Android Voice Controller Servo Motor Controller using Bluetooth


This is a voice controlled servo motor controller. I created this just for fun. I used the following:
Arduino Mega
Arduino IDE C/C++
Android Speech to Text
Bluetooth to Serial using Serial Port Profile
Python SL4A
Servo Motor 

Saturday, 7 October 2017

Embedded Linux: Buildroot and BeagleBone

Buildroot for BeagleBone Black - Hyperterminal @ 115200bps
I just created a custom embedded linux platform using Buildroot for my Beaglebone Black. Buildroot is very easy to use. I was able to create my Embedded Linux image within 1 hour (including the Buildroot compilation).

I posted the whole procedure on my youtube: https://www.youtube.com/watch?v=QLzGKIx9Mz8

I used LUBuntu because it is more lightweight compared to the main Ubuntu distribution.

Monday, 2 October 2017

Test Driving: nRF24L01 + my observations vs CC1101



I am currently trying the nRF24L01 and it is very easy to use. In as little as 30 minutes I was able to make the two modules communicate with each other.  I had just started playing with it since yesterday and one thing that I am looking for is an RSSI readout. Unfortunately, this only has a boolean return value for the Received Power (RPD). If received power levels are more than -64dBm, you will get a 1, less than that, you will get 0. In CC1101, I can get the absolute value of the RSSI and convert it to dBm accurately.

I used the steps on this link to setup my nRF24L01.

Sunday, 3 September 2017

Vicks Humidifier Modification: Adding a Humidity Controller with Hysteresis

One winter night, I woke up and my room was very foggy. I checked my Sunbeam humidity monitor and the humidity is around 80! I immediately turned off my Vicks humidifer (which I bought from Walmart). We all know that molds are the number 1 enemy in a very humid room. Since now, it is summer, I was able to do some modification and a bit of reverse engineering.

First, I opened the Vicks Humidifier and checked all the circuit inside and I did my first prototype and sensor characterization on an Arduino Mega 2560.

Unmodified circuit


Arduino Mega Prototype with DHT-11


Next,

Next, I modified a couple of things inside the Vicks humidifier. I only have 24V DC on the board and I planned on using an Arduino Mini. I checked Arduino Mini's schematic and it uses MIC5205 regulator. From MIC5205's datasheet, normal operation for Vin is from 2.5V to 16V. Since I don't have any regulator in my hand, I just created a 12V power supply using P2N2222A in emitter follower configuration with voltage divider in it. I used this 12V to power my Arduino Mini.

Next, the float switch needs to connect 24V to certain part of a circuit. I modified this and since I don't like to use a relay in this scenario and I want this be have a lower power consumption, I created a PNP/NPN combo to deliver the needed 24V on a part of Vick's circuit and this triggers the ultrasonic mist generator and the internal fan.

Almost Complete


Now it is working. I implemented a hysteresis from 50% to 60% of humidity.

Arduino Mini Mounted


I removed the scent filter since I think it is not that useful and it just consumes additional power. The DHT-11 humidity sensor goes out via the scent filter.

Saturday, 19 August 2017

1st Time to Join a Hackathon : Lessons Learned

I recently joined a 1-day Hackathon and we were two on the team. There are lots of lessons learned. I will also place comments in italics on how we are doing on every items.

  1. Make sure majority of the tools are installed on your PC. Or, at least, the installers should be on your PC. Downloading the installers and installing them will eat some precious time. We are very prepared when we came to the venue.
  2. The moment the organizers give the Challenge Statement, brainstorm. Refrain from doing any coding. As I have project management background, we were able to come up with a good game plan and a solution to the Problem Statement.
  3.  Make sure you are familiar with Git. You don't have to be an expert in Git. You must at least know how to clone, push, pull, and commit. If you are new to Git, use a UI tool like TortoiseGit.
  4. Work incrementally. Whenever you have a working code, ALWAYS COMMIT TO GIT! That means having more than 3 commits per hour.
  5. Take frequent short breaks. As I am the sole developer, I need this because of the stress on the time limit.
  6. Respect the developer's time. When I was coding and debugging something, my partner keeps on giving suggestions that is not on the context of the problem we are currently solving; therefore, I wasn't able to absorb a thing he is saying since I am focused on doing something.
  7.  Try not to panic when something is wrong. On my case, I did panic at around 3:45PM. I though my software is not working, but when i figured out, the online JSON viewer is showing me the JSON on a wrong way. The data was represented like this: Data1,Info1,Data2,Info2. Due to the constant pressure, I missed that and I thought it was Info1,Data1,Info2,Data2. Try to take note of the details of the datasets in case you are working on Open Data.
  8. There will be different kinds of people on the venue. Remember the panic that I had on the previous item? When I was dealing with it, some of the people on the other team are celebrating on how good their system was. I panicked crazily. If you are like me, make sure to bring headphones and listen to some MP3 songs. This will help you avoid hearing other people and avoid more panic.
  9. After you are done, make sure to talk to some other teams and be friendly. If you ask questions on what they did, they will most of the time give you an overview on what they did and you will see how proud they are of their work. You will also learn from them.
  10. Enjoy the foods!
I think we did pretty good on the Hackathon. We were able to "WOW" the audiences. However, there is one thing that we missed:

YOU NEED TO KNOW THE SPONSORS AND THEIR NEEDS.

The main sponsor of the Hackathon are doing web apps. And we did a mobile app. All the winners created websites. No mobile apps won on that hackathon. If you would like to win, create a solution AND use a technology that would be inline with their business needs as much as possible.

After that Hackathon, I was too tired. Although it was a good experience. Now, I know what to expect on our next Hackathon.