Finished function generator checkout - just need some labeling on the box
CUT TRACES AND ADDED SHORT JUMPERS
Since my PCB had the wrong connections for the op-amp, I did some adjustments to reroute the wiring. An op-amp has negative feedback, a connection from the output back to the negative input terminal, while the source signal is applied to the plus input terminal. The op amp follows the voltage of its plus input to produce a stronger output which is then fed to the analog to digital converter of a microcontroller.
My error had the input attached to the minus input and the output hooked to the plus input. This drives the op amp to its positive rail, 3.3V rather than varying based on the input signal. I cut the connection between output and + input as well as the connection of the source to the - input. Using blobs of solder across adjacent pins, I connected - input and output together. A short bit of bare wire was tacked onto the + input pin and connected it to the source input.
I tested the generator and it functioned as expected, taking input signals that range between -10V and +10V, converting them to a value between 0 and 3.3V with the op amps I rewired, then read then in the microcontroller to apply the selected function to the values we sensed. The result of the function was converted by the microcontroller from digital back to analog and that was fed into another op amp which converted to 0 to 3.3V result back to a value from -10 to +10V as the output of the box.
The analog computer this will be used with operates with the -10 to +10V range which represents the analog value from -1 to 1. All real world problems to be handled by an analog computer must be scaled to generate values in this range of 0 to +/- 1 which is part of the mathematics wizardry applied before using the machine to show the results.
For example, if the input is 5V, it represents a value of 0.5. The function which gives us the square root will produce a value of .707106781... which becomes a voltage of 7.0710681... as the output. If the function is x^2 then the result is 0.25 which gives us an output voltage of 2.5V.
Comments
Post a Comment