VOGONS


Reply 20 of 24, by Darmok

User metadata
Rank Newbie
Rank
Newbie

I tested the device with a 486 computer and everything was fine, but when I began to test it with a 386 computer whose speaker output is low when there is no signal, a problem was discovered. In games that use short single pulses, the volume level of these pulses was too low. The problem was solved by choosing the value of the resistor in the input differentiating circuit, but its value depends on the gain of the transistor, so this is a bad solution. The correct solution would be to add an additional switched inverter, as shown in the attached diagram.

Attachments

  • dev3new.GIF
    Filename
    dev3new.GIF
    File size
    122.02 KiB
    Views
    329 views
    File license
    Public domain

Reply 21 of 24, by Darmok

User metadata
Rank Newbie
Rank
Newbie

I made a test recording of the speaker's PWM signal using LINE_OUT and TAD inputs. This recording contains high frequencies, which proves the full suitability of the optocoupler in the photovoltaic circuit.

Attachments

  • Filename
    popcorn2.ogg
    File size
    2.25 MiB
    Downloads
    33 downloads
    File license
    Fair use/fair dealing exception

Reply 22 of 24, by Darmok

User metadata
Rank Newbie
Rank
Newbie

I made a new, maximally simplified version of the device with optical isolation. This option does not contain a timer and driver, and there is also no possibility of connecting the sound card output to the PC speaker. This version has software control for turning off the speaker. Simultaneously with its disabling, the linear output to the sound card input is turned on. That is, either the speaker or the sound card sounds.

download/file.php?mode=view&id=183367

download/file.php?mode=view&id=183367

The device is tolerant of incorrect reverse connection of the CN1 connector, this will not cause damage to the device or motherboard. Potentiometer R1 is used to set the optimal current value through the LEDs, and can also be used to set the desired signal level. The easiest way is to set the appropriate current value by listening to PWM sound with some kind of player to minimize distortion.
An example of PWM sound recording is in the file popcorn2.1.ogg. Recording made using Inertia Player V1.20 on a 386DX40 computer.

download/file.php?mode=view&id=183369

The speaker is controlled via the COM port using the spk.com utility. The utility accepts two parameters: E – enable the speaker and disable the linear output and D – disable the speaker and enable the linear output. By default, the utility controls the COM2 port, but using hexeditor it can be configured to handle any port. The utility is located in the spk.zip archive. When using the utility in a Windows95 environment, you must disable the corresponding COM port in the system properties.

download/file.php?mode=view&id=183370

Software control made it possible to abandon the use of a timer. Just add the “spk.com d” command to autoexec.bat. Due to the lack of a switchable inverter in this version, there is a difference in the tactics of using the device. With those motherboards in which, in the absence of a signal, the output of the speaker driver is in the LOW state, when the speaker is turned off, there is interference from the power and ground lines at the input of the sound card. When the speaker is turned on, there is no interference at all. Therefore, for such motherboards, it makes sense to disable the speaker when running games that use it if we want to hear sound through the sound card. In this case, you should launch the game with a bat file, for example:
Spk.com d
Game.exe
Spk.com e

I recorded the sound card's own noise (AWE64 Value) and the noise introduced by the device on a 386DX40 motherboard with the speaker driver output set to LOW (silens2.1.ogg file). From 00 to 10, from 16 to 20 and from 25 to 41 seconds the speaker is on, from 10 to 16 and from 20 to 25 the speaker is off. At 35 seconds, I physically disconnected the device output from the sound card input. The CD_IN input was used.

download/file.php?mode=view&id=183371

Attachments

  • Filename
    sillens2.1.ogg
    File size
    807.77 KiB
    Downloads
    8 downloads
    File license
    Public domain
  • Filename
    spk.zip
    File size
    1.16 KiB
    Downloads
    8 downloads
    File license
    Public domain
  • Filename
    popcorn2.1.ogg
    File size
    1.9 MiB
    Downloads
    9 downloads
    File license
    Public domain
  • spk V2.1.GIF
    Filename
    spk V2.1.GIF
    File size
    44.47 KiB
    Views
    143 views
    File license
    Public domain
  • IMGP0055.JPG
    Filename
    IMGP0055.JPG
    File size
    1.83 MiB
    Views
    143 views
    File license
    Public domain

Reply 23 of 24, by Darmok

User metadata
Rank Newbie
Rank
Newbie

Another version, now without optical isolation. Its properties are similar to the previous one, but it has a slightly higher level of interference when the speaker is turned off.
An example of PWM sound recording is in the file popcorn2.2.ogg.
The recording of the sound card's own noise and the noise introduced by the device is in the file silens2.2.ogg. From 00 to 5, from 10 to 14 and from 18 to 34 seconds the speaker is on, from 5 to 10 and from 14 to 18 the speaker is off. At 25 seconds I physically disconnected the device output from the sound card input, at this moment a click was heard.
The recording conditions are the same.
If software control of the device is not required, then you can exclude T1, R3, D2, CN2 and control the switching with a manual switch connected in series with the speaker.

Attachments

  • Filename
    silens2.2.ogg
    File size
    657.78 KiB
    Downloads
    5 downloads
    File license
    Public domain
  • Filename
    popcorn2.2.ogg
    File size
    1.74 MiB
    Downloads
    5 downloads
    File license
    Public domain
  • spk V2.2.GIF
    Filename
    spk V2.2.GIF
    File size
    39.49 KiB
    Views
    123 views
    File license
    Public domain
  • IMGP0054.JPG
    Filename
    IMGP0054.JPG
    File size
    1.73 MiB
    Views
    123 views
    File license
    Public domain

Reply 24 of 24, by Darmok

User metadata
Rank Newbie
Rank
Newbie

Based on the results of operating the first prototype of the device, a new final version of the device was developed, which completely satisfied me. I also built and tested a new prototype.

All features of the old version have been retained and new ones have been added. The values of some components were also clarified.

The mixer of Creative sound cards has too rough adjustment at the TAD and PC_SPK inputs, so potentiometer R7 has been added to more accurately adjust the volume level.

The duration of the timer pulse, which sets the duration of the speaker's activation after the computer starts or the reset button is pressed, is set by resistor R4 and capacitor C3. With the values indicated in the diagram, the duration is approximately 30 seconds (depending on the variation in capacitance of the capacitor). If necessary, the duration can be adjusted by the value of resistor R4.

I have found that the output level value of the speaker driver on the motherboard can in some cases change to the opposite after finishing some programs/games that use the speaker. That is, if before starting the program the output level was low, then after its completion it becomes high. Moreover, this does not happen every time, but occasionally. The reasons for this phenomenon are not clear to me. However, this gives rise to the problem of constant current flow through the speaker, especially since the device allows the use of increased power supplied to the speaker. Using a switched inverter at the device input does not solve the problem.
Therefore, the new version of the device uses automatic adaptation to the driver output level. If the low or high input level is held for more than 1 second, the device-controlled speaker, LINE_OUT and PC_SPK outputs are turned off. However, such a shutdown does not affect the useful signal in any way. The shutdown control is implemented using logic gate U1.2, which acts as a comparator with hysteresis. If there is a useful signal, a voltage of about 2.35V is established at the comparator input, which falls within the zone inside the hysteresis loop and false operation does not occur. The value of this voltage is determined by the circuit D3, R5, SD1 (must be a Schottky diode).

Sometimes I want to enjoy the “real” sound of the speaker while remembering the good old days, so I implemented the ability to programmatically turn on the speaker while simultaneously disabling the LINE_OUT output. The CTL input is designed for this capability. The permissible voltage level at this input is from -15V to +15V. Low level less than 0.3V, high level more than 3.5V or open collector.
Control is possible both from any GPIO device and directly from the COM port. Personally, I use a simple homemade GPIO board also connected to the COM port. Jumper J1 allows you to adapt the CTL input to any polarity of the output of the control device; to control from the COM port, it must be removed. If software control is not used, a jumper must be installed. Also, instead of a jumper, you can use a switch to manually turn on/off the speaker. The spk.com utility (located in the spk.zip archive) is intended for control via the COM port. The utility works in DOS and Win9x environments. Unfortunately, my knowledge is not enough to develop such a utility that will work in the Win NT family. Maybe someone can tell me how to solve this problem? Need a low-level driver? How to write it? Where can I find information about this?

The device can be used without connecting to the Reset input of the motherboard, relying on software control of the speaker. In this case, you need to provide some kind of connection to the computer ground, it is best to do this with a screw.

Jumper J2 determines whether the LINE_OUT output will turn off when the speaker is turned on or will be turned on constantly.

Jumper J3 limits the output power supplied to the PC speaker when using an amplifier designed to work with external speakers of several watts.

A sample sound of a melody from the game Supaplex is in the file supaplex.ogg, a sample PWM signal is in the file popcorn.ogg. The device does not introduce any additional noise into the output signal of the sound card via the LINE_OUT output, at least their level is much lower than its own noise. The PC_SPK output has a very low noise level, barely noticeable against the background noise of the AWE64 CT4520.

Attachments

  • final.jpg
    Filename
    final.jpg
    File size
    1.96 MiB
    Views
    66 views
    File license
    Public domain
  • diagram.GIF
    Filename
    diagram.GIF
    File size
    131.85 KiB
    Views
    66 views
    File license
    Public domain
  • Filename
    supaplex.ogg
    File size
    1.44 MiB
    Downloads
    4 downloads
    File license
    Public domain
  • Filename
    popcorn.ogg
    File size
    1.39 MiB
    Downloads
    3 downloads
    File license
    Public domain
  • Filename
    spk.zip
    File size
    1.22 KiB
    Downloads
    3 downloads
    File license
    Public domain