digitaldanny / AudioEffectsGlove

A hand tracking glove that controls parameters of various audio effects.
1 stars 0 forks source link

Waveform Generator + Speaker Driver Module - Prototyping #38

Closed digitaldanny closed 3 years ago

digitaldanny commented 3 years ago

Describe the solution you'd like

Additional context

digitaldanny commented 3 years ago

Some truth tables that need the logic gates to be defined.

4029 counter outputs to 4051 demux outputs logic The demux outputs control which resistor values are chosen to select the 555 timer frequency.

C3 C2 C1 C0 - D3 D2 D1 D0
* * 0 0 - 0 0 0 1
* * 0 1 - 0 0 1 0
* * 1 0 - 0 1 0 0
* * 1 1 - 1 0 0 0

Circuit inputs to 4029 counter direction

Connected (Active Low) Battery Charged - Counter Direction Description
Falling edge 0 - Up Connecting but NOT charged.
0 Rising edge - Up Fully charged and connected.
Rising edge 0 - Down Disconnecting.
Circuit 1 Connected (Active Low) Battery Charged - Counter Direction Description
0 Rising edge - Up Fully charged and connected.
Circuit 2 Connected (Active Low) Battery Charged - Counter Direction Description
Falling edge 0 - Up Connecting but NOT charged.
Rising edge 0 - Down Disconnecting.

Todo

digitaldanny commented 3 years ago

Monostable Multivibrator Mode (555 timer): Some notes about the 555 timer's one-shot mode that could be useful.

Monostable Multivibrator Mode

digitaldanny commented 3 years ago

Some additional notes on the 555 timer modes..

digitaldanny commented 3 years ago

Rising and Falling Edge Detector - YouTube: This video shows how to make rising/falling edge detectors with a single NPN transistor. This can be used for detecting if the device is connected or disconnected.

digitaldanny commented 3 years ago

I've attached a high level diagram of how this circuit will work below. I've also listed an explanation of the steps starting from the bottom when the glove PCB is connected/disconnected.

Mid level HW diagram

digitaldanny commented 3 years ago

HW Prototype Parts List

Part | Quantity | Ordered?

These parts may not be needed, but I'm ordering them just in case.

digitaldanny commented 3 years ago

Update for 02/14.

In Progress:

Todo:

digitaldanny commented 3 years ago

These are the notes I will tune the resistors to.

Note Freq (Hz) Ra
C4 261.63 ---
E4 329.63 ---
G4 392.00 ---
C5 523.25 ---

Assuming Rb = ? and C = ?.

digitaldanny commented 3 years ago

Update for 02/14

Completed:

digitaldanny commented 3 years ago

Update on the edge detector design. I was originally planning on building this with npn transistors, but this StackExchange comment shows a clever solution to building a rising and falling edge detector using an RC circuit and XOR gate. The XOR inputs both come from the input; however, one of the inputs are delayed by the RC circuit. There is a brief period of time when the input voltage switches from high-to-low or low-to-high when the inputs will be different values. This is what creates the output pulse.

I'm using this circuit with an NPN transistor inverter to combine the positive-edge detector, negative-edge detector, and OR gate into a single circuit.

Since I do not have any XOR ICs, I will just use 4 NAND gates as shown in this link.

digitaldanny commented 3 years ago

Current issues with the circuit..

1.) The beat 555 timer has an offset before the capacitor charges up enough to switch voltages.

Beat Timer Delay

2.) The 4 resistance values need to be modified for the timer to output the frequencies required. 3.) The duty cycle is closer to 70% than 50% for this timer as well. May need to increase the size of Rb. 4.) There is sometimes a delay before the up/down dir signal from the DFF sets the direction when the connected pin is pulled high. It seems like this is a race between the up/down dir signal and the enable signal from the monostable 555 timer. 5.) The volume is extremely quiet even at its max. How do I improve this? 6.) Need to force the 4029 initial state to 0. Right now, it can initialize to anything.

digitaldanny commented 3 years ago

Need to force the 4029 initial state to 0. Right now, it can initialize to anything.

Fixed using the suggestion on this StackExchange comment. I used a 100nF cap to enable the Preset Enable during power on and a 100k resistor to discharge the capacitor immediately after. This results in a consistent initial state of 0 on the 4029.

digitaldanny commented 3 years ago

Altium schematic completed for this hardware. Currently focused on the battery charger schematic / prototype before completing the charger PCB placement.

digitaldanny commented 3 years ago

No work completed on this since issue was closed. Just leaving snapshots of current schematic for later reference.

From the bottom up..

Glove Connection Detector D) Glove Connection Detectors

Tune Up/Down Direction Controller E) Up Down Dir Controller

Frequency Controller C) Frequency Controller Logic

Note Waveform Generator G) Note Generator

Volume Amplifier F) Volume Amp

Class AB Amplifier B) Class AB Amp