Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

armorer posted:



I don't live in the sates you mentioned, so setting up something to water my plants might not carry the intended humor value. (Assuming that's where you were headed!)


Some dude on the forums is making a twitter-enabled bong

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009

ante posted:

Some dude on the forums is making a twitter-enabled bong

He finished it.

HATE TROLL TIM
Dec 14, 2006
So it turns out I *didn't* have a USB micro cable on hand. I have a bunch of what turn out to be non-standard cables that are similar to micro-B. Not all is lost, however. For the first time in history a Blackberry Storm actually did something useful! A few weeks back while cleaning out the guest room I found my fiancé's old BB charger. Micro-B connector, 700mA! Just what the r.pi needs.

I got Raspbian loaded onto an SD card, HDMI cable hooked up and it booted like a champ. I did run into an issue with my older Apple USB Keyboard; when I pressed keys sometimes they seemed to soft-stick or enter random garbage. Turns out that's the symptoms of not enough power, but it was enough to get SSH turned on. (If anyone is interested, fully powered the r.pi will put out max 140mA to each USB port.)

I've got a real, high quality USB cable coming on Monday. After reading a really good breakdown of various high quality USB chargers I've decided to power it from one of the many iPad chargers I've got sitting around. (They did show some voltage sagging [4.6V@2.3A] when pushed to the limit, but the r.pi won't draw more than 1.5A, so it should be perfect for the job.)

I also picked up a small powered hub to plug more things into.

I think one of the first projects I'm going to tackle is to design (and have printed) a case that will house the r.pi and some LiPo cells. I'm thinking four of these would work very nicely, providing 7.4v@11.6Ah (or 3.7V@23.4Ah, depending on the power circuit I build). I think that'll keep it running for several hours! I'd like to build the power control circuit and have it fully interface with the r.pi over GPIO, so it can take advantage of APM features, report battery life, perform safe shutdowns, that sort of thing.

NecroBob
Jul 29, 2003
Does anybody know of a good way to detect water levels in a smallish reservoir? I would like for it to be small, safe to put in consumable water, and discreet so that inquiring noses don't mistake it for food and eat it.

I tried two exposed tips of copper wire in the water, but they didn't conduct.

sleepy gary
Jan 11, 2006

NecroBob posted:

Does anybody know of a good way to detect water levels in a smallish reservoir? I would like for it to be small, safe to put in consumable water, and discreet so that inquiring noses don't mistake it for food and eat it.

I tried two exposed tips of copper wire in the water, but they didn't conduct.

https://www.sparkfun.com/products/10221

edit: There does not seem to be information about whether this is food safe.

sleepy gary fucked around with this message at 10:03 on Feb 23, 2013

TVarmy
Sep 11, 2011

like food and water, my posting has no intrinsic value

NecroBob posted:

Does anybody know of a good way to detect water levels in a smallish reservoir? I would like for it to be small, safe to put in consumable water, and discreet so that inquiring noses don't mistake it for food and eat it.

I tried two exposed tips of copper wire in the water, but they didn't conduct.

You'll probably need an adc (analog to digital converter) that takes the weak current between the electrodes and turns it into a serial signal the pi can understand. A digital pin needs a certain amount of current and voltage to register high, more than a weak conductor like water could deliver.

Come to think of it, you might be able to use a transistor to boost the current coming from the electrodes to see if the water is touching. I think it's npn you would want. Try that first. It's cheaper/simpler, and you can find the parts at a radio shack. Maybe two transistors could do it if one doesn't work...

Try this if you want a more polished solution. You'll need an adc, though.

Edit: Or, just put the vessel on a weight/pressure sensor and tare out the weight of the container. Divide the water's weight by whatever unit you prefer (water volume is dead simple to derive by weight in either metric or Imperial). Plus, nothing actually touches the water. A Wii Fit balance board is about $30 on ebay, probably free on Craigslist or Freecycle if you're lucky, and a bluetooth USB dongle is about $5-10. Here's a guy who made them talk on Linux: http://www.mattcutts.com/blog/linux-wii-balanceboard/ I've not seen anyone get the balance board working with the Pi, but I do see other people have the other Wii controllers working, so I don't see that being much of an issue. Plus, no wiring! If you just want the pi to tweet/play an alarm when you need to refill a container outside, you could keep the pi safely inside.

I'd probably weatherize the balance board a bit, though. Maybe put it in two or three of those big 10 gallon "storage" zip lock bags.

TVarmy fucked around with this message at 14:45 on Feb 23, 2013

NecroBob
Jul 29, 2003
DNova: Unfortunately, the datasheet said that it needs to be kept vertical and not bent, which is incompatible with the vessel I have in mind.

TVarmy: My test was a simple circuit, two AA batteries, an LED, and two open copper ends. Would a transistor be able to amplify even a really weak connection like that?

underlig
Sep 13, 2007

NecroBob posted:

DNova: Unfortunately, the datasheet said that it needs to be kept vertical and not bent, which is incompatible with the vessel I have in mind.

TVarmy: My test was a simple circuit, two AA batteries, an LED, and two open copper ends. Would a transistor be able to amplify even a really weak connection like that?
If it didn't lead current, why not do something as similarly "simple", two copper wires, one attached to something that floats (styrofoam?), floats up towards the second wire. Or do you need it to detect a low level of liquid?

eddiewalker
Apr 28, 2004

Arrrr ye landlubber

underlig posted:

If it didn't lead current, why not do something as similarly "simple", two copper wires, one attached to something that floats (styrofoam?), floats up towards the second wire. Or do you need it to detect a low level of liquid?

Like a food-grade toilet mechanism.

NecroBob
Jul 29, 2003

underlig posted:

If it didn't lead current, why not do something as similarly "simple", two copper wires, one attached to something that floats (styrofoam?), floats up towards the second wire. Or do you need it to detect a low level of liquid?

Yeah, I would like to detect a low level of liquid. Obvious physical devices in the water would not last long at all, unfortunately.

Stereotype
Apr 24, 2010

College Slice

NecroBob posted:

DNova: Unfortunately, the datasheet said that it needs to be kept vertical and not bent, which is incompatible with the vessel I have in mind.

I think you would able to put it at any orientation you want, but the readout would have to be calibrated to your vessel. You could write a pretty simple python script to do the conversion.

baka kaba
Jul 19, 2003

PLEASE ASK ME, THE SELF-PROFESSED NO #1 PAUL CATTERMOLE FAN IN THE SOMETHING AWFUL S-CLUB 7 MEGATHREAD, TO NAME A SINGLE SONG BY HIS EXCELLENT NU-METAL SIDE PROJECT, SKUA, AND IF I CAN'T PLEASE TELL ME TO
EAT SHIT

NecroBob posted:

Yeah, I would like to detect a low level of liquid. Obvious physical devices in the water would not last long at all, unfortunately.

Ok, what have you got in there. Sharks? Piranhas? Angry turtles? Genetically modified goldfish? You're being very koi about all this

NecroBob
Jul 29, 2003

baka kaba posted:

Ok, what have you got in there. Sharks? Piranhas? Angry turtles? Genetically modified goldfish? You're being very koi about all this

Zing!

I suppose I have been, my apologies. I'm thinking about making a water bowl for my dog that will let me know when I need to refill it. I know I could just look, but I think it would be a fun project to try. She's a chewer, so I need to make it as inconspicuous as possible, otherwise she will likely eat it and that would be a Bad Thing.

HATE TROLL TIM
Dec 14, 2006
What I’d do is get two pairs of copper strips and attach them down the side of the bowl. Hook that up to a simple A/D converter and just read that data over the GPIO. (I know I’ve seen adhesive metallic strips on various sites. You can get a simple Pi Plate with an A/D converter on it for cheap on eBay.)



There’s a good example for you. Alternatively, you could just use one set of copper pads and measure the resistance, it should get higher as the water level gets lower.

Edit: http://www.amazon.com/JVCC-CFL-5CA-Copper-Conductive-Adhesive/dp/B000UZ8SJK/

HATE TROLL TIM fucked around with this message at 21:23 on Feb 23, 2013

Pablo Bluth
Sep 7, 2007

I've made a huge mistake.
Some sort of pressure sensor under the base to send an alert based on weight?

Roundboy
Oct 21, 2008
Yeah i think you are looking at it wrong. I for that application I would say weight is the easiest, with a moisture sensor at the top of the bowl being second.

The weigh method has the added advantage of you watching loss over time to consumption and evaporation, and knowing exact amount to fill up

Although the real easiest method would be a bowl fed by an upside down two liter bottle where the water level of a full bowl self regulates. But i like the tinkering

Guy Axlerod
Dec 29, 2008
What about a ultrasonic range sensor mounted on the ceiling?

Or use the upside down bottle, but put the float sensor in the bottle.

eddiewalker
Apr 28, 2004

Arrrr ye landlubber

Guy Axlerod posted:

Or use the upside down bottle, but put the float sensor in the bottle.

Floating conductive ball in the bottle. Two contacts in the neck of the bottle that are bridged when the ball is at the bottom.

100 HOGS AGREE
Oct 13, 2007
Grimey Drawer
Instead of putting the sensor in the dog bowl, put it in one of these automatic waterer things http://www.amazon.com/Replendish-Wa...tic+Dog+Waterer

eddiewalker
Apr 28, 2004

Arrrr ye landlubber
Train the dog to fill his own drat water.

HATE TROLL TIM
Dec 14, 2006
Found a great deal on a Motorola Droid Bionic Lapdock! I’m going to hardwire a short, full sized USB and HDMI cable into for now until I can design a new “dock” module for it that has female ports. I’m also going to retrofit it with larger LiPo batteries. I picked it up for under $50, so I’m really pleased. This will make the perfect workstation for working with the Pi; HDMI display, full sized keyboard, mouse, two USB ports and battery A/C power! It looks like you only need one USB cable on the newer Revision 2 Pis, since power can back feed over the regular USB ports because it’s not fused. Ideally I’ll have a new cover 3D printed that flush fits to close the back up where the dock is now, just have a full sized HDMI and USB port there; keep a retractable USB and HDMI cable plugged in I’ll be good to go!

100 HOGS AGREE
Oct 13, 2007
Grimey Drawer
Looks like there's now a multiboot manager/installer for the pi, looks really useful! http://www.berryterminal.com/doku.php/berryboot

HATE TROLL TIM
Dec 14, 2006
Yeah, Berryboot is pretty neat. I’m building a FreeBSD image right now for the Pi. Once I’ve got it up and running I’ll upload it as a normal image and one that’s Berryboot compatible if anyone wants to play with it.

got dat wmd
Apr 28, 2009
I thought the Pi was a joke initially when I bought one but now I'm on my third after giving one to my father to just act as a wireless printer server and now I have one in a weatherproof box with a solar powered case to act as an always on camera on the top of my building for weatherunderground purposes and now I have another for XBMC. I also used it the other day to act as an airprint server at an internet cafe when I needed to print something from my iPad over Airprint. These drat things come in handy.

Also it's worth getting a script I can't think the name of currently that will email you the Pi's ip when it comes online so you know where to ssh into easily.

chutwig
May 28, 2001

BURLAP SATCHEL OF CRACKERJACKS

got dat wmd posted:

Also it's worth getting a script I can't think the name of currently that will email you the Pi's ip when it comes online so you know where to ssh into easily.

Personally I think that using Avahi to register the Pi in Bonjour as raspberrypi.local or something similar is a superior method, especially if you have a Mac (but you can use Avahi on Linux or Apple's Bonjour implementation for Windows, so this isn't Mac-exclusive). This blog post instructs you on how to install and configure Avahi so that you can SSH to the RPi regardless of its IP.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Are there any low-effort methods right now to hook up a capacitive touchscreen to get an almost-tablet form factor?

I could probably design something like that from scratch, but that'd be a project all to itself.

McGlockenshire
Dec 16, 2005

GOLLOCKS!
Most of the challenge is going to be finding a touchscreen with enough resolution to be worthwhile without breaking the bank.

All I want is a LCD display that can do 80x25 text...

got dat wmd
Apr 28, 2009

chutwig posted:

Personally I think that using Avahi to register the Pi in Bonjour as raspberrypi.local or something similar is a superior method, especially if you have a Mac (but you can use Avahi on Linux or Apple's Bonjour implementation for Windows, so this isn't Mac-exclusive). This blog post instructs you on how to install and configure Avahi so that you can SSH to the RPi regardless of its IP.

Yeah, that's what I did anyway for my Airprint installation but if you're using a Pi in many places, it's more useful to have the ip available immediately.

I just wish there was a way to be able to headless tell it a wifi username/password sometimes, but I guess that's impossible.

eddiewalker
Apr 28, 2004

Arrrr ye landlubber

got dat wmd posted:

I just wish there was a way to be able to headless tell it a wifi username/password sometimes, but I guess that's impossible.

You could maybe have it parse a text file on a USB stick which you edit on another computer, but that'd be annoying.

TVarmy
Sep 11, 2011

like food and water, my posting has no intrinsic value

got dat wmd posted:

Yeah, that's what I did anyway for my Airprint installation but if you're using a Pi in many places, it's more useful to have the ip available immediately.

I just wish there was a way to be able to headless tell it a wifi username/password sometimes, but I guess that's impossible.

You could use a FTDI cable hooked up to the serial port to reach the console, although that's not much more convenient than just hooking it up to a keyboard and screen.

HATE TROLL TIM
Dec 14, 2006
Why not just connect the Ethernet to your laptop?

HATE TROLL TIM
Dec 14, 2006
I got FreeBSD built from -CURRENT sources and booting on the rpi. I’m working on getting X11 running. It looks like it’s detecting the GPIO, but I don’t have any way to try it out right now. (I have a breadboard and some other supplies coming.) I’m going to start fixing bugs and submitting patches to help get this into a real release. I’m setting up my server to do nightly builds and I’ll post information for that once it’s running, but in the mean time here’s a working build!

Download: FreeBSD-HEAD ARMv6 (10.0 R247277)
SHA256: 3d9df2a8d5c15b2ecdd5762cf48ad04783e31a23d23672b10c63d5c23725ee89



Default Login/Password: pi/raspberry

code:
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2013 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.0-CURRENT #3 r247277: Mon Feb 25 14:32:30 EST 2013
    root@builder:/root/FreeBSD/obj/arm.armv6/root/FreeBSD/head/sys/RPI-B arm
gcc version 4.2.1 20070831 patched [FreeBSD]
CPU: ARM1176JZ-S rev 7 (ARM11J core)
 Supported features: ARM_ISA THUMB2 JAZELLE ARMv4 Security_Ext
 WB enabled LABT branch prediction enabled
  16KB/32B 4-way instruction cache
  16KB/32B 4-way write-back-locking-C data cache
real memory  = 536870912 (512 MB)
avail memory = 385839104 (367 MB)
kbd0 at kbdmux0
simplebus0: <Flattened device tree simple bus> mem 0xf2000000-0xf2ffffff on fdtbus0
intc0: <BCM2835 Interrupt Controller> mem 0xf200b200-0xf200b3ff on simplebus0
systimer0: <BCM2835 System Timer> mem 0xf2003000-0xf2003fff irq 8,9,10,11 on simplebus0
Event timer "BCM2835 Event Timer 3" frequency 1000000 Hz quality 1000
Timecounter "BCM2835 Timecounter" frequency 1000000 Hz quality 1000
bcmwd0: <BCM2708/2835 Watchdog> mem 0xf210001c-0xf2100027 on simplebus0
gpio0: <BCM2708/2835 GPIO controller> mem 0xf2200000-0xf22000af irq 57,59,58,60 on simplebus0
gpio0: read-only pins: 46,47,48,49,50,51,52,53.
gpio0: reserved pins: 48,49,50,51,52,53.
gpioc0: <GPIO controller> on gpio0
gpiobus0: <GPIO bus> on gpio0
mbox0: <BCM2835 VideoCore Mailbox> mem 0xf200b880-0xf200b8bf irq 1 on simplebus0
mbox0: [GIANT-LOCKED]
sdhci_bcm0: <Broadcom 2708 SDHCI controller> mem 0xf2300000-0xf23000ff irq 70 on simplebus0
bcm_sdhci_attach(): SDHCI frequency: 100MHz
mmc0: <MMC/SD bus> on sdhci_bcm0
uart0: <PrimeCell UART (PL011)> mem 0xf2201000-0xf2201fff irq 65 on simplebus0
dwcotg0: <DWC OTG 2.0 integrated USB controller> mem 0xf2980000-0xf299ffff irq 17 on simplebus0
usbus0 on dwcotg0
fb0: <BCM2835 framebuffer device> on fdtbus0
sc0: Unknown <16 virtual consoles, flags=0x300>
Timecounters tick every 10.000 msec
usbus0: 480Mbps High Speed USB v2.0
ugen0.1: <DWCOTG> at usbus0
uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
mmcsd0: 1886MB <SD SU02G 8.0 SN 552856534 MFG 01/2012 by 3 SD> at mmc0 25.0MHz/4bit/65535-block
fb0: 1824x984(0x0@0,0) 16bpp
fb0: pitch 3648, base 0x58006000, screen_size 3618816
Root mount waiting for: usbus0
uhub0: 1 port with 1 removable, self powered
Root mount waiting for: usbus0
ugen0.2: <vendor 0x0424> at usbus0
uhub1: <vendor 0x0424 product 0x9512, class 9/0, rev 2.00/2.00, addr 2> on usbus0
uhub1: MTT enabled
uhub1: 3 ports with 2 removable, self powered
Root mount waiting for: usbus0
ugen0.3: <vendor 0x0424> at usbus0
smsc0: <vendor 0x0424 product 0xec00, rev 2.00/2.00, addr 3> on usbus0
Trying to mount root from ufs:/dev/mmcsd0s2a [rw,noatime]...
warning: no time-of-day clock registered, system time will not be set accurately
smsc0: chip 0xec00, rev. 0002
miibus0: <MII bus> on smsc0
ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus0
ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ue0: <USB Ethernet> on smsc0
ue0: Ethernet address: b8:27:eb:6b:a8:18
smsc0: chip 0xec00, rev. 0002

Goon Matchmaker
Oct 23, 2003

I play too much EVE-Online
This is impressive. Thanks for posting the build.

HATE TROLL TIM
Dec 14, 2006
Oh, there’s also an unofficial pkg repository that’s been setup since building from ports on the rpi would be painfully slow. You’ll need to bootstrap it with pkg-static.

code:
 # echo 'PACKAGESITE: http://people.freebsd.org/~gonzo/arm/pkg/' > /usr/local/etc/pkg.conf 
 # fetch -o pkg.txz http://people.freebsd.org/~gonzo/arm/pkg/pkg-1.0.4_1.txz
 # ./pkg-static add pkg-1.0.4_1.txz
https://github.com/daveish/freebsd-arm-tools

http://kernelnomicon.org/?p=261

HATE TROLL TIM fucked around with this message at 04:35 on Feb 26, 2013

HATE TROLL TIM
Dec 14, 2006
My Lapdock came in today and I’ve got to say, this thing is really well built. Now the long wait for the adapters to come in from China… :sigh:

This thing is really going to be useful though, I can already tell. Dedicated display, keyboard, mouse, USB hub *and* it powers the RPi through the upstream USB port? It’s like this thing was made to use with an RPi.

TVarmy
Sep 11, 2011

like food and water, my posting has no intrinsic value

This is kind of a noobish question, but I'm noticing my Raspberry Pi slowly fills up its memory as it runs over the course of several days, according to free -h.

I don't know how Linux allocates/deallocates memory. Is the used memory not all being actively used and some of it having the potential to be recycled if need be? Or is something leaking memory and I need to fix that?

Over the course of staying on for ~two-three weeks, it started running low on ram (~410 used of ~430MB) and responding slowly over SSH. If the two issues are related, is there any way I could start working on diagnosing this?

EDIT: I was running screen, IRSSI, and an Apache webserver to host a GPIO controlling web app I made.

Longinus00
Dec 29, 2005
Ur-Quan

TVarmy posted:

This is kind of a noobish question, but I'm noticing my Raspberry Pi slowly fills up its memory as it runs over the course of several days, according to free -h.

I don't know how Linux allocates/deallocates memory. Is the used memory not all being actively used and some of it having the potential to be recycled if need be? Or is something leaking memory and I need to fix that?

Over the course of staying on for ~two-three weeks, it started running low on ram (~410 used of ~430MB) and responding slowly over SSH. If the two issues are related, is there any way I could start working on diagnosing this?

EDIT: I was running screen, IRSSI, and an Apache webserver to host a GPIO controlling web app I made.

Post your output when you run free. The first line of free includes memory used by the disk cache and buffers into the "used" number. If you really are running out of memory then post the output of this as well "ps aux | sort -n -k 6 -r | head".

Geektox
Aug 1, 2012

Good people don't rip other people's arms off.
Where's the best place to buy these from in Canada? It seems all the retailers on the official site ship from the US and it'd be lame to get nailed on Customs fees.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Where in Canada?

Adbot
ADBOT LOVES YOU

Geektox
Aug 1, 2012

Good people don't rip other people's arms off.

ante posted:

Where in Canada?

Vancouver

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply