Saturday, May 21, 2011

Gyro Horizon. Renesas RX62N Kit


In this post, we 'll show an advanced kit from Renesas based on a modern microcontroller RX62N.

I received this kit by participation in Renesas Design Contest 2010. The kit has various types of sensors and interfaces to the outer world that cannot be makes you wonder how to use them all in one application. For example, it contains a 3D accelerometer and a temperature sensor, USB , CAN , Ethernet and RS-232 interfaces and an alphanumeric LCD.



The contest allows each contestant participate using only one application.

I wondered what application should I design , and I decided to design an ADI after being inspired by the Embraer 170 ADI ( Attitude Direction Indication )



This is the ADI


The ADI is an important aviation instrument that helps the pilot controlling and the aircraft. It senses and indicates Pitch ( Up and Down ) and Roll ( Right and Left ) attitude of the aircraft.




The actual ADI instrument senses the attitude using sensors in the aircraft called Gyroscope. The modern types of ADI collects attitude data from an electronic device called Laser Gyro or Fiber Optic Gyro.

My version of ADI uses a built in sensor in the Renesas kit called Accelerometer.


This is the running application on the kit ( ADI appears on the LCD )


The
Accelerometer is an electronic MEMS sensor that senses acceleration in three dimensions.

The Accelerometer senses the acceleration in three dimensions and then the RX62N microcontroller reads the data and then draws the output indication on the LCD on the kit.




This is the kit and the application on the LCD



This is the video of the kit in action.




Here is the contest entry :

http://renesasrulz.com/design_contest_archives/the_rx_mcu_design_contest/contest_entries/m/mediagallery/260.aspx


Here is the project on instructables


http://www.instructables.com/id/Gyro-Horizon-DIY/





رابط المقالة على مدونتى باللغة العربية
This is the link to the post in Arabic





If you like this blog you can support us by many ways:
   
   1. Leave comments stating your point of view about this article.

   2. Buy our book on Amazon Learn By Making.

   3. Click on links of our sponsors without adding any extra cost on you if you make purchase from them. Actually, many of these offers are totally free.
  4. Visit our new website outatime.tech.

Thank you for visiting our blog.

Monday, November 29, 2010

16F84A Spindle Motor Control

In this post , we 'll see how to control a spindle motor using the Microcontroller PIC 16F84A.
The spindle motor is a special type of Brushless DC ( BLDC )Motor that runs on high speed.

Unlike other types of motors, spindle motors have more than 2 terminals ( They can have 3 , 4 or five terminals ) .
Thus , the spindle motor is driven by switching its coils ON and OFF according to certain sequence. The function of the microcontroller is generating the driving signals.


Of course, the output current of the Microcontroller is not sufficient to drive the motor coils. There is an interfacing IC that can supply the motor coils with the suitable driving current. 

This IC is ULN2003. It acts as an electronic switch opened and closed according to the output signals of the Microcontroller.


I connected the ULN2003 IC to the Microcontroller on the prototyping bradboard.



This is the real circuit connection






As you can see , I used an old hard disk drive motor. This is a three coil spindle motor. Actually it has 4 terminals ( 3 Coils and 1 Common ).






You can see the four terminals on the back of the motor


 
This video shows the spindle motor connected to the driving circuit and rotating

You can find the source code and simulation files on this link.
 

The simulation model shows LEDs connected to the Microcontroller 16F84A. That is because this version of Proteus ISIS does not contain a three coil spindle motor model.









This is the schematic diagram of the circuit.




 





You can get this offer of 5 stepper motors with 5 ULN2003 boards from Amazon or Banggood








If you like this blog you can support us by many ways:
   
   1. Leave comments stating your point of view about this article.

   2. Buy our book on Amazon Learn By Making.

   3. Click on links of our sponsors without adding any extra cost on you if you make purchase from them. Actually, many of these offers are totally free.
This means that you can enjoy something for free and still support our blog to keep posting useful stuff.



This is the well-know Amazon Kindle platform. If you sign up for the free reader from Amazon to read any book, we get commission. 
There are many useful book for free on Amazon Kindle. Even you can find best sellers offered for free on Kindle format.
The best part is you can have the application on any platform. You can even read any book without installing any application by using Amazon Cloud-Reader on your browser.

You can join Amazon Kindle for 30 days free to have access to many paid book for free. You can cancel you subscription anytime.

The Amazon Prime is a special paid service from Amazon that offers good promotions and one-day free shipment for Amazon Shoppers. You can try this service for 30 days. You can cancel you subscription anytime.

Audible is the audio books website from Amazon. Many Kindle books are sold on Audible. You can try this service for free and get 2 free book. You can cancel you subscription anytime.

If you have a new baby borne or expecting one, you can create your free baby registry to easily save products and get offers and promotions on baby requirements.

  4. Visit our new website outatime.tech.

Thank you for visiting our blog.

Saturday, July 24, 2010

16F84 SERIAL COMMUNICATIONS



In many projects exists the need to exchange information with outside world. This case can be the need to store information from your project to a database on a standard PC or a need to communicate with another device. RS232 is widely used serial communications protocol. Modern Microcontroller chips contain hardware modules for such communications protocol. In those chips all you have to do is configuring the RS232 module and to choose the right crystal to produce the desired baud rate .



But in Microcontroller as 16F84A there is no such hardware communications modules. Serial communication can be established by software or Bit-Bang method. The standard RS232 protocol uses +12v to represent logic 0 and -12v to represent logic 1 . While TTL uses +5v to represent logic 1 and 0 V to represent logic 0.

An external IC is used as an interface between the Microcontroller and an RS232 enabled device ( PC for example ) .This IC MAX232 or HIN232 performs this level shifting function between the RS232 and TTL protocols.


Recently , I found a website implementing RS232 protocol in software using C language. The new method represented in this website is using the inverted logic ( 0v for logic 1 and +5v for logic 0 ) .

This method enables connection of the Microcontroller directly to the PC. The web page clearly explains this method . The PIC 16f8A can withstand +12v and -12v when receiving data from PC . And for data transmission to PC 0v to +5v can be distinct by the PC as two different levels.


I really wanted to try this code in real world and built the simple circuit as shown in the web page. The designer recommends connecting a resistor for PIC protection .


Of course , you can find that it is a very simple circuit that provides another new usage for the PIC 16F84A.


So how can you use the serial data form the Microcontroller ?

You can write a simple software for the PC that reads from the PC's serial port ( com1 or com2 ) . Or you can simply open the famous program Hyper terminal that comes with all Microsoft windows versions under the menu Programs --> Accessories --> Communications --> HyperTerminal. Then you need to configure the right Com port , Baud rate and Flow control . As shown here







I used a serial connector from an old mouse to connect the circuit board to the PC .




Here is the pinout of the 9 pin serial connector




This is the Hyper terminal program showing "Hello World" message from the Microcontroller .


This is the schematic drawing of the circuit




Here is the real circuit board I built and the serial connector connected to it .


Here, we 'll use the serial communication protocol RS232 to adjust the Microcontroller which in turn controls a DC motor by the PWM signals.

By choosing the motor speeds and sending them to the Microcontroller, we are able to choose PWM signals duty cycles and sending them to the Microcontroller via RS232 protocol.

The ciruit between the Microcontroller and the PC is very simple. All you have to connect is the PIC16F84A ,the crystal oscillator and the RS232 9 pin female connector.

The Microcontroller is supplied by the 12V DC from RS232 pin 7 RTS. Do not be afraid of losing the PIC chip, it can withstand it without damage.

The PIC16F84A Tx pin 1 is connected directly to RS232 pin 2 Rx.

The PIC16F84A Rx pin 17 is connected to RS232 pin 3 Tx through 10k ohm resistor to adjust the input voltage to the PIC.

The motor driving part of the circuit has already been explained in the PWM DC motor control post. So I 'll use the same driving circuit.

The PWM signal comes from the PIC16F84A to the NPN 2N2222 transistor base. This transistor acts as an electronic switch.

The DC motor is driven by an external DC 9v battery.



This image shows the Proteus 7 Model of the project


As usual , you may want to try the code and the circuit om the simulator first before building it . So , you 'll find the Proteus 7 model and code in this link . But to properly send and receive data form PIC 16F84A to the virtual terminal model in Proteus 7 environment it must be configured to use inverted data . You 'll find that I configured this for the model . But if you want to see it for yourself , right click on the virtual terminal model and choose inverted .


يمكنك قراءة هذه المقالة باللغة العربية

You can read this post in Arabic Language





If you like this blog you can support us by many ways:
   
   1. Leave comments stating your point of view about this article.

   2. Buy our book on Amazon Learn By Making.

   3. Click on links of our sponsors without adding any extra cost on you if you make purchase from them. Actually, many of these offers are totally free.
This means that you can enjoy something for free and still support our blog to keep posting useful stuff.


Amazon.com - Read eBooks using the FREE Kindle Reading App on Most Devices


This is the well-know Amazon Kindle platform. If you sign up for the free reader from Amazon to read any book, we get commission. 
There are many useful book for free on Amazon Kindle. Even you can find best sellers offered for free on Kindle format.
The best part is you can have the application on any platform. You can even read any book without installing any application by using Amazon Cloud-Reader on your browser.


Join Amazon Kindle Unlimited 30-Day Free Trial

You can join Amazon Kindle for 30 days free to have access to many paid book for free. You can cancel you subscription anytime.


Try Amazon Prime 30-Day Free Trial


The Amazon Prime is a special paid service from Amazon that offers good promotions and one-day free shipment for Amazon Shoppers. You can try this service for 30 days. You can cancel you subscription anytime.

Shop Amazon - Give the Gift of Amazon Prime


Try Audible and Get Two Free Audiobooks


Audible is the audio books website from Amazon. Many Kindle books are sold on Audible. You can try this service for free and get 2 free book. You can cancel you subscription anytime.


Shop Amazon - Create an Amazon Baby Registry

If you have a new baby borne or expecting one, you can create your free baby registry to easily save products and get offers and promotions on baby requirements.

  4. Visit our new website outatime.tech.

Thank you for visiting our blog.

Tuesday, July 13, 2010

16F84A VGA Output


Have you ever thought of this ?

That you can generate any kind of signals using your little Microcontroller PIC 16F84A . And one of these signals is the VGA signal that appears on your PC monitor . I thought of this idea but I couldn't implement it. But I found it at this website. So I wanted to try if it is working and share it with you.




Here is the VGA connector from Amazon

I found an old web page containing this project http://tinyvga.com/pic-vga . I just made some minor modification on that project and put it into a real circuit. I found that the there is a small timing issue in this software that makes the monitor flicker repeatedly.


The circuit is very simple. It consists of the Microcontroller PIC 16F84A and the 15 pin female VGA connector. They all are connected on a breadboard.



This is the schematic diagram of the circuit


This is the pinout of the VGA connector




There is a simple hint for your when downloading the software on the

Microcontroller . Make sure that the configuration is :


PRTE ON

XT

WDT OFF


I took this pictures for the monitor after running the program.




This picture shows the circuit.







You can see in this video the flickering I told you about.




I 'll try to fix this issue and post it when I am done with it. Now I will show you the results of the current software. I hope you enjoy it.






Here is the link for the Proteus 7 Model , source code and Hex file .


You can read this post on my page on instructables.com







If you like this blog you can support us by many ways:
   
   1. Leave comments stating your point of view about this article.

   2. Buy our book on Amazon Learn By Making.

   3. Click on links of our sponsors without adding any extra cost on you if you make purchase from them. Actually, many of these offers are totally free.
This means that you can enjoy something for free and still support our blog to keep posting useful stuff.


Amazon.com - Read eBooks using the FREE Kindle Reading App on Most Devices


This is the well-know Amazon Kindle platform. If you sign up for the free reader from Amazon to read any book, we get commission. 
There are many useful book for free on Amazon Kindle. Even you can find best sellers offered for free on Kindle format.
The best part is you can have the application on any platform. You can even read any book without installing any application by using Amazon Cloud-Reader on your browser.


Join Amazon Kindle Unlimited 30-Day Free Trial

You can join Amazon Kindle for 30 days free to have access to many paid book for free. You can cancel you subscription anytime.


Try Amazon Prime 30-Day Free Trial


The Amazon Prime is a special paid service from Amazon that offers good promotions and one-day free shipment for Amazon Shoppers. You can try this service for 30 days. You can cancel you subscription anytime.

Shop Amazon - Give the Gift of Amazon Prime


Try Audible and Get Two Free Audiobooks


Audible is the audio books website from Amazon. Many Kindle books are sold on Audible. You can try this service for free and get 2 free book. You can cancel you subscription anytime.


Shop Amazon - Create an Amazon Baby Registry

If you have a new baby borne or expecting one, you can create your free baby registry to easily save products and get offers and promotions on baby requirements.

  4. Visit our new website outatime.tech.

Thank you for visiting our blog.


يمكنك قراءة هذه المقالة على مدونتى باللغة العربية 


You can read this post in Arabic 




Tank