회원가입 ID/PW 찾기

1) 지식 창고는 본인이 작성한 콘텐츠(팁/노하우/리소스/강좌 등)을 무료 혹은 가상화폐인 납포인트를 통해 공유하는 공간입니다.
2) 본인이 작성한 콘텐츠에 대해서만 지식 창고에 등록할 수 있으며, 저작권에 위배되는 콘텐츠는 사전경고 없이 삭제될 수 있습니다.
3) 콘텐츠 구매 및 첨부파일 다운로드는 회원그룹 '연구원' 이상 가능하오니, 경험치를 쌓아 진급한 후에 이용 부탁드립니다.
4) 무료 콘텐츠의 본문은 구매절차 없이 즉시 이용할 수 있으며, 판매 납포인트가 있는 콘텐츠는 구매 후 이용할 수 있습니다.
5) 콘텐츠 판매에 따른 납포인트 수익은 지정한 비율(50%)에 따라 판매자에게 지급하며, 납포인트 수익을 통해 진급을 빨리할 수 있습니다.
6) 구매 후 평가를 하면 구매 납포인트의 20%를 돌려 드립니다.

콘텐츠 수 69

Low speed AVR oscilloscope

마이크로프로세서 구매수 0 2015.07.11 23:10:50
판매자 아크마 판매 납포인트 무료 평점 0점 / 총 0명 참여

 

 

 

 

Features

Frequency measurement

Voltage input

Power supply

Liquid Display Crystal

Measurement display area

Information displaying area:

Auto triggering

10Hz - 7.7 kHz (firmware  2.0 and above)

24V AC / 30V DC

12V DC

128x64 pixels

100x64 pixels

28x64 pixels  (Used from firmware  2.0 and above)

Auto

 

Introduction

 

A few months ago as I was surfing on the net, I saw an oscilloscope based on PIC18F2550 microcontroller and a KS0108 controller based graphical LCD. That was Steven Cholewiak's web site. I had never seen before so amazing microcontroller-only oscilloscope. That was realy impressive circuit, so I decided to design something like that but in C language instead of assembly that I was using all those years. The best solution for me was the WinAVR as it bases on open source AVR-GNU compiler and it works perfect with AVR studio 4. The graphics library that I used, was made by me specific for this project. It's not for general use. If you want to include it to your source codes, you have to convert it according to your needs. The maximum input signal speed who can show up this oscilloscope is 7.7 kHz in square signal. For other signals (sine or triangle) the frequency is lower ( almost 1 kHz) for having clear view of the signal.

 

Schematic of the circuit (click to enlarge)

 

Description

The operating voltage of the circuit is 12V DC. By this voltage, the power supply is producing 2 voltages. +8.2V for IC1 and +5V for IC2 and IC3. This circuit can measure from +2.5V to -2.5V or from 0 to +5V dependent by S1 position (AC or DC input). By using probe with 1:10 division you can measure almost 10 times higher voltages. Moreover, with S2 you can make an extra division by 2 the input voltage.

 

How the software triggering works

As you can see the circuit doesn't have any hardware triggering. The triggering function is been made entire in software.

The steps for triggering are:

      1. The AVR gets up to 15000  Analog to Digital Converter samples and calculates the middle value of the waveform. The number of captured samples is depended on when a full period is completed
      2. Starts again capturing new samples but every sample value must be compared with the previous sample.
      3. If the next sample is higher than the previous sample then our waveform is rising. So AVR goes to step 4. If the next sample value is lower than the previous sample then AVR goes to step 2.
      4. Read the next sample value and compare it with the middle value had been calculated in step 1.
      5. AVR checks if the value of the next captured sample is higher than the middle value.
      6. If it's higher, the beginning of the waveform has been found. The AVR starts capturing the next 100 samples in to the RAM. I choose 100 samples because I left 100 pixels on LCD for displaying the waveform.
      7. AVR Prints these 100 samples on LCD.
      8. AVR starts again from step 1.

You will say: Why AVR starts again from step 1 and not from step 2 ?  AVR starts again the capturing  from step 1 because you can change the peak-to-peak voltage of the waveform (0V - 5V). Changing the input waveform will change the middle value of the waveform.

How is the frequency is calculated

The frequency indication of course is not very accurate. The calculation is been made by counting the time from the beginning of waveform (step 4 in  "How the software triggering works") until the next start of waveform.

 

Programming The ATmega32

Burn the ATmega32 with AVR_oscilloscope.hex  and select external crystal at the fuses section.

After that, you Must disable the JTAG interface from your ATmega32 microController. If you don't do that, the mega32 will show you the initial screen and when it go to the oscilloscope screen it will restart immediately to the initial screen and it will stay there for ever.

 

The fuses that must be set in ATmega32 microcontroller.

Calibrations

The only 2 things you have to calibrate is the LCD contrast trimmer P2 and the P1, to move the beam at the center of the LCD. To do that, apply only the power supply to the circuit and adjust the P2 up to the point you will see clear the appeared pixels on the screen. Then, adjust the P1 up to the point the beam is moved at the middle of the LCD (at the horizontal line of the cross).

 

Usage

   You can move the beam up or down the screen by pressing the buttons S8 or S4 correspondingly to measure the voltage of the signal. 1 volt is taking up 1 square height.

   With S7 and S3 you can increase or decrease the measurement speed. The minimum speed of a waveform that can be displayed on LCD is 460Hz. If you want to view a lower frequency waveform, for example 30 Hz,  you can press the S7 to shrink the waveform or S3 to extend the waveform up to the maximum sampling rate.

   This oscilloscope has an automatic trigger. That means, if you have a continuous signal (ex a triagle waveform) the auto trigger will work perfect. If your signal is not stable (ex a serial transmittion) you can freeze the screen by pressing S6 switch. At his case you can get a snapshoot of your measurment signal. By the time you release the S6, the snapshoot will end.

 

PCB (101x160mm) and components placement.

 

History:

  -- (19 Mar 2011) V2.00 by Vassilis Serasidis. The harware (PCB, schematic diagram, electronic components) remains the same.

    • Information about the measured waveform has been added on LCD. Now you can see the Volts peak-to-peak, Volts DC and the frequency of the measured waveform.
    • The RAM requirement of AVR microcontroller has been reduced from 2kB to 335 bytes! Now you can slightly modify the source code for migrating on another AVR microcontroller with (probably) higher ADC (Analog to Digital Convertion) capabilities.
    • Improved the sampling rate. Tha sampling accuracy was reduced from 10-bit to 8-bit and the ADC prescaller decreased from 16 to 4. These  changes give higher sampling rate.
    • A problem with buttons S3 and S7 was fixed. Now these buttons work properly.

  -- (26.Jun.2008)  V1.01 by Anantha Narayanan. Fixed a problem that was showed up the with the delay routine and optimitation flags.

  -- (03.Aug.2007) V1.00 Initial version by Vassilis Serasidis.

 

See AVR oscilloscope V2.00 in action.

 

AVR oscilloscope V2.00

 

 

AVR oscilloscope V1.50 (this firmware version was never published).

V2.00 Download the source code and the hex file of AVR oscilloscope.

V1.01 Download the source code and the hex file of AVR oscilloscope.

V1.00 Download the source code, hex, schematic and PCB of AVR oscilloscope.

Software to make your own 128x64 pixel logos for graphical LCDs .

 

 

 

 

The implementation of AVR oscilloscope by Leonardo Chocron.  He drew his own PCB (sandwich).

 

 

 

A comparison between "AVR oscilloscope" and Velleman oscilloscope. Yeah... there are some differencies on voltage indication.

 

Created and published by Vassilis Serasidis on 01.Dec.2007

Updated by Vassilis Serasidis on 01.Jun.2011

모르는 것이 무엇인지 스스로 정리하고 질문하는 습관을 가집시다.
무성의/광범위하거나 직접 해보지 않고 올리는 질문은 서로를 피곤하게 합니다.
질문쪽지는 사절이오니 게시판에 글을 남겨주세요. 그래야 다같이 공유할 수 있으니까요.


profile
크히히힝 2016.08.12 17:05

감사합니다

profile
시나브로69 2017.06.25 23:20
좋은 자료 감사합니다.
search
List of Articles
번호 분류 제목 평점 포인트 판매자 등록일 구매수 조회 수
공지 공공의 목적으로 공유하고자 하는 소프트웨어는 '소프트웨어 자료실'에 업로드를 요청드립니다.
공지 구매후 평점 댓글을 남겨주시면 구매포인트의 20%를 돌려드립니다.
69 머신러닝, AI & 알고리즘 matlab 쉽게 배우는 방법없나요? [7] 무료 kayle 2013-09-26 0 441
68 머신러닝, AI & 알고리즘 Kalman 필터로 쉽게 센서통합하기 [8] 무료 아크마 2011-08-01 0 2993
67 머신러닝, AI & 알고리즘 매크로 이름에 괄호를 사용하기 [5] 무료 밝은전기구슬 2011-03-28 0 4923
66 머신러닝, AI & 알고리즘 Solving ODEs with MATLAB [3] 무료 HALU13 2010-11-29 0 2153
65 머신러닝, AI & 알고리즘 A Guide to MATLAB Object-Oriented Programming - Andy H. Register [5] 무료 HALU13 2010-11-29 0 2299
64 머신러닝, AI & 알고리즘 매트랩 한글 메뉴얼 입니다. [33] 무료 우당탕카 2010-06-01 0 5727
63 머신러닝, AI & 알고리즘 보간법 매틀랩 코드입니다. 무료 나얼제자 2010-05-25 0 4140
62 머신러닝, AI & 알고리즘 매틀랩 명령어 정리 입니다 [14] 무료 지노쟁이 2010-04-29 0 4648
61 머신러닝, AI & 알고리즘 matlab이 저에게 필요한가요 [5] 무료 딘재 2010-04-16 0 2250
60 머신러닝, AI & 알고리즘 공업수학요약정리4 [10] 무료 알라뷰 2010-03-07 0 2525
59 머신러닝, AI & 알고리즘 공업수학요약정리3 [8] 무료 알라뷰 2010-03-07 0 2483
58 머신러닝, AI & 알고리즘 공업수학요약정리2 [8] 무료 알라뷰 2010-03-07 0 2061
57 머신러닝, AI & 알고리즘 공업수학요약정리1 [12] 무료 알라뷰 2010-03-07 0 3187
56 머신러닝, AI & 알고리즘 proxmity sensing 알고리즘입니다. [2] 무료 퀴아쿠 2010-02-19 0 2047
55 머신러닝, AI & 알고리즘 알고리즘 설계 및 실습 - Huffman & Dijkstra [5] 무료 블루미르7 2010-01-05 0 3471
54 머신러닝, AI & 알고리즘 간단한 비례 공식입니다 ㅎㅎ [2] 무료 karismapong 2009-10-20 0 2648
53 머신러닝, AI & 알고리즘 Euler 미분법[MATLAB] [4] 무료 아크마 2009-10-01 0 4642
52 머신러닝, AI & 알고리즘 Matlab코드를 C코드로 변환할 수 있다는데.. 무료 kezman 2009-09-25 0 4195
51 머신러닝, AI & 알고리즘 MPLAB 컴파일을 했더니 에러가 떠요..ㅠㅠ [2] 무료 로이lee 2009-04-16 0 3968
50 머신러닝, AI & 알고리즘 (MATLAB) S-ALOHA의 Throughput 시뮬레이션 소스 [2] 무료 태상노군 2008-09-23 0 5172
  • 힘으로서 사람을 복종시키지 말고 덕으로서 사람을 복종시켜라.
    - 맹자
  • * 납포인트 정보 *
  • 글 작성 : 3
  • 댓글 작성 : 1
저작권법에 위배되는 콘텐츠는 등록 불가하며, 저작물에 대한 권리는 저작자에게 있습니다.
Copyright 2006-2021 © hardwareis.com, All rights reserved.