Go to advanced search

by pootle
Thu Sep 19, 2019 6:41 am
Forum: Automation, sensing and robotics
Topic: 2 Stepper Motors; Independent control
Replies: 6
Views: 143

Re: 2 Stepper Motors; Independent control

Would all of the TMC drivers be able to run motors autonomously after settings configuration & function with commands as simple as go to "stepX"? All of the ones in that family - 5130, 5160 etc, I would expect to run pretty simply: Check at position zero clear crash flag repeat 111 times: set goto ...
by pootle
Wed Sep 18, 2019 7:34 am
Forum: Automation, sensing and robotics
Topic: 2 Stepper Motors; Independent control
Replies: 6
Views: 143

Re: 2 Stepper Motors; Independent control

For driving stepper motors, a raspbery pi is every bit as capable as an arduino, either by offloading the low level driving to external chips, or by using dma control of the I/O pins providing very highly accurate timings. The standard Hat's available are not in general suitable for smart driving of...
by pootle
Tue Sep 17, 2019 7:01 am
Forum: General discussion
Topic: Python 2 or Python 3 ...?
Replies: 8
Views: 359

Re: Python 2 or Python 3 ...?

mattmiller wrote:
Mon Sep 16, 2019 8:16 am

Because of lot of us are dinosaurs and we'll still be using Python 2 until the heat death of the universe :)
I will stop using Python2 just as soon as the prophet Zarquon turns up
by pootle
Mon Sep 09, 2019 8:19 am
Forum: Automation, sensing and robotics
Topic: [SOLVED] How To Get Smooth PWM Control
Replies: 15
Views: 529

Re: [ASK] How To Get Smooth PWM Control

As I read the code, you aren't changing the throttle setting at all in the test, yet the drive motor speeds up and slows down. Is this true? Also I note you are going round the control loop at a hell of a rate - 2,500 times per second. I'm wondering if this is causing a problem somewhere downstream....
by pootle
Fri Sep 06, 2019 7:15 am
Forum: Automation, sensing and robotics
Topic: [SOLVED] How To Get Smooth PWM Control
Replies: 15
Views: 529

Re: [ASK] How To Get Smooth PWM Control

I had twitchy servos on a 2 servo project, it turned out that the servos themselves needed decoupling capacitors on the power feed right beside the servos themselves. The voltage spikes caused by servo motors starting and stopping were de-stabilizing the servo's own electronics. Try a moderate elect...
by pootle
Fri Sep 06, 2019 6:52 am
Forum: Python
Topic: Not able to make anywhere near 860 samples using ADS1115 on RPi3B+
Replies: 6
Views: 216

Re: Not able to make anywhere near 860 samples using ADS1115 on RPi3B+

Just been looking at the adafruit code on github, They have a specific example for fast read here.

It looks like the single shot approach you have programmed only works for relatively slow sample rates.

You need to use their fast read example as the base for you program.
by pootle
Fri Sep 06, 2019 6:20 am
Forum: Python
Topic: Not able to make anywhere near 860 samples using ADS1115 on RPi3B+
Replies: 6
Views: 216

Re: Not able to make anywhere near 860 samples using ADS1115 on RPi3B+

I'm not clairvoyant, this doersn't make sense. You could try going back to the example code from adafruit, checking it runs at the right speed, and then modifying that 1 step at a time to get the behaviour you want
by pootle
Wed Sep 04, 2019 6:39 am
Forum: Python
Topic: DBUS? permissions problem on Raspbian lite vs raspbian (runing bluedot)
Replies: 0
Views: 58

DBUS? permissions problem on Raspbian lite vs raspbian (runing bluedot)

I've got a strange (well to me at least) problem running a bluedot app on raspbian (buster). On gui versions of raspbian I can run the app with no problems either from an ssh session or from a terminal in the gui. On raspbian lite I get a permissions fail unless I run the command with sudo. I don't ...
by pootle
Tue Sep 03, 2019 1:44 pm
Forum: Python
Topic: Not able to make anywhere near 860 samples using ADS1115 on RPi3B+
Replies: 6
Views: 216

Re: Not able to make anywhere near 860 samples using ADS1115 on RPi3B+

Try without the print statement and see how fast it goes, if that speeds it up, then you need to print from a separate thread - or possibly a separate process.
by pootle
Tue Sep 03, 2019 7:28 am
Forum: Python
Topic: Not able to make anywhere near 860 samples using ADS1115 on RPi3B+
Replies: 6
Views: 216

Re: Not able to make anywhere near 860 samples using ADS1115 on RPi3B+

This code reads 200 samples per second????

The sleep commands it goes through for a single read appear to add up to 4 seconds.

Assuming you really mean to use a larger array, just remove the print statement and see what difference it makes.
by pootle
Fri Aug 30, 2019 7:21 am
Forum: General discussion
Topic: Use multiple 12V stepmotors with Raspberry 3+
Replies: 3
Views: 137

Re: Use multiple 12V stepmotors with Raspberry 3+

Multiply max current per motorr by the number of motors to get the current rating you need. Your project will mostly use a lot less than that, but that way even a heavy load will be OK. The control board itself will use a tiny amount of current. It might be worth putting some decoupling capacitors b...
by pootle
Thu Aug 29, 2019 6:44 am
Forum: General discussion
Topic: Use multiple 12V stepmotors with Raspberry 3+
Replies: 3
Views: 137

Re: Use multiple 12V stepmotors with Raspberry 3+

It sounds like you haven't done much research, so here are a few starters for 10. 1. Can I control them all directly with the Rasp. board? Or shall I use a different kind of controller that allows multiple attachments? Yes, multi motor controllers are fine - depends on cost, wiring complexity etc. 2...
by pootle
Tue Aug 27, 2019 7:44 am
Forum: General discussion
Topic: Fixing the Pi 4 usb C issue by hand
Replies: 13
Views: 1000

Re: Fixing the Pi 4 usb C issue by hand

Could it be fixed by making (by hand) a short extension cable incorporating the resistor?
by pootle
Thu Aug 01, 2019 10:15 am
Forum: General discussion
Topic: RPi 4 opencv face detection using neural networks - looking good..
Replies: 0
Views: 134

RPi 4 opencv face detection using neural networks - looking good..

I've played a little with face detection using the haag methods described in so many places, but it is rather limited in its abilities, and I wondered if a Pi4 is fast enough to do it using dnn (deep neural networks). And it works surprisingly well. First problem is the build of open cv in the stand...
by pootle
Wed Jul 31, 2019 12:50 pm
Forum: C/C++
Topic: more performance optimizations for pi4 compiles?
Replies: 3
Views: 1685

more performance optimizations for pi4 compiles?

On pi3 we can use

Code: Select all

-D ENABLE_NEON=ON \
-D ENABLE_VFPV3=ON \
I'm just wondering if we can do more to help performance on a pi 4?
by pootle
Mon Jun 24, 2019 7:07 am
Forum: General discussion
Topic: Do we get Vulkan on Pi 4?
Replies: 16
Views: 4605

Re: Do we get Vulkan on Pi 4?

mmm that would be tasty. Won't hold me breath though
by pootle
Mon Jun 24, 2019 7:01 am
Forum: General discussion
Topic: Do we get Vulkan on Pi 4?
Replies: 16
Views: 4605

Do we get Vulkan on Pi 4?

Just askin....
by pootle
Tue Jun 18, 2019 8:38 am
Forum: Networking and servers
Topic: WORKAROUND; intermittent disconnects with r8152 chipset USB adapters
Replies: 0
Views: 339

WORKAROUND; intermittent disconnects with r8152 chipset USB adapters

For some of my pi Zeros I use wired ethernet through an adapter like: https://shop.pimoroni.com/products/three-port-usb-hub-with-ethernet-and-microb-connector or https://www.amazon.co.uk/dp/B00RM3KXAU/ref=pe_3187911_189395841_TE_3p_dp_1 And I tend to get intermittent LAN dropouts (see dmesg printout...
by pootle
Mon Jun 10, 2019 7:55 am
Forum: Python
Topic: picamera & ILI9341 - change picamera encoder
Replies: 2
Views: 232

Re: picamera & ILI9341 - change picamera encoder

There is only 1 core in a pi zero, so additional processes will probably slow things down, rather than speed them up. I assume the conversion cannot keep up with frames from the camera? How far away you are from what you want. Is the process 10% too slow, or 100% too slow or worse? The solution depe...
by pootle
Thu Jun 06, 2019 6:39 am
Forum: General discussion
Topic: Python code is being executed slowly on Pi 3 B+
Replies: 14
Views: 642

Re: Python code is being executed slowly on Pi 3 B+

I'm also wondering what benefit the fuzzies bring to a reasonably well setup pid control loop. Have you tried running with just a straight pid control loop?
by pootle
Thu Jun 06, 2019 6:31 am
Forum: General discussion
Topic: Python code is being executed slowly on Pi 3 B+
Replies: 14
Views: 642

Re: Python code is being executed slowly on Pi 3 B+

I think you should be able to get a big improvement by refactoring the code, and potentially get numpy to do a lot more work per call (and fewer calls). Can you declare the numpy arrays once up front and re-use them? Can you shape the data so that the sequences like: mu_kural1 = min(mu_e_SC,mu_de_N)...
by pootle
Wed May 15, 2019 7:12 pm
Forum: Python
Topic: Running two functions simultaneously via Threading
Replies: 10
Views: 1703

Re: Running two functions simultaneously via Threading

Python will not execute 2 threads at exactly the same time - so if you use code like while time.time() < start_time: pass that thread will completely lock out all other threads. (search Python Global Interpreter Lock if you want to know more) If the code in you playaudio / recordaudio functions are ...
by pootle
Tue May 14, 2019 7:09 am
Forum: Python
Topic: Retrieving counts from an [Absolute Rotary Encoder]
Replies: 3
Views: 273

Re: Retrieving counts from an [Absolute Rotary Encoder]

Is it always the same value that is missing? If so which is the missing value?
by pootle
Fri May 10, 2019 8:29 am
Forum: Automation, sensing and robotics
Topic: Cheaper alternative to brickpi? (Connecting NXT servomotors)
Replies: 11
Views: 941

Re: Cheaper alternative to brickpi? (Connecting NXT servomotors)

I like this idea, as I have a couple of these motors. I developed techniques to drive (different) dc motors with optical encoders. A couple of things that might help: I wrote code using pigpio to process the feedback from the optical encoder. Initially enitrly in python, but I recoded a critical par...

Go to advanced search