Project Salted – 1

This project will go on into the next year, and a few months further. What is the project about? [mysterious music] I cannot reveal that. [/mysterious music].

Those of you into writing code will see through it easily though. But it needs to be kept secret from someone I know, so there won’t be a direct reveal here of what it’s all about. Not till its done.

I have given it some thought, and at this stage it involves the following components, in a order that makes sense in a way:

  • a tin box
  • a 3″x 4″ protoboard.
  • RGB diode.
  • a bluetooth module
  • an arduino nano
  • bamboo kebab sticks
  • white handmade paper
  • Processing code
  • Arduino code
  • Android app
  • wires,resistors,a switch (SPDT

My first major aim was to get a particular piece of Processing code working that would read the color values from under the mouse pointer on a loaded image and transfer those values via serial to the arduino. It works now and you can see it in the attached files.

The next step was the work to be done with those values by the arduino. that’s all i can say, without saying too much. It works too and the code’s there in the file. 🙂

What remains to be done is interfacing a bluetooth module with the arduino for wireless communication. I am still hunting for one, but for now have a HC-06 in mind. Have to learn soldering to use that though. Solder gun et al on the way from an online shop.


Here’s the breadboard circuit for one-quarter of the project. Doesn’t look very interesting right? I know. The major work happens in Processing. Tata for now. Updates coming up.

[mysterious music]


[/mysterious music]


arduinocode_secp  processingcode_secp


Two chatty radios

two chatty radios
two chatty radios

That’s two radios talking to each other! The breadboard has a Arduino Nano clone, the one in the bg is a Arduino Uno. With Radios on each. The laptop screen barely shows the two serial monitors 🙂

Here’s what the say:

Serial Monitors
Serial Monitors

Code courtesy: maniacbug

Project.RFID (1)

Ok, a bit of a progress report.

I have managed to get the RFID reader part working, like I said in the previous post. Almost working. There are still some kinks which I need to iron out, more about them at the end of the post. For now, here’s what my setup looks like:


The image is cool right? I made it in Fritzing – a really nifty utility for drawing your prototype circuits and much more. Get it here :

And the code’s here: rfidcode.

I will explain the above image a bit first.

I am sure you recognize the cool-blue Arduino Uno on the right. The little black rectangle marked ‘RFID’ on the left is the RFID reader. It actually has many more pins, but I couldn’t find the equivalent part in Fritzing. The one I have looks like this:

RDM6300 RFID Reader
RDM6300 RFID Reader
  • All the black wires go to ground.
  • The orange wire sends data from the RFID reader to the Arduino.
  • The red lines are the power lines.

There are a couple of LEDs and resistors in there too.

The way the sketch works is:

  • When I wave a card over the antenna, the RFID reader sends the data through the TX line to the Arduino’s RX pin.
  • The Arduino stores the data in an array, compares it with the stored card values and lights up the relevant LED. Its pretty simple actually.

The part that needed work was the comparison with the stored cards. You can see it in the compare_card and give_output functions.

But fun 🙂

The issues I am having is of multiple reads. If I wave a card across the antenna, Arduino stores the incoming data in the serial buffer. In the code, if data is available at the serial buffer, Arduino processes it. This is good. But then it does the same thing more than once. So if wave a card once, the LED lights up three times, with three “Hi Harshad!”s  printed on the serial port. That’s not what we want. It also messes up the stored card values in the array. Still haven’t figured out why its doing that, really.

More later!!

Arduino: Project.New

The last 3 weeks went in figuring out the Arduino and learning a little about basic electronics. I hadn’t paid much attention to electronics in college, so it was as good as a start from scratch. Right from reading how current flows to how microcontrollers process data. And resistors, phototransistors, potentiometers(pots!), capacitors, breadboards, switches, relays, power supplies….you get the idea. The programming part has been comparatively straightforward, since I have had some familiarity with VB6 and because of the (awesome) final year project. (I long to go back to work with my guide, Mr.Bamnote. Amazing time it was. More about this in a later post).

It’s been good, good way to pass the time in-between writing essays for the MBA programs and dohffice.

Last week I began work on my first ‘real’ Arduino project. The idea is simple: I want to create a system which sends an alert each time a particular container is kept in the refrigerator. When the container goes in, mom can set the ‘shelf life’ for that container through an app on her phone, i.e for the food in the container. As the shelf life approaches, she gets reminders on her phone, so she can take it out before it spoils….

Its a simple idea. For now, I have the following system in mind:


Location 1 is a unit that would attach to the fridge.

Location 2 is the unit which will eventually be replaced by mom’s phone.

I have got these parts for the project:

  • A RDM6300 RFID reader (125 KHz) with two tag cards.
  • NRF24L01+ 2.4Ghz Wireless Module for the radio communication between the two locations.
  • Will be getting another arduino board to help the NRF24 and RFID reader communicate at location 1.

For the programming side, it’s the Arduino IDE. For the later part, where I will be writing an app for the phone, I am thinking of using Processing.

As of this writing, I have mostly figured out the code and circuitry for the RFID reader part. I may need to replace the RFID reader later because of the limited range, but its good for ‘prototyping’  (Damn I am using geekspeak already :P).

In the next post, I will go into the details about the code and circuitry, and will upload the code and the circuit diagram of my current progress.

Current Dabble – Arduino!

I am sure you must have read at least one story somewhere which is about a person starting to do something and suddenly realizing that that particular thing is what he/she was meant to do. It becomes a passion. Something he/she becomes really amazing at. It leads to some great deeds and tons of money. And a story that can be told with a heroic music score in the background.

I am still trying to find that one thing for myself. Something with ‘passion potential’.

Many times, I have these false alarms. I start off with something, get really excited about it, and think, ‘Damn, I can do this all my life and get really good!’. This ‘state’ stays for a couple days, max. Then there comes a fine morning when the whole thing feels kinda stale. And its not cool anymore. Happens to you?

There is this general ‘group’ of things I have a waxing and waning interest in – Linux, video games, board games, RPGs, Tarot, tinkering, DYI, cars and bikes, programming. The more ‘permanent’ or ‘mostly constant’ interests are reading and writing. Then there is this whole set of things I pick up a fancy for, and give it days and days of time – I spend the time researching, reading, buying stuff, trying it out, fiddling, getting excited, reading all the material I can get – till it sort of wears off.

So I think, maybe this ‘trying out stuff’ thing is the thing with ‘passion potential’? Not a very happy thought to me honestly, but I am gonna stick with it till I hit something else. I am going to call these episodes of trying stuff ‘Dabbles’. And my current dabble happens to be the Arduino – an ‘open source prototyping platform’.

So how did i come across this? It happened in a way that is typical of me. I have a friend, who is also a published author and a really cool guy. I met up with him the other day over coffee, and he told me about this ‘Maker Fair‘ he had attended in China. A Maker Fair is basically a ‘fair’ where ‘makers’ come together. Who are makers? These are mostly DIY enthusiasts, people who have a passion for inventing, tinkering, modifying, modding – just making new stuff. And really cool stuff at that. How does the Arduino fit in into all this? Well, the people behind Arduino have pitched it and made it in a really cool way – it is a package consisting of a microcontroller board and a programming environment for the microcontroller. What does this mean? The Arduino board is basically a small computer – but still a very capable computer – which can be programmed on your laptop or home computer to do different things. But the coolest thing here is that the whole deal has been dumbed down enough so that even non-technical guys, i.e people who haven’t ever coded anything or have no idea about any electronics, can buy an Arduino and use it in their projects to make really cool stuff. And believe me, in the right hands, this thing can do wonders. Just google ‘Arduino projects’ and you will see what I mean.

So, yeah, my friend was telling me about this Maker fair, and all these guys who were there with their Arduino powered projects, and I felt I knew this. I had read and have been reading about the Raspberry Pi on and off. I knew that it was a capable computer on a board running Linux. I had looked it up a few months back, and it was selling in India for around 3k. I didn’t have that kind of spare cash then, so I had skipped it. When I came back home after the meeting with this friend, I googled Arduino and there was this ton of info all over. Everyone seemed to be talking about it. It was also featured in some project by Adam Savage ( There was quite a lot of stuff happening around it in India too.

So I got really intrigued, and spent the next couple days reading about it. I started getting these Steve Wozniak-y vibes out of it – I had read his autobiography, iWoz, in which he writes extensively about microcontroller chips and his friends at the Homebrew Computer Club who are all kicked about the new microcontroller chips coming out in the market, way back in the 60s and 70s (Er, Steve Wozniak is the guy who virtually made the computer, and is the co-founder of Apple, with Steve Jobs. If you can, just go and read iWoz. Its a brilliant book, and he is an awesome guy.). While reading that book, I had had this geeky longing to have that kind of a feeling, you know, where you are really interested in something new thats happening, maybe you don’t understand it fully, but its exciting, and you want a part of it. That feeling when something new comes out, and there is so much pleasure in buying and owning it, even though you don’t have much of an idea what are you going to do with it. So I had this feeling for the Arduino, and I wanted it. A few quick google searches later, I had ordered for myself an Arduino. And I also dug out iWoz again. Exciting times indeed 😀

In a couple days, I received my Arduino (In the two days it took to deliver, I had called up the store once and written them two emails while waiting for it to get delivered…teh impatience!). A really cool box the size of a credit card, a cool looking card inside it, a small sticker set and a manual. Trust me, this kind of stuff gives a geek a kick. I was happy.

I plugged my Arduino into my laptop, and within an hour had my first program running. One that caused an LED on the board to blink. I imagine myself building projects like an automatic water-er for mom’s plants. Or lights I can turn on and off using my smartphone. Or something else. I have ordered a kit full of stuff – LEDs, resistors, photoresistors, switches, breadboards and battery packs to use in my projects. I have fashioned a little tin box for the Arduino, have stickered it up. I have signed up for a Arduino Meetup in my city. I spent time sitting with colleagues in office with electronics training, and got a crash course on the basics. I have downloaded the datasheet of the processor, though I can’t understand one bit of it. But it looks like so much fun!

And the most awesome thing about it? It’s Open Source.

More coming up!