Delays could be very important: Making two Arduinos talk

Posted April 5th, 2012 in Stuff, tech by AJ

Ardunio is an interesting easy-to-programme microcontroller platform which anyone can use it to bring their ideas into reality. I’ve been using them for more than 2 years now in my projects (both hobby and job related), and found them extremely handy for prototyping. Highly recommended for anyone trying to build things on his own.

Recently I was developing a prototype for a potential startup, and found myself using them. It turns out that I’ll have to use two Ardunio’s Uno boards (just google if you don’t know what they are) altogether, and let them share data among them. To start of with I followed this video, and went around building my application. Turns out that I cannot receive or send data!!!?

After two sleepless nights, I discovered that the problem is in ‘delays’ I am defining in my code to communicate over the Serial. And here is math explaining why-

In my case I started serial connection at baud rate of 115200, and I was transferring 8-bit characters which eventually make a string. So time required to transfer an 8-bit character at 115200 bit rate, you need at least delay of-

Delay_min= 115200/8

Thus, when I gave the delay of 14.4 ms and above, my ardunios started communicating well [in adruino code, delays are defined in milliseconds].

P.S. – The schematic do not show serial communication which was used in this project, but shows I2C protocol for connecting two Arduinos .

Such a big Deal!?

Posted November 17th, 2011 in Stuff by AJ

It all started when groupon came up with an idea to provide self-grooming and beauty services at a discounted price. They were targeting females working in offices behind the desk who are bored of work and unlike males donot want to goto a sports/adult website to cheer them up. But what started as a tiny little convenience and a way to save few bucks in pocket has now become a big pain in ass now. To my surprise, today so far I receive 10 emails and all are of some deal site or the other. And all of them are equally good as spams.

Comeon! no more deals for me

Its true that once I signed for groupon’s newsletter and was happy to receive them every afternoon after lunch. There will be some deals I’ll forward to my friends and even give them a call to emotionally force them to buy with me. But now like several others I’m over it. This all came at the cost of a huge pile of unnecessary items lying in my apartment plus going to places where I always wanted to go but now never want to. The worse of all is that companies like Amazon, ebay etc have also started ‘spamming’ my mailbox with their own daily deal services for which I never signed up for. One of my friend even told that he has received an email from Paypal today for another deal service started by them.

I hope one day these companies ‘grow-up’ and actually make something which makes our life easier and not so complicated. Or else soon these deals mail will find their place in my folder containing Nigerian inheritance and Pen** enlargement deals.

From Inventor 2011 to AutoCAD

Posted November 8th, 2011 in Stuff, tech by AJ

If you are designer/engineer using Autodesk’s platform then there are times when you have to export a sketch from Inventor to AutoCAD. However direct copy-paste doesn’t work at all, and there is no visible option to save file in AutoCAD readible format. If you happen to come across such a situation, then follow this procedure-

  1. Finish your sketch (after performing extrusion etc).
  2. Browse to the sketch which you want to export and ‘right-click’ on it.
  3. You’ll see ‘Export Sketch As…”.
  4. Thats it, choose your format and you can easily import it in AutoCAD.

Following image speaks it all. Happy designing!!

Inventor to AutoCAD

Can a pressure regulator be used as a back-pressure regulator!!?

Posted October 13th, 2011 in tech by AJ

The answer is NO. Even if you reverse the inlet/outlet.

I spent some of my precious work-hours in last two days to get an answer to it. I searched the web, talked to the technician at the workshop but still couldn’t find a suitable answer. So I had no other choice then to work it out myself and post it here for mental sake of other fellas.

If you don’t know what what these regulators are, you can google(/wiki) it. Simply put, a pressure regulator will ensure the moment pressure in a vessel or system falls, the valve open up and ‘replenish’ the pressure in the system by getting more fluid (gas) from a higher pressure source connected at the inlet of the pressure regulator. Thus, pressure in the system remains constant to the set value. Contrary to this, back pressure regulator (BPR) will ensure the moment pressure in a vessel or system rises, the valve opens up and ‘vent’ the pressure from the system into a low-pressure source (atmosphere). Thus, pressure in the system remains constant. The following table taken from this link explains it all-

Type Pressure Reducing
Regulator
Back Pressure
Regulator
Schematic Pressure reducing regulator diagram back pressure regulator diagram
Controls Pressure Downstream Upstream
Opens to: Increase pressure downstream Decrease pressure upstream
Closes to: Decrease pressure downstream Increase pressure upstream

 

In general the Pressure reducing regulator is a ‘Normally open’ valve on the other hand the BPR is a ‘normally closed’ valve. So they respond opposite to the pressure change. This ppt explains the working of pressure regulators well. I will love to hear about your experience with pressure regulators too, so feel free to share it with me.

Bacon ‘n’ Islam

Posted October 3rd, 2011 in Stuff by AJ

I guess everyone of us know about swine in Islam—a forbidden creature. It is ‘haraam’ to eat or consume products made out of pig. But the big question is why!?

I don’t know what recently motivated me to put together my own outrages explanation, may be for my own self or may be just for fun. Although I have a feeling that the movie ‘Contagion’ has something to do. Anyways, the good news it I have the first answer-’Its all because pig is an excellent vector and carrier of diseases!!.’ Sounds a bit off, let me show you how.

There are numerous pathogens swimming around us all the time, and each and every second we come in contact with them. Thanks to our immune system or pathogens’ inability to survive in our human body, we walk around freely without health issues. Another interesting reality is that pigs are as good (or in some cases better) biological models for humans as monkeys. So, if there is a disease which can infect or ‘survive’ in pigs, chances are that it will very easily infect humans as well.

Lets talk a bit about halal diet (correct me if I’m wrong). In halal diet, you can eat any animal which has been sacrificed following the religious codes. Now there are three types of animal categories—Carnivorous, Herbivorous, and Omnivorous. You will rarely find anyone eating carnivorous animals (except some foxes). Herbivorous animals eat only ‘herbs’ and due to plant’s extreme dissimilarity with animals, plants infections can ‘rarely’ infect humans (toxins are a different story though). So we are left with only omnivorous. Out of all the omnivorous, swine is the only widely available and common scavenger in human reach. Which means if required pig will eat whatever he/she gets—even a fellow dead pig. If a pig eats an animal infected with some sort of virus, the pig as well will get exposed to the virus. If the encounters with this virus are limited, then the virus will not ‘mutate’ and start infecting the pig itself. However repeated encounters may very well lead to mutation, and the end result will be an infected pig. If a human consumes an infected pig, the virus will very well infect  the human due to biological similarities between humans and swines. Once the virus is up and infecting humans, rest all will be history.

Founders of islam might have been aware of this fact, thus they forbid humans from eating swines. ‘Prevention is better then cure’. Also, recently one of my Iranian friend told me that you are exempted to eat swine if you are starving to death( and only swine is available). Thus, there is no feud between muslims and swine, its just that Prophet Mohammed knew what a swine can do.  This explains it all…

P.S.- I’m still compiling a list of human infections caused directly or indirectly by pigs. That will give us some statistical insight as well.

Disclaimer:-”These are all my principles, if you dont like then I have others too!!.”