Hollow RGB XMAS Tree
Hollow XMAS Tree made from WS2812 RGB LED´s and a Digistump ATTiny85
Code and HowTo on my Github Page: https://github.com/designer2k2/xmas-tree
Kommentar schreiben (2 Kommentare)
Arduino I2C multiple slaves
Connecting more than 1 I2C device to an Arduino is simple, if you follow some basic rules.
The I2C bus is designed to be a multipoint serial connection system.
So it was always intended to use with multiple devices.
But how can they share the same Pins on the Arduino?
Here is a simple layout:
The µC Master is the Arduino, with multiple I2C Slaves connected over the SDA and SCL Lines.
The Trick is within the 2 pullup Resistors Rp!
I2C pullup resistors
They are needed to help the devices with getting the slew rates it needes.
If want to just get it going, take 4.7k and it will work when you have just 1 slave.
But we want to make it right or?
The size is depending from the total capacitance in the circuit, so you will have to look to the datasheets and sum up the capacitance to get our Cb, next look up the formula:
Rp(max) = tr/0.8473 x Cb
Where tr is our allowed rise time for the signal, take this with 1µs.
So what? What happens when the resistor is wrong?
I2C wrong pullup resistor
if the resistor is to high the signal rises to slow, that will cause missing bits -> trouble.
But also to low values get you trouble, they will draw too much current, do not go below 1,5k.
Good practice is to first make the calculations, then hook up a oscilloscope and verify your values.
I2C bus slave address conflict
Every slave must have a unique address, so check your datasheets and ensure that the devices all have unique addresses!
I2C Bus with mixed Voltages
mixing 5V and 3V devices is possible, but dont just connect them together!
It needs a bidirectional level shifter, common practice is to use Mosfets with clamping diodes.
Take a look at the Application Note 10441 from NXP it is about "Level shifting techniques in I2C-bus design"
Also the old Application Note AN97055 "Bi-directional level shifter for I2C-bus and other systems." is a more in depth read about it.
Kommentar schreiben (0 Kommentare)
Arduino Battery Tester
a small project to test 1S Lipo batterys used in micro Helicopters with the help of a Arduino.
An Arduino shield with mosfets switches big load resistors until the Lipo is drained,
and transmitts the current voltage over the USB Port to the PC.
Sourcecode, Diagramms and more after the break!
Kommentar schreiben (1 Kommentar)
Arduino I/O Protection
When your project moves to a level where you start making a dedicated case for it to protect it from the environmental influences, what do you do to protect the exposed signal lines from the harsh world outside?