Pages

Thursday, 25 October 2012

em28xx - RPi - archlinux-hf-2012-09-18

N.B. This doesn't work

Second attempt with a em28xx on Raspberry Pi... I'm so fucking bored of this not working I decided to do it again.


This is largely based on the first attempt...

http://bufobufomagic.blogspot.co.uk/2012/07/make-disk-image-mac-diskutil-list-sudo.html



 

build SD card (on a mac) and, probably, make it work


diskutil list

sudo diskutil unmountDisk /dev/disk1

dd if=/Users/michael/Desktop/RaspberryPi/Images/archlinux-hf-2012-09-18.img of=/dev/disk1 bs=1m


muck about with partitions - i expand the arch linux partition to 4Gb and call the remainder of the drive fat32.

fiddle with boot partition memory elves - rename original start elf and copy the 240 start elf as start.elf



then insert card, boot RPi and watch the LEDs dance about while you find it on the network.



mine was 85...

ssh 192.168.1.85 -l root (password root)

if this isn't your first time round the loop you might get a load of key verification errors, so do

ssh-keygen -R 192.168.1.85

and try again.

 
it is plugged in, right?

set up stuffs

swapdisk-u-like


mkdir -p /var/cache/swap/

dd if=/dev/zero of=/var/cache/swap/swapfile bs=1M count=1024

chmod 0600 /var/cache/swap/swapfile 
mkswap /var/cache/swap/swapfile
 
swapon /var/cache/swap/swapfile
put it in fstab, if you want to...
 
echo "/var/cache/swap/swapfile    none    swap    sw    0   0" >> /etc/fstab


...otherwise just remember to check it's on before you make the kernel.









upgradings






// if you like progress bars, this will give you the horn.

pacman -Syuand open a bottle of red wine.


install stuff

// because you want stuff

pacman -S ffmpeg motion git base-devel python2


Shall we reboot? Wouldn't be a bad idea. It will be nice to see it boot in a working state one more time...

do a kernel

get the kernel source


// are you doing this for fun? - because it isn't.





cd /home

git clone --depth 1 https://github.com/raspberrypi/linux.git

cd linux

zcat /proc/config.gz > .config



make menuconfig
( it appears i2c and em28xx stuff is all there now, but you can have a look for yourself)

muck about with the kernel


This is where you patch em28xx... https://patchwork.kernel.org/patch/1309461/

diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c
index de2cb20..bed07a6 100644
--- a/drivers/media/video/em28xx/em28xx-core.c
+++ b/drivers/media/video/em28xx/em28xx-core.c
@@ -785,12 +785,8 @@ int em28xx_resolution_set(struct em28xx *dev)
     else
         dev->vbi_height = 18;

-    if (!dev->progressive)
-        height >>= norm_maxh(dev);
-
     em28xx_set_outfmt(dev);

-
     em28xx_accumulator_set(dev, 1, (width - 4) >> 2, 1, (height - 4) >> 2);

     /* If we don't set the start position to 2 in VBI mode, we end up

make the kernel

// I know we've been here before, just try and think positively

make



cd ..
 

git clone https://github.com/raspberrypi/tools

python2 imagetool-uncompressed.py /home/linux/arch/arm/boot/Image

mv /boot/kernel.img /boot/kernel.old


cp kernel.img /boot/kernel.img

cd /home/linux

make modules_install

reboot





ERRORS!


motion grumbles with;

[1] Unable to query input 1 VIDIOC_ENUMINPUT: Invalid argument
[1] ioctl (VIDIOCGCAP): Inappropriate ioctl for device
[1] Could not fetch initial image from camera
 




I suspect this is something to do with the wrong card id...

[    4.504130] em28xx #0: Your board has no unique USB ID and thus need a hint to be detected.
 

Here are the choices;

[    4.504215] em28xx #0: Here is a list of valid choices for the card=<n> insmod option:
[    4.504232] em28xx #0:     card=0 -> Unknown EM2800 video grabber
[    4.504248] em28xx #0:     card=1 -> Unknown EM2750/28xx video grabber
[    4.504264] em28xx #0:     card=2 -> Terratec Cinergy 250 USB
[    4.504279] em28xx #0:     card=3 -> Pinnacle PCTV USB 2
[    4.504293] em28xx #0:     card=4 -> Hauppauge WinTV USB 2
[    4.504307] em28xx #0:     card=5 -> MSI VOX USB 2.0
[    4.504321] em28xx #0:     card=6 -> Terratec Cinergy 200 USB
[    4.504335] em28xx #0:     card=7 -> Leadtek Winfast USB II
[    4.504350] em28xx #0:     card=8 -> Kworld USB2800
[    4.504365] em28xx #0:     card=9 -> Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker / Kworld DVD Maker 2
[    4.504386] em28xx #0:     card=10 -> Hauppauge WinTV HVR 900
[    4.504401] em28xx #0:     card=11 -> Terratec Hybrid XS
[    4.504415] em28xx #0:     card=12 -> Kworld PVR TV 2800 RF
[    4.504429] em28xx #0:     card=13 -> Terratec Prodigy XS
[    4.504445] em28xx #0:     card=14 -> SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0
[    4.504462] em28xx #0:     card=15 -> V-Gear PocketTV
[    4.504476] em28xx #0:     card=16 -> Hauppauge WinTV HVR 950
[    4.504490] em28xx #0:     card=17 -> Pinnacle PCTV HD Pro Stick
[    4.504506] em28xx #0:     card=18 -> Hauppauge WinTV HVR 900 (R2)
[    4.504521] em28xx #0:     card=19 -> EM2860/SAA711X Reference Design
[    4.504537] em28xx #0:     card=20 -> AMD ATI TV Wonder HD 600
[    4.504552] em28xx #0:     card=21 -> eMPIA Technology, Inc. GrabBeeX+ Video Encoder
[    4.504569] em28xx #0:     card=22 -> EM2710/EM2750/EM2751 webcam grabber
[    4.504585] em28xx #0:     card=23 -> Huaqi DLCW-130
[    4.504599] em28xx #0:     card=24 -> D-Link DUB-T210 TV Tuner
[    4.504613] em28xx #0:     card=25 -> Gadmei UTV310
[    4.504628] em28xx #0:     card=26 -> Hercules Smart TV USB 2.0
[    4.504643] em28xx #0:     card=27 -> Pinnacle PCTV USB 2 (Philips FM1216ME)
[    4.504659] em28xx #0:     card=28 -> Leadtek Winfast USB II Deluxe
[    4.504675] em28xx #0:     card=29 -> EM2860/TVP5150 Reference Design
[    4.504690] em28xx #0:     card=30 -> Videology 20K14XUSB USB2.0
[    4.504705] em28xx #0:     card=31 -> Usbgear VD204v9
[    4.504719] em28xx #0:     card=32 -> Supercomp USB 2.0 TV
[    4.504733] em28xx #0:     card=33 -> Elgato Video Capture
[    4.504748] em28xx #0:     card=34 -> Terratec Cinergy A Hybrid XS
[    4.504763] em28xx #0:     card=35 -> Typhoon DVD Maker
[    4.504777] em28xx #0:     card=36 -> NetGMBH Cam
[    4.504790] em28xx #0:     card=37 -> Gadmei UTV330
[    4.504804] em28xx #0:     card=38 -> Yakumo MovieMixer
[    4.504817] em28xx #0:     card=39 -> KWorld PVRTV 300U
[    4.504832] em28xx #0:     card=40 -> Plextor ConvertX PX-TV100U
[    4.504846] em28xx #0:     card=41 -> Kworld 350 U DVB-T
[    4.504860] em28xx #0:     card=42 -> Kworld 355 U DVB-T
[    4.504875] em28xx #0:     card=43 -> Terratec Cinergy T XS
[    4.504890] em28xx #0:     card=44 -> Terratec Cinergy T XS (MT2060)
[    4.504905] em28xx #0:     card=45 -> Pinnacle PCTV DVB-T
[    4.504919] em28xx #0:     card=46 -> Compro, VideoMate U3
[    4.504934] em28xx #0:     card=47 -> KWorld DVB-T 305U
[    4.504948] em28xx #0:     card=48 -> KWorld DVB-T 310U
[    4.504962] em28xx #0:     card=49 -> MSI DigiVox A/D
[    4.504976] em28xx #0:     card=50 -> MSI DigiVox A/D II
[    4.504990] em28xx #0:     card=51 -> Terratec Hybrid XS Secam
[    4.505005] em28xx #0:     card=52 -> DNT DA2 Hybrid
[    4.505019] em28xx #0:     card=53 -> Pinnacle Hybrid Pro
[    4.505033] em28xx #0:     card=54 -> Kworld VS-DVB-T 323UR
[    4.505048] em28xx #0:     card=55 -> Terratec Cinnergy Hybrid T USB XS (em2882)
[    4.505064] em28xx #0:     card=56 -> Pinnacle Hybrid Pro (330e)
[    4.505079] em28xx #0:     card=57 -> Kworld PlusTV HD Hybrid 330
[    4.505094] em28xx #0:     card=58 -> Compro VideoMate ForYou/Stereo
[    4.505109] em28xx #0:     card=59 -> (null)
[    4.505123] em28xx #0:     card=60 -> Hauppauge WinTV HVR 850
[    4.505138] em28xx #0:     card=61 -> Pixelview PlayTV Box 4 USB 2.0
[    4.505153] em28xx #0:     card=62 -> Gadmei TVR200
[    4.505167] em28xx #0:     card=63 -> Kaiomy TVnPC U2
[    4.505181] em28xx #0:     card=64 -> Easy Cap Capture DC-60
[    4.505196] em28xx #0:     card=65 -> IO-DATA GV-MVP/SZ
[    4.505210] em28xx #0:     card=66 -> Empire dual TV
[    4.505223] em28xx #0:     card=67 -> Terratec Grabby
[    4.505237] em28xx #0:     card=68 -> Terratec AV350
[    4.505252] em28xx #0:     card=69 -> KWorld ATSC 315U HDTV TV Box
[    4.505267] em28xx #0:     card=70 -> Evga inDtube
[    4.505281] em28xx #0:     card=71 -> Silvercrest Webcam 1.3mpix
[    4.505296] em28xx #0:     card=72 -> Gadmei UTV330+
[    4.505310] em28xx #0:     card=73 -> Reddo DVB-C USB TV Box
[    4.505325] em28xx #0:     card=74 -> Actionmaster/LinXcel/Digitus VC211A
[    4.505340] em28xx #0:     card=75 -> Dikom DK300
[    4.505354] em28xx #0:     card=76 -> KWorld PlusTV 340U or UB435-Q (ATSC)
[    4.505371] em28xx #0:     card=77 -> EM2874 Leadership ISDBT
[    4.505386] em28xx #0:     card=78 -> PCTV nanoStick T2 290e
[    4.505400] em28xx #0:     card=79 -> Terratec Cinergy H5
[    4.505415] em28xx #0:     card=80 -> PCTV DVB-S2 Stick (460e)






It's supposedly a kworld 2800USB, so i'll try 8

modprobe -r em28xx
modprobe em28xx card=8


doesn't work, hangs on Resizing pre_capture buffer to 1 items - which i think is an improvement. card=19 doesn't work either, same error - although i have a feeling that's how it has turned up in the past.







New drivers?

cd /home

mkdir stuff

wget http://aur.archlinux.org/packages/pe/perl-proc-processtable/perl-proc-processtable.tar.gz


wget http://aur.archlinux.org/packages/pe/perl-proc-processtable/PKGBUILD

makepkg --asroot -s

pacman -U perl-proc-processtable-0.45-3-any.pkg.tar.xz

pacman -S patchutils

cd /home

git clone git://linuxtv.org/media_build.git

cd media_build

./build


the build failed on smiapp-core.c
at this point I  make menuconfig and start removing stuff
then try to make it again.

make install 


 this seemed to work now

reboot 


but the driver still doesn't. I'm giving up on this board for a while.

Monday, 22 October 2012

Cue light repeater

A cue light repeater

a photo transistor;

http://uk.farnell.com/vishay/tept5600/phototransistor-sensor-ambient/dp/1497673

a red led

http://uk.farnell.com/cml-innovative-technologies/cmd5055/led-5mm-red/dp/1139562


some circuit diagrams;

http://home.cogeco.ca/~rpaisley4/PhotoDetectors.html


When the male XLR shell housing the photo transistor is mounted over a cue light, and the cue light comes on, then the LED comes on.



Monday, 3 September 2012

enabling the gpio on the beaglebone

Currently in the process of building the hardware for the first beaglebone bufocam. The 1-wire and RTC clock have been mounted on some prototyping board (ebay). Cheapest supplier I found for board headers was rapid electronics - buy the larger ones and cut them down.

I want to add a couple of LED's to the inside of the box to give some user feedback that something is really happening. There are lots of guides already for this;

http://www.nathandumont.com/node/250
http://ninjablocks.com/blog/2012/1/20/setting-up-gpio-on-the-beaglebone.html
http://www.youtube.com/watch?v=SaIpz00lE84&feature=fvwrel

http://akademii.blogspot.co.uk/2012/02/beaglebone-gpio-testing.html
http://blog.makezine.com/2009/02/03/blinking-leds-with-the-beagle-board/

Monday, 6 August 2012

stk1160 driver on beaglebone

Had another look at this

There's a branch of STK1160 for the raspberry pi, and that works for the beaglebone

(think all the AC97 has been commented out)

it's here - https://github.com/piotr-e/stk1160-raspberrypi

(some history of it -  https://github.com/ezequielgarcia/stk1160-standalone/issues/8 )


It still exhibits the same picture breakup as seen on the RPi - but I've checked my DMA fix ... and it hasn't been, so that's my first step; (Disable USB DMA at drivers->USB support->Inventra-> select [*] Disable DMA) http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/791/t/185953.aspx


Disable DMS makes it worse; the picture is a horrible mess now!

=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Attempt to build the updated easycap driver stk1160 from Ezequiel Garcia.

http://easycap.blogspot.com.ar/2012/07/new-driver-for-easycap-dc60-stk1160.html

https://github.com/ezequielgarcia/stk1160-standalone/tree/0.9.4_v3.2


need kernel sources to build it on beaglebone - trying to create them using this method;


git clone git://github.com/RobertCNelson/linux-dev.git
cd linux-dev
git checkout origin/am33x-v3.2 -b am33x-v3.2
./build_kernel.sh


from http://elinux.org/BeagleBoardUbuntu#BeagleBone



exciting highlights;

arch/arm/configs/omap2plus_defconfig:244:warning: unexpected data # # configuration written to .config # `.config' -> `/home/michael/beaglebone/linux-dev/patches/ref_omap2plus_defconfig' `/home/michael/beaglebone/linux-dev/patches/defconfig' -> `.config' HOSTCC scripts/kconfig/lxdialog/checklist.o HOSTCC scripts/kconfig/lxdialog/inputbox.o HOSTCC scripts/kconfig/lxdialog/menubox.o HOSTCC scripts/kconfig/lxdialog/textbox.o HOSTCC scripts/kconfig/lxdialog/util.o HOSTCC scripts/kconfig/lxdialog/yesno.o HOSTCC scripts/kconfig/mconf.o HOSTLD scripts/kconfig/mconf scripts/kconfig/mconf Kconfig *** End of the configuration. *** Execute 'make' to start the build or try 'make help'. `.config' -> `/home/michael/beaglebone/linux-dev/patches/defconfig' make -j2 ARCH=arm LOCALVERSION=-psp20 CROSS_COMPILE="ccache arm-linux-gnueabihf-" zImage modules scripts/kconfig/conf --silentoldconfig Kconfig

I'm using the machine in my loft to build all this, because (being an ubuntu 12.04 server) it was easier to install the cross compiler toolchain. Seemed to be as easy as sudo apt-get install gcc-arm-linux-gnueabihf

found some files that look like source in /KERNEL and some headers and a zImage in /deploy... looks like the kernel i've made isn't the one i'm using on the beaglebone (not very surprising). I've made a uImage from the new zImage and will see what happens.

Found the command below at http://eewiki.net/display/linuxonarm/BeagleBone

mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux" -d ./linux-dev/deploy/3.2.21-psp16.zImage ./uImage

Wednesday, 1 August 2012

1-wire and blinking LEDs

Not much progress tonight. I got distracted looking at opencv/simplecv - which is something that interests me for the future - and I think I may have broken motion/ffmpeg in the process of trying to install opencv with ffmpeg and python support. I've built a new image and have disabled creating ffmpeg videos to be on the safe side. (I'm not really interested in video footage, but I'm quite interested in stability). I hasn't crashed yet since. (still running at 720x576).

I have been looking at 1wire for humidity and temperature monitors. I don't think I'm feeling bold enough to attempt anything like http://dominion.thruhere.net/koen/cms/using-1-wire-on-a-beaglebone
ultimately this, or something like it (I2C?) is going to make the device £20 cheaper.... but in terms of simplicity I want to see it working first with something like the DS9094 http://www.sheepwalkelectronics.co.uk/products-adapters.shtml

useful?
http://apartment-automation.blogspot.co.uk/2009/09/installing-1-wire-usb-adapter-ds9490r.html

Currently the SWE3 module from http://www.sheepwalkelectronics.co.uk/SWE3.shtml looks favorite, with a DS18S20 sensor (http://www.sheepwalkelectronics.co.uk/products-components.shtml) wired directly into the 3way terminal block on the board to create a dual temp/humidity unit. The IR led lighting can live on this module too and take power from the cat5.



Afterwards, I made LED 3 turn on and off

echo 0 > /sys/class/leds/beaglebone\:\:usr3/brightness 
echo 1 > /sys/class/leds/beaglebone\:\:usr3/brightness 


RTC on i2c


Instructions for the DS1307 below, step one is build the thing;

 http://adafruit.com/product/264
http://www.ladyada.net/learn/breakoutplus/ds1307rtc.html

http://datasheets.maxim-ic.com/en/ds/DS1307.pdf

Then buy this (should have used the

http://proto-pic.co.uk/pca9306-level-translator-breakout/

(set EN high)
connect them all together;



(The 1-wire thermometer can just be seen at the bottom of the breadboard)

L@@K! something (hopefully the DS1307) is at address 0x68.


root@omap:/home# i2cdetect -r -y 3    

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                      



The DS1307 didn't seem to burst into life until you set it... I would probably know that if I read the friendly manual. I seem to be able to set the seconds byte to 00x0 with


i2cset -y 3 0x68 0x00 0x00


and a couple of seconds later 0x00 is 02... so I think it's working. Note to self - need to refine this to actually set/read the time.

i2cdump -y 3 0x68


No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 02 00 00 01 01 01 00 03 07 01 40 30 40 0d 26 70    ?..???.???@0@?&p
10: 98 03 10 50 83 89 18 1d 1c 01 0c 08 0c 12 00 20    ???P??????????. 
20: 1e 6a 10 f0 60 52 82 61 47 81 63 10 80 30 04 39    ?j??`R?aG?c??0?9
30: 2e 38 8a 04 ec 88 c0 20 01 20 20 56 40 d0 24 95    .8????? ?  V@?$?
40: 02 00 00 01 01 01 00 03 07 01 40 30 40 0d 26 70    ?..???.???@0@?&p
50: 98 03 10 50 83 89 18 1d 1c 01 0c 08 0c 12 00 20    ???P??????????. 
60: 1e 6a 10 f0 60 52 82 61 47 81 63 10 80 30 04 39    ?j??`R?aG?c??0?9
70: 2e 38 8a 04 ec 88 c0 20 01 20 20 56 40 d0 24 95    .8????? ?  V@?$?
80: 02 00 00 01 01 01 00 03 07 01 40 30 40 0d 26 70    ?..???.???@0@?&p
90: 98 03 10 50 83 89 18 1d 1c 01 0c 08 0c 12 00 20    ???P??????????. 
a0: 1e 6a 10 f0 60 52 82 61 47 81 63 10 80 30 04 39    ?j??`R?aG?c??0?9
b0: 2e 38 8a 04 ec 88 c0 20 01 20 20 56 40 d0 24 95    .8????? ?  V@?$?
c0: 02 00 00 01 01 01 00 03 07 01 40 30 40 0d 26 70    ?..???.???@0@?&p
d0: 98 03 10 50 83 89 18 1d 1c 01 0c 08 0c 12 00 20    ???P??????????. 
e0: 1e 6a 10 f0 60 52 82 61 47 81 63 10 80 30 04 39    ?j??`R?aG?c??0?9
f0: 2e 38 8a 04 ec 88 c0 20 01 20 20 56 40 d0 24 95    .8????? ?  V@?$?


lots of numbers....

getting the time out of the ds1307 looks like it's going to be easier than i thought


echo ds1307 0x68 >/sys/bus/i2c/devices/i2c-3/new_device

or

echo ds1307 0x68>/sys/devices/platform/omap/omap_i2c.3/i2c-3/

both these seem to work, and it also seems this information can be found at  /sys/class/i2c-adapter/i2c-3/

There's a driver in the kernel for the ds1307, so getting the time is seemingly as straight forward as; 

hwclock -f /dev/rtc1 --set --date="8/11/2012 21:31"

I had some problems with the hours last night - either it was me, or whatever time zone i'm in (haven't set any locale data yet) or the bits for 24h/12h on the ds1307 (see datasheet).

so look there for a fuller explaination - but here are the useful commands I need for my own reference;
Read time from hwclock;
hwclock -f /dev/rtc1 -r
Set system time from hwclock;
hwclock -f /dev/rtc1 -s
Write system time to the hwclock
hwclock -f /dev/rtc1 -w


Looking into getting this to work on startup next...

got some advice here;

https://groups.google.com/forum/?fromgroups#!topic/beagleboard/DegreEdtI-Q%5B1-25%5D

Which seems to work.
I think this should set the right time and write it to the hwclock

dpkg-reconfigure tzdata
ntpdate ntp.ubuntu.com
hwclock -f /dev/rtc0 -w


1 wire


Datasheet for DS9094;
http://www.sheepwalkelectronics.co.uk/datasheets/DS9490-DS9490R.pdf 

pinout for DS9094;


pinout for RJ45;


The humidity module SWE3 from sheepwalk (http://www.sheepwalkelectronics.co.uk/SWE3.shtml) has two rj45 sockets - I'm going to use one of these at the host end to build a RJ12 - RJ45 adapter. Pins 4 and 5 will come from the 1wire host RJ12 socket but this adapter doesn't provide enough power to drive the IR leds so my RJ45 adapter is going to inject 5v from the regulator.


Image of the SWE3 from sheepwalkelectronics.co.uk - the terminal block is where the temperature sensor will be mounted.

Having built my RJ12 -> RJ45 adaptor I dmesg, and have just spied;

[ 1.827064] BeagleBone cape: initializing w1-gpio
[ 1.832094] w1-gpio connected to P8_6


This implies to me that the ubuntu 12.04 already has the 1wire patch and I don't need my USB host!? Looking at the comments at http://dominion.thruhere.net/koen/cms/using-1-wire-on-a-beaglebone leads me to believe I probably should have expected than...

last comment regarding the 4k7 pull up seems pertinent too.


...Found two approx. 10k resistors in the loft! Hooking up to P8_6 does indeed work.


root@omap:~# cat /sys/bus/w1/devices/10-000802307b83/w1_slave 
31 00 4b 46 ff ff 01 10 27 : crc=27 YES
31 00 4b 46 ff ff 01 10 27 t=24687

cat /sys/bus/w1/devices/10-000802307b83/w1_slave | tail -n1 | awk -F= '{print $2/1000 " degrees Celsius"}'
24.625 degrees Celsius

A comfortable 24.635 C°.


I need to do some homework before I hook up the humidity sensor as 3.3v is outside the voltage range of the 4031. Looks like I might be able to replace it with the 5031;

http://uk.farnell.com/jsp/search/productdetail.jsp?sku=1784721

I've have to do some homework/ read the datasheet.
http://sensing.honeywell.com/index.php/ci_id/49692/la_id/1/document/1/re_id/0


Voltage supply 2.7 - 5.5 Vdc

Current supply 200 - 500 uA

Voltage output (1st order curve fit) VOUT=(VSUPPLY)(0.00636(sensor RH) + 0.1515), typical at 25 C

Temperature compensation True RH = (Sensor RH)/(1.0546  0.00216T), T in  C



NB The ADC may lose accuracy at 3.3v... so maybe some more bidirectional level conversion is better?

This looks a bit like the SWE3 circuit to me;
http://owfs.org/uploads/File/humsensor.pdf
note the True RH calculation above for the 5031 differs from the information in the sidebar for the other chip.


Further reading


Application notes on 1-wire
http://www.maxim-ic.com/app-notes/index.mvp/id/148


References/ Acknowledgements

Invaluable 1-wire info;
http://dominion.thruhere.net/koen/cms/using-1-wire-on-a-beaglebone

Great i2c beaglebone tutorial;
http://www.youtube.com/watch?v=8C2zk6B-eLU

another RTC resource
http://wiki.glacsweb.info/index.php?title=Beaglebone&redirect=no

Monday, 30 July 2012

Hardware




  1. Raspberry Pi
  2. BeagleBone
  3. syntek/'easycap' capture device
  4. em28xx capture devices
  5. 5v regulator
  6. SD card reader
  7. Multimeter

The bullet camera is mostly obscured by an elephant.
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License