Sony Arouje

a programmer's log

First time experience with Analogue Photography

leave a comment »

I was shooting in DSLR and mobile phone for quiet a long time, I started with D40 and some years ago moved to D7100. Photography is my hobby and I am not a pro. One of my long time wish was to shoot in Film but I never got a chance to realize my dream. Thoughts that kept me away from buying an SLR was

  • Is it worth to spend money on some thing that is difficult to use
  • Cost of the film
  • Who will process the films and cost involved in processing and digitizing

A month ago, my CEO Simon Weeks visited India and he gave me a very surprising and one of my most valued gift, a Nikon FM3A along with couple of Black and White films. It’s one of the greatest Camera ever made, Ken Rockwell has a great post about this camera. With this Camera, my journey starts in Film photography. At first I didn’t knew how to load a film, Simon gave me a short introduction about loading the film and theoretically he take me through the processes of washing the film.

Capturing

As a DSLR user, I am habituated to check the LCD to see the preview of what I captured and adjust the exposure settings, if I am not satisfied. In film world I have no preview, so I should be very clear about the metering techniques and exposure. I have a good knowledge about Exposure but I refreshed my knowledge once again to make sure I will not do any mistake while capturing in film camera.

Photographing in FM3A is quiet a new experience. This camera will not autofocus, but the split screen focusing system is a great feature, which allows me to focus easier. Still I get some out of focus photos and learning my focusing skills. I really enjoy photographing with FM3A, it’s a very simple system, not many settings to fiddle with. Adjust the exposure and Aperture (if needed) and click shutter release, as simple as that.

Note: Shouldn’t try film SLR, if you are shooting in DSLR with Auto mode dialed in. It’s like sitting in a driverless car, in this case camera adjust Aperture and Exposure by itself, photographer only need to do is simply click the shutter release button. Instead in SLR world, you need to adjust the exposure yourself.

Processing

I went through a lot of articles and videos explaining the film processing. First thing to do film processing at home, is a developing tank, I checked most of the Indian ecom sites and they were pretty expensive or I didn’t like it much. From one of the facebook group I came to know about fotosingstore.in and ordered a Paterson Developing Tank

In my searches I come across film photographer named Prasanna Subbarayan,  in one of the post he talk about developing film using XRay developer. I contacted him via email and later I talked to him via phone. He gave me the chemistry of developing using XRay developer. I got some developer from my Dentist and developed the first film roll. The result was good. First of all I cant judge my developing skills yet, learning from mistakes.

For developing my second film roll I bought Sterling Universal Film developer from GG Wellings, Sterling developer cost 60 Rs, to create 1 litre stock solution. I used XRay fixer to fix 35mm film.

Ofcourse I need a dark room to load the film, as of now I used one of my room at night with all light switched off, to make complete light proof, I cover myself and film using a blanket. It’s too hot : ). My father is making a setup to load film, I will update the photo of it later.

Digitizing

I used my DSLR to photograph the negative, then invert it via any processing application. But I didn’t get a good quality from it, to get good quality I need a macro lens. Then I tried with my iPhone camera and started getting satisfactory images. To capture the film, I created a small light box using an empty cardboard box. I felt like, I am getting a better result than anticipated, I decided to buy a dedicated Film Scanner. I got a good deal in Amazon.in for Canon 5600f and bought the scanner too. I did some scanning and I am getting pretty decent photographs.

How to reduce cost in Film photography

Every one knows film is the costliest part in film photography. In India, an ILFORD 100 cost around 800 INR. It’s pretty expensive. One way to reduce cost is to buy bulk 100ft films and use a day light film loader. This will reduce the cost to around 60INR per roll. My next item to buy is a Film loader and couple of reusable cassettes. Then I can be a full time Film photographer 🙂

What I love about Film photography

When I edit my DSLR photos, mostly I convert my photos to Black and white, I tried to achieve a film feel with a bit of grains. Now with film, I got what I really wanted. Also the process of developing, and after 15 to 20mins of development process, the moment you see the washed negative, it’s all real fun. I really didn’t get that anticipation in Digital world, I know what I got from the Preview screen of my Digital camera.

Some of the photos I shot in FM3A

 

 

You can also see more photos of mine at lumiagraphs.com

Written by Sony Arouje

August 30, 2016 at 11:10 pm

Posted in Misc

Tagged with , ,

Logitech M570 Button click issue

leave a comment »

I am using a Logitech M570 for last two years. It’s a pretty good mouse and a bit expensive. Unfortunately Logitech uses some pretty cheap crappy switches for left and right buttons. After a year the mouse wont register button clicks properly, it’s a nightmare to use it. I did every thing I can but no changes. I live with that situation for some time and then decided to change the mouse, but couldn’t found any mouse that’s very similar to M570. Recently I did some searches and found one video that shows, how to rectify this issue by changing the switches. The video was very explanatory and guide me to open the mouse and successfully taken out the board.

Board

IMG_1422

I have to remove those switches outlined in Red, those are very cheap switches. Logitech taken us for a ride with these switches on an expensive mouse.

I have all the necessary tools to desolder these switches from the board and in some time I taken out those switches. I need to give a little pressure to remove this switch after desoldering.

IMG_1426

 

Omron D2F-01F

To replace the switch, I bought couple of Omron D2F-01F switches, these are very high quality switches made in Japan.

IMG_1425

After fixing the new switch, my mouse is good as new. Both left and right clicks works perfectly.

 

Is it worth the fix?

For me yes, buying a new mouse is a costly affair and I have all the necessary tools to replace these crappy stuffs. Even if I buy a new one, most probably Logitech will be using the same switches and I will be in trouble sooner or later.

 

Note: Try to get the Omron Switches from any dealer, do not buy from Amazon or any online sites. The cost of these switches are less than 80.00 INR, in Amazon these switches cost around 319.00 INR.

Written by Sony Arouje

August 10, 2016 at 11:14 am

Posted in Misc

Tagged with ,

ISP Shield for Arduino Uno to program 3 different Atmega

leave a comment »

Couple of weeks ago I designed and etched a home made pcb to program my Atmega 40 pin family micro processors. After that I redesign the PCB layout, so that I could program all the necessary processors like Atmega 40 pin, Atmega 28 pin and Attiny 8 pin family processors in a single board. I named this board as Kevino after my son Kevin. I also wanted this board in Red because my son is crazy about Red but fab house said it’s difficult for low volumes, so went with standard Green solder mask.

I received the board yesterday and assembled all the components. Below is the final outcome.

Snapseed (6)

 

 

Features of the board

1. Program any one chip by selecting the respective chip via the red dip switch.

2. The chips can be Bootloaded and programmed via Arduino uno Or using a USBASP programmer.

3. Should be able to program and monitor serial communication using USB to TTL Adapter. I can plug the TTL adapter to the female pins in the board.

4. I can also test Blink program, an on board LED to test Blink and make sure the chip bootloaded successfully.

 

Let see how it looks when connected to Uno

Snapseed (7)

 

With this shield I can Bootload and program all the Atmega Processors I used for experimenting.

 

Happy hacking…

Written by Sony Arouje

July 3, 2016 at 1:16 pm

Home made DC – DC converter for Microprocessor

leave a comment »

One important tool when you deal with Microprocessors are, regulated power supply. To power my standalone Atmega’s and test the working I assembled a regulator in a breadboard along with Atmega. I cant relay on some thing running in a breadboard, a loose wire can create tiring troubleshooting. So I decided to build a permanent solution by creating a PCB and assembling the components.

My requirement is simple, connect a 12v adapter and I need 5v and 3.3v output. The 3.3v should provide a minimum 300mA. I have to use this power supply to power ESP8266 or any module that uses 3.3v. I am using LM2575 to provide 5v and LM1117 for 3.3v. Theoretically LM2575 can withstand upto 40v.

Below is the Schematic.

schematic

 

Here is the PCB I created and assembled at home.

Printed side

IMG_1374

Lacking some soldering skills, still learning how to solder well.

IMG_1373

 

I can give input voltage via the DC Jack or screw terminal. Three female pins at the right hand side provide 5v, GND and 3.3v. Forgot to include a LED to show the voltage status.

Written by Sony Arouje

June 30, 2016 at 11:42 pm

Digital I/O Expander for Arduino

with 5 comments

When we work with processor like Amega328 or ATTiny85 we will come to a situation like we are running short of GPIO pins. One option is to go for 40pin processors like Atmega16/32/324, etc. But there are some cons with 16/32, these chips doesn’t have PCINT (Pin change interrupt) and we cant use software serial. If we are not dealing with Software serial then we can use these MC’s without any issues. Some of the experiments I am doing, deals with Software serial, so I decided to use Atmega328. But I need more Digital I/O pins. To get more IO we can pair Atmega328 with GPIO expanders like MCP23017 or MCP23S17.

Keep in mind that MCP23017 talks via I2C and MCP23S17 talks via SPI. I prefer I2C as it uses two pins of my Arduino, SCL and SDA. SPI needs 4 pins, MISO, MOSI, SCK and RESET. Also in my system there are several other chips connected to I2C bus and thus deals with only one type of communication.

Lets see how to connect MCP23017 to Arduino

MCP23017 Pinout

 

As you can see we have 16 GPIO’s in MCP23017, 1-8 and 21 to 28.

Connection

  • 5v to pin 9
  • GND to 10.
  • Arduino SCL to pin 12
  • Arduino SDA to pin 13.
  • MCS23017 RESET pin to pin9 with a 1k Resistor.

Now we need to set the I2C address of this pin. You can connect upto 8 MCP23017 by changing connection to A0 to A2 (pin 15 to 17). For e.g. connect all three pins to GND will get an address of 0, connect A0 to VCC and A1 and A2 to GND will give an address of 1 and so on.

Here I am connecting all the pins to GND and I get an address of 0.

 

Schematic

schema

 

Here I am not detailed the connection to Atmega328. I focused on the connectivity between 328 and MCP23017. To see how to run an Atmega in standalone mode, check this post.

Edit: As Anon suggested in comments sections, I added a pullup resistor to SDA and SCL lines. I2C is open drain and without a pullup resistor the system will not work.

Arduino Sketch

I used Adafruit library to interact with MCP23017, you also can directly interact with expander by just using wire library. There is a good post explaining how to write data to MCP23017 without any library.

#include <Wire.h> #include "Adafruit_MCP23017.h" Adafruit_MCP23017 mcp; void setup() { mcp.begin(0); mcp.pinMode(1, OUTPUT); } void loop() { delay(1000); mcp.digitalWrite(0, HIGH); delay(1000); mcp.digitalWrite(0, LOW); }

 

Here port 0 is referring to pin 21.

 

Here I talks about I2C connectivity but you can also use SPI using MCP23S17.

These expanders are not limited to Atmegas we can use it with Raspberry pi’s or any other processors that supports I2C or SPI communication.

Happy hacking…

Written by Sony Arouje

June 14, 2016 at 10:41 am

Posted in Arduino

Tagged with , ,

Schematic of standalone Arduino with FTDI Programming

with 3 comments

I recently wrote a post explaining how to setup an Arduino in a breadboard. This post will show the schematic of the system. It’s a very simple system with minimal components. Here I used Atmega 32a. To program the chip I used an FTDI module.

 

MinimalArduino

 

To program the chip via FTDI module, we have to bootload it first. I used an Arduino Uno as the ISP, I have a home made board to bootload or program Atmega 40 pin family processors.

Once the chip is programmed it can be directly powered by a 9 or 12v DC Adapter. Here I used LM2575 switching regulator to step down the source voltage to 5v. Switching regulators are very energy efficient and produce very less heat compare to linear regulators like LM7805. I am powering the system using a 12v DC source. If there is no adapter then the module can be powered from the FTDI module by shorting the jumper.

Here I configured the processor to run at 16MHZ external clock. If we are using 8MHZ internal clock then we can avoid the crystal and the two 22pF caps.

 

Happy hacking…

Written by Sony Arouje

June 3, 2016 at 9:48 am

Posted in Arduino

Tagged with , , ,

Arduino system in a breadboard

with 3 comments

After successfull completion of the first prototype of my Aeroponic controller, I decided to redesign the system with more functionalities. In the new design I need external EEPROM, WiFi and more but I am running out of extra pins in my Nano to support all the new functionalities in my mind. I cant go to Mega, as it will increase the size of my system and cost. So I decided to experiment with Atmega32a which has 32 I/O pins and can accommodate all my new requirements. But I have to run this chip standalone without all the luxury provided by Arduino board, like USB connection, Power regulation, etc.

I bought couple of Atmega32a from the market and boot loaded using the Arduino ISP Shield. Tested the chip using a blinky sketch and it worked well.

The next task is run it standalone from an external power source. Atmega32 can handle voltage upto 5.5v and my Aeroponic controller runs with an external power source of 12v. So I need to use a regulator to step down the voltage from 12 to 5v. One option could be to use LM7805 but in my experiments I could see this regulator produces a lot of heat. I come across this switching regulator called LM2575 and every one says it works really well and not produce much heat. I bought couple of these regulators with fixed 5v output.

The data sheet of LM2575 provides a schema to connect the regulator as shown below.

image

[Note: Above picture from the Datasheet of LM2575]

Yesterday night I decided to combine all the parts together to create a standalone board to run the blinky sketch.

I wired LM2575 as described in the above schema in a breadboard, checked the output voltage and it was 5v. I left the system for couple of hours to see any heat coming out. After the heat testing I decided to connect Atmega32a to the power source and make the standalone system.

 

Atmega32A

[Note: Above picture from the Datasheet of Atmega32]

Here is the wiring.

  • Atmega VCC to LM2575 5v output
  • Atmega GND to common GND
  • Atmega XTAL1 and XTAL2 to 16mghz crystal, and two 22pf ceramic capacitor from each leg of the crystal to GND.
  • Atmega RXD to FTDI USB’s TXD
  • Amega TXD to FTDI USB’s RXD
  • FTDI USB’s GND to common GND.

The FTDI adapter allows me to see the debug information I am writing to the serial port. The blinky sketch I uploaded also write ‘Hello world’ to serial port.

Let’s see how to looks in a breadboard. As you can see it’s very minimal.

IMG_1279

 

Now it’s a standalone board which can run Arduino sketch and can easily fit in my new board.

Next task will be to try programming the Atmega using the connected FTD USB to TTL adapter.

Written by Sony Arouje

May 18, 2016 at 10:37 am

Posted in Arduino

Tagged with , ,

Home made Arduino ISP Shield

with 4 comments

In recent days I started programming more on Atmega chips than Arduino boards. I use Arduino Uno as the ISP to bootload and program the Atmega chips. One of the difficulty I faced to use Arduino ISP is the wires running from Uno to bread board. If I misplace the breadboard slot while plugging a new chip, I might fry it and waste my money.

So I decided to make a shield for my Uno. It’s nothing special and not so beautiful but does it job well.

IMG_1277

 

This board is based on the Arduino ISP sketch from lydiard. I also kept a slot to plug FTDI USB to TTL adapter, which connects the Serial port of Atmega 32 plugged into the shield. Using the TTL adapter I can see the serial writes from the chip and easily debug my code.

With this board I can bootload several of my Atmega 16/32 chips and upload sketch very easily.

Written by Sony Arouje

May 16, 2016 at 11:35 pm

Aeroponic V3 – controlled by Arduino an overview

with 9 comments

Last couple of months I was building a new version of my Aeroponic controlling system. This time I dropped Raspberry pi and moved to Arduino. One of the reason I moved to Arduino is, it’s a micro controller and has no OS. So the system will not crash, in case of power failures. Raspberry pi is on the other hand runs Linux and frequent power failures might damage the OS. The new system has all the features of my old version, plus some additional features.

Overview

I decided to use Arduino Nano, for my development. Nano has a small foot print and can plug into a PCB. I also designed a PCB to hold all the pieces together, will see the PCB shortly.

I went through several iterations of PCB design. Initially I started with onboard relay modules, later I decided to remove on board relay modules and plug external relay modules. The reason to use external relay is, I can change the relays depends on the water pump’s ampere. Also I can easily change relays if it got fried.

Mobile Application: Just like last version I created an Android app to control the system but this time I wrote a native app, previously I used Cordova to build the app.

Communication: Mobile app and Arduino communicates via bluetooth. I used HC-06 bluetooth module. To make the system simple, I skipped WiFi module. May be in later version I can include WiFi or I can use Arduino MKR1000 which has inbuilt WiFi.

Power: The system runs in 12V DC. The board can be powered in two different ways, either connect a 12V power adapter with a standard 2.1mm barrel jack or use a DC converter and supply power via normal screw terminal.

 

Features of the Controller system

Controlling Water Pump: One of the crucial part of Hydroponic/Aeroponic system is the cycling of water in periodic intervals. A water pump is used to cycle the water. The controller should be able to switch on motor in a particular interval and keep it on for a configured time. Say run motor every 30 mins and keep it on for 3 mins. This settings can be configured from the mobile application.

Nutrient Feeder: In Aeroponic/Hydroponic the fertilizers (called as nutrients) are mixed into the water. In normal scenario we need to add it manually, the system uses two dosage pumps to add nutrients. We can add nutrients two way, either via the mobile app or by manually pressing a button. Through mobile app, we can specify how may ml of nutrients need to mixed to water.

Nutrient Mixer: Used a small wave maker to mix the nutrients while adding it.

Maintain Reservoir Water Level: One of the important thing to consider is, the water pump should not dry run, if it does then ready to buy a new one. In this version, used water level sensors to know the water level. The system used a solenoid valve, which is connected to a water source. When the water level goes down to a set level, system will activate the valve and start filling the reservoir. Once the water reaches a set level, system will switch off the valve.

PCB

I spent a lot of time in designing the board and come up with a very simple board with pluggable external relay modules. I am a beginner in PCB and electronics world. I had to spend my nights assembling the system in a bread board to see how each components behave. For me programming is easy but not playing with electronic components. At last I come up with a board design. Next big task was to find a shop to manufacture the prototype board. I was in touch with so many vendors and some never responded. I choose Protocircuits to do the PCB manufacturing.

Snapseed (55) 

Protocircuits manufactured a beautiful board for me. I etched several boards at home but this was awesome. I spend another night to solder the components to the board, see the assembled board below.

 

Snapseed (53)

 

Here Arduino and Bluetooth modules are not soldered instead plugged to a female header. External relay modules can be plugged via screw terminals.

About Protocircuits

I had a very good experience with Protocircuits. They are very professional in dealing with me and answering all my queries. I should thank Jeffrey Gladstone, Director Business development for his prompt replies and answering to all my queries. If anyone want to prototype a board, I highly recommend Protocircuits. You can reach them at info@protocircuits.in

Buying Components: I highly recommend to buy any electronic components directly from the market than from any ecom providers. I did a comparison with price in the market and some online electronic shops and the price was very less in market. Take an e.g. of a chip 24LC256, in ebay.in it cost 100rs for one, from market I bought the same for 40rs. If you are in Bangalore, take a ride to SP Road and I am sure you will get all the components you want.

Written by Sony Arouje

April 23, 2016 at 1:34 am

Posted in .NET

Control AC/DC devices using Arduino

leave a comment »

In forums I could see people asking how to switch on/off devices using Arduino. It’s a very simple approach using a relay module. In this post I will briefly explain how to do that.

 

Connecting Relay module to Arduino

RelayConnection_bb

 

Most of the relay module runs with 5 or 12v DC. Even if it’s 5v, never connect VCC of relay to Arduino. Always make sure Relay should powered from an external source. Most of the relay need more current (A) than Arduino can supply and might damage your Arduino. In the above diagram I used a battery (it should be a 12v battery, I couldn’t find 12v battery in fritzing) to as power source.

Here the Arduino and the Relay are powered from the battery. If you are powering Arduino separately via USB then remove the wire connecting to VIN of Arduino. Leave the GND connecting to Arduino as it is, all the connected devices needs common ground.

Relay need a trigger to switch on/off the connected device. If we supply high (5v) to INP pin of relay module the connected device will switch on, if we supply low then the device will get switched off. Here I connected D2 to INP pin of the relay. In code if we do digitalWrite to D2 with HIGH, the relay will get activated and LOW will deactivate the relay.

We can control AC or DC device using the relay. As you can see from the above diagram, the Relay is in series to the power supply going to the load. The wiring is very similar to a switch between a load and the power.

Written by Sony Arouje

April 19, 2016 at 4:12 pm

Posted in Arduino

Tagged with , , , , ,

%d bloggers like this: