Closed digitaldanny closed 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
Monostable Multivibrator Mode (555 timer): Some notes about the 555 timer's one-shot mode that could be useful.
Some additional notes on the 555 timer modes..
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.
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.
HW Prototype Parts List
These parts may not be needed, but I'm ordering them just in case.
Update for 02/14.
In Progress:
Todo:
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 = ?.
Update for 02/14
Completed:
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.
Current issues with the circuit..
1.) The beat 555 timer has an offset before the capacitor charges up enough to switch voltages.
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.
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.
Altium schematic completed for this hardware. Currently focused on the battery charger schematic / prototype before completing the charger PCB placement.
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
Tune Up/Down Direction Controller
Frequency Controller
Note Waveform Generator
Volume Amplifier
Class AB Amplifier
Describe the solution you'd like
Additional context