top of page
Writer's picturebusmomarrenisivime

[VIRTUALBENCH-BODE-ANALYZER - Texas Instruments India](^1^)



Set up the Arduino IDE and upload code to a SparkFun Redboard. Use the microcontroller to control an RGB LED. Read in values from a flex sensor and set the position of a servo accordingly. Control a relay via a transistor and use a scope to show why a flyback diode is needed. Display text on an LCD.




Creating A Bode Analyzer From A Microcontroller



Decode the signal from an IR remote. Build a 5-bit R-2R digital to analog converter (DAC). Hook up the DAC to a common collector amplifier and a speaker. Synthesize sine waves corresponding to musical notes using direct digital synthesis (DDS). Use the remote control to select various frequencies, creating a remote controlled piano.


Take on any comms challenge by creating your own low-level protocol analyzer, high-level protocol analyzer, or measurement. And if you like, you can easily share your extension with the Saleae community.


The PWM frequency on the Arduino using the analogWrite() command is set to 490 Hz on most pins and 980 Hz on pins 5 and 6. Thus using the analogWrite() command to generate the square is not a viable option since the frequency is not adjustable (only the duty cycle). (It is important to remember that the goal here is not actually to modulate the pulse width -- it is to change the frequency of the square wave.) The other option is to bit-bang the PWM and just manually switch the pin high and low with the appropriate delay. This could be done using the delayMicroseconds command, but this does not provide a good enough resolution at 100kHz. The clear solution is to work directly with the timing registers on the Atmega chip. Given more time, this would have been a good option to explore, but as it turns out, the faster solution was to switch to the Teensy 3.1 microcontroller. The Teensy is a 3.3V microcontroller that runs on a 96MHz clock. It has a function called analogWriteFrequency(pin, freq) that allows you to set the analogWrite frequency in the setup code. It can easily set frequencies from a few Hz up to hundreds of kHz. The only downside is that all PWM pins tied to the same timer will change their frequency at the same time, but we only need one for this project. The simplicity of this solution motivated motivated the use of a Teensy as the microcontroller.


With the selection of the microcontroller done, we need to consider how to actually control the inverter with the Teensy. While it is possible to control the DELAY and #DELAY signals in software, it is far simpler to just create a single square wave from the Teensy and send it through the 74HC14 delay network. This is very straightforward to implement: we just replace the LM311 and the 74HC14 oscillator with the Teensy. It is important to remember that the Teensy is a 3.3V device that is now interfacing with a 0-5V (TTL-level) device. This turns out to be okay though because the TTL thresholds for high and low logic levels are more than sufficient to provide the correct output. If a larger peak-to-peak voltage was needed, it would be a simple matter to feed the signal into an appropriate comparator (e.g. LM311) with the correct bias voltage to increase the amplitude.


Educational tools. TINA also includes unique tools for testing students' knowledge, monitoring progress and introducing troubleshooting techniques. With optional hardware it can be used to test real circuits for comparison with the results obtained from simulation. With the Live 3D breadboard tool you can automatically build a life-like 3D picture of a solderless breadboard. When you run TINA in interactive mode, components like switches, LEDs, instruments, etc. become "live" and will work on the virtual breadboard just as in reality. You can use this capability of TINA to prepare and document lab experiments. You can also use the integrated Flowchart Editor and Debugger to generate and debug the MCU code, learning and teaching microcontroller programming.


The setup of interactive communication between arm strength training machine and the people will make exercise and rehabilitation therapy become more friendly. The employment of electromyographic not only can help physical therapy but also can achieve more effective rehabilitation. Both of the system hardware and software of the arm strength training machine with EMG system are well designed and described. The fundamental design of electromyographic measurement system based on a microcontroller is analyzed and discussed. The software programming is developed in MPLAB integrated development environment from the Microchip Technology Inc. and the friendly user interface is created as well. Finally, an arm strength training machine with electromyographic control system is realized and demonstrated. The experimental results show the feasibility and fidelity of the complete designed system.


Most of the ASTM functions are programmed in the microcontroller firmware which includes the circuit protection mechanism, the analog to digital converter for EMG system, PWM generation, motor currents calculation, rotor position and speed calculation, rotor pole position and the transmission and receiving of communication interface as shown in Figure 7. The flowchart of the main program for microcontroller firmware is shown in Figure 8. Since the resolution of encoder is 2500 pulses per revolution. The value of the counter in the microcontroller will be 5000 counts. The motor speed is obtained from the difference between current counter value and the last counter value in which both are acquired from the Timer 2 in capture interrupt service routine as shown in Figure 9. The EMG analog signal input to the microcontroller is first converted to the digital signal via the ADC module embedded in the microcontroller. Accordingly, the human interface can display the same converted EMG signal as well. The human interface design related to the peripheral device can be found in the paper [13]. The Capture Counter in Figure 9 represents the distance when motor runs. Consequently, the displacement of a user performing the arm exercise can be obtained. The relationship between the actual speed shown in the human interface display and the motor speed can be expressed aswhere is the speed displayed in human interface with the unit of cm/sec and is the radius of motor shaft with the unit of cm. 2ff7e9595c


0 views0 comments

Recent Posts

See All

Comments


bottom of page