Monday, November 25, 2013

LPC2138 ARM Oscilloscope and generator

Hello.

I'd like to show you my new project. I've never had a generator and an oscilloscope so I decided to make these. I started making oscilloscope on Atmega32, but later I bought LPC2138 and it has DAC so I decided to change uC to LPC.

Generator
Few words about generator. Generator can generate sine wave, square wave and triangle wave. You can adjust duty cycle in range 1-99%. Amplitude of generating signal is 3.3V. I used an internal DAC to make this generator.

Oscilloscope
I used an internal ADC to make oscilloscope. It has these features:
  • time/div: 50us/div-500ms/div
  • voltage/div: 1V/div-50V/div
  • detection signal DC/AC
  • calculate frequency and duty cycle
  • calculate voltage 
All values: frequency, duty cycle and voltage calculate only on based values from ADC that means frequency and duty cycle could not be accurate. Firstly oscilloscope detect signal if it is AC then calculate frequency, duty cycle and maximum of voltage. If detected signal is DC then only calculate average of voltage. Input of oscilloscope is very simple I only used a voltage divider and a range of input signal is ±30V.

LCD
I used LCD with a driver KS0108.

How to use these
I used 5 keys to choose option and input data for generator you can enter value through for example terminal Putty.

Code
I wrote it in C.

Video
On video I show you 3 different waves and measurement voltage of transformer. You can also watch earlier version of oscilloscope on Atmega at my YouTube channel.

Summary
This is simple oscilloscope with generator but what it's important it works. At main screen you can see a clock with thermometer as RTC: PCF8583, thermometer: DS18B20 and EEPROM: ATMEL24C256 to storage a configuration.

You are welcome to post your opinions of my project.

4 comments:

  1. Hello
    How can I get your project
    Thanks

    ReplyDelete
  2. Hi Michal,
    I really like your LPC2138 LCD scope project and wish to build one for my self.
    I have some LPC2138 spare chips in my lab, so I could design EAGLE PCB for this project.

    I will highly appreciate if you may share the project details e.g schematic, source code or HEx file for the same.
    Previously I have worked on LPC2138 chip for some RnD but later switched to LPC2888.
    I could ship ONE or TWO LPC2138 new chips for FREE, if you may need, bcz I have 10 in stock.

    Thanks for sharing such nice project.
    Have a nice day!

    ReplyDelete
  3. Hi Michal,

    I hope you are doing just fine in this era of COVID-19 pandemic. Wish you good health & blessings.

    Please share the details for this project, as I am also working on LPC2138 & LPC2888 again for some other projects, but willing to replica your Scope project in the meanwhile.
    I will appreciate your reply via email. my ID is ijaved@ecraft.pk

    Have a good day! Stay Safe!

    ReplyDelete