Circuit-Zone.com - Electronic Projects
Posted on Wednesday, May 25, 2011 • Category: Arduino
Arduino Sine wave Generator using the direct digital synthesis Method.
Here we describe how to generate sine waves with an Arduino board in a very accurate way. Almost no additional hardware is required. The frequency range reaches form zero to 16 KHz with a resolution of a millionth part of one Hertz! Distortions can be kept less than one percent on frequencies up to 3 KHz. This technique is not only useful for music and sound generation another range of application is test equipment or measurement instrumentation. Also in telecommunication the DDS Method is useful for instance in frequency of phase modulation (FSK PSK).
The DDS Method (digital direct synthesis).
To implement the DDS Method in software we need four components. An accumulator and a tuning word which are in our case just two long integer variables, a sinewave table as a list of numerical values of one sine period stored as constants, a digital analog converter which is provided by the PWM (analogWrite) unit, and a reference clock derived by a internal hardware timer in the atmega. To the accumulator , the tuning word is added, the most significant byte of the accu is taken as address of the sinetable where the value is fetched and outputted as analog value bye the PWM unit. The whole process is cycle timed by an interrupt process which acts as the reference clock. Further details of the DDS Method are described in web of course.
Posted on Wednesday, May 25, 2011 • Category: Arduino
This example shows how to make use of the Watchdog and Sleep functions provided by the ATMEGA168 chip (decimila). These functions are useful if you want to build low power consuming devices operated by battery or solar power.
The reduced power consumption is achieved by through a intermittent operation of the system .In case of Arduino your main loop will be executed once before the system is put into the sleep mode. After a few seconds t the watchdog wakes the system up and the main loop is executed again. The ratio between main loop execution time and watchdog time determines the amount of power that will be saved.
When we assume that the time to measure a sensor and making some decisions will take 10 millisecond and the watchdog is set to 8 seconds the on/off ratio is 800 which extends the battery live time by this factor.
Posted on Tuesday, May 24, 2011 • Category: Miscellaneous
This device is designed to measure the torque in an automobile drive shaft and provide an output to a vehicle data recording system or a portable computer via an RS-232 interface. The received data can then be combined with RPM measurements from the data recording system to calculate horsepower. It consists of the sensor unit, (Figure 1), which attaches to the driveshaft, and the receiver unit, , which provides the serial output signal. The sensor unit is battery powered and communicates with the receiver via a 433 Mhz RF data link.The receiver unit is powered by the vehicle electrical system. Circuit operation is shown in the diagram.
Posted on Monday, May 23, 2011 • Category: Power Supplies
The linear laboratory power supply, shown in the schematic, provides 0-30 volts, at 1 amp current, using a discrete transistor regulator with op-amp feedback to control the output voltage. The supply was constructed in 1975 and has a constant current mode that can be used to recharge batteries. With reference to the schematic, lamp, LP2, is a power-on indicator. The other lamp (lower) lights when the unit reaches its preset current limit. R5, C2, and Q10 (TO-3 case) operate as a capacitor multiplier. The 36 volt zener across C2 limits the maximum supply voltage to the op-amps supply pins. D5, C4, C5, R15, and R16 provide a small amount of negative supply for the op-amps so that the op-amps can operate down to zero volts at the output pins (pins 6). A more modern design might eliminate these 4 components and use a CMOS rail-to-rail op-amp. Current limit is set by R3, D1, R4, R6, Q12, R10, and R13 providing a bias to U2 that partially turns off transistors Q9 and Q11 when the current limit is reached. R4 is a front panel potentiometer that sets the current limit, R22 is a front panel potentiometer that sets the output voltage (0-30 volts), and R11 is an internal trim-pot for calibration. The meter is a 1 milliamp meter with an internal resistance of 40 ohms. Switch S1 determines whether the meter reads 0-30 volts, or 0-1 amp.
Posted on Monday, May 23, 2011 • Category: RC Servo Motors
The USB-Servo is a device to control a servo via USB. A servo is a motorized device that is commonly used in remote controlled cars and planes. I built this device to activate a toy puppet. The puppet has a button on its bottom, if you press the button the puppet collapses. When the computer is able to press the button, I can use the puppet to signal information like someone's online-state in the Jabber-network: when my friend goes online, the puppet stands up, when he logs off it collapses.
Servos are connected with three-wire-cables. A red and a black one for the power, and a yellow one for the signal. Power has to be between 4.8 and 6 volts, so the 5 volts from the USB-port is in the range. The signal doesn't take much current, so you can connect it directly to the controller. The angle of the servo is controlled with pulse width modulation (PWM). It gets a signal of about 50Hz (one pulse every 20ms), the length of the pulse tells the servo the angle to adjust.
Circuit-Zone.com © 2017. All Rights Reserved.