Modern oscilloscope on a microcontroller circuit. Pocket oscilloscope "Lori" on the STM32F103 microcontroller. Computer console

The oscilloscope is based on an ATmega32 microcontroller. Graphic LCD indicator 128 x 64 dots. The circuit of this device is very simple. One of the disadvantages of this oscilloscope is the low maximum frequency of the measured signal; for a square wave it is only 5 kHz. The program was written in C in WinAVR, in conjunction with AVRStudio 4. The graphics library was written specifically for this project.

Description:

The supply voltage of the circuit is 12 volts. From this voltage at the output of the converter we get +8.2V for IC1 and +5V for IC2 for IC3. This circuit has an input range from -2.5 volts to +2.5 volts or from 0 to +5 volts depending on the position of S1 (AC/DC). Using a divider you can expand the range of measured voltages. The display contrast is adjusted using potentiometer P2. Maximum input voltage is 30 volts for DC and 24 volts for AC.

You can see a more advanced oscilloscope circuit based on the ATxmega128A3 microcontroller.

Scheme:

Microcontroller firmware:

Firmware file AVR_oscilloscope.hex, when flashing the firmware, set the microcontroller bits to Fuse for clocking from an external crystal. Be sure to disable the JTAG interface.

Recently I already reviewed one construction kit, today is a continuation of a small series of reviews about all sorts of homemade things for beginner radio amateurs.
I’ll say right away that this is certainly not Tectronics, or even DS203, but it’s an interesting thing in its own way, even though it’s essentially a toy.
Usually, before testing, the thing is first disassembled, here you have to assemble it first :)

In my opinion, these are the “eyes” of a radio amateur. This device rarely has high accuracy, unlike a multimeter, but it allows you to see processes in dynamics, i.e. in move".
Sometimes such a second “look” can help more than a day of fiddling with the tester.

Previously, oscilloscopes were tube oscilloscopes, then they were replaced by transistor ones, but the result was still displayed on the CRT screen. Over time, they were replaced by their digital counterparts, small, light, and the logical continuation was the appearance of a designer for assembling such a device.
Several years ago, on some forums, I came across attempts (sometimes successful) to develop a homemade oscilloscope. The constructor is of course simpler than them and weaker in technical specifications, but I can say with confidence that even a schoolchild can assemble it.
This construction set was developed by jyetech. of this device on the manufacturer's website.

Perhaps this review will seem overly detailed to specialists, but the practice of communicating with novice radio amateurs has shown that they perceive information better this way.

In general, I’ll tell you about everything a little below, but for now the standard introduction, unpacking.

They sent the construction set in a regular zip-lock bag, although quite thick.
In my opinion, such a set would really benefit from some nice packaging. Not for the purpose of protection from damage, but for the purpose of external aesthetics. After all, the thing should be pleasant even at the unpacking stage, because it is a construction set.

The package contained:
Instructions
Printed circuit board
Cable for connecting to measured circuits
Two bags of ingredients
Display.

The technical characteristics of the device are very modest, as for me it is more of a training set than measuring device, although even with the help of this device it is possible to carry out measurements, albeit simple ones.

The kit also includes detailed color instructions on two sheets.
The instructions describe the sequence of assembly, calibration and quick guide by use.
The only negative is that it’s all in English, but the pictures are made clearly, so even in this version most of it will be understandable.
The instructions even indicate the positional positions of the elements and make “checkboxes” where you need to put a tick after completing a certain stage. Very thoughtful.

There is a separate sheet of paper with a list of SMD components.
It is worth noting that there are at least two variants of the device. On the first, only the microcontroller is initially soldered, on the second, all SMD components are soldered.
The first option is designed for slightly more experienced users.
This is the option that is included in my review; I learned about the existence of the second option later.

The printed circuit board is double-sided, as in the previous review, even the color is the same.
On top there is a mask with the designation of the elements, one part of the elements is fully designated, the second has only a position number according to the diagram.

There are no markings on the reverse side, there is only a designation of jumpers and the name of the device model.
The board is covered with a mask, and the mask is very durable (I had to check it involuntarily), in my opinion, what is needed specifically for beginners, since it is difficult to damage anything during the assembly process.

As I wrote above, the designations of the installed elements are marked on the board, the markings are clear, there are no complaints about this item.

All contacts are tinning, the board is soldered very easily, well, almost easily, more on this nuance in the assembly section :)

As I wrote above, a microcontroller is preinstalled on the board
This is a 32-bit microcontroller based on the ARM 32-bit Cortex™-M3 core.
The maximum operating frequency is 72 MHz, and it also has 2 x 12-bit, 1 μs ADC.

On both sides of the board its model is indicated, DSO138.

Let's return to the list of components.
Small radio components, connectors, etc. Packed in small snap bags.

Pour the contents of a large bag onto the table. Inside there are connectors, stands and electrolytic capacitors. Also in the package there are two more small bags :)

Having opened all the packages, we see quite a lot of radio components. Although, given that this is a digital oscilloscope, I expected more.
It’s nice that the SMD resistors are labeled, although in my opinion, it wouldn’t hurt to label regular resistors as well, or provide a small color-coding guide in the kit.

The display is packed in soft material; as it turned out, it does not slip, so it will not dangle in the bag, but printed circuit board protects it from damage during transportation.
But still, I think that normal packaging would not hurt.

The device uses a 2.4-inch TFT LCD indicator with LED backlight.
Screen resolution 320x240 pixels.

A small cable is also included. To connect to the oscilloscope, a standard BNC connector is used; at the other end of the cable there is a pair of alligator clips.
The cable is medium soft, the crocodiles are quite large.

Well, here’s a view of the entire set completely unfolded.

Now you can move on to the actual assembly of this constructor, and at the same time try to figure out how difficult it is.

Last time I started the assembly with resistors, as the lowest elements on the board.
If you have SMD components, it is better to start assembly with them.
To do this, I laid out all the SMD components on the attached sheet, indicating their nominal value and position designation on the diagram.

When I was ready to solder, I thought that the elements were in a case that was too small for a beginner; it would have been possible to use resistors of size 1206 instead of 0805. The difference in the space taken up is insignificant, but soldering is easier.
The second thought was - now I’ll lose the resistor and won’t find it. Okay, I’ll open the table and take out a second such resistor, but not everyone has such a choice. In this case, the manufacturer took care of this.
I gave all the resistors (it’s a pity that they weren’t microcircuits) by one more, i.e. in reserve, very prudently, offset.

Next I’ll talk a little about how I solder such components, and how I advise others to do it, but this is just my opinion, of course, everyone can do it in their own way.
Sometimes SMD components are soldered using a special paste, but it is not often that a beginning radio amateur (and even a non-beginner) has it, so I will show you how easier it is to work without it.
We take the component with tweezers and apply it to the installation site.

In general, I often first coat the installation site of the component with flux; this makes soldering easier, but complicates cleaning the board; it can sometimes be difficult to wash the flux out from under the component.
Therefore, in this case I simply used 1mm tubular solder with flux.
Holding the component with tweezers, place a drop of solder on the soldering iron tip and solder one side of the component.
It’s okay if the soldering turns out ugly or not very strong; at this stage it’s enough that the component holds itself together.
Then we repeat the operation with the remaining components.
After we have secured all the components in this way (or all components of the same value), we can safely solder them as needed, to do this we turn the board so that the already soldered side is on the left and hold the soldering iron in right hand(if you are right-handed), and the solder is in the left, we go through all the unsoldered places. If the soldering of the second side is not satisfactory, then rotate the board 180 degrees and similarly solder the other side of the component.
This makes it easier and faster than soldering each component individually.

Here in the photo you can see several installed resistors, but so far soldered only on one side.

Microcircuits in an SMD package are marked in the same way as in a regular one, on the left near the mark (although usually on the bottom left when looking at the marking) there is the first contact, the rest are counted counterclockwise.
The photo shows the location for installing the microcircuit and an example of how it should be installed.

We proceed with microcircuits in a completely similar way to the example with resistors.
We place the microcircuit on the pads, solder any one pin (preferably the outermost one), slightly adjust the position of the microcircuit (if necessary) and solder the remaining contacts.
WITH microcircuit stabilizer you can do it in different ways, but I advise you to solder the petal first, and then the contact pads, then the microcircuit will definitely lie flat on the board.
But no one forbids soldering the outermost pin first, and then all the others.

All SMD components are installed and soldered, there are a few resistors left, one of each value, put them in a bag, maybe they will come in handy someday.

Let's move on to installing conventional resistors.
In the last review I talked a little about color coding. This time I would rather advise you to simply measure the resistance of the resistors using a multimeter.
The fact is that the resistors are very small, and with such sizes the color markings are very difficult to read (than smaller area painted area, the more difficult it is to determine the color).
Initially, I looked for a list of denominations and positional designations in the instructions, but I couldn’t find them, because I was looking for them in the form of a plate, and after installation it turned out that they were in the pictures, with checkboxes for marking the established positions.
Because of my carelessness, I had to make my own plate, on which I laid out the installed components next to each other.
On the left you can see the resistor separately; when compiling the plate it was superfluous, so I left it at the end.

We proceed with resistors in a similar way as in the previous review; we shape the terminals using tweezers (or a special mandrel) so that the resistor easily falls into place.
Be careful, the positional designations of components on the board can be not only labeled, but also SIGNED, and this can play a cruel joke on you, especially if there are many components in one row on the board.

This is where a small minus of the printed circuit board came out.
The fact is that the holes for resistors are very large diameter, and since the installation is relatively tight, I decided to bend the leads, but not too much, and therefore they do not hold very well in such holes.

Due to the fact that the resistors did not hold up very well, I recommend not filling in all the values ​​at once, but installing half or a third, then soldering them and installing the rest.
Don’t be afraid to bite the pins too much, a double-sided board with metallization forgives such things, you can always solder a resistor even on top, which you can’t do with a single-sided printed circuit board.

That's it, the resistors are sealed, let's move on to the capacitors.
I treated them the same way as resistors, laying them out according to the plate.
By the way, I still have one extra resistor left, apparently they put it in by accident.

A few words about labeling.
Such capacitors are marked in the same way as resistors.
The first two digits are the number, the third digit is the number of zeros after the number.
The resulting result is equal to the capacitance in picofarads.
But there are capacitors on this board that do not fall under this marking; these are values ​​of 1, 3 and 22pF.
They are marked simply by indicating the capacitance since the capacitance is less than 100pF, i.e. less than three digits.

First, I solder the small capacitors according to the positional designations (that’s a quest).

With capacitors with a capacity of 100 nF, I stepped a little, without adding them to the plate right away, I had to do it later by hand.

I also did not bend the leads of the capacitors completely, but at about 45 degrees, this is quite enough to prevent the component from falling out.
By the way, in this photo you can see that the spots connected to the common contact of the board are made correctly, there is an annular gap to reduce heat transfer, this makes it easier to solder such places.

Somehow I relaxed a little on this board and remembered about the chokes and diodes after soldering the ceramic capacitors, although it would have been better to solder them in front of them.
But this didn’t really change the situation, so let’s move on to them.
The board was supplied with three chokes and two diodes (1N4007 and 1N5815).

Everything is clear with the diodes, the location is labeled, the cathode is marked with a white stripe on the diode itself and on the board, it is very difficult to confuse.
With chokes it can be a little more complicated, they are sometimes also color coded, fortunately in this case all three chokes have the same rating :)

On the board, the chokes are indicated by the letter L and a wavy line.
The photo shows a section of the board with sealed chokes and diodes.

The oscilloscope uses two transistors of different conductivity and two stabilizer microcircuits with different polarities. In this regard, be careful when installing, since the designation 78L05 is very similar to 79L05, but if you put it the other way around, you will most likely go for new ones.
With transistors it is a little simpler, although the board simply shows the conductivity without indicating the type of transistor, but the type of transistor and its position designation can be easily seen from the diagram or component installation map.
The terminals here are noticeably more difficult to mold, since all three terminals need to be molded; it is better not to rush, so as not to break off the terminals.

The conclusions are formed in the same way, this simplifies the task.
The position of the transistors and stabilizers is indicated on the board, but just in case, I took a photo of how they should be installed.

The kit included a powerful (relatively) inductor, which is used in the converter to obtain negative polarity and quartz resonator.
They don’t need to draw conclusions.

Now about the quartz resonator, it is made for a frequency of 8 MHz, it also has no polarity, but it is better to put a piece of tape under it, since its body is metal and it lies on the tracks. The board was covered with a protective mask, but I’m somehow used to making some kind of backing in such cases, for safety.
Don’t be surprised that at the beginning I indicated that the processor has a maximum frequency of 72 MHz, and the quartz costs only 8, inside the processor there are both frequency dividers and sometimes multipliers, so the core can easily operate, for example, at a frequency of 8x8 = 64 MHz.
For some reason, the inductor contacts on the board are square and round shape, although the inductor itself is a non-polar element, so we simply solder it into place; it is better not to bend the leads.

The kit included quite a few electrolytic capacitors, they all have the same capacitance of 100 μF and a voltage of 16 Volts.
They must be soldered with correct polarity, otherwise pyrotechnic effects are possible :)
The long lead of the capacitor is the positive contact. The board has polarity markings both near the corresponding pin and next to the circle marking the position of the capacitor, which is quite convenient.
The positive output is marked. Sometimes they mark it as negative, in which case approximately half of the circle is shaded. And then there is a computer hardware manufacturer like Asus, which shades the positive side, so you always have to be careful.

Little by little we came to a rather rare component, the trimmer capacitor.
This is a capacitor whose capacitance can be changed within small limits, for example 10-30pF, usually the capacitance of these capacitors is small, up to 40-50pF.
In general, this is a non-polar element, i.e. Formally, it doesn’t matter how you solder it, but sometimes it matters how you solder it.
The capacitor contains a screwdriver slot (like the head of a small screw) that has an electrical connection to one of the terminals. SO in this circuit, one terminal of the capacitor is connected to the common conductor of the board, and the second to the remaining elements.
To reduce the influence of the screwdriver on the circuit parameters, it is necessary to solder it so that the pin connected to the slot is connected to the common wire of the board.
The board is marked on how to solder it, and later in the review there will be a photo where you can see this.

Buttons and switches.
Well, it’s hard to do something wrong here, since it’s very difficult to insert them somehow :)
I can only say that the terminals of the switch body must be soldered to the board.
In the case of a switch, this will not only add strength, but will also connect the switch body to the common contact of the board and the switch body will act as a shield from interference.

Connectors.
The most difficult part in terms of soldering. It is difficult not because of the accuracy or small size of the component, but on the contrary, sometimes it is difficult to warm up the soldering area, so for the BNC connector it is better to take a more powerful soldering iron.

In the photo you can see -
Soldering a BNC connector, an additional power connector (the only connector here that can be installed in reverse) and a USB connector.

There was a slight problem with the indicator, or rather with the connectors for connecting it.
The kit forgot to include a pair of double contacts (pins), they are used here to secure the side of the indicator opposite the signal connector.

But after looking at the pinout of the signal connector, I realized that some contacts could easily be bitten off and used instead of the missing ones.
I could open the desk drawer and take out such a connector from there, but it would be uninteresting and to some extent dishonest.

We solder the socket (so-called female) parts of the connectors onto the board.

The board has an output of a built-in 1KHz generator, we will need it later, although these two contacts are connected to each other, we still solder in a jumper, it will be convenient for connecting the “crocodile” signal cable.
For the jumper it is convenient to use the bitten lead of an electrolytic capacitor; they are long and quite rigid.
This jumper is located to the left of the power connector.

There are also a couple of important jumpers on the board.
One of them, called JP3 it must be short-circuited immediately, this is done with a drop of solder.

With the second jumper, it’s a little more complicated.
First you need to connect the multimeter in voltage measurement mode at the test point located above the petal of the stabilizer chip. The second probe is connected to any contact connected to the common contact of the board, for example to a USB connector.
Power is supplied to the board and the voltage at the test point is checked, if everything is in order, then there should be about 3.3 Volts.

After this jumper JP4, located slightly to the left and below the stabilizer, is also connected using a drop of solder.

There are four more jumpers on the back of the board; you don’t need to touch them; these are technological jumpers for diagnosing the board and switching the processor to firmware mode.

Let's return to the display. As I wrote above, I had to bite off several contact pairs in order to use them to replace the missing ones.
But when assembling, I decided not to bite out the outer pairs, but from the middle, as it were, and solder the outer one in place, so it would be more difficult to confuse something during installation.

Although there is a protective film on the display, I would recommend covering the screen with a piece of paper when soldering the connector, in which case drops of flux that boils during soldering will fly off onto the paper and not onto the screen.

That's it, you can apply power and check :)
By the way, one of the diodes that we soldered earlier serves to protect the electronics from incorrect power connections; on the part of the developer, this is a useful step, since the board can be burned with the wrong polarity in a second.
The board indicates a power supply of 9 Volts, but a range of up to 12 Volts is specified.
In the tests, I powered the board from a 12 Volt power supply, but I also tried from two series-connected lithium batteries, the difference was only in a slightly lower brightness of the screen backlight, I think that by using a 5 Volt stabilizer with a low drop and removing the protective diode (or connecting it in parallel with the power supply and installing a fuse), you can quite easily power the board from two lithium batteries.
Alternatively, use a 3.7-5 Volt power converter.

Since the startup of the board was successful, it is better to wash the board before setting it up.
I use acetone, although it is prohibited for sale, but there are small reserves; as an option, we also used toluene, or, in extreme cases, medical alcohol.
But the board must be washed, you don’t need to “bathe” it entirely, just go over it from below with a cotton swab.

At the end, we put the board “on its feet” using the supplied stands; of course, they are a little smaller than necessary and dangle a little, but it’s still more convenient than just putting it on the table, not to mention the fact that the pins of the parts can scratch the table top, and so on. this way nothing gets under the board and shorts out anything underneath it.

The first test is from the built-in generator, for this we connect the crocodile with a red insulator to the jumper near the power connector; there is no need to connect the black wire anywhere.

I almost forgot, a few words about the purpose of switches and buttons.
On the left are three three-position switches.
The top one switches the input operating mode.
Grounded
Operating mode without taking into account the constant component, or AC, or operating mode with a closed input. Well suited for AC current measurements.
Operating mode with measurement capability direct current, or operating mode with an open input. Allows measurements taking into account the constant voltage component.

The second and third switches allow you to select the scale along the voltage axis.
If 1 Volt is selected, this means that in this mode a swing of one scale cell of the screen will be equal to a voltage of 1 Volt.
At the same time, the middle switch allows you to select the voltage, and the lower multiplier, therefore, using three switches, you can select nine fixed voltage levels from 10 mV to 5 Volts per cell.

On the right are buttons for controlling scan modes and operating modes.
Description of the buttons from top to bottom.
1. When pressed briefly, it turns on the HOLD mode, i.e. recording readings on the display. when long (more than 3 seconds), turns on or off the mode of digital output of signal parameter data, frequency, period, voltage.
2. Button to increase the selected parameter
3. Button to decrease the selected parameter.
4. Button to cycle through operating modes.
Sweep time control, range from 10 µs to 500 sec.
Select the operating mode of the synchronization trigger, Auto, normal and standby.
The mode of capturing the synchronization signal by a trigger, at the front or rear of the signal.
Selecting the voltage level of the synchronization trigger signal capture.
Scrolling the waveform horizontally allows you to view the signal “off the screen”
Setting the vertical position of the oscillogram helps when measuring signal voltages and when the oscillogram does not fit on the screen...
The reset button, simply rebooting the oscilloscope, as it turned out, is sometimes very convenient.
There is a green LED next to the button; it blinks when the oscilloscope has synchronized.

All modes when the device is turned off are remembered and it then turns on in the mode in which it was turned off.

There is also a USB connector on the board, but as I understand it, it is not used in this version; when connected to a computer, it displays that an unknown device has been detected.
There are also contacts for flashing the device.

All modes selected by buttons or switches are duplicated on the oscilloscope screen.

I did not update the software version, since it is the latest one at the moment 113-13801-042

Setting up the device is very simple; the built-in generator helps with this.
Most likely, when you connect to the built-in rectangular pulse generator, you will see the following picture; instead of even rectangles, there will be either a “collapse” of the top/bottom angle, down or up.

This is corrected by rotating the tuning capacitors.
There are two capacitors, in the 0.1 Volt mode we adjust C4, in the 1 Volt mode, respectively, C6. In 10mV mode no adjustment is made.

By adjusting it is necessary to achieve even rectangular pulses on the screen, as shown in the photograph.

I looked at this signal with another oscilloscope, in my opinion it is “smooth” enough to calibrate this oscilloscope.

Although the capacitors are installed correctly, even in this option there is a slight influence from the metal screwdriver, as long as we hold the tip on the adjustable element, the result is the same, as soon as you remove the tip, the result changes slightly.
In this option, either tighten it with small shifts, or use a plastic (dielectric) screwdriver.
I got such a screwdriver with some kind of Hikvision camera.

On one side it has a cross tip, cut off, specifically for such capacitors, on the other it is straight.

Since this oscilloscope is more a device for studying the principles of operation than a truly full-fledged device, I don’t see the point in conducting full testing, although I will show and check the main things.
1. I completely forgot, sometimes when working, a manufacturer’s advertisement appears at the bottom of the screen :)
2. Displays the digital values ​​of the signal parameter, a signal is supplied from the built-in rectangular pulse generator.
3. This is the intrinsic noise of the oscilloscope input; I have seen mentions of this on the Internet, as well as the fact that a new version has a lower noise level.
4. To check that this is really noise from the analog part and not interference, I switched the oscilloscope to the mode with a short-circuited input.

1. Switched the sweep time to 500 seconds per division mode, as for me, well, this is really for extreme sports enthusiasts.
2. The input signal level can be changed from 10mV per cell
3. Up to 5 Volts per cell.
4. Rectangular signal with a frequency of 10 KHz from the generator of the DS203 oscilloscope.

1. Rectangular signal with a frequency of 50 KHz from the generator of the DS203 oscilloscope. It can be seen that at this frequency the signal is already highly distorted. 100KHz doesn't make much sense anymore.
2. Sinusoidal signal with a frequency of 20 KHz from the generator of the DS203 oscilloscope.
3. Triangular signal with a frequency of 20 KHz from the generator of the DS203 oscilloscope.
4. Ramp signal with a frequency of 20 KHz from the generator of the DS203 oscilloscope.

Next, I decided to look a little at how the device behaves when working with a sinusoidal signal supplied from an analog generator and compare it with my DS203
1. Frequency 1KHz
2. Frequency 10KHz

1. Frequency 100KHz, in the designer you cannot select a sweep time less than 10ms, that’s why it’s the only way :(
2. And this is what a sinusoidal signal with a frequency of 20KHz, fed from the DS203, may look like, but in a different input divider mode. Above was a screenshot of such a signal, but given in the position of the divider 1 Volt x 1, here the signal is in the 0.1 Volt x 5 mode.
Below you can see what this signal looks like when fed to the DS203

20KHz signal supplied from an analog generator.

Comparative photo of two oscilloscopes, DSO138 and DS203. Both are connected to an analog sine generator, frequency 20KHz, both oscilloscopes are set to the same operating mode.

Summary.
pros
Interesting educational design
High-quality printed circuit board, durable protective coating.
Even a novice radio amateur can assemble the set.
Well-thought-out packaging, I was pleased with the spare resistors included.
The instructions describe the assembly process well.

Minuses
Low frequency input signal.
They forgot to include a couple of contacts for attaching the indicator.
Simple packaging.

My opinion. Let me say briefly, if I had such a construction set in my childhood, I would probably be very happy, even despite its shortcomings.
Long story short, I was pleasantly surprised by the designer; I consider it a good base both in gaining experience in assembling and setting up an electronic device, and in working with a very important device for a radio amateur - an oscilloscope. It may be simple, even without memory and with a low frequency, but it is much better than fiddling with audio cards.
Of course, it cannot be considered a serious device, but it is not positioned as such, but as a designer, more than anything.
Why did I order this designer? Yes, it was just interesting, because we all love toys :)

I hope that the review was interesting and useful, I’m looking forward to suggestions regarding testing options :)
Well, as always, Additional materials, firmware, instructions, sources, diagram, description -

  • operating modes:
    • mixed signal oscilloscope;
    • arbitrary waveform generator;
    • 8-channel logic analyzer;
    • spectrum analyzer;
  • possibility of simultaneous operation of the generator and oscilloscope;
  • graphic OLED display, size 0.96"", resolution 128×64 pixels;
  • PDI interface for programming and debugging;
  • control using a 4-button keyboard;
  • USB connector for powering the device (hereinafter referred to as software implementation of the USB interface).
  • Meter Specification:

    • oscilloscope:
      • 2 analog channels;
      • 8 digital channels;
      • analog bandwidth - 318 kHz;
      • maximum speed samples - 2 Msps;
      • resolution - 8 bits;
      • analog synchronization and external digital synchronization;
      • vertical and horizontal cursors;
      • input resistance - 1 MOhm;
      • buffer size for each channel - 256;
      • maximum input voltage - ±10 V;
    • arbitrary waveform generator:
      • 1 analog channel;
      • maximum conversion speed - 1 Msps;
      • analog bandwidth - 66 kHz;
      • resolution - 8 bits;
      • low output impedance;
      • buffer size - 256;
      • maximum output voltage- ±2 V.

    Schematic diagram of the device

    The input analog channels of the oscilloscope and the output channel of the signal generator are made using a JFET operational amplifier TL064 with low consumption. The same operational amplifier is used as a reference voltage source for the built-in analog-to-digital converter of the microcontroller.

    The device receives power from the USB interface, however, you can use an external 5 V voltage source, but you should be careful and exclude the possibility of simultaneously connecting an external source and the USB interface. The supply voltage of the microcontroller is 3.3 V; for this purpose, a 3.3 V voltage regulator AP7333 is installed. Also, a voltage of 3.3 V is required to power the display controller.

    To power the operational amplifiers, a bipolar voltage source of + 5 V and -5 V is required. To obtain a negative voltage of -5 V, an integrated DC/DC converter TPS60403 (charge pump) is installed.

    The clock source for the microcontroller is an external 16 MHz quartz resonator.

    Control, menu navigation, and parameter settings are carried out using the K1-K4 keyboard.

    For programming (as well as for software debugging) of the microcontroller, a 2-wire PDI interface is used. This interface supports high-speed programming of all non-volatile memory spaces, incl. Flash memory, EEPOM, Fuse bits, Lock bits and user signature code. Programming is carried out by accessing the non-volatile memory controller (NVM controller) and executing commands from the NVM controller.

    PCB appearance

    Demonstration of the device operation

    There is such a wonderful USB oscilloscope from the Chinese company Instrustar labeled ISDS205A. It is attractive primarily for its software, it is very convenient and functional for a USB oscilloscope, and of course, for its characteristics, which are not even bad considering the price of the oscilloscope. On Aliexpress it is about $55 for the whole set. Therefore, if you are not confident in your ability to repeat the device, then it would be more advisable to purchase a ready-made device. Moreover, the difference in price is not that big. In general, this whole idea of ​​repetition, solely from sporting interest. One of the differences is that in the author’s version the relay is powered from +5V, which comes out of the converter, thereby loading the latter and distorting the voltage. In our case, the relay will be powered from a separate stabilizer, and the converter will also be different. Below is the diagram of Instrustar ISDS 205A (modified).

    In the analog part, only one channel is drawn, the second is the same. The oscilloscope is built on a processor CY7C68013A, and a two-channel ADC chip AD9288-40BRSZ. The processor transmits all received data via USB to the computer, so its operation is very dependent on the performance of the computer. On older machines, most likely, this oscilloscope will not work correctly.

    Assembly Features

    The printed circuit board is attached below in the archive. The board on which I made the oscilloscope contains a small error in the wiring, so it does not control the relay correctly. I had to use an inverter (in the photo you can see the microcircuit is located with the pins up and is soldered to the wires).





    The board is quite complex, double-sided and metallized, so I recommend making it using a relay, which is used in the input part of the TX-4.5 type. The response voltage should be no more than 3.3 volts. Operational amplifiers AD8065 are very afraid of overheating and static. It is also very easy to run into a fake. Therefore, I recommend soldering them with a well-grounded soldering iron with temperature control, and try not to overheat, soldering in one touch. Before soldering the op-amp, I recommend making a DC-DC converter and soldering it.
    This is necessary to monitor the operability of the op-amp. After installing the first one, we supply power and control the voltage at the input and output. A normal op amp should have 0 volts at the input and output. Well, now about DC itself - DC. It makes +5 and -5 Volts out of 5 volts. Its circuit and board are also in the archive. The most difficult thing there is to reel in the trance. It is imperative to observe the polarity of the winding and not confuse anything.

    You can also purchase a ready-made DC-DC, but the noise level of the oscilloscope increases slightly. After assembly, you need to flash the Eeprom chip. To do this, install a jumper on the board, connect it via USB to the computer, launch the Cypress Suite program, go to the EZ Console, press the LGeeprom button, select the firmware file from the archive (extension .iic), and the firmware is loaded. You can read more about the firmware in. The housing is standard and marked BIS-M1-BOX-100-01BL. Case size - 100*78*27 mm. Ideal for boards from the archive. Below is a photo of the case itself and the assembly process.








    Specifications:

    Digitizing an analog signal:

    Voltage 0-3V

    Sampling up to 153.9 kHz.

    Generator:

    Frequency 0-533.3kHz

    Voltage 3V

    Current up to 15mA

    Battery 1.5V

    Description:

    This oscilloscope can be useful when repairing and tuning audio equipment, since it has a built-in generator, and the sampling frequency allows you to measure signals over almost the entire audio frequency range.

    The oscilloscope has 2 channels: analog and digital. Both channels are displayed on the display as a timing diagram, the analog channel in blue, the digital channel in yellow. Synchronization can be carried out from both channels. It is also possible to switch digital channel to the output and output frequencies from 20Hz to 533kHz with any signal duty cycle.

    Control is carried out using one button, which selects the parameter being set, and a potentiometer, with which the selected parameter is changed.

    Interface and control

    The information on the display looks like this:

    Channel 1 (analog input) is supplied with a frequency of 50Hz. Channel 2 is switched to generator mode and generates a frequency of 30Hz with a duty cycle of 50%.

    U 100 is the synchronization level. The parameter only affects when synchronization comes from channel 1 (analog input).

    T 025 is the timing offset. 25 - quarter screen. Thus, the leading edge is offset from the left edge of the display by 25 reports. There are 100 reports in total.

    048ms - sweep period. There will be 48ms between 2 green vertical bars.

    The arrow to the left of the number 048 is a cursor, it indicates the currently selected parameter.

    /1 indicates synchronization mode. Now the leading edge of channel 1 is selected. The falling edge, leading edge of any of the channels can also be selected, or synchronization is disabled (the “NO” symbol).

    30 is the generator frequency. There may be a frequency value or an IN value - this indicates that channel 2 will be the input and the frequency is not output.

    The next parameter 000 indicates the duty cycle of the pulse. It is not selected, so the duty cycle is set to the default - 50%.

    In order to set the appropriate parameter value, you need to press the button to set the cursor “ ” opposite the required parameter, then turn the potentiometer to set the required value.

    If the selected option led to a freeze, this happens if synchronization is enabled, but there is no signal for synchronization. In this case, the program waits for an input signal and does not poll the potentiometer. To exit this mode, you need to use the button to place the cursor on the desired parameter and, while holding it, change the parameter to the appropriate one, at which synchronization is possible or disabled.

    Oscilloscope circuit

    The oscilloscope circuit is based on the ATTiny 43U controller. This controller has a built-in DC-DC converter, which allows you to power the circuit from a single battery. I used the AAA element. The built-in DC-DC converter raises the battery voltage (0.7V - 1.8V) to 3V, and the controller core (and ports) is powered from 3V.

    The display selected is from cell phone NOKIA6100, since it is color, has a fairly decent resolution of 132x132 pixels, is controlled via the SPI protocol (to save ports) and already has a built-in backlight. Plus it's very cheap.

    The circuit also uses another DC-DC converter based on the MC34063 microcircuit; it is needed to power the display backlight, since the backlight should receive approximately 6V and a few kopecks.

    The circuit does not need any special settings.

    Software part:

    The oscilloscope program is written in assembly language in AVR Studio.

    When implementing the program, I encountered the following nuances:

    Since the display has serial interface, and SPI with 9-bit transmission (the protocol for working with the display is described in detail in an earlier article about the power supply), it is not possible to implement data transmission in hardware. Therefore, updating the display takes a long time. The display is completely painted over in about a second (this does not suit us at all), so when an oscillogram is displayed on the display, the erasure occurs along the previous contour together with the drawing of new data. This made it possible to speed up the process of drawing an oscillogram by almost 100 times. There was just enough RAM to store 2 buffers of digitized data.

    To reduce the amount of information stored in RAM, the data of both channels is stored in one buffer, that is, the state values ​​of both channels are stored in one byte of the buffer. Bits 0 to 6 are the ADC data (since we are quite happy with 7 bits of digitized data) and bit 7 is the state of channel 2.

    Also, to improve the displayed image, the program calculates intermediate points. The calculation occurs as the arithmetic average of two adjacent ADC values, that is, when the current point is output, another point in the same row is output. Thus, the picture is supplemented and the gaps between reports are filled.

    To eliminate potentiometer bounce, the value accumulation method is used; the potentiometer value is calculated using the following formula:

    A p=A p-Ap/256+ADC, where Ap is the accumulated value.

    Thus, averaging of 256 potentiometer values ​​occurs.

    About ADC

    According to the chip datasheet, the ADC sampling frequency is 15 kHz with a maximum resolution at a clock speed of approximately 200 kHz. But ADC clocking up to 1 MHz is allowed. At a frequency of 1 MHz, the sampling frequency is 76 kHz. And with divisors you can specify much more. During experiments by clocking the ADC, it turned out that it works quite well at a frequency of 2 MHz. If it is more, then the measurement cycle increases, and the measurement period begins to decrease. In the program, when the sampling frequency changes, the clock ADC changes from 62 kHz to 2 MHz.



    If you find an error, please select a piece of text and press Ctrl+Enter.