Go to advanced search

by datanaut
Sat Feb 02, 2013 3:43 pm
Forum: Automation, sensing and robotics
Topic: 240v 500ma MOSFET questions.
Replies: 6
Views: 2843

Re: 240v 500ma MOSFET questions.

I once made some disco lights using a good old pic processor. There are some IC's that provide optical decoupling between the pi and the mains side. Here is one http://www.panasonic-electric-works.es/pewes/es/downloads/dd_x615_en_an_030.pdf You still need a triac to provide the current, and these d...
by datanaut
Fri Feb 01, 2013 6:12 pm
Forum: Automation, sensing and robotics
Topic: 240v 500ma MOSFET questions.
Replies: 6
Views: 2843

Re: 240v 500ma MOSFET questions.

I've often salvaged RELAYS out of old microwave ovens. As an example the OMRON G4W-2212P-FD-US-TV5 has a 12VDC coil and the contacts are rated 10A 250VAC/24VDC. They are also a good source for micro-switches(3) and large magnets(2) The size is approx: 30mm x 18mm x 30mm (1.125 x 0.75 x 1.125) I use...
by datanaut
Fri Feb 01, 2013 6:09 pm
Forum: Automation, sensing and robotics
Topic: 240v 500ma MOSFET questions.
Replies: 6
Views: 2843

Re: 240v 500ma MOSFET questions.

I just typed a measured and lengthy reply, but the forum ate it and presented me with a 1040 error... :x Find more room and use a mechanical relay. Seriously. We don't want to lose anyone here. Mains is alternating current, so it needs a device that can control current in two directions. A single t...
by datanaut
Fri Feb 01, 2013 2:02 am
Forum: Automation, sensing and robotics
Topic: 240v 500ma MOSFET questions.
Replies: 6
Views: 2843

240v 500ma MOSFET questions.

I want to switch a light 240 volts up to 100 watts. http://img.inkfrog.com/pix/ebayimage2012/22956.jpg I have used relays like this up till now but the size of the relay is now becoming an issue and I only have a 10mm x 20mm x 25mm space. I have searched around and it looks like a MOSFET is the way ...
by datanaut
Sun Jan 27, 2013 3:13 am
Forum: Python
Topic: Threading. Run two tasks independently
Replies: 2
Views: 2600

Re: Threading. Run two tasks independently

Datanaut, Check out the "threading" package in Python, that should do what you're looking for. Your example doesn't need it, but the queue package is very straightforward for communicating between threads. The "multiprocessing" package could be used too, but for your example I think that would be o...
by datanaut
Sat Jan 26, 2013 3:01 am
Forum: Beginners
Topic: Too few parameters for iface line.
Replies: 2
Views: 4932

Re: Too few parameters for iface line.

Maybe you need a wpa-conf? My /etc/network/interfaces looks like this auto lo iface lo inet loopback iface eth0 inet dhcp auto wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa.conf I used this to get the psk $ wpa_passphrase [ ssid ] [ passphrase ] network={ ssid="myrouter" psk=b39a79dcf4d49967xxxxxxxx...
by datanaut
Sat Jan 26, 2013 2:21 am
Forum: Python
Topic: Threading. Run two tasks independently
Replies: 2
Views: 2600

Threading. Run two tasks independently

I'm very new to python and pi. I can use this bash script to run two tasks simultaneously independent of each other #!/bin/bash /home/pi/gpio/led_Startup.py & # Blink led 1 at random /home/pi/gpio/blink_Led_1.py & # Blink led 2 at random /home/pi/relay/blink_Led_2.py & There has to be a better way w...
by datanaut
Tue Jan 22, 2013 2:31 pm
Forum: Troubleshooting
Topic: rc.local GPIO python script won't run/start
Replies: 8
Views: 8115

SOLVED rc.local GPIO python script won't run/start

SOLVED I added thease two lines of code below to the top of the rc.local file and this showed that my script was executing OK. exec 2> /tmp/rc.local.debug set -x I then looked for anything else that might affect the GPIO. I have WebIOpi ( http://code.google.com/p/webiopi/ ) installed. WebIOpi is sta...
by datanaut
Tue Jan 22, 2013 3:42 am
Forum: Troubleshooting
Topic: rc.local GPIO python script won't run/start
Replies: 8
Views: 8115

Re: rc.local GPIO python script won't run/start

GPIO python scripts must be run as root. Does rc.local run as root? Yes. The /etc/rc.local runs as the last part of the boot process before login becomes available. rc.local is owned by root and the python script it calls is executable by root as well. The rc.local also has the full path to the pyt...
by datanaut
Tue Jan 22, 2013 1:18 am
Forum: Troubleshooting
Topic: rc.local GPIO python script won't run/start
Replies: 8
Views: 8115

Re: rc.local GPIO python script won't run/start

Are you sure rc.local is running. The rc.local on my system has this comment: # In order to enable or disable this script just change the execution # bits. Make sure its executable. Could it be that simple? Maybe :) The permissions and correct. I have other scripts in rc.local that work fine. I've ...
by datanaut
Mon Jan 21, 2013 11:46 pm
Forum: Troubleshooting
Topic: rc.local GPIO python script won't run/start
Replies: 8
Views: 8115

rc.local GPIO python script won't run/start

I can't get the python script to run from rc.local at startup. The scrip runs fine from the command line Other scripts (not python - New to python and picked this up) and they work fine What am I missing? Where can I look for errors? What can I add to try and de-bug? Thanks ..... In rc.local I've tr...

Go to advanced search