Christian Vogel

Member Since: August 12, 2011

Country: United States

  • News - According to Pete - Revis… | about a year ago

    Get yourself a good soundcard (24Bit, 96KHz) and a software that can make fourier spectra: (maybe something like http://www.baudline.com/ or http://www.qsl.net/dl4yhf/spectra1.html ). 16bit is 97dB, much more sensitive than and sensible scope (typically 8bit (48dB) or 10bit(60dB) resolution).

  • News - According to Pete - Revis… | about a year ago

    The good ones are bifilar wound, so they have pretty low inductance (at least low enough for audio). But seriously: Don’t bother ;-)

  • News - According to Pete - Revis… | about a year ago

    With a torque-sensor you are most often dealing with a small differential voltage hovering at an elevated potential.

    (see, for example, http://en.wikipedia.org/wiki/Wien_bridge )

    What you need is a circuit with as high as possible CMMR and PSSR (common-mode rejection, power-supply-rejection): The output signal should represent the input (differential) voltage, but not unwanted signals generated by the simultaneous swing of both inputs (=common mode) or generated by noise on the power supply.

    For this one uses a “instrumentation amplifier” that consists of two very high impedance signal inputs and integrated difference amplifier. http://en.wikipedia.org/wiki/Instrumentation_amplifier (R_gain is the potentiometer used to vary the gain.)

  • News - According to Pete - Revis… | about a year ago

    While a lot of the “Audiophile” guys really seem to hate electrolytics they are not as bad. They are universally used in professional audio gear (used for music production): Because pro-audio equipment tends to use rather low-impedance (most often: symmetrical) inputs, and at low audio frequencies (significantly below 50 Hz, say 10 Hz corner frequency) you need tens of µF which tend to be pretty big components if you want to use, for example, polymer film types.

    If you really are concerned about long-term depolarisation and loss of capacitance (I am not), you could use two electrolytics back-to-back and bias the middle node with a high resistance to a supply rail.

  • News - According to Pete - SPI a… | about 2 years ago

    Hi Pete, nice example to illustrate the insanity that’s sometimes called SPI and explain I2C, maybe I can add a few useful points.

    — SPI —

    • SPI of course is a popular interface on complicated chips like the signal generator you mentioned. But fundamentally you can think of two shift registers (one in master, one in client). In the bidirectional case (using MOSI and MISO) the two shift registers will have exchanged their content after the required number of bits have been pulsed out of the clock line. In practice you can even put cheap HC166-shift-registers there to expand a small micro to an arbitrary number of IOs.

    • With all the variety you mention, the possibly variations for clock polarity and phase (idle-state of clock line, sample or shift edge) are normally called “mode-0” … “mode 3”. With some luck you’ll find this information in the datasheet, configure your master device (or bit-bang library) for mode-X and are set.

    • I second the comment from “sgrace” to always try using the SPI subsystem if some exists on your platform of choice. The integrated peripherals are very powerful, features include:

      . Most often bug-free in comparison to a lot of the home-grown code (of course also mine).

      . Alignment of odd bit-numbers to native word-sizes, LSB/MSB first swap in hardware (=fast).

      . Counter for doing a number of transfers in a row, maybe even DMA from/to internal memory

      . Multi-slave support by keeping track of several chip-select lines and switching automatically between configurations for several devices (to be found on higher-end CPUs)

      . Support for related standards, for example I2S that is used with audio-ADCs/DACs

    After setup of the controller, the long while()-loop that Pete did show might be reduced to a simple…

      SDR = data; /* put data in SPI data register, needs 1 CPU cycle to perform */
    

    …and your processor will be free to do more important tasks. There will be a bit in the SPI controller that changes once the transfer is finished, or a interrupt can be triggered. Mandatory as soon as you want to move any significant amount of data, e.g. from ADCs.

    — I2C —

    • The I2C standard is actually very readable, just search for “The I2C-bus specification”.

    • I2C generally is a little slower, so there’s no big performance gain in using the included hardware, but it is generally well implemented. It has dedicated hardware for stuff that is generally hard to implement efficiently in software like detecting the start-condition/bit or collision in multi-master setups.

    • I don’t remember if it has been mentioned in the video: The name “wire” originates from device manufacturers avoiding to call the bus “I2C”, maybe bececause they don’t want to pay royalties to Philips. They call it “TWI/Two Wire Interface” instead.

    — General —

    • If you start to explore an devices, it can be very handy to just connet them to a linux-pc. Doesn’t matter if workstation or something like a raspberry-pi. Linux has good support for SPI and I2C on a multitude of interfaces (GPIOs on a parallel port, I2C on that old VGA connector, …). With this you can prototype code, or manually play with your device using simple 10-line python scripts on /dev/i2c-# or /dev/spi-#.

    • Be careful about the voltage levels, modern chips might have 1.8V, your computer might spit out 5V and fry the chip.

    • Especially more complicated devices (gps receivers, 3D magnetometers, …) often can be switched between several modes with a configuration pin (async serial, SPI, I2C).

  • Tutorial - Ganged Programming with AVR ISP MKIIs | about 2 years ago

    The Atmel-AVRs used on the Arduino don’t use JTAG but their own serial programming interface which cannot be chained.

    Furthermore chaining 9 boards will make the programming success of the 2nd to 9th board depend on the health of the first, so even if JTAG is available one wants to check if it’s a sensible thing from a manufacturing-quality point of view.

No public wish lists :(