https://www.bitwizard.nl/wiki/api.php?action=feedcontributions&user=Sjoerd&feedformat=atomBitWizard WIKI - User contributions [en]2024-03-29T12:19:06ZUser contributionsMediaWiki 1.27.0https://www.bitwizard.nl/wiki/index.php?title=Dmx_interface_for_raspberry_pi&diff=4110Dmx interface for raspberry pi2016-11-21T13:24:18Z<p>Sjoerd: /* Jessie */</p>
<hr />
<div>= Introduction =<br />
<br />
[[File:DMX_case_complete.jpg|thumb|DMX with case]]<br />
<br />
The '''DMX interface for raspberry pi''' allows you to interface a raspberry pi with DMX hardware. <br />
<br />
There is also a version "with FT245" That version adds the option to use your raspberry pi with our board as an Enttec USB Pro compatible device from another computer (raspberry pi or PC, Windows or Linux)<br />
<br />
If you select "for pi zero" we give you an extra 40 pin male header and do not solder the matching female header onto our board. You can then chose several configurations yourself. The one I prefer is to have the male headers on the zero on the bottom, and the female on our board on the top. Keep in mind that if you arrange for the pi to stick out from under or above our board, the pinout is going to be wrong. So you can't put the connectors on both boards on top, and then flip one to make the connection.<br />
<br />
= Software =<br />
<br />
There are several software packages that can be used with your '''DMX interface for Raspberry pi'''.<br />
<br />
First there are QLC+ and OLA. These are packages that run on Linux on the raspberry pi and allow you to control a DMX Universe. <br />
<br />
Second, there are several packages by Arjan van Vught that use the raspberry pi "bare metal". <br />
<br />
See: http://www.raspberrypi-dmx.com/<br />
<br />
<br />
== QLC+ and OLA ==<br />
<br />
Don't forget to remove the console and getty from the serial port that the DMX inteface is using. <br />
<br />
See: http://elinux.org/RPi_Serial_Connection#Preventing_Linux_using_the_serial_port<br />
<br />
<br />
=== QLC+ ===<br />
<br />
Harold van Hulten wrote a nice "howto". See: http://www.udenix.nl/2016/how_did_i/rpi2dmx/<br />
<br />
QLC+ 's home is at: http://www.qlcplus.org<br />
<br />
=== OLA ===<br />
<br />
==== Jessie ====<br />
On raspbian jessie installing OLA is easy: ''sudo apt-get install ola'' should do the trick. <s>The downside is however that it doesn't work :-( . </s><br />
<br />
'''update:''' The simple option seems to work now. :-)<br />
<br />
<span style="color:#808080"> <br />
what does work however is:<br />
#sudo apt-get install automake libtool bison flex libcppunit-dev libprotobuf-dev libprotoc-dev protobuf-compiler protobuf-c-compiler uuid-dev libmicrohttpd-dev<br />
sudo apt-get build-dep ola<br />
mkdir ola<br />
cd ola<br />
wget https://github.com/OpenLightingProject/ola/archive/0.10.1.tar.gz<br />
tar xvfz 0.10.1.tar.gz<br />
cd ola-0.10.1<br />
#libtoolize<br />
autoreconf -i<br />
./configure <br />
make -j 5 all<br />
sudo make install<br />
<span style="color:#808080"> <br />
There is one little thing about the first two commands here. The first should always work, but if I accidentally missed a package, well.. I missed a package and the build will fail. The second one (with "build-dep" should be more reliable. But before that works, you need to add the sources to your /etc/apt/sources.list file. It's already there, but commented out. Use your favorite editor to do that. (otherwise, try: sudo nano /etc/apt/sources.list )<br />
</span><br />
<br />
==== wheezy ====<br />
On Wheezy, adding <br />
deb http://apt.openlighting.org/raspbian wheezy main<br />
to ''/etc/apt/sources.list'', and then the ''apt-get install ola'' should work. <br />
<br />
There are some important hints at: http://opendmx.net/index.php/OLA_Device_Specific_Configuration#UART_native_DMX<br />
<br />
==== raspberry pi 3 ====<br />
<br />
Add: <br />
dtoverlay=pi3-disable-bt<br />
<br />
Otherwise, the wrong UART will be used. The "wrong" uart will <br />
* change baudrate unexpectedly when the CPU feels hot. <br />
* I haven't figured out if it CAN do the required baud rate, and/or how to do that. <br />
<br />
This has the consequence that we've stolen back the good UART from the bluetooth that's present on the PI3.<br />
<br />
On the raspberry pi forums there is talk about re-enabling bluetooth at a lower performance level.<br />
<br />
==== all raspberries ====<br />
<br />
First you need to disable "other things" on the UART that the DMX board uses. <br />
<br />
sudo systemctl disable serial-getty@ttyAMA0.service<br />
<br />
and remove "ttyAMA" or "serial0" from /boot/config.txt. (you'll find something like '''console=ttyAMA0,115200''' there, remove that whole '''console=''' entry. Try not to mess up the rest of that line. <br />
<br />
<br />
Most importantly: add: <br />
init_uart_clock=16000000<br />
to your config.txt file in the /boot directory. <br />
<br />
Next, you need to configure ola to use the native-uart plugin. This is described at: http://www.raspberrypi-dmx.com/raspberry-pi-ola-dmx512-sender<br />
<br />
Locate your ola-uartdmx.conf (on some systems I'm told it is in ''/etc/ola/conf/'', on others ''/var/lib/ola/conf/'', and in some cases: ''/root/.ola/ola-uartdmx.conf'' or ''/home/pi/.ola/ola-uartdmx.conf''. One of the ways to find out is to look at the -c argument on your running olad.). Edit it and set enabled to true, set the correct device (ttyS0 on rpi3, ttyAMA0 on <br />
others), and add ''/dev/ttyAMA0-break = 100'' and ''/dev/ttyAMA0-malf = 100'' . It should then look like:<br />
<br />
/dev/ttyAMA0-break = 100<br />
/dev/ttyAMA0-malf = 24000<br />
device = /dev/ttyAMA0<br />
enabled = true<br />
<br />
Note that the "malf" (mark after last frame) is set to 24 miliseconds. This is due to a problem with OLA: it writes the data, and after that waits for the time specified in "malf". It turns out that the kernel will return from the write before the buffer is flushed. So the malf is measured from close to the START of the frame. Thus if you would enter the normal MALF of 100 microseconds, the next break is attempted after only about three characters have been sent. When the kernel then tries to empty the buffer before issuing the BREAK, it waits way too long. We (bitwizard + ola developers) have not been able to figure out an easy fix. So until then saying "24000" gives reasonable performance. (but once the bug has been fixed, you'll need to adjust this configuration parameter)<br />
<br />
==== output mode ====<br />
<br />
Then set the board to output mode. I would recommend creating a small script (''sudo nano /usr/bin/set_dmx_mode; sudo chmod 755 /usr/bin/set_dmx_mode'') : <br />
<br />
#!/bin/sh<br />
# set_dmx_mode<br />
if [ $# -lt 1 ] ; then <br />
echo 'on or off?'<br />
exit 1<br />
fi<br />
<br />
if [ ! -d /sys/class/gpio/gpio18 ] ; then <br />
echo 18 > /sys/class/gpio/export<br />
fi<br />
echo out > /sys/class/gpio/gpio18/direction<br />
echo $1 > /sys/class/gpio/gpio18/value<br />
<br />
<br />
then calling the script: <br />
sudo set_dmx_mode 1<br />
<br />
I recommend putting that line in /etc/rc.local so that it gets executed at boot time so you don't have to worry about it. (IIRC there is an "exit 0" in there, so don't put it AFTER that!)<br />
<br />
Or you can install the gpio utility from wiringpi and use the following command to view the status of all the pins<br />
<br />
gpio readall<br />
<br />
and to set GPIO 18 (BCM) in output mode <br />
<br />
gpio -g mode 18 out<br />
gpio -g write 18 1<br />
<br />
also, pin 14 & 15 need to be in the ALT5 mode, if this is not the case use<br />
<br />
gpio -g mode 14 alt5<br />
gpio -g mode 15 alt5<br />
<br />
<br />
Note that the earlier versions of the DMX board have a bug that when the GPIO pin is an input (not driven) it will configure the board as an output. This is not desirable. Newer versions (starting 1.4) will have this "fixed" and the "default" will be "DMX IN" mode. <br />
<br />
This does mean that if you want the board to do output, you can get away with forgetting about this gpio18 business if you have an older version. (I just realized ''I'' was getting away with this.... :-) )<br />
<br />
= Hardware =<br />
== Case ==<br />
[[Assembling_the_DMX_case]]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Dmx_interface_for_raspberry_pi&diff=4074Dmx interface for raspberry pi2016-06-20T14:49:26Z<p>Sjoerd: </p>
<hr />
<div>= Introduction =<br />
<br />
[[File:DMX_case_complete.jpg|thumb|DMX with case]]<br />
<br />
The '''DMX interface for raspberry pi''' allows you to interface a raspberry pi with DMX hardware. <br />
<br />
There is also a version "with FT245" That version adds the option to use your raspberry pi with our board as an Enttec USB Pro compatible device from another computer (raspberry pi or PC, Windows or Linux)<br />
<br />
If you select "for pi zero" we give you an extra 40 pin male header and do not solder the matching female header onto our board. You can then chose several configurations yourself. The one I prefer is to have the male headers on the zero on the bottom, and the female on our board on the top. Keep in mind that if you arrange for the pi to stick out from under or above our board, the pinout is going to be wrong. So you can't put the connectors on both boards on top, and then flip one to make the connection.<br />
<br />
= Software =<br />
<br />
There are several software packages that can be used with your '''DMX interface for Raspberry pi'''.<br />
<br />
First there are QLC+ and OLA. These are packages that run on Linux on the raspberry pi and allow you to control a DMX Universe. <br />
<br />
Second, there are several packages by Arjan van Vught that use the raspberry pi "bare metal". <br />
<br />
<br />
== QLC+ and OLA ==<br />
<br />
Don't forget to remove the console and getty from the serial port that the DMX inteface is using. <br />
<br />
See: http://elinux.org/RPi_Serial_Connection#Preventing_Linux_using_the_serial_port<br />
<br />
<br />
=== QLC+ ===<br />
<br />
Harold van Hulten wrote a nice "howto". See: http://www.udenix.nl/2016/how_did_i/rpi2dmx/<br />
<br />
QLC+ 's home is at: http://www.qlcplus.org<br />
<br />
=== OLA ===<br />
<br />
==== Jessie ====<br />
On raspbian jessie installing OLA is easy: ''apt-get install ola'' should do the trick. The downside is however that it doesn't work :-( . <br />
<br />
what does work however is: <br />
#sudo apt-get install automake libtool bison flex libcppunit-dev libprotobuf-dev libprotoc-dev protobuf-compiler protobuf-c-compiler<br />
sudo apt-get build-dep ola<br />
mkdir ola<br />
cd ola<br />
wget https://github.com/OpenLightingProject/ola/archive/0.10.1.tar.gz<br />
tar xvfz 0.10.1.tar.gz<br />
cd ola-0.10.1<br />
#libtoolize<br />
autoreconf -i<br />
./configure <br />
make -j 5 all<br />
sudo make install<br />
<br />
==== wheezy ====<br />
On Wheezy, adding <br />
deb http://apt.openlighting.org/raspbian wheezy main<br />
to ''/etc/apt/sources.list'', and then the ''apt-get install ola'' should work. <br />
<br />
There are some important hints at: http://opendmx.net/index.php/OLA_Device_Specific_Configuration#UART_native_DMX<br />
<br />
==== raspberry pi 3 ====<br />
<br />
Add: <br />
dtoverlay=pi3-disable-bt<br />
<br />
Otherwise, the wrong UART will be used. The "wrong" uart will <br />
* change baudrate unexpectedly when the CPU feels hot. <br />
* I haven't figured out if it CAN do the required baud rate, and/or how to do that. <br />
<br />
This has the consequence that we've stolen back the good UART from the bluetooth that's present on the PI3.<br />
<br />
On the raspberry pi forums there is talk about re-enabling bluetooth at a lower performance level.<br />
<br />
==== all raspberries ====<br />
<br />
Most importantly: add: <br />
init_uart_clock=16000000<br />
to your config.txt file in the /boot directory. <br />
<br />
Next, you need to configure ola to use the native-uart plugin. This is described at: http://www.raspberrypi-dmx.com/raspberry-pi-ola-dmx512-sender<br />
<br />
Locate your ola-uartdmx.conf (on some systems I'm told it is in ''/etc/ola/conf/'', on others ''/var/lib/ola/conf/'', and in some cases: ''/root/.ola/ola-uartdmx.conf'' or ''/home/pi/.ola/ola-uartdmx.conf''. One of the ways to find out is to look at the -c argument on your running olad.). Edit it and set enabled to true, set the correct device (ttyS0 on rpi3, ttyAMA0 on <br />
others), and add ''/dev/ttyAMA0-break = 100'' and ''/dev/ttyAMA0-malf = 100'' . It should then look like:<br />
<br />
/dev/ttyAMA0-break = 100<br />
/dev/ttyAMA0-malf = 100<br />
device = /dev/ttyAMA0<br />
enabled = true<br />
<br />
Then set the board to output mode. I would recommend creating a small script (''sudo nano /usr/bin/set_dmx_mode; sudo chmod 755 /usr/bin/set_dmx_mode'') : <br />
<br />
#!/bin/sh<br />
# set_dmx_mode<br />
if [ $# -lt 1 ] ; then <br />
echo 'on or off?'<br />
exit 1<br />
fi<br />
<br />
if [ ! -d /sys/class/gpio/gpio18 ] ; then <br />
echo 18 > /sys/class/gpio/export<br />
fi<br />
echo out > /sys/class/gpio/gpio18/direction<br />
echo $1 > /sys/class/gpio/gpio18/value<br />
<br />
<br />
then calling the script: <br />
sudo set_dmx_mode 1<br />
<br />
I recommend putting that line in /etc/rc.local so that it gets executed at boot time so you don't have to worry about it. (IIRC there is an "exit 0" in there, so don't put it AFTER that!)<br />
<br />
<br />
Note that the earlier versions of the DMX board have a bug that when the GPIO pin is an input (not driven) it will configure the board as an output. This is not desirable. Newer versions (starting 1.4) will have this "fixed" and the "default" will be "DMX IN" mode. <br />
<br />
This does mean that you can get away with forgetting about this gpio18 business if you have an older version. (I just realized I was getting away with this.... :-) )<br />
<br />
= Hardware =<br />
== Case ==<br />
[[Assembling_the_DMX_case]]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Dmx&diff=4073Dmx2016-06-20T14:11:02Z<p>Sjoerd: Redirected page to Dmx interface for raspberry pi</p>
<hr />
<div>#REDIRECT[[Dmx_interface_for_raspberry_pi]]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=DMX&diff=4072DMX2016-06-20T14:10:09Z<p>Sjoerd: Redirected page to Dmx interface for raspberry pi</p>
<hr />
<div>#REDIRECT [[Dmx_interface_for_raspberry_pi]]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Main_Page&diff=4071Main Page2016-06-20T10:35:53Z<p>Sjoerd: DMX toegevoegd op frontpage</p>
<hr />
<div><big>'''BitWizard documentation wiki.'''</big><br />
<br />
This WIKI is for documentation of the BitWizard SPI/I2C expansion system and other boards, available from the [http://www.bitwizard.nl/catalog/ BitWizard Shop]. If you are considering adding information that is not related to one of our products, please contact us beforehand.<br><br />
It is expressly forbidden to add information intended to promote other sites. It is expressly forbidden to have a program add accounts and add articles with links to other sites. <br />
<br />
= How-to's =<br />
* [[Beginners guide to SPI on Raspberry Pi]]<br />
* [[Installing and booting FriendlyArm mini6410]]<br />
<br />
<br />
= DMX =<br />
* [[Dmx interface for raspberry pi]]<br />
* [[Assembling the DMX case]]<br />
<br />
<br />
= Kits =<br />
* [[RGB clock]]<br />
* [[Raspberry Pi camera extension kit]]<br />
<br />
<br />
= Developement boards =<br />
* [[Raspduino]]<br />
* [[FTDI_ATmega]]<br />
* [[USB-multio]]<br />
* [[Usbbigmultio]]<br />
* [[Cyclone dev board]]<br />
<br />
= Expansion boards =<br />
<br />
== General ==<br />
* [[Default addresses]] (both SPI and I2C)<br />
* [[SPI versus I2C protocols]]<br />
* [[Daisy-chaining BitWizard I2C boards]]<br />
* [[USB Relay]]<br />
* [[Model B+ compatibility]]<br />
<br />
== Board specific pages ==<br />
These expansion boards come in I2C and SPI versions, and thus can be connected to a single bus. This allows you to easily expand your microcontroller system with new functions, without the cost of additional I/O pins.<br />
<br />
* [[LCD|LCD]]<br />
* [[DIO|DIO]]<br />
* [[Servo|Servo]]<br />
* [[7FETs|7FETs]]<br />
* [[3FETs|3FETs]]<br />
* [[temp|Temperature Interface]]<br />
* [[relay|Relay/BigRelay]]<br />
* [[motor|Motor]]<br />
<!--<br />
* [[PiPower|PiPower]]<br />
--><br />
* [[Raspberry Juice]]<br />
* [[Raspberry Relay]]<br />
* [[User Interface|User Interface]]<br />
* [[7_Segment]]<br />
<!--<br />
* [[SPI_SPI]]<br />
--><br />
* [[Pushbutton]]<br />
* [[Rtc]]<br />
* [[Dimmer]]<br />
* [[16 LEDs]]<br />
<br />
== Other boards ==<br />
* [[USB-SATA powerswitch]]<br />
* [[USB-opto]]<br />
* [[Servotester]]<br />
* [[USB-step]]<br />
* [[Usb ws2812]]<br />
<!--<br />
* [[USB relay board]]<br />
--><br />
<br />
= Breakout boards =<br />
<br />
* [[Raspberry Pi Serial]]<br />
* [[Dio breakout]]<br />
<br />
== FTDI chips ==<br />
<br />
* [[FT201X]] USB I2C slave<br />
* [[FT220X]] USB 4-bit SPI/FT1248<br />
* [[FT221X]] USB 8-bit SPI/FT1248<br />
* [[FT230X]] USB to basic UART<br />
* [[FT231X]] USB to full handshake UART<br />
* [[FT240X]] USB 8-bit FIFO<br />
* [[FT245RL V1.5]] USB FIFO<br />
* [[FT311D]] USB Android host, compatible with AOA (Android Open Accessory)<br />
* [[FT312D]] USB Android host, compatible with AOA (Android Open Accessory)<br />
* [[FT245RL breakout board]]<br />
* [[FT2232H breakout board]]<br />
* [[FTDI serial]]<br />
* [[FTDI serial 2]]<br />
<br />
== I2C chips ==<br />
* [[I2C DAC|Dual MCP4726 DAC]]<br />
* [[I2C ADC|MCP3424 ADC]]<br />
* [[I2C splitter|PCA9548A I2C switch/mux]]<br />
* [[IO Expander|MCP23008 IO Expander]]<br />
* [[I2C accellerometer]]<br />
* [[I2C magnetometer]]<br />
* [[I2C pressure sensor]]<br />
<br />
<br />
== SPI chips ==<br />
* [[IO Expander|MCP23S08 IO Expander]]<br />
* [[SPI DAC|MCP4822 DAC]]<br />
<br />
= Sample programs =<br />
* [[Usbio kitt]]<br />
* [[Usbio ACM sample program]]<br />
* [[Raspberry Pi LCD program]]<br />
<!--<br />
= Preparing your development environment =<br />
* [[Linux]]<br />
* [[Windows]]<br />
* [[MacOS]]<br />
--><br />
= Sample projects =<br />
* [[Temperature control]] (ftdi_atmega, spi_temp, spi_relay).<br />
<br />
= Raspberry Pi projects =<br />
* [[Reducing power consumption of a raspberry Pi]]<br />
* [[LCD + 3FETs demonstration|Connecting two 1602 LCDs and an RGB LED Strip to a Raspberry Pi]]<br />
* [[Connecting a motor and 1602 LCD to a Raspberry Pi]]<br />
* [[MPU-6050 sensor connected to Raspberry Pi]]<br />
* [[Raspberry pi expansion system page]]<br />
* [[GPS reciever connected to Raspberry Pi]]<br />
<br />
= Help! =<br />
<br />
If you have trouble finding things on this wiki you can: <br />
* Use the search function on the left<br />
* [http://www.bitwizard.nl/contact.php Contact us]<br />
* Or use the [http://forum.bitwizard.nl/ forum]<br />
<br />
= Miscellaneous =<br />
* [[Solder jumpers]]<br />
* [[SPI_connector_pinout]]<br />
* [[Template]]<br />
* [[Nikon D80 wired remote]]<br />
* [[Iphone 3GS camera]]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Assembling_the_DMX_case&diff=4053Assembling the DMX case2016-05-06T13:47:23Z<p>Sjoerd: /* Included */</p>
<hr />
<div>= Assembling the DMX case = <br />
<br />
[[File:DMX_case_complete.jpg|600px|DMX case]]<br />
<br />
== Included ==<br />
Included screws and spacers<br />
10x m3x6<br />
4x m3x12<br />
4x m2.5x10<br />
4x m3x4mm spacer<br />
4x m3x20mm spacer<br />
<br />
== Step 1 ==<br />
<br />
4x m3x6<br />
4x m3x12<br />
4x m3x4mm spacer<br />
4x m3x20mm spacer<br />
<br />
[[File:DMX_case_1.jpg|400px|DMX case - step 1]]<br />
<br />
[[File:DMX_case_2.jpg|400px|DMX case - step 1]]<br />
<br />
[[File:DMX_case_3.jpg|400px|DMX case - step 1]]<br />
<br />
[[File:DMX_case_4.jpg|400px|DMX case - step 1]]<br />
<br />
== Step 2 ==<br />
<br />
[[File:DMX_case_5.jpg|400px|DMX case - step 2]]<br />
<br />
[[File:DMX_case_6.jpg|400px|DMX case - step 2]]<br />
<br />
[[File:DMX_case_7.jpg|400px|DMX case - step 2]]<br />
<br />
== Step 3 ==<br />
<br />
6x m3x6<br />
4x m2.5x10<br />
<br />
[[File:DMX_case_8.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_9.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_10.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_11.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_12.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_13.jpg|400px|DMX case - step 3]]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Assembling_the_DMX_case&diff=4052Assembling the DMX case2016-05-06T13:46:55Z<p>Sjoerd: /* Included */</p>
<hr />
<div>= Assembling the DMX case = <br />
<br />
[[File:DMX_case_complete.jpg|600px|DMX case]]<br />
<br />
== Included ==<br />
Included screws and spacers<br />
10x m3x6<br />
4x m3x12<br />
4x m2.5x10<br />
4x m3x4mm spacer<br />
4x m3x20mm spacer<br />
<br />
== Step 1 ==<br />
<br />
4x m3x6<br />
4x m3x12<br />
4x m3x4mm spacer<br />
4x m3x20mm spacer<br />
<br />
[[File:DMX_case_1.jpg|400px|DMX case - step 1]]<br />
<br />
[[File:DMX_case_2.jpg|400px|DMX case - step 1]]<br />
<br />
[[File:DMX_case_3.jpg|400px|DMX case - step 1]]<br />
<br />
[[File:DMX_case_4.jpg|400px|DMX case - step 1]]<br />
<br />
== Step 2 ==<br />
<br />
[[File:DMX_case_5.jpg|400px|DMX case - step 2]]<br />
<br />
[[File:DMX_case_6.jpg|400px|DMX case - step 2]]<br />
<br />
[[File:DMX_case_7.jpg|400px|DMX case - step 2]]<br />
<br />
== Step 3 ==<br />
<br />
6x m3x6<br />
4x m2.5x10<br />
<br />
[[File:DMX_case_8.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_9.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_10.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_11.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_12.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_13.jpg|400px|DMX case - step 3]]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Assembling_the_DMX_case&diff=4051Assembling the DMX case2016-05-06T13:46:33Z<p>Sjoerd: </p>
<hr />
<div>= Assembling the DMX case = <br />
<br />
[[File:DMX_case_complete.jpg|600px|DMX case]]<br />
<br />
== Included ==<br />
Included screws and washers/spacers<br />
10x m3x6<br />
4x m3x12<br />
4x m2.5x10<br />
4x m3x4mm spacer<br />
4x m3x20mm spacer<br />
<br />
== Step 1 ==<br />
<br />
4x m3x6<br />
4x m3x12<br />
4x m3x4mm spacer<br />
4x m3x20mm spacer<br />
<br />
[[File:DMX_case_1.jpg|400px|DMX case - step 1]]<br />
<br />
[[File:DMX_case_2.jpg|400px|DMX case - step 1]]<br />
<br />
[[File:DMX_case_3.jpg|400px|DMX case - step 1]]<br />
<br />
[[File:DMX_case_4.jpg|400px|DMX case - step 1]]<br />
<br />
== Step 2 ==<br />
<br />
[[File:DMX_case_5.jpg|400px|DMX case - step 2]]<br />
<br />
[[File:DMX_case_6.jpg|400px|DMX case - step 2]]<br />
<br />
[[File:DMX_case_7.jpg|400px|DMX case - step 2]]<br />
<br />
== Step 3 ==<br />
<br />
6x m3x6<br />
4x m2.5x10<br />
<br />
[[File:DMX_case_8.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_9.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_10.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_11.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_12.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_13.jpg|400px|DMX case - step 3]]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_complete.jpg&diff=4050File:DMX case complete.jpg2016-05-06T13:38:19Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_12.jpg&diff=4049File:DMX case 12.jpg2016-05-06T13:35:25Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_13.jpg&diff=4048File:DMX case 13.jpg2016-05-06T13:35:12Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_11.jpg&diff=4047File:DMX case 11.jpg2016-05-06T13:34:50Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_10.jpg&diff=4046File:DMX case 10.jpg2016-05-06T13:34:43Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_9.jpg&diff=4045File:DMX case 9.jpg2016-05-06T13:34:19Z<p>Sjoerd: uploaded a new version of &quot;File:DMX case 9.jpg&quot;</p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_8.jpg&diff=4044File:DMX case 8.jpg2016-05-06T13:33:46Z<p>Sjoerd: uploaded a new version of &quot;File:DMX case 8.jpg&quot;</p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_7.jpg&diff=4043File:DMX case 7.jpg2016-05-06T13:32:17Z<p>Sjoerd: uploaded a new version of &quot;File:DMX case 7.jpg&quot;</p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_6.jpg&diff=4042File:DMX case 6.jpg2016-05-06T13:32:08Z<p>Sjoerd: uploaded a new version of &quot;File:DMX case 6.jpg&quot;</p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_5.jpg&diff=4041File:DMX case 5.jpg2016-05-06T13:28:52Z<p>Sjoerd: uploaded a new version of &quot;File:DMX case 5.jpg&quot;</p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_4.jpg&diff=4040File:DMX case 4.jpg2016-05-06T13:28:39Z<p>Sjoerd: uploaded a new version of &quot;File:DMX case 4.jpg&quot;</p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_3.jpg&diff=4039File:DMX case 3.jpg2016-05-06T13:27:47Z<p>Sjoerd: uploaded a new version of &quot;File:DMX case 3.jpg&quot;</p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_2.jpg&diff=4038File:DMX case 2.jpg2016-05-06T13:26:40Z<p>Sjoerd: uploaded a new version of &quot;File:DMX case 2.jpg&quot;</p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_1.jpg&diff=4037File:DMX case 1.jpg2016-05-06T13:25:29Z<p>Sjoerd: uploaded a new version of &quot;File:DMX case 1.jpg&quot;</p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_9.jpg&diff=4036File:DMX case 9.jpg2016-05-06T13:23:44Z<p>Sjoerd: uploaded a new version of &quot;File:DMX case 9.jpg&quot;</p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Assembling_the_DMX_case&diff=4019Assembling the DMX case2016-03-25T14:14:50Z<p>Sjoerd: Created page with "= Assembling the DMX case = DMX case == Included == Included screws and washers/spacers 10x m3x6 4x m3x12 4x m2.5x10 4x m3x4mm spacer ..."</p>
<hr />
<div>= Assembling the DMX case = <br />
<br />
[[File:DMX_case_9.jpg|600px|DMX case]]<br />
<br />
== Included ==<br />
Included screws and washers/spacers<br />
10x m3x6<br />
4x m3x12<br />
4x m2.5x10<br />
4x m3x4mm spacer<br />
4x m3x18mm spacer<br />
12x m3 plastic washer<br />
<br />
== Step 1 ==<br />
<br />
4x m3x6<br />
4x m3x12<br />
4x m3x4mm spacer<br />
4x m3x18mm spacer<br />
12x m3 plastic washer<br />
<br />
[[File:DMX_case_1.jpg|400px|DMX case - step 1]]<br />
<br />
[[File:DMX_case_3.jpg|400px|DMX case - step 1]]<br />
<br />
[[File:DMX_case_4.jpg|400px|DMX case - step 1]]<br />
<br />
== Step 2 ==<br />
<br />
[[File:DMX_case_5.jpg|400px|DMX case - step 2]]<br />
<br />
== Step 3 ==<br />
<br />
6x m3x6<br />
4x m2.5x10<br />
<br />
[[File:DMX_case_6.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_7.jpg|400px|DMX case - step 3]]<br />
<br />
[[File:DMX_case_8.jpg|400px|DMX case - step 3]]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_9.jpg&diff=4018File:DMX case 9.jpg2016-03-25T14:12:53Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_4.jpg&diff=4017File:DMX case 4.jpg2016-03-25T13:57:04Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_5.jpg&diff=4016File:DMX case 5.jpg2016-03-25T13:57:00Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_6.jpg&diff=4015File:DMX case 6.jpg2016-03-25T13:56:56Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_7.jpg&diff=4014File:DMX case 7.jpg2016-03-25T13:56:53Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_8.jpg&diff=4013File:DMX case 8.jpg2016-03-25T13:56:50Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_3.jpg&diff=4012File:DMX case 3.jpg2016-03-25T13:56:20Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_2.jpg&diff=4011File:DMX case 2.jpg2016-03-25T13:56:06Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:DMX_case_1.jpg&diff=4010File:DMX case 1.jpg2016-03-25T13:55:53Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:I2c_connection.jpg&diff=3755File:I2c connection.jpg2015-12-11T14:12:32Z<p>Sjoerd: uploaded a new version of &quot;File:I2c connection.jpg&quot;: Reverted to version as of 14:11, 11 December 2015</p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:I2c_connection.jpg&diff=3754File:I2c connection.jpg2015-12-11T14:12:21Z<p>Sjoerd: uploaded a new version of &quot;File:I2c connection.jpg&quot;</p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:I2c_connection.jpg&diff=3753File:I2c connection.jpg2015-12-11T14:11:14Z<p>Sjoerd: uploaded a new version of &quot;File:I2c connection.jpg&quot;</p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Usbbigmultio&diff=3512Usbbigmultio2015-11-10T14:09:55Z<p>Sjoerd: </p>
<hr />
<div>= USB IO =<br />
<br />
This is the documentation page for the USB bigmultio PCB. <br />
<br />
The USB bigMultio PCB can be bought in the [http://www.bitwizard.nl/shop/avr-boards/raspduino BitWizard shop].<br />
<br />
== Overview ==<br />
<br />
The USBbigmultio PCB has an USB connector and two 20-pin IO connectors. The brains of the PCB is an ATmega32U4 chip.<br />
<br />
== Assembly instructions ==<br />
<br />
== External resources ==<br />
<br />
=== Datasheets ===<br />
* [http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf ATmega16/32U4 datasheet]<br />
<br />
== Additional software ==<br />
* [http://www.fourwalledcubicle.com/LUFA.php LUFA, a open-source USB framework]<br />
<br />
=== Related projects ===<br />
<br />
== Pinout ==<br />
<br />
20 Pin connector SV1 is connected as follows <br />
<br />
<table border=1><br />
<tr><td>1</td><td>GND</td></tr><br />
<tr><td>2</td><td>GND</td></tr><br />
<tr><td>3</td><td>PB0 (SS / PCINT0)</td></tr><br />
<tr><td>4</td><td>PB1 (PCINT1 / SCLK)</td></tr><br />
<tr><td>5</td><td>PB2 (PDI / PCINT2 / MOSI)</td></tr><br />
<tr><td>6</td><td>PB3 (PDO / PCINT3 / MISO)</td></tr><br />
<tr><td>7</td><td>PB4 (PCINT4 / ADC11)</td></tr><br />
<tr><td>8</td><td>PB5 (PCINT5 / OC1A / /OC4B / ADC12)</td></tr><br />
<tr><td>9</td><td>PB6 (PCINT6 / OC1B / OC4B / ADC13)</td></tr><br />
<tr><td>10</td><td>PB7 (PCINT7 / OC0A / OC1C / /RTS)</td></tr><br />
<tr><td>11</td><td>PD0 (OC0B / SCL / INT0)</td></tr><br />
<tr><td>12</td><td>PD1 (SDA / INT1)</td></tr><br />
<tr><td>13</td><td>PD2 (RXD1 / INT2)</td></tr><br />
<tr><td>14</td><td>PD3 (TXD1 / INT3)</td></tr><br />
<tr><td>15</td><td>PD4 (ICP1 / ADC8)</td></tr><br />
<tr><td>16</td><td>PD5 (XCK1 / /CTS)</td></tr><br />
<tr><td>17</td><td>PD6 (T1 / /OC4D / ADC9)</td></tr><br />
<tr><td>18</td><td>PD7 (T0 / OC4D / ADC10)</td></tr><br />
<tr><td>19</td><td>VCC</td></tr><br />
<tr><td>20</td><td>VCC</td></tr><br />
</table><br />
<br />
20 Pin connector SV2 is connected as follows <br />
<br />
<table border=1><br />
<tr><td>1</td><td>GND</td></tr><br />
<tr><td>2</td><td>GND</td></tr><br />
<tr><td>3</td><td>PC6 (OC3A / /OC4A)</td></tr><br />
<tr><td>4</td><td>PC7 (ICP3 / CLK0 / OC4A)</td></tr><br />
<tr><td>5</td><td>PE2 (/HWB)</td></tr><br />
<tr><td>6</td><td>PE6 (INT6 / AIN0)</td></tr><br />
<tr><td>7</td><td>PF0 (ADC0)</td></tr><br />
<tr><td>8</td><td>PF1 (ADC1)</td></tr><br />
<tr><td>9</td><td>PF4 (ADC4 / TCK)</td></tr><br />
<tr><td>10</td><td>PF5 (ADC5 / TMS)</td></tr><br />
<tr><td>11</td><td>PF6 (ADC6 / TDO)</td></tr><br />
<tr><td>12</td><td>PF7 (ADC7 / TDI)</td></tr><br />
<tr><td>13</td><td>PF1 (ADC1)</td></tr><br />
<tr><td>14</td><td>NC</td></tr><br />
<tr><td>15</td><td>PF5 (ADC5 / TMS)</td></tr><br />
<tr><td>16</td><td>NC</td></tr><br />
<tr><td>17</td><td>PF7 (ADC7 / TDI)</td></tr><br />
<tr><td>18</td><td>AREF</td></tr><br />
<tr><td>19</td><td>VCC</td></tr><br />
<tr><td>20</td><td>VCC</td></tr><br />
</table><br />
<br />
* led1 is connected to VCC<br />
* led2 is connected to PF6<br />
* led3 is connected to PF7<br />
* led4 is connected to PE2<br />
<br />
== Jumper settings ==<br />
<br />
<table border=1><br />
<tr><td></td><td>J1</td><td>J2</td><td>IC1</td></tr><br />
<tr><td>5V</td><td>1</td><td>0</td><td>NOT mounted</td></tr><br />
<tr><td>3V3 <50mA</td><td>0</td><td>1</td><td>NOT mounted</td></tr><br />
<tr><td>3V3 >50mA</td><td>0</td><td>0</td><td>mounted</td></tr><br />
</table><br />
0 Means open, 1 means bridged.<br><br />
3V3 operation is not supported, but may or may not work in your application.<br />
<br />
== Programming ==<br />
<br />
This section describes how you get your program into the processor. <br />
<br />
In general what you need to know is that the processor will boot into the code you programmed into it on powerup. Once you're done developing your program, that's the way you'll use it: Powerup, run. <br />
<br />
If there is no program loaded or if you press the reset button the chip comes up in "firmware upload mode". This is done by a bootloader. You should take care not to overwrite or erase the bootloader, because there is no way to put the bootloader back once it is gone. <br />
<br />
=== Linux ===<br />
<br />
Get the dfu-programmer for atmel chips package. (link?) <br />
<br />
On sufficiently recent Ubunu distributions that is as simple as: <br />
<br />
sudo apt-get install dfu-programmer<br />
<br />
I recommend creating a script called "dfu": <br />
<br />
#!/bin/sh<br />
if [ -z "$CHIP" ] ; then <br />
chip=at90usb162<br />
else<br />
chip=$CHIP<br />
fi<br />
<br />
hex=$1<br />
sudo dfu-programmer $chip erase<br />
sudo dfu-programmer $chip flash --suppress-bootloader-mem $hex<br />
sudo dfu-programmer $chip start<br />
<br />
TODO: figure out how to get rid of the "sudo" commands here... <br />
<br />
Now downloading and starting a program is as simple as pressing the reset button and then: <br />
<br />
dfu <yourbinary>.hex<br />
<br />
TODO: When I'm developing, I'm likely to modify the code, and when I want to program the chip I hit the "reset" button on the board. Then the computer will see my chip re-enumerate as the Atmel DFU chip. A simple script could watchout for that and invoke dfu <mycurrentbinary>.hex the moment the chip has enumerated. Once that's running downloading and starting the latest code becomes as simple as hitting the reset button. <br />
<br />
Apparently the FLIP program is now available for Linux too. See below.<br />
<br />
=== Windows ===<br />
<br />
Get the "flip" program from Atmel. http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3886<br />
<br />
== Writing programs ==<br />
<br />
The chip is an ATmega32U4. http://www.atmel.com/dyn/resources/prod_documents/doc7766.pdf<br />
<br />
You can program the processor as if it is a normal AVR processor without USB. Just like an arduino. Or you can program it to have USB support. For this the LUFA package is very useful. http://www.fourwalledcubicle.com/LUFA.php<br />
<br />
<br />
Depending on what you want you can start from these examples: <br />
<br />
* [[usbio kitt]]<br />
* [[usbio ACM sample program]].<br />
<br />
DONE: Find out if we can jump to the bootloader from our code so that we can issue a "go get yourself updated" command over the USB (yes, but the documentation says nothing about what address to jump to). This comes in handy if the reset button is difficult to reach because the device is built-in somewhere. http://www.atmel.com/dyn/resources/prod_documents/doc7618.pdf<br />
<br />
== Future hardware enhancements ==<br />
<br />
* Make an I2C header<br />
<br />
== Future software enhancements ==<br />
<br />
* program the LUFA bootloader. <br />
* Program an even smaller bootloader. (512 bytes should be possible, CF teensy/halfkay).<br />
<br />
== Changelog ==<br />
<br />
=== 1.1 ===<br />
* Added ICSP connector (can function as ISP slave, master, or SPI connector)<br />
* Added header parallel to reset switch<br />
<br />
=== 1.0 ===<br />
* Initial release</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=I2C_pressure_sensor&diff=3112I2C pressure sensor2015-08-31T14:19:38Z<p>Sjoerd: /* general info */</p>
<hr />
<div>= general info =<br />
<br />
The I2C pressure sensor is based on the MS5637 from Measurement Specialties. It can be found on address 0xEC (7 bit address: 0x76). More info about 7 bit and 8 bit address can be found on the following page: [[I2c_addresses]]<br />
<br />
= pinout =<br />
<br />
As with all bitwizard I2C boards, the board has a 4 pin female connector on the left and a male connector on the right so that you can daisychain multiple boards. <br />
<br />
The pinout is GND, SDA, SCL, VCC. (with a bit of luck this is now silk-screened on the back of the board.)<br />
<br />
== voltages ==<br />
<br />
The chip is 3.3V, a regulator is provided on board. This regulator has a dropout of about 1V, so the board currently requires a 5V nominal VCC. We'll move to a different regulator one of these days allowing clean 3.3V operation. (the dropout will be so low that the chip will have to make do with 3.299V if you provide 3.300V....). The chip can handle 4k7 pullups to 5V on the I2C bus. <br />
<br />
= examples =<br />
<br />
This is an example arduino sketch that prints the pressure every second. <br />
<br />
#include <Wire.h><br />
#include <BaroSensor.h><br />
<br />
void setup()<br />
{<br />
Serial.begin(9600);<br />
BaroSensor.begin();<br />
}<br />
<br />
void loop()<br />
{<br />
float temp, pres;<br />
<br />
if(!BaroSensor.isOK()) {<br />
Serial.print("Sensor not Found/OK. Error: "); <br />
Serial.println(BaroSensor.getError());<br />
BaroSensor.begin(); // Try to reinitialise the sensor if we can<br />
} else {<br />
temp = BaroSensor.getTemperature();<br />
pres = BaroSensor.getPressure();<br />
Serial.print (millis ()); <br />
Serial.print (" ");<br />
// Serial.print("T: "); <br />
Serial.print(temp);<br />
// Serial.print(" P: ");<br />
Serial.print (" "); <br />
Serial.println(pres);<br />
}<br />
delay (1000);<br />
}<br />
<br />
<br />
<br />
= datasheets =<br />
<br />
[[http://www.farnell.com/datasheets/1756129.pdf]]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=I2C_pressure_sensor&diff=3111I2C pressure sensor2015-08-31T14:16:48Z<p>Sjoerd: </p>
<hr />
<div>= general info =<br />
<br />
The I2C pressure sensor is based on the MS5637 from Measurement Specialties. It can be found on address 0xEC.<br />
<br />
= pinout =<br />
<br />
As with all bitwizard I2C boards, the board has a 4 pin female connector on the left and a male connector on the right so that you can daisychain multiple boards. <br />
<br />
The pinout is GND, SDA, SCL, VCC. (with a bit of luck this is now silk-screened on the back of the board.)<br />
<br />
== voltages ==<br />
<br />
The chip is 3.3V, a regulator is provided on board. This regulator has a dropout of about 1V, so the board currently requires a 5V nominal VCC. We'll move to a different regulator one of these days allowing clean 3.3V operation. (the dropout will be so low that the chip will have to make do with 3.299V if you provide 3.300V....). The chip can handle 4k7 pullups to 5V on the I2C bus. <br />
<br />
= examples =<br />
<br />
This is an example arduino sketch that prints the pressure every second. <br />
<br />
#include <Wire.h><br />
#include <BaroSensor.h><br />
<br />
void setup()<br />
{<br />
Serial.begin(9600);<br />
BaroSensor.begin();<br />
}<br />
<br />
void loop()<br />
{<br />
float temp, pres;<br />
<br />
if(!BaroSensor.isOK()) {<br />
Serial.print("Sensor not Found/OK. Error: "); <br />
Serial.println(BaroSensor.getError());<br />
BaroSensor.begin(); // Try to reinitialise the sensor if we can<br />
} else {<br />
temp = BaroSensor.getTemperature();<br />
pres = BaroSensor.getPressure();<br />
Serial.print (millis ()); <br />
Serial.print (" ");<br />
// Serial.print("T: "); <br />
Serial.print(temp);<br />
// Serial.print(" P: ");<br />
Serial.print (" "); <br />
Serial.println(pres);<br />
}<br />
delay (1000);<br />
}<br />
<br />
<br />
<br />
= datasheets =<br />
<br />
[[http://www.farnell.com/datasheets/1756129.pdf]]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Raspberry_Pi_camera_extension_kit&diff=3055Raspberry Pi camera extension kit2015-03-16T16:08:37Z<p>Sjoerd: /* Splitting cable */</p>
<hr />
<div>[[File:Rpicamextstraight.jpg|thumb|300px|Camera extension kit with straight pins]]<br />
[[File:Rpicamextangle.jpg|thumb|300px|Camera extension kit with angled pins]]<br />
<br />
== Overview ==<br />
This kit allows you to expand the length of the Raspberry Pi camera by converting the standard FFC cable to a generic 2.54mm pin set. You could use the attached connectors to create a ribbon cable, let us create the ribbon cable, or use your own cable. Please note that the ribbon cable has an angled connector. The kit can be found in the shop [http://www.bitwizard.nl/catalog/product_info.php?products_id=146 here]<br />
<br />
<br />
== Connecting ==<br />
<br />
You can recognise this version by the way the connectors one the "camera board" converter are mounted on opposite sides of the PCB.<br><br />
<br><br />
This is very straightforward:<br><br />
- Turn off your Raspberry Pi<br><br />
- Connect the opposite-side FPC cable (supplied with the kit) to the CSI connector of your Raspberry Pi, and the adapter board labeled "Raspberry Pi". The silver connectors on the FPC cable should face the HDMI connector on the raspberry pi side. On our adapter board the silver connectors on the FPC face AWAY from the PCB. <br><br />
- Connect the opposite side FPC cable (supplied with the camera module) to the camera module, and the adapter board labeled "Camera board". Again on our adapter board the silver connectors on the FPC face AWAY from the PCB.<br><br />
- Connect the IDC cable to both adapter boards. Make sure pin 1 of the cable lines up with de pin 1 markings on both adapter boards (please note: On the board marked with "Camera board", the pin 1 marking may be obstructed by the right-angle connector. On both boards the BitWizard is on the pin16 side of the board)<br><br />
<br><br />
<br />
== Splitting cable ==<br />
For more flexability, it is possible to split the cable into individual wires. Keep in mind that you have to keep the following wires fused together:<br><br />
Pin 2&3<br><br />
Pin 4&5<br><br />
Pin 7&8<br><br />
Pin 10&11<br><br />
Pin 14&15</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Raspberry_Pi_camera_extension_kit&diff=3054Raspberry Pi camera extension kit2015-03-16T16:08:16Z<p>Sjoerd: </p>
<hr />
<div>[[File:Rpicamextstraight.jpg|thumb|300px|Camera extension kit with straight pins]]<br />
[[File:Rpicamextangle.jpg|thumb|300px|Camera extension kit with angled pins]]<br />
<br />
== Overview ==<br />
This kit allows you to expand the length of the Raspberry Pi camera by converting the standard FFC cable to a generic 2.54mm pin set. You could use the attached connectors to create a ribbon cable, let us create the ribbon cable, or use your own cable. Please note that the ribbon cable has an angled connector. The kit can be found in the shop [http://www.bitwizard.nl/catalog/product_info.php?products_id=146 here]<br />
<br />
<br />
== Connecting ==<br />
<br />
You can recognise this version by the way the connectors one the "camera board" converter are mounted on opposite sides of the PCB.<br><br />
<br><br />
This is very straightforward:<br><br />
- Turn off your Raspberry Pi<br><br />
- Connect the opposite-side FPC cable (supplied with the kit) to the CSI connector of your Raspberry Pi, and the adapter board labeled "Raspberry Pi". The silver connectors on the FPC cable should face the HDMI connector on the raspberry pi side. On our adapter board the silver connectors on the FPC face AWAY from the PCB. <br><br />
- Connect the opposite side FPC cable (supplied with the camera module) to the camera module, and the adapter board labeled "Camera board". Again on our adapter board the silver connectors on the FPC face AWAY from the PCB.<br><br />
- Connect the IDC cable to both adapter boards. Make sure pin 1 of the cable lines up with de pin 1 markings on both adapter boards (please note: On the board marked with "Camera board", the pin 1 marking may be obstructed by the right-angle connector. On both boards the BitWizard is on the pin16 side of the board)<br><br />
<br><br />
<br />
== Splitting cable ==<br />
For more flexability, it is possible to split the cable into individual wires. Keep in mind that you have to keep the following wires fused together:<br />
Pin 2&3<br />
Pin 4&5<br />
Pin 7&8<br />
Pin 10&11<br />
Pin 14&15</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=FT4222h&diff=3050FT4222h2015-03-09T16:47:00Z<p>Sjoerd: /* Jumper settings */</p>
<hr />
<div>[[File:FT4222h.jpg|thumb|300px]]<br />
<br />
This is the documentation page for the FT4222h breakout board. <br />
<br />
== overview ==<br />
<br />
The FT4222h breakout board has an USB connector, two SPI connectors, one I2C connector one CNF connector and one 14-pin IO connector. The brains of the PCB, of course, is an FT4222h chip.<br />
<br />
== External resources ==<br />
<br />
* [http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT4222h.pdf Datasheet]<br />
* [http://www.ftdichip.com/Products/ICs/FT4222h.html FTDI product page]<br />
<br />
== pinout ==<br />
<TODO><br />
<br />
== LEDS ==<br />
<br />
* The only LED is a power LED <br />
<br />
== Jumper settings ==<br />
<TODO><br />
<br />
== future hardware enhancements ==<br />
<br />
<br />
<br />
== Changelog ==<br />
<br />
1.1<br />
* Initial public release</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=FT4222h&diff=3049FT4222h2015-03-09T16:37:28Z<p>Sjoerd: Created page with "300px This is the documentation page for the FT4222h breakout board. == overview == The FT4222h breakout board has an USB connector, two SPI con..."</p>
<hr />
<div>[[File:FT4222h.jpg|thumb|300px]]<br />
<br />
This is the documentation page for the FT4222h breakout board. <br />
<br />
== overview ==<br />
<br />
The FT4222h breakout board has an USB connector, two SPI connectors, one I2C connector one CNF connector and one 14-pin IO connector. The brains of the PCB, of course, is an FT4222h chip.<br />
<br />
== External resources ==<br />
<br />
* [http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT4222h.pdf Datasheet]<br />
* [http://www.ftdichip.com/Products/ICs/FT4222h.html FTDI product page]<br />
<br />
== pinout ==<br />
<TODO><br />
<br />
== LEDS ==<br />
<br />
* The only LED is a power LED <br />
<br />
== Jumper settings ==<br />
<br />
* The only jumper Is for selecting the I/O voltage. 1-2 = 1V8, 2-3 = 3V3.<br />
<br />
== future hardware enhancements ==<br />
<br />
<br />
<br />
== Changelog ==<br />
<br />
1.1<br />
* Initial public release</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=File:FT4222h.jpg&diff=3048File:FT4222h.jpg2015-03-09T16:23:58Z<p>Sjoerd: </p>
<hr />
<div></div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Raspberry_Relay&diff=3021Raspberry Relay2014-12-19T14:52:33Z<p>Sjoerd: </p>
<hr />
<div>[[File:RPiRelay.jpg|thumb|300px|alt=The Raspberry Relay board|The Raspberry Relay board]]<br />
The Raspberry Relay board makes it possible to control 4 relays using your Raspberry Pi. There are now 3 versions:<br />
<br />
* [http://www.bitwizard.nl/shop/raspberry-pi/rpi-relay Raspberry Relay board]<br />
* [http://www.bitwizard.nl/shop/raspberry-pi?product_id=148 Raspberry SPI Relay board]<br />
* [http://www.bitwizard.nl/shop/raspberry-pi?product_id=149 Raspberry Solid State Relay board]<br />
<br />
== Overview ==<br />
The Raspberry Relay board can be connected to a Raspberry Pi using the 26-pin GPIO connector. The relays can be controlled using the Raspberry Pi GPIO pins. Optionally, with the old version of the Relay board the Pi can be powered by the micro USB port on the Relay board. This way, the connectors for power, ethernet and USB are on one side. Please note that the polyfuse will be bypassed if the Pi is powered via the Relay board. The polyfuse prevents damage when a short-circuit occurs. If you power your Raspberry Pi with batteries, it is recommended to use the regular power connector, since a short-circuit could damage the battery. The positive side of bypassing the polyfuse is that the board is less sensitive to voltage fluctuations, since the polyfuse induces a 0.2V voltage drop.<br />
<br />
== Pinout ==<br />
[[File:RPiRelayPinout.jpg|thumb|300px|alt=Pin numbering|Pin numbering of the Relay Board]]<br />
{| border=1<br />
! Pin 1 !! Pin 2 !! Pin 3 !! Pin 4 !! Pin 5 !! Pin 6 !! Pin 7 !! Pin 8 !! Pin 9 !! Pin 10 <br />
|-<br />
| Neutral || Relay 1 out || Neutral || Relay 2 out || Neutral || Relay 3 out || Neutral || Relay 4 out || Neutral || Hot <br />
|}<br />
<br />
If you want to switch mains, you should connect the 'Hot' wire to pin 10. In EU countries, this is usually the brown wire. The blue wire is the 'Neutral', and should be connected to pin 9. All other wires should be connected in the same way, so 'Neutral' to 'Neutral' and a 'Hot' wire to a relay output pin.<br />
<br />
[[File:Dsc05646_small.jpg|thumb|300px|Example configuration]]<br />
<br />
== Usage == <br />
The module can be controlled with the GPIO pins on the Pi. Set a pin high, the relay will switch on and when the pin is low the relay will switch off. The pins are wired as follows:<br />
<br />
{| border=1<br />
! Relay no. !! Pin number (by [http://elinux.org/File:RPi_P1_header.png this] scheme)!! Pin name ([http://elinux.org/File:GPIOs.png Broadcom ref.]) !! Pin name ([http://wiringpi.com/pins/ wiringPi]) <br />
|-<br />
| 1 || 11 || GPIO17 || 0 <br />
|-<br />
| 2 || 12 || GPIO18 || 1<br />
|- <br />
| 3 || 13 || GPIO21 (rev 1)/GPIO27 (rev 2) || 2<br />
|- <br />
| 4 || 15 || GPIO22 || 3<br />
|}<br />
<br />
== Examples ==<br />
=== Shell ===<br />
* First, [http://wiringpi.com/download-and-install/ install WiringPi]<br />
* Set the GPIO modes:<br />
gpio mode 0 out<br />
gpio mode 1 out<br />
gpio mode 2 out<br />
gpio mode 3 out<br />
* Enabling a relay:<br />
gpio write X 1<br />
where X is the relay number (0 to 3)<br />
* Disabling a relay:<br />
gpio write X 0<br />
For more information about the gpio utility, see [https://projects.drogon.net/raspberry-pi/wiringpi/the-gpio-utility/ this page]<br />
=== Python ===<br />
* Install the RPi.GPIO Python module:<br />
sudo apt-get install python-rpi.gpio<br />
* start the python interpreter <br />
python<br />
* or create a script<br />
nano gpio.py<br />
* The Python script should look like this:<br />
#!/usr/bin/env python<br />
#import the GPIO library<br />
import RPi.GPIO as GPIO<br />
#select the board mode pin numbering<br />
GPIO.setmode(GPIO.BOARD)<br />
#set the needed GPIO pins as output<br />
GPIO.setup(11, GPIO.OUT) #relay 1<br />
GPIO.setup(12, GPIO.OUT) #relay 2<br />
GPIO.setup(13, GPIO.OUT) #relay 3<br />
GPIO.setup(15, GPIO.OUT) #relay 4<br />
#toggle the relays<br />
GPIO.output(13,True) #Enable relay 3 <br />
GPIO.output(11,False) #Disable relay 1<br />
* For more information on the RPi.GPIO module, see [https://pypi.python.org/pypi/RPi.GPIO this page].<br />
<br />
== Datasheets ==<br />
2A SSR: [http://www.components.omron.com/components/web/pdflib.nsf/0/F1D420C93E86CDB685257201007DD5BA/$file/G3MB_0609.pdf Omron G3MB-202P]<br />
<br />
5A: [http://www.parallax.com/sites/default/files/downloads/27115-Single-Relay-Board-Datasheet.pdf Songle SRD-05VDC]<br />
<br />
10A: [http://www.omron.com/ecb/products/pdf/en-g5le.pdf Omron G5LE-14]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Raspberry_Relay&diff=3020Raspberry Relay2014-12-19T14:50:47Z<p>Sjoerd: </p>
<hr />
<div>[[File:RPiRelay.jpg|thumb|300px|alt=The Raspberry Relay board|The Raspberry Relay board]]<br />
The Raspberry Relay board makes it possible to control 4 relays using your Raspberry Pi. There are now 3 versions:<br />
<br />
* [http://www.bitwizard.nl/shop/raspberry-pi/rpi-relay Raspberry Relay board]<br />
* [http://www.bitwizard.nl/shop/raspberry-pi/RPi-solid-state-relay Raspberry SPI Relay board]<br />
* [http://www.bitwizard.nl/shop/raspberry-pi/RPi-solid-state-relay Raspberry Solid State Relay board]<br />
<br />
== Overview ==<br />
The Raspberry Relay board can be connected to a Raspberry Pi using the 26-pin GPIO connector. The relays can be controlled using the Raspberry Pi GPIO pins. Optionally, with the old version of the Relay board the Pi can be powered by the micro USB port on the Relay board. This way, the connectors for power, ethernet and USB are on one side. Please note that the polyfuse will be bypassed if the Pi is powered via the Relay board. The polyfuse prevents damage when a short-circuit occurs. If you power your Raspberry Pi with batteries, it is recommended to use the regular power connector, since a short-circuit could damage the battery. The positive side of bypassing the polyfuse is that the board is less sensitive to voltage fluctuations, since the polyfuse induces a 0.2V voltage drop.<br />
<br />
== Pinout ==<br />
[[File:RPiRelayPinout.jpg|thumb|300px|alt=Pin numbering|Pin numbering of the Relay Board]]<br />
{| border=1<br />
! Pin 1 !! Pin 2 !! Pin 3 !! Pin 4 !! Pin 5 !! Pin 6 !! Pin 7 !! Pin 8 !! Pin 9 !! Pin 10 <br />
|-<br />
| Neutral || Relay 1 out || Neutral || Relay 2 out || Neutral || Relay 3 out || Neutral || Relay 4 out || Neutral || Hot <br />
|}<br />
<br />
If you want to switch mains, you should connect the 'Hot' wire to pin 10. In EU countries, this is usually the brown wire. The blue wire is the 'Neutral', and should be connected to pin 9. All other wires should be connected in the same way, so 'Neutral' to 'Neutral' and a 'Hot' wire to a relay output pin.<br />
<br />
[[File:Dsc05646_small.jpg|thumb|300px|Example configuration]]<br />
<br />
== Usage == <br />
The module can be controlled with the GPIO pins on the Pi. Set a pin high, the relay will switch on and when the pin is low the relay will switch off. The pins are wired as follows:<br />
<br />
{| border=1<br />
! Relay no. !! Pin number (by [http://elinux.org/File:RPi_P1_header.png this] scheme)!! Pin name ([http://elinux.org/File:GPIOs.png Broadcom ref.]) !! Pin name ([http://wiringpi.com/pins/ wiringPi]) <br />
|-<br />
| 1 || 11 || GPIO17 || 0 <br />
|-<br />
| 2 || 12 || GPIO18 || 1<br />
|- <br />
| 3 || 13 || GPIO21 (rev 1)/GPIO27 (rev 2) || 2<br />
|- <br />
| 4 || 15 || GPIO22 || 3<br />
|}<br />
<br />
== Examples ==<br />
=== Shell ===<br />
* First, [http://wiringpi.com/download-and-install/ install WiringPi]<br />
* Set the GPIO modes:<br />
gpio mode 0 out<br />
gpio mode 1 out<br />
gpio mode 2 out<br />
gpio mode 3 out<br />
* Enabling a relay:<br />
gpio write X 1<br />
where X is the relay number (0 to 3)<br />
* Disabling a relay:<br />
gpio write X 0<br />
For more information about the gpio utility, see [https://projects.drogon.net/raspberry-pi/wiringpi/the-gpio-utility/ this page]<br />
=== Python ===<br />
* Install the RPi.GPIO Python module:<br />
sudo apt-get install python-rpi.gpio<br />
* start the python interpreter <br />
python<br />
* or create a script<br />
nano gpio.py<br />
* The Python script should look like this:<br />
#!/usr/bin/env python<br />
#import the GPIO library<br />
import RPi.GPIO as GPIO<br />
#select the board mode pin numbering<br />
GPIO.setmode(GPIO.BOARD)<br />
#set the needed GPIO pins as output<br />
GPIO.setup(11, GPIO.OUT) #relay 1<br />
GPIO.setup(12, GPIO.OUT) #relay 2<br />
GPIO.setup(13, GPIO.OUT) #relay 3<br />
GPIO.setup(15, GPIO.OUT) #relay 4<br />
#toggle the relays<br />
GPIO.output(13,True) #Enable relay 3 <br />
GPIO.output(11,False) #Disable relay 1<br />
* For more information on the RPi.GPIO module, see [https://pypi.python.org/pypi/RPi.GPIO this page].<br />
<br />
== Datasheets ==<br />
2A SSR: [http://www.components.omron.com/components/web/pdflib.nsf/0/F1D420C93E86CDB685257201007DD5BA/$file/G3MB_0609.pdf Omron G3MB-202P]<br />
<br />
5A: [http://www.parallax.com/sites/default/files/downloads/27115-Single-Relay-Board-Datasheet.pdf Songle SRD-05VDC]<br />
<br />
10A: [http://www.omron.com/ecb/products/pdf/en-g5le.pdf Omron G5LE-14]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Raspberry_Relay&diff=3019Raspberry Relay2014-12-19T14:49:35Z<p>Sjoerd: </p>
<hr />
<div>[[File:RPiRelay.jpg|thumb|300px|alt=The Raspberry Relay board|The Raspberry Relay board]]<br />
The Raspberry Relay board makes it possible to control 4 relays using your Raspberry Pi. There are now 3 versions:<br />
<br />
* [http://www.bitwizard.nl/shop/raspberry-pi/rpi-relay Raspberry Relay board]<br />
* [http://www.bitwizard.nl/shop/raspberry-pi/rpi-spi-relay Raspberry SPI Relay board]<br />
* [http://www.bitwizard.nl/shop/raspberry-pi/rpi-solid-state-relay Raspberry Solid State Relay board]<br />
<br />
== Overview ==<br />
The Raspberry Relay board can be connected to a Raspberry Pi using the 26-pin GPIO connector. The relays can be controlled using the Raspberry Pi GPIO pins. Optionally, with the old version of the Relay board the Pi can be powered by the micro USB port on the Relay board. This way, the connectors for power, ethernet and USB are on one side. Please note that the polyfuse will be bypassed if the Pi is powered via the Relay board. The polyfuse prevents damage when a short-circuit occurs. If you power your Raspberry Pi with batteries, it is recommended to use the regular power connector, since a short-circuit could damage the battery. The positive side of bypassing the polyfuse is that the board is less sensitive to voltage fluctuations, since the polyfuse induces a 0.2V voltage drop.<br />
<br />
== Pinout ==<br />
[[File:RPiRelayPinout.jpg|thumb|300px|alt=Pin numbering|Pin numbering of the Relay Board]]<br />
{| border=1<br />
! Pin 1 !! Pin 2 !! Pin 3 !! Pin 4 !! Pin 5 !! Pin 6 !! Pin 7 !! Pin 8 !! Pin 9 !! Pin 10 <br />
|-<br />
| Neutral || Relay 1 out || Neutral || Relay 2 out || Neutral || Relay 3 out || Neutral || Relay 4 out || Neutral || Hot <br />
|}<br />
<br />
If you want to switch mains, you should connect the 'Hot' wire to pin 10. In EU countries, this is usually the brown wire. The blue wire is the 'Neutral', and should be connected to pin 9. All other wires should be connected in the same way, so 'Neutral' to 'Neutral' and a 'Hot' wire to a relay output pin.<br />
<br />
[[File:Dsc05646_small.jpg|thumb|300px|Example configuration]]<br />
<br />
== Usage == <br />
The module can be controlled with the GPIO pins on the Pi. Set a pin high, the relay will switch on and when the pin is low the relay will switch off. The pins are wired as follows:<br />
<br />
{| border=1<br />
! Relay no. !! Pin number (by [http://elinux.org/File:RPi_P1_header.png this] scheme)!! Pin name ([http://elinux.org/File:GPIOs.png Broadcom ref.]) !! Pin name ([http://wiringpi.com/pins/ wiringPi]) <br />
|-<br />
| 1 || 11 || GPIO17 || 0 <br />
|-<br />
| 2 || 12 || GPIO18 || 1<br />
|- <br />
| 3 || 13 || GPIO21 (rev 1)/GPIO27 (rev 2) || 2<br />
|- <br />
| 4 || 15 || GPIO22 || 3<br />
|}<br />
<br />
== Examples ==<br />
=== Shell ===<br />
* First, [http://wiringpi.com/download-and-install/ install WiringPi]<br />
* Set the GPIO modes:<br />
gpio mode 0 out<br />
gpio mode 1 out<br />
gpio mode 2 out<br />
gpio mode 3 out<br />
* Enabling a relay:<br />
gpio write X 1<br />
where X is the relay number (0 to 3)<br />
* Disabling a relay:<br />
gpio write X 0<br />
For more information about the gpio utility, see [https://projects.drogon.net/raspberry-pi/wiringpi/the-gpio-utility/ this page]<br />
=== Python ===<br />
* Install the RPi.GPIO Python module:<br />
sudo apt-get install python-rpi.gpio<br />
* start the python interpreter <br />
python<br />
* or create a script<br />
nano gpio.py<br />
* The Python script should look like this:<br />
#!/usr/bin/env python<br />
#import the GPIO library<br />
import RPi.GPIO as GPIO<br />
#select the board mode pin numbering<br />
GPIO.setmode(GPIO.BOARD)<br />
#set the needed GPIO pins as output<br />
GPIO.setup(11, GPIO.OUT) #relay 1<br />
GPIO.setup(12, GPIO.OUT) #relay 2<br />
GPIO.setup(13, GPIO.OUT) #relay 3<br />
GPIO.setup(15, GPIO.OUT) #relay 4<br />
#toggle the relays<br />
GPIO.output(13,True) #Enable relay 3 <br />
GPIO.output(11,False) #Disable relay 1<br />
* For more information on the RPi.GPIO module, see [https://pypi.python.org/pypi/RPi.GPIO this page].<br />
<br />
== Datasheets ==<br />
2A SSR: [http://www.components.omron.com/components/web/pdflib.nsf/0/F1D420C93E86CDB685257201007DD5BA/$file/G3MB_0609.pdf Omron G3MB-202P]<br />
<br />
5A: [http://www.parallax.com/sites/default/files/downloads/27115-Single-Relay-Board-Datasheet.pdf Songle SRD-05VDC]<br />
<br />
10A: [http://www.omron.com/ecb/products/pdf/en-g5le.pdf Omron G5LE-14]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Raspberry_Relay&diff=3018Raspberry Relay2014-12-19T14:39:52Z<p>Sjoerd: /* Overview */</p>
<hr />
<div>[[File:RPiRelay.jpg|thumb|300px|alt=The Raspberry Relay board|The Raspberry Relay board]]<br />
The Raspberry Relay board makes it possible to control 4 relays using your Raspberry Pi. It can be found in the shop [http://www.bitwizard.nl/shop/raspberry-pi/rpi-relay here].<br />
== Overview ==<br />
The Raspberry Relay board can be connected to a Raspberry Pi using the 26-pin GPIO connector. The relays can be controlled using the Raspberry Pi GPIO pins. Optionally, with the old version of the Relay board the Pi can be powered by the micro USB port on the Relay board. This way, the connectors for power, ethernet and USB are on one side. Please note that the polyfuse will be bypassed if the Pi is powered via the Relay board. The polyfuse prevents damage when a short-circuit occurs. If you power your Raspberry Pi with batteries, it is recommended to use the regular power connector, since a short-circuit could damage the battery. The positive side of bypassing the polyfuse is that the board is less sensitive to voltage fluctuations, since the polyfuse induces a 0.2V voltage drop.<br />
<br />
== Pinout ==<br />
[[File:RPiRelayPinout.jpg|thumb|300px|alt=Pin numbering|Pin numbering of the Relay Board]]<br />
{| border=1<br />
! Pin 1 !! Pin 2 !! Pin 3 !! Pin 4 !! Pin 5 !! Pin 6 !! Pin 7 !! Pin 8 !! Pin 9 !! Pin 10 <br />
|-<br />
| Neutral || Relay 1 out || Neutral || Relay 2 out || Neutral || Relay 3 out || Neutral || Relay 4 out || Neutral || Hot <br />
|}<br />
<br />
If you want to switch mains, you should connect the 'Hot' wire to pin 10. In EU countries, this is usually the brown wire. The blue wire is the 'Neutral', and should be connected to pin 9. All other wires should be connected in the same way, so 'Neutral' to 'Neutral' and a 'Hot' wire to a relay output pin.<br />
<br />
[[File:Dsc05646_small.jpg|thumb|300px|Example configuration]]<br />
<br />
== Usage == <br />
The module can be controlled with the GPIO pins on the Pi. Set a pin high, the relay will switch on and when the pin is low the relay will switch off. The pins are wired as follows:<br />
<br />
{| border=1<br />
! Relay no. !! Pin number (by [http://elinux.org/File:RPi_P1_header.png this] scheme)!! Pin name ([http://elinux.org/File:GPIOs.png Broadcom ref.]) !! Pin name ([http://wiringpi.com/pins/ wiringPi]) <br />
|-<br />
| 1 || 11 || GPIO17 || 0 <br />
|-<br />
| 2 || 12 || GPIO18 || 1<br />
|- <br />
| 3 || 13 || GPIO21 (rev 1)/GPIO27 (rev 2) || 2<br />
|- <br />
| 4 || 15 || GPIO22 || 3<br />
|}<br />
<br />
== Examples ==<br />
=== Shell ===<br />
* First, [http://wiringpi.com/download-and-install/ install WiringPi]<br />
* Set the GPIO modes:<br />
gpio mode 0 out<br />
gpio mode 1 out<br />
gpio mode 2 out<br />
gpio mode 3 out<br />
* Enabling a relay:<br />
gpio write X 1<br />
where X is the relay number (0 to 3)<br />
* Disabling a relay:<br />
gpio write X 0<br />
For more information about the gpio utility, see [https://projects.drogon.net/raspberry-pi/wiringpi/the-gpio-utility/ this page]<br />
=== Python ===<br />
* Install the RPi.GPIO Python module:<br />
sudo apt-get install python-rpi.gpio<br />
* start the python interpreter <br />
python<br />
* or create a script<br />
nano gpio.py<br />
* The Python script should look like this:<br />
#!/usr/bin/env python<br />
#import the GPIO library<br />
import RPi.GPIO as GPIO<br />
#select the board mode pin numbering<br />
GPIO.setmode(GPIO.BOARD)<br />
#set the needed GPIO pins as output<br />
GPIO.setup(11, GPIO.OUT) #relay 1<br />
GPIO.setup(12, GPIO.OUT) #relay 2<br />
GPIO.setup(13, GPIO.OUT) #relay 3<br />
GPIO.setup(15, GPIO.OUT) #relay 4<br />
#toggle the relays<br />
GPIO.output(13,True) #Enable relay 3 <br />
GPIO.output(11,False) #Disable relay 1<br />
* For more information on the RPi.GPIO module, see [https://pypi.python.org/pypi/RPi.GPIO this page].<br />
<br />
== Datasheets ==<br />
2A SSR: [http://www.components.omron.com/components/web/pdflib.nsf/0/F1D420C93E86CDB685257201007DD5BA/$file/G3MB_0609.pdf Omron G3MB-202P]<br />
<br />
5A: [http://www.parallax.com/sites/default/files/downloads/27115-Single-Relay-Board-Datasheet.pdf Songle SRD-05VDC]<br />
<br />
10A: [http://www.omron.com/ecb/products/pdf/en-g5le.pdf Omron G5LE-14]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Raspberry_Relay&diff=3017Raspberry Relay2014-12-19T14:38:31Z<p>Sjoerd: /* Datasheets */</p>
<hr />
<div>[[File:RPiRelay.jpg|thumb|300px|alt=The Raspberry Relay board|The Raspberry Relay board]]<br />
The Raspberry Relay board makes it possible to control 4 relays using your Raspberry Pi. It can be found in the shop [http://www.bitwizard.nl/shop/raspberry-pi/rpi-relay here].<br />
== Overview ==<br />
The Raspberry Relay board can be connected to a Raspberry Pi using the 26-pin GPIO connector. The relays can be controlled using the Raspberry Pi GPIO pins. Optionally, the Pi can be powered by the micro USB port on the Relay board. This way, the connectors for power, ethernet and USB are on one side. Please note that the polyfuse will be bypassed if the Pi is powered via the Relay board. The polyfuse prevents damage when a short-circuit occurs. If you power your Raspberry Pi with batteries, it is recommended to use the regular power connector, since a short-circuit could damage the battery. The positive side of bypassing the polyfuse is that the board is less sensitive to voltage fluctuations, since the polyfuse induces a 0.2V voltage drop.<br />
<br />
== Pinout ==<br />
[[File:RPiRelayPinout.jpg|thumb|300px|alt=Pin numbering|Pin numbering of the Relay Board]]<br />
{| border=1<br />
! Pin 1 !! Pin 2 !! Pin 3 !! Pin 4 !! Pin 5 !! Pin 6 !! Pin 7 !! Pin 8 !! Pin 9 !! Pin 10 <br />
|-<br />
| Neutral || Relay 1 out || Neutral || Relay 2 out || Neutral || Relay 3 out || Neutral || Relay 4 out || Neutral || Hot <br />
|}<br />
<br />
If you want to switch mains, you should connect the 'Hot' wire to pin 10. In EU countries, this is usually the brown wire. The blue wire is the 'Neutral', and should be connected to pin 9. All other wires should be connected in the same way, so 'Neutral' to 'Neutral' and a 'Hot' wire to a relay output pin.<br />
<br />
[[File:Dsc05646_small.jpg|thumb|300px|Example configuration]]<br />
<br />
== Usage == <br />
The module can be controlled with the GPIO pins on the Pi. Set a pin high, the relay will switch on and when the pin is low the relay will switch off. The pins are wired as follows:<br />
<br />
{| border=1<br />
! Relay no. !! Pin number (by [http://elinux.org/File:RPi_P1_header.png this] scheme)!! Pin name ([http://elinux.org/File:GPIOs.png Broadcom ref.]) !! Pin name ([http://wiringpi.com/pins/ wiringPi]) <br />
|-<br />
| 1 || 11 || GPIO17 || 0 <br />
|-<br />
| 2 || 12 || GPIO18 || 1<br />
|- <br />
| 3 || 13 || GPIO21 (rev 1)/GPIO27 (rev 2) || 2<br />
|- <br />
| 4 || 15 || GPIO22 || 3<br />
|}<br />
<br />
== Examples ==<br />
=== Shell ===<br />
* First, [http://wiringpi.com/download-and-install/ install WiringPi]<br />
* Set the GPIO modes:<br />
gpio mode 0 out<br />
gpio mode 1 out<br />
gpio mode 2 out<br />
gpio mode 3 out<br />
* Enabling a relay:<br />
gpio write X 1<br />
where X is the relay number (0 to 3)<br />
* Disabling a relay:<br />
gpio write X 0<br />
For more information about the gpio utility, see [https://projects.drogon.net/raspberry-pi/wiringpi/the-gpio-utility/ this page]<br />
=== Python ===<br />
* Install the RPi.GPIO Python module:<br />
sudo apt-get install python-rpi.gpio<br />
* start the python interpreter <br />
python<br />
* or create a script<br />
nano gpio.py<br />
* The Python script should look like this:<br />
#!/usr/bin/env python<br />
#import the GPIO library<br />
import RPi.GPIO as GPIO<br />
#select the board mode pin numbering<br />
GPIO.setmode(GPIO.BOARD)<br />
#set the needed GPIO pins as output<br />
GPIO.setup(11, GPIO.OUT) #relay 1<br />
GPIO.setup(12, GPIO.OUT) #relay 2<br />
GPIO.setup(13, GPIO.OUT) #relay 3<br />
GPIO.setup(15, GPIO.OUT) #relay 4<br />
#toggle the relays<br />
GPIO.output(13,True) #Enable relay 3 <br />
GPIO.output(11,False) #Disable relay 1<br />
* For more information on the RPi.GPIO module, see [https://pypi.python.org/pypi/RPi.GPIO this page].<br />
<br />
== Datasheets ==<br />
2A SSR: [http://www.components.omron.com/components/web/pdflib.nsf/0/F1D420C93E86CDB685257201007DD5BA/$file/G3MB_0609.pdf Omron G3MB-202P]<br />
<br />
5A: [http://www.parallax.com/sites/default/files/downloads/27115-Single-Relay-Board-Datasheet.pdf Songle SRD-05VDC]<br />
<br />
10A: [http://www.omron.com/ecb/products/pdf/en-g5le.pdf Omron G5LE-14]</div>Sjoerdhttps://www.bitwizard.nl/wiki/index.php?title=Raspberry_Relay&diff=3016Raspberry Relay2014-12-19T14:37:44Z<p>Sjoerd: /* Datasheets */</p>
<hr />
<div>[[File:RPiRelay.jpg|thumb|300px|alt=The Raspberry Relay board|The Raspberry Relay board]]<br />
The Raspberry Relay board makes it possible to control 4 relays using your Raspberry Pi. It can be found in the shop [http://www.bitwizard.nl/shop/raspberry-pi/rpi-relay here].<br />
== Overview ==<br />
The Raspberry Relay board can be connected to a Raspberry Pi using the 26-pin GPIO connector. The relays can be controlled using the Raspberry Pi GPIO pins. Optionally, the Pi can be powered by the micro USB port on the Relay board. This way, the connectors for power, ethernet and USB are on one side. Please note that the polyfuse will be bypassed if the Pi is powered via the Relay board. The polyfuse prevents damage when a short-circuit occurs. If you power your Raspberry Pi with batteries, it is recommended to use the regular power connector, since a short-circuit could damage the battery. The positive side of bypassing the polyfuse is that the board is less sensitive to voltage fluctuations, since the polyfuse induces a 0.2V voltage drop.<br />
<br />
== Pinout ==<br />
[[File:RPiRelayPinout.jpg|thumb|300px|alt=Pin numbering|Pin numbering of the Relay Board]]<br />
{| border=1<br />
! Pin 1 !! Pin 2 !! Pin 3 !! Pin 4 !! Pin 5 !! Pin 6 !! Pin 7 !! Pin 8 !! Pin 9 !! Pin 10 <br />
|-<br />
| Neutral || Relay 1 out || Neutral || Relay 2 out || Neutral || Relay 3 out || Neutral || Relay 4 out || Neutral || Hot <br />
|}<br />
<br />
If you want to switch mains, you should connect the 'Hot' wire to pin 10. In EU countries, this is usually the brown wire. The blue wire is the 'Neutral', and should be connected to pin 9. All other wires should be connected in the same way, so 'Neutral' to 'Neutral' and a 'Hot' wire to a relay output pin.<br />
<br />
[[File:Dsc05646_small.jpg|thumb|300px|Example configuration]]<br />
<br />
== Usage == <br />
The module can be controlled with the GPIO pins on the Pi. Set a pin high, the relay will switch on and when the pin is low the relay will switch off. The pins are wired as follows:<br />
<br />
{| border=1<br />
! Relay no. !! Pin number (by [http://elinux.org/File:RPi_P1_header.png this] scheme)!! Pin name ([http://elinux.org/File:GPIOs.png Broadcom ref.]) !! Pin name ([http://wiringpi.com/pins/ wiringPi]) <br />
|-<br />
| 1 || 11 || GPIO17 || 0 <br />
|-<br />
| 2 || 12 || GPIO18 || 1<br />
|- <br />
| 3 || 13 || GPIO21 (rev 1)/GPIO27 (rev 2) || 2<br />
|- <br />
| 4 || 15 || GPIO22 || 3<br />
|}<br />
<br />
== Examples ==<br />
=== Shell ===<br />
* First, [http://wiringpi.com/download-and-install/ install WiringPi]<br />
* Set the GPIO modes:<br />
gpio mode 0 out<br />
gpio mode 1 out<br />
gpio mode 2 out<br />
gpio mode 3 out<br />
* Enabling a relay:<br />
gpio write X 1<br />
where X is the relay number (0 to 3)<br />
* Disabling a relay:<br />
gpio write X 0<br />
For more information about the gpio utility, see [https://projects.drogon.net/raspberry-pi/wiringpi/the-gpio-utility/ this page]<br />
=== Python ===<br />
* Install the RPi.GPIO Python module:<br />
sudo apt-get install python-rpi.gpio<br />
* start the python interpreter <br />
python<br />
* or create a script<br />
nano gpio.py<br />
* The Python script should look like this:<br />
#!/usr/bin/env python<br />
#import the GPIO library<br />
import RPi.GPIO as GPIO<br />
#select the board mode pin numbering<br />
GPIO.setmode(GPIO.BOARD)<br />
#set the needed GPIO pins as output<br />
GPIO.setup(11, GPIO.OUT) #relay 1<br />
GPIO.setup(12, GPIO.OUT) #relay 2<br />
GPIO.setup(13, GPIO.OUT) #relay 3<br />
GPIO.setup(15, GPIO.OUT) #relay 4<br />
#toggle the relays<br />
GPIO.output(13,True) #Enable relay 3 <br />
GPIO.output(11,False) #Disable relay 1<br />
* For more information on the RPi.GPIO module, see [https://pypi.python.org/pypi/RPi.GPIO this page].<br />
<br />
== Datasheets ==<br />
2A SSR: [http://www.components.omron.com/components/web/pdflib.nsf/0/F1D420C93E86CDB685257201007DD5BA/$file/G3MB_0609.pdf]<br />
<br />
5A: [http://www.parallax.com/sites/default/files/downloads/27115-Single-Relay-Board-Datasheet.pdf Songle SRD-05VDC]<br />
<br />
10A: [http://www.omron.com/ecb/products/pdf/en-g5le.pdf Omron G5LE-14]</div>Sjoerd