Wednesday, December 29, 2010

My Damaged CCFL Inverter: Repair

It's Wednesday, and I am thinking of what to do today. My damaged CCFL inverter at my motorcycle just popped into my mind. I quickly went out and took the CCFL inverter circuit on my bench.

Upon opening, I saw a busted transistor.



Upon checking the other transistor using the E-gizmo's DMM transistor testing feature (this is a very affordable DMM from E-Gizmo), I was able to say that the other transistor is also damaged.



I replaced the two transistors and a diode with a crack(?).



All in all, three components are damaged but they are easily identified and replaced. I hope that this guide may help solve those who have similar CCFL inverter problems.

Tuesday, December 21, 2010

Renesas RX62N's uIP TCP/IP Stack

The sample code provided by Renesas on their HEW IDE is a very good example on how to connect via Ethernet. It uses the web browser to control the RX62N. I modified the sample project and created a Python script on the Android to be able to control the demo kit via Wifi.

Android Communication via Wifi -- router --- Ethernet of RX62N using uIP TCP/IP Stack

Monday, December 20, 2010

Renesas RX62N Demonstration Kit

At last, I was able to get my free Renesas RX62N Demo Kit.



Through visual inspection, I could see that this board has so things in it:
- J-link
- Ethernet
- USB Host/OTG
- CAN
- LCD
- Microphone
- Speaker
- Audio Out
- Micro SD
- Com Port
- Temperature Sensor
- 3-axis accelerometer

All the informations and downloads can be acquired on Renesas website.

Here are the application notes.

Monday, December 13, 2010

VirtualBox TCP/IP Communication (Host and Guest)

I want to experiment with C# and Python's socket programming. I don't want to use 127.0.0.1 anymore in my sample program as I want to have a simulation of like two computers sending and receive data via TCP/IP.

My solution is to use a VirtualBox with another Windows OS in it.

I am struggling with this since yesterday but I was able to get it by today. Here is a video procedure.
(The video lagged a lot because my PC is too slow to record and run the virtualbox at the same time. The mouse pointer is also not visible on the video, maybe it is because of the Guest Additions on the VirtualBox).

Here are the procedures:

1. On Host and Guest: Turn off the firewall. My preliminary setting: firewall turned off and No connection to the internet.
2. On Host: Bridge a LAN connection and the VirtualBox Host-Only Network. Then assign an IP on it. (On the example, 192.168.70.4)
3. On Guest: Go to network settings, Choose a network adapter, choose "Attached to Bridge Adapter" and choose the name "MAC Bridge Miniport".
4. On Guest: Run the Virtual OS.
5. On Guest: Set the IP Address of the Ethernet Adapter. (On the example, 192.168.70.5).
6. On Host and Guest: Ping both the address to be able to confirm that there is a connectivity.

Additional test: Hyperterminal was used to test if handshaking will occur and if messages can be sent.

On Future: I will be replacing the Virtual OS with an Ubuntu and use python for socket programming.

Saturday, November 27, 2010

Arduino Meets Android (via WiFi)

Here's another simple project for Android control of Gizduino. TCP/IP shield using ATC1000M was used.



Here's a short video of LED Blinker Control of Gizduino via Android.

Arduino Simple Source Code

Python for Android Source Code

Saturday, November 20, 2010

ATC-1000M (TCP/IP to UART) Step by Step Guide -- (a Gizduino TCP/IP Shield)

Here is a E-Gizmo TCP/IP Shield which is powered by ATC-1000M, which will be covered in this post.



(the green circle shows that the RX and TX are shorted, for loopback testing)

Here is the procedure from setting the static IP up to hyperterminal loopback testing. (Connection: PC —LAN cable–ATC1000M)

ATC-1000M Loopback Setup and Test Video


Here is a C# test program:



Here is the complete source code in C#.

If the ATC-1000M is planned to be used over wifi, check the IP Address and Gateway of the ATC-1000M via the web configuration and make the necessary adjustments (if needed).

Tuesday, November 16, 2010

E-Gizmo's Sim900D Modem

This is a very nice product from E-Gizmo.

Some GSM modems doesn't have a Sim Toolkit Command which is used to access the Sim Menu. This is one of its major selling point + it's easiness to connect with a microcontroller.

You can also hook-up earphone and microphone to be able to send/receive calls.

The serial output is TTL-level of near 3V. This can be interfaced to a microcontroller directly (with consideration to the TTL voltages). And all transactions are done via AT command.

All documents can be downloaded from SimCom.

Regular Expressions (RegEx)

This is a very powerful feature of a programming language (although not all programming languages have this feature). Some programmers use it and some are not aware of it (most of my friends don't know this yet). The following is just a simple example/demonstration of using a regex.

Python will be used for the following example.

We have a component naming on the schematic wherein there is a string and number (no spaces in between) e.g. IC1,D1,D3,R1, how do we split the number and the string and display them separately (or put the two splitted fields in two separate variables)?

MyString="IC1"
....... process .....
StringPart="IC"
NumberPart="1"


First Approach using conventional for-loop and if statements.

Using Regular Expression, I can do it this way.

Very short code right?

But python has this comprehension list which can do that as well. Take a look at this short source code using comprehension list.

Lists comprehension is a good way for this as well, but how if the string becomes, [string1][number1][string2][number2] (e.g. IC1D1)? This will be much trickier to extract using conventional methods. Here is the code using regex.

It really takes time and dedication to harness the full power of Regex, but learning it gives us another weapon in our arsenal. :)

Monday, November 15, 2010

Bus Pirate Writing/Reading ---> MMC Card

Here is a script for Serial Command Script Processor for quick prototyping and to speed up trial-and-error experiments for reading and writing to MMC card.



Command Script for the MMC Writing and Reading. link

Here is the result. (Copy and paste it into a word processing to eliminate horizontal scrolling.)

Thanks to this site: http://nada-labs.net/2010/using-the-buspirate-with-a-sd-card/

Saturday, October 2, 2010

E-Gizmo's RFID Kit

Here is an RFID kit I bought from E-Gizmo.



Stand-Alone Mode

On Stand-alone mode, if the card isn't recognized, it will beep twice. If the card is recognized, it will beep once.

To Erase:
1. Set the DIL switch to select the location.
2. Then press Erase button. The D3 LED will light shortly to signify that the any registered card is erased on the location.

To Register the Card:
1. Set the DIL switch to select the location.
2. Press and hold (for around 1sec) then release the Set button.
3. The D3 will blink continuously. The put the card that needs to be registered near the RFID kit. It will beep once, denoting that the card is successfully registered.

Up to 16 RFIDs can be stored in stand-alone mode.

Interfaced to PC

If interfaced on PC, the cards are not needed to be registered on the kit. All the validations are done on the PC side.

Here is a short Python Script that I created to read the RFID's response of the card that was shown on the picture above. (Any PL that has an access to Serial port will do, I just used python for rapid prototyping) :)

Output:
0x41 0x7d 0xff 0xdc 0xe8 0xe7 0x1b 0x87 0xfb 0x42

Here is the output on another card:
0x41 0x7d 0xff 0xdc 0xe8 0xe4 0x46 0xa7 0xfb 0x42

The 0x41 at beginning and 0x42 on end, denotes the start and end of the frame. The 8-bytes inside are needed to be processed by the PC.

This RFID is very easy to use. :)

Sunday, August 22, 2010

AT Command Script Processor... Enhanced and Renamed!



The AT Command Processor was renamed to Serial AT Command Processor. It has been featured on the Dangerous Prototype.

This software was used for creating AT Command Scripts for USB Huawei E160E HSDPA Modem and GSM/GPRS Sim900D Modem.

But later I realized the it can also be used on Dangerous Prototype's Pirate Bus, which is a very powerful tool especially for us hobbyists.

Download Link: Serial AT Command Processor


- includes sample script for AT command and Bus Pirate Sample script


Update as of 8/9/2015:  The source code and the link for the Windows executable and sample scripts are placed here

Saturday, August 14, 2010

AT Command Script Processor

Last week, I am creating a software for GSM module. The debugging of the AT command is usually done via Hyperterminalbut I got tired of typing series of AT commands via Hyperterminal. I tried looking on the web for some kind of AT Command Script Processing to be able to execute series of AT commands repeatedly but found none.

So I created an AT Command Script Processor written in C# (Visual C# 2010 Express Edition).



Here is the download link. (Current version as of this writing is 00.08.01 Alpha Release)

Included are two files: the application and a sample script file.

The script file formatting is like this:
AT Command| Get Response (bool)| Delay| Comment
Example#1:
AT|TRUE|1000|Send AT then delay for 1 sec then get data
This example wait for the reply from the GSM modem.

Example#2:
AT|FALSE| 1000|Send AT then delay for 1 sec
This example doesn't wait for reply from the GSM modem.

Update as of 8/9/2015:  The source code and the link for the Windows executable and sample scripts are placed here.

Sunday, May 16, 2010

Dangerous Prototypes

Here is a very good site for open-source projects: Dangerous Prototype. It's a very nice and educational site especially for us electronics hobbyists :)

Thursday, April 1, 2010

Today's Adventure: Mono - .NET for Linux

Today, I had the feeling of the need to learn a cross-platform language. I am planning to re-learn and re-study wxwidgets,pyQt or Java. But since I had already some foundations on C# I had decided to give Mono a try. (I really love C#, it's a very beautiful language along with Python)

I downloaded an OpenSuse Linux VMWare image from the Mono's main site and read some stuffs to how to get started. Using Sun's VirtualBox to load the OpenSuse, I was able to run my .NET application with no-recompilation at all!



Here is the same application executed on Windows XP:


I'm so happy that it worked! This will be a very big advantage for me since I will be able to develop .NET apps using Free Compiler (Express Editions) on Free OS (Linux distros) :)

More information on Mono here: http://mono-project.com/

Saturday, March 20, 2010

In love with PowerPC...

It's a very good week. I am so glad I was given a chance to be able to develop firmware using PowerPC. I was able to get things work and make some firmware application (SIUL - Port Manipulation and Multiplexing, Timer, Hardware SPI, and LINFlex - LIN communication protocol) using Codewarrior from scratch. I think this is the most powerful processor I had used in my entire career as a firmware developer.

The PowerPC Adventure is still on the way... :)

Sunday, March 14, 2010

Repairing a persistent "Bad BIOS Checksum" Message

Recently, I revived a system which was submerged in flood due to the typhoon Ondoy. I cleaned the system using a dishwashing liquid and I was able to revive the system.



But upon checking the boot-up message at the BIOS start-up page, it always report that the BIOS checksum is bad. I even changed the CMOS battery and still no luck. I checked the voltage on the CMOS reset jumper (set at normal mode), and it reads 0V. On one of my normal mobo, there is a voltage of around 2.59V. With this, I decided to experiment a little bit.



The setup is :
+ Terminal of Battery ------ Diode (1N4148) ------ two terminals of the CMOS reset normal mode



And the problem was solved! :)

Saturday, January 23, 2010

Playing with the Renesas M16C Starter Kit

Recently, while checking some stuffs from my drawer, I saw this Evaluation Kit I had won from an Electronics Forum.



It comes with a CD, MCU Programmer and the kit itself. The compiler uses C language.

In the following weeks, if I will not be busy, I will try to fully utilize this starter kit and see what useful things can I do with it.

Saturday, January 2, 2010

Replacement Battery Problem for Kingston K-Pex 100 Media Player

I really love my Kingston K-Pex 100 Media Player. It really suits my needs for playing MP3s and watching movies. However, I recently noticed that the battery is no longer holding charge.



I looked over the net and Kingston is not selling a replacement battery since they had discontinued the product. I also searched on forums and those who have battery problems just throw this Media player away.

Instead of throwing this away, I just created an outside connection for an external battery connection via a female header.




Temporarily, I used 4 x AA 2000mAh Sanyo Eneloop Batteries and they worked fine with it. The original battery is 3.7V 850mAh. Having 4 Eneloop batteries will yield 4.8V (4x1.2V). I added a 1N4001 diode (can be seen on the glued connector at the back) to be able to provide one-way direction (so when USB is connected, there will be no charging) + to have a drop of 0.7V (which gives us 4.8V-0.7V=4.1V; near 3.7V).

It is now working and I am able to watch many movies and listen to MP3s for a longer time due to the Eneloops Superb Performance!



In conclusion, although the device has lost its great portability due to the battery, this is just a temporary solution. I just want to be able to use this and save it from being thrown in the garbage hehe.

My future plan is
1. to use a Nokia Battery (inside the KPex to be able to regain the portability). :)
OR
2. find a way to be able to put this in the car to be able to watch movies and hook it up on my car stereo. :)