Most Arduino SPI tutorials show this simple but poor SPI bus design. In this article a new approach is discussed.
Better SPI Bus Design in 3 Steps - [Link]
An app note from Atmel, digital sound recorder with AVR and DataFlash (PDF!):
This application note describes how to record, store and play back sound using any AVR microcontroller with A/D converter, the AT45DB161B DataFlash memory and a few extra components.
This application note shows in detail the usage of the A/D Converter for sound recording, the Serial Peripheral Interface – SPI – for accessing the external DataFlash memory and the Pulse Width Modulation – PWM – for playback. Typical applications that would require one or more of these blocks are temperature loggers, telephone answering machines, or digital voice recorders.
Digital sound recorder with AVR and DataFlash - [Link]
by marc2203 @ importhack.wordpress.com:
I’m not going to explain in detail what is ESP8266 because if you have found this post I’m sure you already know it. But just in case, it is an awesome cheap board (less than 4$) with built-in wifi communication (802.11 b/g/n), and SPI, UART. You can also use its processor to run your code.
How to use ESP8266 ESP-01 as a SENSOR web client - [Link]
I contrast to the very timing-sensitive one-wire protocol of the WS2812, the APA102 uses a standard two wire SPI protocol – one clock line and one data line. Each LED has two inputs and two outputs which can be daisy chained. At the first sight this may seem wasteful, but it has the advantage of being supported by standard microcontroller periphery and it is insensitive to timing variations. Due to the critical timing requirement it is not possible to control the WS2812 from SOCs with multitasking operating systems, such as the Raspberry Pi. This should not be an issue with the APA102. Furthermore, the data can be transferred at an almost arbitrary clock rate. I was able to control the LEDs with 4 MHz SPI clock without any hitch. It appears that the maximum speed is mainly limited by the parasitics of the wiring.
APA102 aka “Superled” - [Link]
Spacewrench over at Dorkbotpdx writes:
I had some spare 4-digit 7-segment LED displays and some AT90USB82s, and I’d always intended to do something with them. This was probably the easiest thing! It’s just the AT90 driving the display, with a(t least) 4 wires controlling it: Vcc, GND, MOSI and SCK. (I haven’t written the code yet, but my plan is to make the display accepts characters via SPI and then spends the rest of the time displaying them).
The board has footprints for a 16MHz crystal and USB connector, so you could make it a USB-enabled 7-segment display as well. I stuffed those parts on my test board, but I’m not sure whether the USB actually works. You can power the display from USB, at least, although the video shows it being powered over SPI (which is the same connection I use to flash code).
Standalone SPI 7-segment display - [Link]
Paul over at DorkbotPDX writes:
For the last several weeks, I’ve been working on SPI transactions for Arduino’s SPI library, to solve conflicts that sometimes occur between multiple SPI devices when using SPI from interrupts and/or different SPI settings.
To explain, a picture is worth 1000 works. In this screenshot, loop() repetitively sends 2 bytes, where green is its chip select and red is the SPI clock. Blue is the interrupt signal (rising edge) from a wireless module. In this test, the interrupt happens at just the worst moment, during the first byte while loop() is using the SPI bus!
Without transactions, the wireless lib interrupt would immediately assert (active low) the yellow chip select while the green is still active low, then begin sending its data with both devices listening!
SPI Transactions in Arduino - [Link]
by Kalle Hyvönen:
I saw a cool app-note from Maxim that described a gamma-photon detector which used a regular PIN-diode as a sensor. The actual circuit looked simple enough so I decided build it, you can never have too many measurement instruments right?
The detector in itself is pretty simple, just some op-amps and a comparator. I decided to build it with all the bells and whistles so I included a digital potentiometer so you can adjust the reference voltage to the comparator via an SPI-bus. I also used a 5V reference shunt as the reference for the op-amps and the comparator to keep the circuits behaviour more consistent. I didn’t have any adjustable capacitors with an SPI bus so I decided against using one (instead of C4, changing the capacitance changes the gain).
A radiation detector with a solid-state PIN-diode sensor - [Link]
Nich Fugalfrom @ Makeatronics is working on a BLDC motor controller.
Icall it a smart BLDC commutator. In a nutshell it’s a dedicated atmega328 that monitors the hall effect sensors on a brushless DC motor and takes care of the commutating and driver circuitry.
It’s smart because it has the ability to extract and keep track of motor position while monitoring the hall sensors. There’s also an option to plug in a quadrature encoder for higher resolution. The position can be sampled via a sample and hold input and communicated to a host controller via SPI.
I designed it to be an easy to use black box for interfacing with BLDC motors. All the host controller has to do is feed it direction (high/low) and PWM and the rest is done for you.
BLDC motor control using Atmega328 - [Link]
Digispark Pro – The tiny Arduino IDE ready, usb and mobile dev board and ecosystem – cheap enough to leave in any project! Wi-fi, BLE, and 25+ shields!
Serial over USB debugging, USB programmable, 14 i/o, SPI, I2C, UART, USB Device Emulation, Mobile Development Ready, Optional BT, BLE, Mesh, and Wi-Fi.
The super small, dirt cheap, always open source, Arduino compatible, USB (and Mobile and Wireless!) development (and production) platform, and follow-up to the original Digispark.
Easier to use, more pins, more program space, more features, more reliable – supporting the entire existing Digispark ecosystem of 25+ shields and adding Wi-Fi, Bluetooth, BLE shields and more! Ready for all your projects – including mobile hardware development! All still super affordable!
The Digispark Pro Ecosystem is the cheapest, Arduino compatible development platform for Mobile and Wireless hardware development.
Digispark Pro – tiny, Arduino ready, mobile & usb dev board! - [Link]
by Kalle Hyvönen:
I bought a small aquarium (54l) as an impulse buy and I needed some lights for it, so naturally I wanted to use LEDs. I also needed a timer for the lights. I also wanted the lights to fade in and out when they were going on or off as a cool effect.
I ordered four Cree XP-G R5 LEDs (cool white, apparently too warm of a light will cause algae growth) and a one amp (switching) constant current supply (with PWM support) from LED-tech.de. I had some Maxim DS3234 real-time clocks with a serial bus (SPI) which looked easy to implement so I decided to use one. I also had one spare Arduino board so that was going to be my microcontroller of choice. I used a laptop power supply as the power source.
LED aquarium lighting with an Arduino based PWM timer - [Link]