Sunday, May 22, 2011

38/40khz Infrared Module for MOBOT

38/40khz Infrared Module for MOBOT


Here is my version of 38/40khz Modulated IR Module for MOBOT or object detection. Using an 8 pins uC, PIC12F509 to drive two IR LED's and a single IR detector cannibalized from an old China DVD.

Schematic of IR Module

IR Module PCB.


Video of operation. Guaranteed 8" detection range indoor or outdoor.




AVR USB

Here is my version of AVR-USB.

AVR-USB Schematic using TH components.

Friday, May 20, 2011

FTDI Interface

FTDI interface for reverse engineering...:D

Top of the board

Bottom view

Wednesday, May 18, 2011

My PICKit2 Clone

Here's my PICKit2 clone courtesy of SANTA..:P

Hmmm...



Bottom layer.
With USB and PROGRAM switch installed.

stuffing with TH components.

another view

2N3904 in SOT-23 package.

SOT-23 transistors soldered on board.

Closer view



Almost done na...with just 2 parts missing....P-Channel MOSFET...:(





2 pcs. P-Channel MOSFET na lang ang kulang.


At last!! waiting is over!!




Fresh from Singapore!


IRLML6402 P-channel MOSFET.


Q1 & Q9 finally installed..


My PICKit 2 finally!!

Hardware as detected by PICkit2 GUI.


That's all for now...waiting for some real action!! :D






Tuesday, May 17, 2011

My First SMD, Double sided PCB

Here's is my first attempt of Double sided and SMD PCB using iron-on process..:D

Bottom Copper

Top Copper

 Using some SMD 0805, 1206, SMC_D, etc..

Wednesday, May 11, 2011

How to create TEXT outline in GROUNDPLANE?

Ever wonder how they create this beautiful TEXT outline on printed circuit board or PCB like this?
Text outline of PCB.

Here is my short video tutorial on how to create a TEXT OUTLINE on PCB using Cadsoft Eagle..

Watch this video.


 



Feel free to leave a comments if you need mode info's..:D


BR



Monday, May 9, 2011

DIY Pinquino by RBT(c)2011

Here is my version of Pinquino

Full schematic in Eagle format.

Single-Sided PCB with 1 jumper..




Construction:

PCB layout ready for iron-on.

After ironing the layout.

Close-up view ready for etching.

PCB after etching.

PCB after cleaning and reading for drilling.


PCB after drilling ready for trimming and stuffing.

Add caption


PCB trimmed with components placement guide.


Partially installed components installed on breadboard.


Almost finish...ready for testing...

Almost finish! few resistors left to solder..:D

Partially working Pinquino.


Here is Version 2 of my PCB

Smaller PCB with pin resistors removed.

Parts Placement guide.
 

Thursday, May 5, 2011

The New Facebook Scam, How to Get it Removed?

Scammers are making a lot many income from simple looking Facebook Applications. Now, Facebook is turning into Spambook rather than Facebook. One more spam has been added to this book. This new survey scam is a massive hit on Facebook and many people have been scammed.

This Scam claims to reveal your total Facebook Profile looks like the Orkut which displays recent users which saw your profile. The application will use your Facebook Wall to post spam messages onto user’s profile. This is totally SCAM. There is nothing like this which can actually tell how many times your profile has been viewed.

How this SPAM works:
You will see that your friend’s status update saying that he got to know how many people viewed his profile with the number. It will be like this:
_________________________________
My total facebook views are : 9632
Find out what your total profile views are: http:bit.ly/xxxx
________________________________
facebook virusIf you click on the link give, you will be directed to a Facebook Application where it will ask you to Allow the permissions to access your information. As soon as you click “Allow”, the application will automatically post these kinds of Status Updates on your wall which afterwards will infect your friends’ account. This way the SCAM spreads itself.
After the application post the Status Update, it will redirect you to a web page which claims that it can calculate the number of people who viewed your profile.

What you can do if you are victim of this Scam?

If you are infected with this Scam, firstly remove all the Status Updates which the application have automatically added. Then you have to remove the application to stop it accessing your Facebook profile. For this follow these steps:
  • Go to Account > Privacy Settings
  • You will see an option saying “Apps and Websites“. Below it there will be a link saying “Edit your settings” Click that link
  • New page will be opened, there you can see the Privacy options of Apps, Games and Websites which are connected with your Facebook Account.
  • The first option will be “Apps you use“. There will be a button saying “Edit Settings”. Click on it.
  • After you click it, you will see a list showing all the application to which your Facebook Account is connected.
  • Search the application saying “funnysweb“. Remove it from your Facebook Account.
Now you have successfully removed the spamming application. We hope that this post helped you, do consider sharing this with others to spread the awareness and help infected peoples. ;)

Introduction to AT Commands

AT commands are instructions used to control a modem. AT is the abbreviation of ATtention. Every command line starts with "AT" or "at". That's why modem commands are called AT commands. Many of the commands that are used to control wired dial-up modems, such as ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return to online data state), are also supported by GSM/GPRS modems and mobile phones. Besides this common AT command set, GSM/GPRS modems and mobile phones support an AT command set that is specific to the GSM technology, which includes SMS-related commands like AT+CMGS (Send SMS message), AT+CMSS (Send SMS message from storage), AT+CMGL (List SMS messages) and AT+CMGR (Read SMS messages).

Note that the starting "AT" is the prefix that informs the modem about the start of a command line. It is not part of the AT command name. For example, D is the actual AT command name in ATD and +CMGS is the actual AT command name in AT+CMGS. However, some books and web sites use them interchangeably as the name of an AT command.
Here are some of the tasks that can be done using AT commands with a GSM/GPRS modem or mobile phone:
  • Get basic information about the mobile phone or GSM/GPRS modem. For example, name of manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number (International Mobile Equipment Identity) (AT+CGSN) and software version (AT+CGMR).
  • Get basic information about the subscriber. For example, MSISDN (AT+CNUM) and IMSI number (International Mobile Subscriber Identity) (AT+CIMI).
  • Get the current status of the mobile phone or GSM/GPRS modem. For example, mobile phone activity status (AT+CPAS), mobile network registration status (AT+CREG), radio signal strength (AT+CSQ), battery charge level and battery charging status (AT+CBC).
  • Establish a data connection or voice connection to a remote modem (ATD, ATA, etc).
  • Send and receive fax (ATD, ATA, AT+F*).
  • Send (AT+CMGS, AT+CMSS), read (AT+CMGR, AT+CMGL), write (AT+CMGW) or delete (AT+CMGD) SMS messages and obtain notifications of newly received SMS messages (AT+CNMI).
  • Read (AT+CPBR), write (AT+CPBW) or search (AT+CPBF) phonebook entries.
  • Perform security-related tasks, such as opening or closing facility locks (AT+CLCK), checking whether a facility is locked (AT+CLCK) and changing passwords (AT+CPWD).
    (Facility lock examples: SIM lock [a password must be given to the SIM card every time the mobile phone is switched on] and PH-SIM lock [a certain SIM card is associated with the mobile phone. To use other SIM cards with the mobile phone, a password must be entered.])

  • Control the presentation of result codes / error messages of AT commands. For example, you can control whether to enable certain error messages (AT+CMEE) and whether error messages should be displayed in numeric format or verbose format (AT+CMEE=1 or AT+CMEE=2).
  • Get or change the configurations of the mobile phone or GSM/GPRS modem. For example, change the GSM network (AT+COPS), bearer service type (AT+CBST), radio link protocol parameters (AT+CRLP), SMS center address (AT+CSCA) and storage of SMS messages (AT+CPMS).
  • Save and restore configurations of the mobile phone or GSM/GPRS modem. For example, save (AT+CSAS) and restore (AT+CRES) settings related to SMS messaging such as the SMS center address.
Note that mobile phone manufacturers usually do not implement all AT commands, command parameters and parameter values in their mobile phones. Also, the behavior of the implemented AT commands may be different from that defined in the standard. In general, GSM/GPRS modems designed for wireless applications have better support of AT commands than ordinary mobile phones.

In addition, some AT commands require the support of mobile network operators. For example, SMS over GPRS can be enabled on some GPRS mobile phones and GPRS modems with the +CGSMS command (command name in text: Select Service for MO SMS Messages). But if the mobile network operator does not support the transmission of SMS over GPRS, you cannot use this feature.

Basic Commands and Extended Commands

There are two types of AT commands: basic commands and extended commands.

Basic commands are AT commands that do not start with "+". For example, D (Dial), A (Answer), H (Hook control) and O (Return to online data state) are basic commands.

Extended commands are AT commands that start with "+". All GSM AT commands are extended commands. For example, +CMGS (Send SMS message), +CMSS (Send SMS message from storage), +CMGL (List SMS messages) and +CMGR (Read SMS messages) are extended commands.

Wednesday, May 4, 2011

How to Use Microsoft HyperTerminal to Send AT Commands to a Mobile Phone or GSM/GPRS Modem?

What is Microsoft HyperTerminal?

Microsoft HyperTerminal is a small program that comes with Microsoft Windows. You can use it to send AT commands to your mobile phone or GSM/GPRS modem. It can be found at Start -> Programs -> Accessories -> Communications -> HyperTerminal. If you cannot find it and you are using Windows 98, then probably you have not installed it. You can go to Control Panel -> Add/Remove Programs -> Windows Setup tab -> Communications list box item -> Details button to install MS HyperTerminal.

Before you start programming your SMS application, you may want to check if your mobile phone, GSM/GPRS modem and SIM card are working properly first. The MS HyperTerminal is a handy tool when it comes to testing your GSM devices. It is a good idea to test your GSM devices beforehand. When a problem occurs, sometimes it is difficult to tell what causes the problem. The cause can be your program, the GSM device or the SIM card. If you test your GSM device and SIM card with MS HyperTerminal and they operate properly, then it is very likely that the problem is caused by your program.

For Linux users, minicom can be used instead of HyperTerminal.


The Procedure for Sending AT Commands to a Mobile Phone or GSM/GPRS Modem Using MS HyperTerminal

To use MS HyperTerminal to send AT commands to your mobile phone or GSM/GPRS modem, you can follow the procedure below:

  1. Put a valid SIM card into the mobile phone or GSM/GPRS modem. You can obtain a SIM card by subscribing to the GSM service of a wireless network operator.
  2. Connect your mobile phone or GSM/GPRS modem to a computer and set up the corresponding wireless modem driver. You should find the wireless modem driver in the CD or disk that was provided by the manufacturer. If the manufacturer does not provide such CD or disk with your mobile phone or GSM/GPRS modem, you can go to the manufacturer's web site and see whether the wireless modem driver can be downloaded there. If the wireless modem driver cannot be found on the web site, you can still use Windows' standard modem driver.
  3. Run MS HyperTerminal by selecting Start -> Programs -> Accessories -> Communications -> HyperTerminal.
  4. In the Connection Description dialog box, enter a name and choose an icon you like for the connection. Then click the OK button.

Figure 5. The screenshot of MS HyperTerminal's Connection Description dialog box in Windows 98.

 

  1. In the Connect To dialog box, choose the COM port that your mobile phone or GSM/GPRS modem is connecting to in the Connect using combo box. For example, choose COM1 if your mobile phone or GSM/GPRS modem is connecting to the COM1 port. Then click the OK button.

    (Sometimes there will have more than one COM port in the Connect using combo box. To know which COM port is used by your mobile phone or GSM/GPRS modem, follow the procedure below:

    In Windows 98:
    Go to Control Panel -> Modem. Then click the Diagnostics tab. In the list box, you can see which COM port the mobile phone or GSM/GPRS modem is connected to.

    In Windows 2000 and Windows XP:
    Go to Control Panel -> Phone and Modem Options. Then click the Modems tab. In the list box, you can see which COM port the mobile phone or GSM/GPRS modem is connected to.)


Figure 6. The screenshot of MS HyperTerminal's Connect To dialog box in Windows 98.




  1. The Properties dialog box comes out. Enter the correct port settings for your mobile phone or GSM/GPRS modem. Then click the OK button.

    (To find the correct port settings that should be used with your mobile phone or GSM/GPRS modem, one way is to consult the manual of your mobile phone or GSM/GPRS modem. Another way is to check the port settings used by the wireless modem driver that you installed earlier.

    To check the port settings used by the wireless modem driver on Windows 98, follow these steps:
    a. Go to Control Panel -> Modem.
    b. Select your mobile phone or GSM/GPRS modem in the list box.
    c. Click the Properties button.
    d. The Properties dialog box appears. The Maximum speeds field on the General tab corresponds to HyperTerminal's Bits per second field. Click the Connection tab and you can find the settings for data bits, parity and stop bits. Click the Advanced button and you can find the setting for flow control.

    To check the port settings used by the wireless modem driver on Windows 2000 and Windows XP, follow these steps:
    a. Go to Control Panel -> Phone and Modem Options -> Modems tab.
    b. Select your mobile phone or GSM/GPRS modem in the list box.
    c. Click the Properties button.
    d. The Properties dialog box appears. Click the Advanced tab and then click the Change Default Preferences button.
    e. The Change Default Preferences dialog box appears. The Port speed field on the General tab corresponds to HyperTerminal's Bits per second field. You can also find the setting for flow control on the General tab. On the Advanced tab, you can find the settings for data bits, parity and stop bits.)


Figure 7. The screenshot of MS HyperTerminal's Properties dialog box in Windows 98.




  1. Type "AT" in the main window. A response "OK" should be returned from the mobile phone or GSM/GPRS modem.
    Type "AT+CPIN?" in the main window. The AT command "AT+CPIN?" is used to query whether the mobile phone or GSM/GPRS modem is waiting for a PIN (personal identification number, i.e. password). If the response is "+CPIN: READY", it means the SIM card does not require a PIN and it is ready for use. If your SIM card requires a PIN, you need to set the PIN with the AT command "AT+CPIN=".


Figure 8. The screenshot of MS HyperTerminal's main window in Windows 98.




If you get the responses above, your mobile phone or GSM/GPRS modem is working properly. You can start typing your own AT commands to control the mobile phone or GSM/GPRS modem.

Further details about how to use AT commands to send and receive SMS messages will be provided in the following sections.

Introduction to GSM / GPRS Wireless Modems

A GSM modem is a wireless modem that works with a GSM wireless network. A wireless modem behaves like a dial-up modem. The main difference between them is that a dial-up modem sends and receives data through a fixed telephone line while a wireless modem sends and receives data through radio waves.

A GSM modem can be an external device or a PC Card / PCMCIA Card. Typically, an external GSM modem is connected to a computer through a serial cable or a USB cable. A GSM modem in the form of a PC Card / PCMCIA Card is designed for use with a laptop computer. It should be inserted into one of the PC Card / PCMCIA Card slots of a laptop computer.

Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate.

Computers use AT commands to control modems. Both GSM modems and dial-up modems support a common set of standard AT commands. You can use a GSM modem just like a dial-up modem.

In addition to the standard AT commands, GSM modems support an extended set of AT commands. These extended AT commands are defined in the GSM standards. With the extended AT commands, you can do things like:
  • Reading, writing and deleting SMS messages.
  • Sending SMS messages.
  • Monitoring the signal strength.
  • Monitoring the charging status and charge level of the battery.
  • Reading, writing and searching phone book entries.
The number of SMS messages that can be processed by a GSM modem per minute is very low -- only about six to ten SMS messages per minute.

What is a GPRS Modem?

A GPRS modem is a GSM modem that additionally supports the GPRS technology for data transmission. GPRS stands for General Packet Radio Service. It is a packet-switched technology that is an extension of GSM. (GSM is a circuit-switched technology.) A key advantage of GPRS over GSM is that GPRS has a higher data transmission speed.

GPRS can be used as the bearer of SMS. If SMS over GPRS is used, an SMS transmission speed of about 30 SMS messages per minute may be achieved. 

This is much faster than using the ordinary SMS over GSM, whose SMS transmission speed is about 6 to 10 SMS messages per minute. A GPRS modem is needed to send and receive SMS over GPRS. Note that some wireless carriers do not support the sending and receiving of SMS over GPRS.

If you need to send or receive MMS messages, a GPRS modem is typically needed.

Which is Better: Mobile Phone or GSM / GPRS Modem?

In general, a GSM/GPRS modem is recommended for use with a computer to send and receive messages. This is because some mobile phones have certain limitations comparing to GSM/GPRS modems. Some of the limitations are described below:
  • Some mobile phone models (example: Ericsson R380) cannot be used with a computer to receive concatenated SMS messages.

    What is a concatenated SMS message?
    A concatenated SMS message is a message that contains more than 140 bytes. (A normal SMS message can only contain at most 140 bytes.) Concatenated SMS works like this: the sender's mobile device breaks a message longer than 140 bytes into smaller parts. Each of these parts are then fitted in a single SMS message and sent to the recipient. When these SMS messages reach the destination, the recipient's mobile device will combine them back to one message.

    What is the cause of the problem?
    When the mobile phone receives the SMS messages that are parts of a concatenated SMS message, it combines them to one message automatically. The correct behavior should be: when the mobile phone receives the SMS messages that are parts of a concatenated SMS message, it forwards them to the computer without combining them.

  • Many mobile phone models cannot be used with a computer to receive MMS messages. Because when they receive a MMS notification, they handle it automatically instead of forwarding it to the computer.
  • A mobile phone may not support some AT commands, command parameters and parameter values. For example, some mobile phones do not support the sending and receiving of SMS messages in text mode. So, the AT command "AT+CMGF=1" (it instructs the mobile phone to use text mode) will cause an error message to be returned. Usually GSM/GPRS modems support a more complete set of AT commands than mobile phones.
  • Most SMS messaging applications have to be available 24 hours a day. (For example, an SMS messaging application that provides ringtone downloading service should be running all the time so that a user can download ringtones any time he/she wants.) If such SMS messaging applications use mobile phones to send and receive SMS messages, the mobile phones have to be switched on all the time. However, some mobile phone models cannot operate with the battery removed even when an AC adaptor is connected, which means the battery will be charged 24 hours a day.
Besides the above issues, mobile phones and GSM/GPRS modems are more or less the same for sending and receiving SMS messages from a computer. Actually, you can consider an AT-command-enabled mobile phone as "GSM/GPRS modem + keypad + display + ...".
There is not much difference between mobile phones and GSM/GPRS modems in terms of SMS transmission rate, since the determining factor for the SMS transmission rate is the wireless network.