Go to advanced search

by pootle
Thu May 13, 2021 6:32 am
Forum: Python
Topic: how to control 2 or more motors with async using PIGPIO Library?
Replies: 4
Views: 339

Re: how to control 2 or more motors with async using PIGPIO Library?

is it possible to make different acceleration and different frequency and different pulses can you write a couple of code or fix the given example? Yes absolutely possible, but not simple. I have a library here that drives multiple steppers using waves using A4988 style driver chips. - you have not...
by pootle
Sat Apr 10, 2021 5:53 pm
Forum: Python
Topic: Use a web browser to run your GUI - a minimal library
Replies: 3
Views: 264

Re: Use a web browser to run your GUI - a minimal library

I was planing to build an app which started with Tkinter and later to Flask all is ment to control script to make backup copys of my photos on "normal" SD from the camera. Could this be a replacement to have a live update as how many photos has been checked, copied, duplicated? Should wor...
by pootle
Sat Apr 10, 2021 11:13 am
Forum: Python
Topic: Use a web browser to run your GUI - a minimal library
Replies: 3
Views: 264

Use a web browser to run your GUI - a minimal library

I got fed up with all the messy quirks when trying to use libraries like tk or qt4. Also I wanted an easy way to control an app on a headless pi. So I've written a tiny (Python) library that uses python's http server library (so only for local network use) that makes it easy to put a web front end o...
by pootle
Tue Dec 29, 2020 8:57 am
Forum: Python
Topic: (solved) servo GPIO jitter
Replies: 6
Views: 248

Re: servo GPIO jitter

It could be that you need a decoupling capacitor up close to the servo. For smaller servo motors I use a typically a 22uF and a 100pF across the power supply as close as possible to the motor.

Is it the same type of servo that worked OK before?
by pootle
Fri Dec 11, 2020 8:23 am
Forum: Python
Topic: time.sleep for milliseconds in a for-loop raspberry pi 4B python takes longer time
Replies: 16
Views: 1140

Re: time.sleep for milliseconds in a for-loop raspberry pi 4B python takes longer time

Some simple feedback to tack account of execution and random operating system delays should fix this. Just adjust the delay dependent on the actual time: import RPi.GPIO as GPIO import time axisStepPin = 21 GPIO.setmode(GPIO.BCM) GPIO.setup(axisStepPin, GPIO.OUT) GPIO.output(axisStepPin, GPIO.LOW) s...
by pootle
Tue Dec 08, 2020 8:13 am
Forum: Automation, sensing and robotics
Topic: Wiring 10x DS18B20 probes on a breadboard
Replies: 6
Views: 558

Re: Wiring 10x DS18B20 probes on a breadboard

470pf at the sensor is good - or even 100pf , but one other consideration: How electrically noisy is the environment? Some electric motors in particular can be a problem. A domestic environment is usually good (but avoid fridges - the motor area - if possible). If the environment is noisy, then twis...
by pootle
Mon Dec 07, 2020 8:35 am
Forum: Automation, sensing and robotics
Topic: Wiring 10x DS18B20 probes on a breadboard
Replies: 6
Views: 558

Re: Wiring 10x DS18B20 probes on a breadboard

This is indeed drastic overkill, and large electrolytic capacitors are not good at decoupling. I run 4 sensors on 3m of cable with no decoupling at all. 470pf are a reasonable value, the initial huge one isn't going to help. 470uF is about 1000 time too large and being electrolytic they won't do the...
by pootle
Tue Nov 10, 2020 7:28 am
Forum: Python
Topic: PIGPIO Stepper Motor Control
Replies: 31
Views: 1997

Re: PIGPIO Stepper Motor Control

Just enter

Code: Select all

 sudo systemctl enable pigpiod
directly in a shell. It will then start automatically on every boot.
by pootle
Mon Nov 09, 2020 8:03 am
Forum: Python
Topic: PIGPIO Stepper Motor Control
Replies: 31
Views: 1997

Re: PIGPIO Stepper Motor Control

The video showing glitchy / noisy operation looks very like you are trying to run too fast without ramp up. There is always a step rate below which the motor can instantly stop and start - the speed varies with motor, load and voltage. The motor can go (a lot) faster than this, but only if it is sta...
by pootle
Mon Nov 09, 2020 7:54 am
Forum: Python
Topic: PIGPIO Stepper Motor Control
Replies: 31
Views: 1997

Re: PIGPIO Stepper Motor Control

Any easy way to have the daemon start automatically? (At system startup, or when the program is called.) I tried using os.system("sudo pigpiod") at the top of the script and I also tried creating a separate script with that code and adding it to start up. Neither seems to work. Not sure h...
by pootle
Thu Nov 05, 2020 7:49 am
Forum: Python
Topic: PIGPIO Stepper Motor Control
Replies: 31
Views: 1997

Re: PIGPIO Stepper Motor Control

... it needs a soft start acceleration ramp. I think the simple Sleep timed loop has already been tried and failed. But the OP is aiming for 15 - 30 rpm, even with a 1.8 degree stepper motor this only requires a maximum of 100 full steps per second, and is well below the speed at which ramping is r...
by pootle
Wed Nov 04, 2020 8:09 am
Forum: Python
Topic: PIGPIO Stepper Motor Control
Replies: 31
Views: 1997

Re: PIGPIO Stepper Motor Control

For the speed you want waves are a complicated solution. Can I suggest some minor changes to the basic loop you posted earlier... for x in range(10): pi.write(17, 1) # set tom's gpio BCM 17 to high time.sleep(delay) pi.write(17, 0) # set tom's gpio BCM 17 to low time.sleep(delay) First, use gpio_tri...
by pootle
Sun Nov 01, 2020 9:17 am
Forum: Python
Topic: PIGPIO Stepper Motor Control
Replies: 31
Views: 1997

Re: PIGPIO Stepper Motor Control

The code you need is very dependent on the driver chip you are using - what driver hardware are youo using.

And yes, assuming you are not using a really advanced driver chip like one of the TMC ones (here for example), then waves are the ultimate way to get accurate timing.
by pootle
Tue Oct 20, 2020 5:16 pm
Forum: Python
Topic: TensorFLow, YoloV4Tiny and sudoku
Replies: 19
Views: 1050

Re: TensorFLow, YoloV4Tiny and sudoku

I wrote a very simple brute force solver in about 60 lines of Python, it runs on a Pi 4 in usually less than 1 second. A version with simple optimisations, (about 100 lines of python typically runs 50 - 100 times faster) - the example quoted earlier by Hermann earlier solves in 2 milliseconds. (add ...
by pootle
Tue Oct 13, 2020 8:03 am
Forum: Python
Topic: TensorFLow, YoloV4Tiny and sudoku
Replies: 19
Views: 1050

Re: TensorFLow, YoloV4Tiny and sudoku

the main app (detect_sudoku.py) tries to import sudokuGridSorter and fails as there is no module of that name..........
by pootle
Mon Sep 28, 2020 6:56 am
Forum: General discussion
Topic: Isolating Public server on local network
Replies: 15
Views: 3184

Re: Isolating Public server on local network

VPN is the simplest answer, the other way (potentially safer) is to run a dmz using (for example) pfSense on an old laptop / PC or pre-setup on somethng like a netgate SG-1100. Your exisitng router then just gives access to your "public" pi and pfsense and everything else is behind pfsense...
by pootle
Wed Sep 02, 2020 6:30 am
Forum: General discussion
Topic: Multiple stepper motors
Replies: 4
Views: 278

Re: Multiple stepper motors

While a pi can drive 2 or 3 steppers with simple driver circuits very well, 8 is challenging if you want to drive them at speed. I would suggest using smart drivers such as those from TMC . Starting at this level you will have to write a lot of software unless you have a framework (like ROS ) in mind.
by pootle
Sat Aug 15, 2020 4:14 pm
Forum: General discussion
Topic: Humor: Syslog Messages
Replies: 17
Views: 989

Re: Humor: Syslog Messages

An error message from a network processor in the 1980's

"Error: name already approximately in use"

There was a good reason for this too.
by pootle
Fri Aug 14, 2020 8:00 am
Forum: General discussion
Topic: Stepper motor with matlab
Replies: 1
Views: 183

Re: Stepper motor with matlab

Stepper motors need regular pulses to run smoothly. Using writedigitalpin (through an arduino?) to provide step pulses from matlab will not be able to generate regularly spaced pulses. Writedigitalpin is intended for non time-critical (in computer timescales) uses such as driving indicator LEDs, or ...
by pootle
Tue Aug 11, 2020 3:57 pm
Forum: Troubleshooting
Topic: Pi 3A wifi very regular dropouts
Replies: 1
Views: 193

Pi 3A wifi very regular dropouts

My Pi 3A with is dropping wifi very regularly (about every 50 seconds) then comes back after about 12 seconds. I've just tested it again having unplugged everything (except power!) and run it for 15 mins and it fails consistently. I've turned off wifi power managent already, and I checked vcgencmd g...
by pootle
Tue Aug 11, 2020 9:33 am
Forum: General discussion
Topic: realvnc invert screen in direct capture mode
Replies: 0
Views: 110

realvnc invert screen in direct capture mode

I'm trying out using realvnc to see the camera preview screen to get better latency than using streaming, but the screen on the pi is inverted, so I have setup the pi to rotate the screen 180, which now works fin on the pi and initially through realvnc. However when I switch on direct capture in rea...
by pootle
Tue Aug 11, 2020 7:37 am
Forum: General discussion
Topic: SSH Locally onto Pi Zero W - Not Showing Up
Replies: 13
Views: 1248

Re: SSH Locally onto Pi Zero W - Not Showing Up

Some routers are a bit picky and ssh pi@raspberrypi.local won't work, you may need to use the IP address. First check your router's DHCP clients list, if the raspberry pi isn't there after 5 minutes, then that is the initial problem. If it is there, try ssh with the IP address instead. As a final re...
by pootle
Sun Aug 02, 2020 10:21 am
Forum: Python
Topic: PI 3/4 optimised packages (e.g. numpy) ?
Replies: 5
Views: 881

Re: PI 3/4 optimised packages (e.g. numpy) ?

Note that if you use the 64-bit version of Raspberry Pi OS, you will (of course) not have everything compiled for the legacy ARMv6. The packages are for Aarch64 and come direct from Debian. I've built python 9.3.8) on both 32 bit and 64 bit raspberry pi OS now. Both are compiling with GCC 8.3.0 rat...
by pootle
Sat Aug 01, 2020 1:14 pm
Forum: Python
Topic: PI 3/4 optimised packages (e.g. numpy) ?
Replies: 5
Views: 881

Re: PI 3/4 optimised packages (e.g. numpy) ?

This gets you the latest Python version, built for you specific Pi model, compiled with a recent version of GCC. well getting close - but it builds with GCC 8.3.0 (clean raspberry pi OS lite install) I get $ python3 Python 3.8.5 (default, Aug 1 2020, 13:30:57) [GCC 8.3.0] on linux Type "help&q...
by pootle
Sat Aug 01, 2020 8:14 am
Forum: Python
Topic: PI 3/4 optimised packages (e.g. numpy) ?
Replies: 5
Views: 881

PI 3/4 optimised packages (e.g. numpy) ?

I see that standard packages for Pi's are compiled for original Pi, and so don't make use of the extra instructions available in the later arm cores. Also I saw recently that pywheels packages are tagged (or can be tagged) with the arm cpu version as well, so potentially packages (like numpy) could ...

Go to advanced search