Saturday, February 27, 2021

Illusionist Locket, 3D print

 3D Printable illusionist Locket(From the movie The Illusionist)

This is my first attempt in 3D design. Wanted to design this for a very long time.



Support required for both "Left" Part and has to be curve surface down with support.

For the other two Flat surface to be on the bed and no support required.
No Gluing required. All the joints are snap to fit.
Use 1mm Dia X1.5 mm (Max 2mm DiaX2.5 mm) neodymium magnets. I have not fixed magnets as I am waiting to receive them. Make sure polarity of magnet is fixed correctly.

Print Settings

Printer brand:

Creality

Printer:

CR-10S

Rafts:

Yes

Supports:

Yes

Infill:

20

Filament brand:

Creality

Filament material:

PLA

Tuesday, January 7, 2020

How to make Ambilight TV using Orange Pi Zero with any HDMI Input.


I have seen lot of how to do Ambilight using Raspberry Pi and not one with Orange Pi. This is a long pending project for me. I had an Orange Pi Zero 512 MB that I bought for the same purpose. I had to do more time on research than making it. Making was only a days job. Finding the right component and debugging took a lot of time. The end result of the project is more satisfying and came well than I had expected.

Materials required

Item  Quantity  Price per item Price(AED)
Orange Pi Zero 1 134.15 134.15
Comon board PCB dotted  1 4 4
Splitter HDMI Full HD 1 65 65
HDMI to Composite  1 35 35
Video Audio VHS VCR USB Video Capture Card 1 40 40
HDMI Cable  3 20 60
AV Cable 1 10 10
Power cable 1 20 20
Power Extention  1 45 45
5 Port Powered USB 3.0 Hub Splitter
, 4 Port USB Data Hub + 1 Smart 2.4A Charging Ports USB Hub
1 70 70
SN74HCT00N  1 0.5 0.5
Heat Sink 1 15 15
Power supply 20A 5 V  1 46 46
APA102 5M IP30 60 LED per meter 1 141 141
Shipping and other charges  1 100 100
Total 785.65

Bought from:
Orange pi Zero -
https://ar.banggood.com/Orange-Pi-Zero-H2-Quad-Core-Open-source-512MB-Development-Board-p-1110210.html?rmmds=buy&cur_warehouse=CN

SN74HCT00N 
https://www.aliexpress.com/item/32964289834.html
Heat sink for Orange pi
https://www.aliexpress.com/item/32801098575.html
Power Supply 20A 5V
https://www.aliexpress.com/item/32879719595.html
APA102 LED strips
https://www.aliexpress.com/item/32878004298.html


Other items are bought from local stores
careful choosing the video grabber, first one I bought did not work. Even though I was able to open the video in mplayer v4l2 of hyperion could not detect.
sample of the grabber
https://www.amazon.ae/0-2-Meter-Portable-Easier-Cable/dp/B07MW82Z7Z/


The Making

1. OS download from Armbian website.
https://dl.armbian.com/orangepizero/Bionic_current
The version I used is
Armbian_19.11.3_Orangepizero_bionic_current_5.3.9
2. Burn using balenaEtcher
Download from https://www.balena.io/etcher/
3a. connet ttltousb use putty and set baudrate 115200
https://www.aliexpress.com/item/4000120687489.html

Power up the Orange pi zero after connecting.
Find out the COM port number from device manager in windows.

3. login as root with password 1234
Create new user by following the instructions given by the armbian
4. Type the following command to configure wifi
sudo nmtui 
5. After configuring wifi (choosing SSID and filling password) update the OS using the below command
sudo apt update & apt upgrade 
(reboot after this. you can use armbian-config to do this too)
6. Login as new user
 sudo apt-get install git cmake build-essential libqt4-dev libusb-1.0-0-dev python-dev libxrender-dev python
export HYPERION_DIR="hyperion"
git clone --recursive https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"
 mkdir "$HYPERION_DIR/build"
 cd "$HYPERION_DIR/build"
cmake -DENABLE_DISPMANX=OFF -DENABLE_OPENCV=OFF -DENABLE_SPIDEV=ON -DENABLE_X11=OFF -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
make -j $(nproc)
strip bin/*
sudo cp ./bin/hyperion-remote /usr/bin/
sudo cp ./bin/hyperiond /usr/bin/
 sudo cp ./bin/hyperion-v4l2 /usr/bin/
sudo mkdir -p /usr/share/hyperion/effects && sudo cp -R ../effects/ /usr/share/hyperion/
sudo mkdir -p /etc/hyperion
#copy hyperion.config.json to /etc/hyperion (SPI is 1.0 and color is bgr no-change as video standard) This file is attached in the link below
https://drive.google.com/open?id=1vGN3vltVbZdioBn_0Ww6Or3sBkS1JCYx

sudo mkdir -p /etc/init/ && sudo cp ../bin/service/hyperion.initctl.sh  /etc/init/hyperion.conf
sudo cp ../bin/service/hyperion.init.sh  /etc/init.d/hyperion
sudo cp ../bin/service/hyperion.systemd.sh  /etc/systemd/system/hyperion.service
sudo apt-get install v4l-utils
sudo systemctl enable hyperion
sudo systemctl start hyperion
Now add the user created to sudoers list and make it not to ask for password
sudo visudo -f /etc/sudoers.d/90-kiran
Add below line in the file. here kirant400 is the user name I have choose. Replace it with the one that you provided in step 3.
   
kirant400 ALL=(ALL) NOPASSWD:ALL
Finally edit /boot/armbianEnv.txt file to enable gpio and spi adding the below line
you can use command
sudo nano /boot/armbianEnv.txt
overlays=usbhost2 usbhost3 w1-gpio uart1 i2c0 spi-spidev
param_w1_pin=PA20
param_w1_pin_int_pullup=1
param_uart1_rtscts=1
param_spidev_spi_bus=1

Careful while editing this file if we make a wrong entry system do not boot and we have to redoo all the steps again

Final File content may look like:

verbosity=1
console=both
overlay_prefix=sun50i-h5
overlays=usbhost2 usbhost3 w1-gpio uart1 i2c0 spi-spidev
rootdev=UUID=abc1d3dd-6193-4fb7-93fb-f50382b8a8b9
rootfstype=ext4
param_w1_pin=PA20
param_w1_pin_int_pullup=1
param_uart1_rtscts=1
param_spidev_spi_bus=0
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

Assembling 

Connection Diagram is given below
Connection of Orange pi Zero and APA 102 LED strips
I had double sided LED strips which was pasted on the edges of the TV Screen. Make sure the TOP and Bottom has same number of LED, similarly right and left has the same number.
Note these numbers. This is used for configuring the LEDs in Hyperion Config(https://hyperion-project.org/wiki/HyperCon-Information).


Connect both ends of +5 and GND together and to the 5V 20A power supply. Current rating depends on the number of LEDs on the screen.

Configuration

HyperCon is the software used for configuring.
Only configurations made are:
LED type selected APA102, color order is changed and SPIdev1.0 given below
                "type"       : "apa102",
"output"     : "/dev/spidev1.0",
                "colorOrder" : "bgr"
Other change was Enabled  grabber-v4l2 and standard manually edited value as "no-change" as given below
                "standard" : "no-change",

Other important change I did was to change the configuration of my grabber using v4l2-ctl command
First Install v4l2-ctl
sudo apt-get install v4l-utils
And now change the grabber setting
v4l2-ctl --set-fmt-video=width=640,height=480,pixelformat=1 

This I have added in the service script prior to hyperion service start. 

Working

After powering up all the mentioned connections our Ambilight is ready.

We can also download hyperion free mobile app and control the lights. This App is available for iOS and Android.

Troubleshooting 

I have first tested light alone using Arduino code before and after attaching to TV. 

For the grabber to check 
1) mplayer install and make sure it is being able to show the video input
2) use hyperion-v4l2 for taking screenshot and see if hyperion is able to get the grabber input. Below command is used for taking a screenshot 
sudo hyperion-v4l2 --width 320 --height 180 --screenshot

Also change the configuration to write to a file and inspect the file for RGB values if hyperion is able to detect.
I also change the BLACKBORDER detection  threshold to 0.2 for better detection.

Friday, January 29, 2016

Pic Microcontroller Baud Rate register value calculator online


It is a must to set SPBRG value, when interfacing with UART/USART device with PIC micro controllers. 
The formula to calculate SPBRG is given below
Error can be calculated by

Where Fosc is the frequency of the crystal used in PIC micro eg: 20MHz. And Baud Rate is the desired  required baud rate.
The tool below can be used to calculate the SPBRG and Error %.

Crystal frequency :

Desired  Baud rate :

Is Synchronous


Result: Use calculate button

Sunday, May 24, 2015

Magic Wand

Started working on the Magic Wand project.
POV. Persistence of vision is used here to create this magic wand.
Letters are created using the controlled switch on and off LEDs.

Please look at the video below.
I have implemented this using the guide provided

Sunday, May 3, 2015

RFduino Installation in Ubuntu

RFduino now support Linux and installation is straight forward.
Step1: Open terminal in ubuntu by pressing Alt+Ctrl+T
Step2: Type the following commands
cd ~
mkdir Arduino
cd Arduino
wget http://downloads.arduino.cc/arduino-1.6.3-linux64.tar.xz
tar -xf arduino-1.6.3-linux64.tar.xz
sudo apt-get install default-jre

key in password when prompted.
No driver installation required for Ubuntu. 

Step3: Open Arduino by typing the following command
cd arduino-1.6.3
./arduino

The current version is 1.6.3. It will be different for different versions.

Step4: Select Menu File->Preference
 in the proxy settings change server to rfduino.com and keep other settings as it is and click OK.
in "Additional Board Manager URLs, add "http://rfduino.com/package_rfduino166_index.json" and click OK

Step5: Select Menu Tools->Board->Board Manager and in the window that is opened select RFduino and select install.
 It will take a while to download and install files there are 2 set of files one ~ 36MB and other ~52MB

Step6: Select Menu Tools->Board->RFduino

Step7: Select Menu Port->/dev/ttyUSB0
 USB menu item will be different in different machine.

Thats it.
Some examples can be found in Menu File->Examples section for RFduino.

Happy Programming.

Saturday, May 2, 2015

Coffee cup using blender

Blender is an amazing 3D modeling tool.
Just started using it ofer 3Ds Max. I find it amazing.
I followed the below tutorial
And created the "hello world" 3D model.
It came out to be like this.

Friday, January 16, 2015

Why Windows 8.1 is a failed operating system to me

I am using windows 8.1 currently.
The following features make me not a big fan of this OS.
1) The wifi problem. 
     The wifi reluctant to connect at times when you most need. Need to disconnect and connect many times to get it working. From windows forums got to know that it is the driver issue and they do not have any intention to fix it. The same machine I dual boot for ubuntu which works perfectly. 
I have followed some tutorials how to make this work but no success. The Machine I use is Dell inspiron N5050.
2) The Update.
   When you just want an urgent mail to send, open the computer then I see this blue screen preparing to configure system do not turn off message. and since my internet do not work It keep on showing 30% for some time then get through after a waiting period. I never know that it has been successful or not. 
3) Full screen apps do not work.
 I had run in to situation that the full screen apps do not work.I just wanted skype but it was not happening and since there was a problem with internet struggle to update and after updation it started working.
4) Login issue.
The internet is never get success at the time of booting unless i continuously switch the wifi on and off. Hence Authenticating time is more and some times it do not recognise and sign me as guest. 
5) Privacy issue.
I had put profile pic of the system by taking a photo suing webcam and shocked to see it was changed my online live account too. 
Skype now use the system password. Once changed skype password using the instruction provided and shocked that my machine password was the one i had changed.
The usability and intuitiveness for the OS is minimum. Ubuntu on the other hand it is the prefered OS.
But stuck with windows because some application dependent. 
"Windows a Bad OS with good applications, ubuntu Great OS with limited/buggy applications"


Sunday, January 11, 2015

Bluetooth 4 (Bluetooth Low energy- BLE) support for sony xperia M with android version 4.3

I was creating android app for RFduino.
RFduino has in built BLE, Bluetooth Low Energy, otherwise known as Bluetooth version 4.0
The example given in the rfduino.com was using Nexus 5.  given here http://www.rfduino.com/product/rfduino-android-application/
I choose the Hardware Sony Xperia M. In the technical specification it was mentioned it support BLE.
Android supported BLE from version 4.3 onwards. Build number 15.4.A.1.9.
but when I try out it seems the support was not there.
To test I used same application shared in rfduino site and it did not work when I scan for the device.
I used BLE Checker to test and it showed that BLE was not supported.

From Sony mobile forum (talk.sonymobile.com) came to know that there is a problem in the current firmware and would require a patch which is yet to be released.

But from this post I found the fix, which is quite simple. It turns out that adding permission for BLE fixes the issue.
Fix was given by pm_cz  In the following forum https://talk.sonymobile.com/t5/Xperia-M-M-dual/Does-Xperia-M-support-Bluetooth-BLE/td-p/673259/page/8

Basically involve rooting the phone add the permission.

Below is the steps I followed:

Saturday, January 10, 2015

Play with RFduino

Happy Newyear !!!
This is my first blog post in this year.

I have received my first RFduino board. thanks to Manu.


"RFduino: An Arduino shrunk to the size of a finger-tip and made wireless!"Some of the project ideas and details can be found from http://www.rfduino.com/
Documentation from http://www.rfduino.com/documentation/index.html

Installation for windows 8.1:
Step 1: Download the Library From http://www.rfduino.com/download-rfduino-library/index.html
Step 2: Download and install the Arduino IDE from http://arduino.cc/en/main/software note that IDE version to be downloaded is 1.5.X now the current version is 1.5.8
Step 3: Download and install FTDI drivers. depending on the OS and processor. 32 bit or 64 bit.
Step 4: unzip the library downloaded from step 1 and place it under Arduino folder under "hardware\arduino"
eg: c:\program files\arduino\hardware\arduino
Step 5: connect rfduino
Run arduino IDE and make sure Rfduino is listed in Tools->boards. Select the same and choose the com port for the RFduino. This can be found from the device manager.
Some samples will be listed in the Example section in File menu.
You may now program the RFduino and create some fun projects.
I will be creating some example projects and will post the same. 
Planning to do some thing as simple as lighting LED using android phone (Yes not using iPhone) with RFduino.

Some of the applications using RFduino from their site given below 

Saturday, November 15, 2014

Making of PCB Hand drill using VCR motor [Failed]

I got an old VCR motor. I thought of creating Hand drill.
Here are the steps I followed.
Unfortunately drill did not work expected :(
I will try 12 V or using different motor.
Items used:
1) Mini Motor.
2) 1 mm drill
3) Battery 9 V
4) Mini Chuck PCB Drill Bit Holder (bought from ebay here)
5) Micro Push Button
6) Adhesive tape.
7) Scissors.
8) Heat shrink tube (optional)
9) Solder materials

Here is the photo of materials used:

Saturday, November 8, 2014

Open Programmer for pic and atmel

I was looking for a free, open source, USB and Linux based programmer for pic micro controller and guess what, I found this.
http://openprog.altervista.org/OP_eng.html

This is perfect and beyond.
I could make this from the details provided by this site.

Friday, October 31, 2014

Custom made Raspberry Pi case from acrylic

Raspberry Pi, I just love it.
My self and my father tried to create a case from acrylic.
and this was the out come
I am also part of Pi User group






Thursday, October 23, 2014

Digital Photo frame from my old laptop.

Last year I had a blog post to convert track pad to external mouse. link

The same HP pavilion dv2000.
After converting the Hard disk to external, DVD drive to external one and track pad to external mouse, I wanted to reuse the rest of the component left out with the laptop. So I decided to create one Smart Digital Photo frame.
My Goal was to create a wall mount or standing Digital photo frame that when started open a full slide show.
Features:
Operate it with a remote control.
Slide show that show shall have video and image.
The content of the photo shall be updated from out side (Dropbox).
Possibility of online video chat.
Play video.
Use as Internet browser
Use it as a computer for advanced users.

The Making


Thursday, October 2, 2014

Ubuntu 14.04 Installed and Mac Theme

After Installing Ubuntu 14.04 LTS I just saw one blog post

http://www.noobslab.com/2014/04/macbuntu-1404-pack-is-released.html

To theme Ubuntu as mac.

After following the steps, I get this.





There was a video tutorial for making this

My Favourite Software to install on fresh Linux distro

 These are the list of software that I use on a Linux distro.

Recently I have migrated from elementary Linux to Ubuntu 14.04 LTS.

I use computer for browsing, programming(web development, micro controller, desktop applications ), watching some videos and sometimes graphics related works.
This list is not complete I will update as an when a new must have software I find.
System Software:
1) Grub customizer:
 This is the first software I install. I use dual boot for Windows 8.1 and Ubuntu. I want some fancy grub menu selector to switch between windows and Ubuntu.
 You may find the link here
 You can find some really good themes from http://kde-look.org/
 This is the theme I am using

Entertainment:
1) VLC: This is the best and my favourite video player. I use it in windows as well.
http://www.videolan.org/vlc/index.html
2)Google Chrome: I use both Chrome and firefox mainly to test the compatibility of the websites that I create.

Multimedia:
1)Blender: Fantastic 3d Software. I was amazed with this software.
2)GIMP: I find this alternate to Photoshop.
3)Inkscape: A beautiful vector graphics creator.

Web development:
1) git: I use gitlab as a version controller and source safe. This is an excellent alternative to github. Github too being used.
https://about.gitlab.com/
2)filezilla: When it comes to FTP this is the software that I prefer.
3) sublimetext: the alternative to notepad++ that I use in windows

Programming:
1) Android studio: This is alternate to eclipse for android development. recently I moved from eclipse to Android studio.
https://developer.android.com/sdk/installing/studio.html
2)JDK: for android studio require JDK to be inplace.
The version I used is here
3)SDCC: This is a compiler I use for Microchip pic micro controller programming.


Monday, June 23, 2014

Using php CURL get PNR status of Indian railways updated

Declaration and Warning: This is done just for example and I declare i do not have any intention to Create DOS, or it is not indented to harm http://indianrail.gov.in. I am ready to remove the post as well as hosted file if this is going to harm indianrail.gov.in in any way. I am not responsible for anyone using this code for any reason. Use this code at your own risk.
Note: The website is fixed no longer this api works This is an update of the post here
About the API details can be found from the older post.
The changed details are given here.

The final code is maintained in github now. You can find the code here.

What is changed:

1. Site now added Captcha hence captcha to be passed as parameter.
2. Code is provided with some comments.

How is is done is detailed below:

Friday, June 20, 2014

Pic Microcontroller Interfacing I2C SSPADD online calculator.


It is a must to set SSPADD value, when interfacing with I2C device with PIC micro controllers. 
The formula to calculate SSPADD is given below 
Where Fosc is the frequency of the crystal used in PIC micro eg: 20MHz. And Bit Rate is the desired  frequency for the I2C device.
The tool below can be used to calculate the SSPADD.

Crystal frequency :
Bit Rate for I2C    :

Result: In HEX = 0x31 , In Decimal = 49

Friday, January 17, 2014

Godaddy IIS Hosting URL redirection using web.config for SEO

For SEO it is very common for redirecting url.
The scenarios are
Redirecting non-www site to www
Redirecting a popular link which is removed to a new link.

The redirection module in IIS 7 in godaddy hosting is already installed. But I couldn't get support for doing these.

Redirection or rewrite rule is done using web.config. which is placed in the root folder of the website.

Lets take an example of site nirays.com

Thursday, January 16, 2014

Create an infinity mirror LED in simple way

Finally, I was able to create Infinity mirror LED effect.
Please see the YouTube video for the final product.




Saturday, December 21, 2013

Near Field Communication using Sony Xperia M

NFC

Recently I came across NFC Technology.

It is a radio communication technique.
This is becoming prominent in Smart phone communication. It is better than Blue tooth communication since this consumes less power.
The range is very limited, so to communicate, the devices shall touch each other.

Contributors