Go to advanced search

by IanS
Wed Sep 07, 2016 10:04 am
Forum: Automation, sensing and robotics
Topic: Draw Wire Sensor
Replies: 3
Views: 1052

Re: Draw Wire Sensor

I have been looking to solve a mechanically similar problem in looking to measure the angle a rotatable pedal has been pushed through. I have also considered rotary encoders, but getting them mounted on-axis is tricky. High resolution ones are not cheap either. The simplest way I have seen so far ca...
by IanS
Tue Sep 06, 2016 1:04 pm
Forum: Automation, sensing and robotics
Topic: Controlling Pi rover over a hosted html page
Replies: 1
Views: 605

Re: Controlling Pi rover over a hosted html page

Try looking into hostapd, then you can set up the RPi (either a v3 or one with a suitable USB WiFi adapter) as the access point and use a mobile device to connect to it.
by IanS
Tue Sep 06, 2016 12:51 pm
Forum: Graphics, sound and multimedia
Topic: Amplifier Issues
Replies: 2
Views: 708

Re: Amplifier Issues

You have tested some components successfully, so it must come down to what is left: the power supply or the amp. The amp is capable of 2x 3.7W output, so nearly 8W total, and allowing for losses that probably needs 10W input power. 10W / 5V = 2A. Are you using a PSU that is capable of 2 amps output?...
by IanS
Thu Sep 01, 2016 12:04 pm
Forum: Networking and servers
Topic: openflow switch error
Replies: 1
Views: 535

Re: openflow switch error

Try
sudo apt-get install raspberrypi-kernel raspberrypi-kernel-headers
by IanS
Thu Aug 11, 2016 7:52 pm
Forum: Graphics, sound and multimedia
Topic: Question about audio amp board
Replies: 5
Views: 1297

Re: Question about audio amp board

How to deal with the outputs from a class D amplifier, which is what the PAM8403 is, has been dealt with on at least two existing threads. The simple answer is that these amps should not be used with headphones. However, for one possible way, see http://electronics.stackexchange.com/questions/149687...
by IanS
Fri Jul 22, 2016 10:41 am
Forum: Automation, sensing and robotics
Topic: Raspberry Pi as a motor controller and counter
Replies: 8
Views: 2441

Re: Raspberry Pi as a motor controller and counter

If you go down the route of using an Arduino for the raw motor control, interfaced to the RPi, then take a look at AccelStepper. I have no personal experience with it but came across it while looking for something similar purely RPi based. It seems to have all the features you need. Also, have you c...
by IanS
Fri Jul 22, 2016 10:17 am
Forum: Python
Topic: self-activating buttons
Replies: 14
Views: 1806

Re: self-activating buttons

Zesid,
Why not just wrap your whole try block in a never-ending loop?
If there is a real button press then the shutdown will end up killing the program, otherwise it just goes round again until another edge trigger occurs.

Ian
by IanS
Wed Jun 08, 2016 1:03 pm
Forum: Graphics, sound and multimedia
Topic: Get max resolution of webcam?
Replies: 4
Views: 12095

Re: Get max resolution of webcam?

If you search online for the WD108 camera (e.g. https://www.amazon.com/Megapixel-Webcam-microphone-notebook-camera/dp/B01DVTCFYA?ie=UTF8&*Version*=1&*entries*=0) you can find the word 'interpolated' in the resolution description. This means that the (probably Windows only) driver guesses an addition...
by IanS
Fri Jun 03, 2016 8:28 am
Forum: Python
Topic: Optimization in Python
Replies: 4
Views: 1304

Re: Optimization in Python

As dasmanul mentioned, you can optimise your loops. You are also working out the function total twice, so you are doubling the work. An optimising compiler might sort this out for you, but I do not think python does. for i in xrange( 0, NINDEX+1): for j in xrange( 0, NINDEX+1-i): k = NINDEX - (i+j) ...
by IanS
Wed May 25, 2016 1:04 pm
Forum: Automation, sensing and robotics
Topic: GPIO Input
Replies: 12
Views: 2199

Re: GPIO Input

If I understand correctly, you are making a switch out of two big metal plates, one connected to 3.3V and the other to a GPIO pin. I can think of two possible reasons for the disconnect not to be seen. The first is purely mechanical. Are you certain that with a surface of that size that the two plat...
by IanS
Wed May 25, 2016 12:50 pm
Forum: Graphics, sound and multimedia
Topic: Class D amp not loud enough
Replies: 16
Views: 3568

Re: Class D amp not loud enough

This is why class D amps are bad as headphone amplifiers. Only high end headphones normally have separate ground connections for each ear, so a standard stereo jack which has L, R, Gnd connections ends up shorting outputs. Pop! There is a way of doing it, but it does not use the full amplification c...
by IanS
Mon May 23, 2016 1:12 pm
Forum: Automation, sensing and robotics
Topic: Open/close a (physical, bottom-hung, cellar-)window via Pi
Replies: 4
Views: 1023

Re: Open/close a (physical, bottom-hung, cellar-)window via

For the opening mechanism, try looking at linear actuators. The power needed to drive the motor is likely to be more than the RPi can handle, so you are likely to need to go through a couple of relays. (One relay wired to power the motor in one direction, and the other for reverse, so look for doubl...
by IanS
Thu May 19, 2016 12:05 pm
Forum: Graphics, sound and multimedia
Topic: Class D amp not loud enough
Replies: 16
Views: 3568

Re: Class D amp not loud enough

OK, yes on the Adafruit MAX98306 amp, L+, L-, R+ and R- are inputs, and the outputs are the LOUT and ROUT pairs. In this case L- and R- are inputs and can be grounded if the input signals are supplied to R+ and L+. However, the principle of my previous reply still stands. Do not connect any outputs ...
by IanS
Wed May 18, 2016 1:05 pm
Forum: Automation, sensing and robotics
Topic: Raspberry pi to turn 64 lights on and off through web app
Replies: 5
Views: 2242

Re: Raspberry pi to turn 64 lights on and off through web ap

If you use a 23017 watch out for the power requirements. Each individual output can only source (or sink) 25mA, and the total chip is limited to 125mA. The output is also 5V, so you need a resistor inline with the the LED, or to use LEDs designed for 5V connectivity which have the resistor already b...
by IanS
Wed May 18, 2016 12:23 pm
Forum: Graphics, sound and multimedia
Topic: Class D amp not loud enough
Replies: 16
Views: 3568

Re: Class D amp not loud enough

HI again, See my reply on your earlier thread. The problem is you connecting L- and R- to ground. On a class D amp they are reversed voltage outputs of L+ and R+, not ground, and so double the output voltage difference between L+ and L- compared with L+ and ground. Connecting any output of a class D...
by IanS
Wed May 18, 2016 12:18 pm
Forum: Graphics, sound and multimedia
Topic: Sound not loud enough
Replies: 6
Views: 2232

Re: Sound not loud enough

Sorry about the delay getting back - I was on holiday. Connecting L- and R- both to ground is your problem. You can use a common ground connection on the L and R speakers on a class A or B amp, but not with a class D. I would expect at least eight connections on a class D amp. Inputs = 1: Power, 2: ...
by IanS
Thu May 05, 2016 1:00 pm
Forum: Graphics, sound and multimedia
Topic: Sound not loud enough
Replies: 6
Views: 2232

Re: Sound not loud enough

OK. Next test is to determine whether the fault lies with the output from the RPi, or with the amplifier/speakers. Do you have an alternative amp/speakers that you could connect to instead, to check the RPi output is as expected? Also, do you have some other audio device with line-level output (e.g....
by IanS
Tue May 03, 2016 12:32 pm
Forum: Graphics, sound and multimedia
Topic: Sound not loud enough
Replies: 6
Views: 2232

Re: Sound not loud enough

Let us start with the obvious:
Have you used alsamixer to check the volume is not set very low?

If alsamixer is not installed, it is provided by the alsa-utils package. However, if you are trying to run Pulseaudio or one of the other alternative sound systems, I'm afraid I can't help.
by IanS
Thu Mar 10, 2016 12:15 pm
Forum: Device Tree
Topic: Redirecting the ACT LED on a RPi3
Replies: 1
Views: 1163

Redirecting the ACT LED on a RPi3

With the change of control of the power and SD card activity LEDs from the normal GPIO set to an expander on the VPU on the RPi3 it is no longer possible to just use 'dtparam=act_led_gpio=nn' to redirect the activity LED to a new GPIO. (Note nn is the GPIO pin number, not the physical pin number.) h...
by IanS
Wed Nov 11, 2015 8:35 pm
Forum: Graphics, sound and multimedia
Topic: Using Raspberry Pi to give MIDI output
Replies: 5
Views: 1646

Re: Using Raspberry Pi to give MIDI output

This is not easy for multiple simultaneous notes. I did some work on it a few years ago. (Search Google for Wave Goodbye Midi.) If you just want a single note, then you need to run a Fourier transform on a short sample of the audio and pick out the strongest frequency. The sample length sets the low...
by IanS
Fri Jun 05, 2015 11:34 am
Forum: Graphics, sound and multimedia
Topic: MIDI Sequencer
Replies: 4
Views: 4837

USB MIDI interface

Why not go for a simple USB MIDI interface? See http://alsa.opensrc.org/USBMidiDevices for a list of ones known to work with ALSA (and hence Linux in general). You can get really cheap (<£5) ones, but sometimes they can have reliability problems, especially with dealing with chords causing the need ...
by IanS
Mon Mar 23, 2015 12:16 pm
Forum: Graphics, sound and multimedia
Topic: Image Processing (Text from image)
Replies: 4
Views: 3563

Re: Image Processing (Text from image)

I have done some OCR previously and also helped junior engineers building OCR into systems, and have found Tesseract to work well. Whether you are running on a RPi or a highend system will change how fast the code runs, but the results should be the same, so there is no reason why it would not work ...
by IanS
Fri Jul 13, 2012 2:37 pm
Forum: Advanced users
Topic: How long have you run your raspi for?
Replies: 42
Views: 17198

Re: How long have you run your raspi for?

I've not had it running for more than about 4 days at a stretch (too much fiddling with the GPIO ports). However I have recompiled the ATLAS (http://math-atlas.sourceforge.net/) libraries on it. It hammers the CPU solidly for about 40 hours straight. Then I crashed the SD card, lost it, rebuilt ever...
by IanS
Wed Jun 20, 2012 2:58 pm
Forum: Automation, sensing and robotics
Topic: Velleman K8055 Project
Replies: 49
Views: 29971

Re: Velleman K8055 Project

You always get this error if not running as root (or using sudo), but judging from your screen captures you do seem to be doing this. Have you been running the program concurrently in multiple windows? It could be that the first invocation gets access correctly but the later ones are locked out if t...

Go to advanced search