Go to advanced search

by joan
Mon Aug 19, 2019 3:10 pm
Forum: General discussion
Topic: 12 v for driving electromagnets PCA9685
Replies: 16
Views: 234

Re: 12 v for driving electromagnets PCA9685

What is the point of the PCA9685? I can't see the relevance of PWM output to an electromagnet. Surely you want them on or off, not vibrating like a hive of demented bees.
by joan
Sun Aug 18, 2019 9:51 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Show signs of life on ssd1306
Replies: 3
Views: 104

Re: Show signs of life on ssd1306

What do you mean by signs of life? I doubt you can write to the screen much earlier than your script starts running.
by joan
Sun Aug 18, 2019 1:42 pm
Forum: General discussion
Topic: 12 v for driving electromagnets PCA9685
Replies: 16
Views: 234

Re: 12 v for driving electromagnets PCA9685

You probably ought to be looking at something like the ULN2803 series. Don't think the ULN2803 series would be suitable either maximum of 500mA per output, would expect electromagnets to be in the amps range, unless they are very small, which is why I said transistor driver circuit probably fet or ...
by joan
Sun Aug 18, 2019 1:39 pm
Forum: Troubleshooting
Topic: Problem with GPIO internal pullup and pulldowns
Replies: 4
Views: 97

Re: Problem with GPIO internal pullup and pulldowns

That should work for all but GPIO 2/3 (GPIO 2/3 have strong external pulls to 3V3 which the weak internal pull-downs will not be able to override).
by joan
Sun Aug 18, 2019 1:31 pm
Forum: General discussion
Topic: 12 v for driving electromagnets PCA9685
Replies: 16
Views: 234

Re: 12 v for driving electromagnets PCA9685

The PCA9685 is designed to provide PWM to LEDs. It has an operating voltage in the range 2.3 V to 5.5 V and can supply roughly 25 mA per LED. It's not any good for 12V or electromagnets.

You probably ought to be looking at something like the ULN2803 series.
by joan
Sat Aug 17, 2019 4:48 pm
Forum: Automation, sensing and robotics
Topic: Raspberry Pi High Frequency Sampling
Replies: 5
Views: 292

Re: Raspberry Pi High Frequency Sampling

That is samples per second, not bytes per second. So if each sample was 12 bytes (4 bytes each of X, Y, Z) then that would be 20,000 times 12 or 240,000 bytes per second.
by joan
Sat Aug 17, 2019 7:38 am
Forum: Beginners
Topic: Building a Garden Surveillance Camera
Replies: 7
Views: 313

Re: Building a Garden Surveillance Camera

I tried to use motion software for a garden cam but there were far too many false alarms (vegetation in the wind, rain, slugs etc). In the end I just recorded the whole lot in 15 minute segments. I then post processed the segments to create a new video of every 45th frame, so each segment ended up a...
by joan
Thu Aug 15, 2019 9:44 pm
Forum: Automation, sensing and robotics
Topic: DHT11 faulty reading or normal behaviour
Replies: 1
Views: 111

Re: DHT11 faulty reading or normal behaviour

I suggest you try my C example.

http://abyz.me.uk/rpi/pigpio/examples.html#pdif2_DHTXXD

The software requires the pigpio daemon to be running.

sudo pigpiod

If it doesn't work your sensor is either wired up wrong or faulty.
by joan
Thu Aug 15, 2019 5:05 pm
Forum: Troubleshooting
Topic: pigpio hardware PWM hangs forever in RPi 4
Replies: 8
Views: 332

Re: pigpio hardware PWM hangs forever in RPi 4

@ShiftPlusOne

I have released V71 on github. Hopefully I haven't introduced more bugs.
by joan
Thu Aug 15, 2019 3:01 pm
Forum: Beginners
Topic: Oscillator frequency - GP_clk
Replies: 3
Views: 79

Re: Oscillator frequency - GP_clk

You need to use a GPIO library which lets you set the clock on GPIO 4 or write your own software. As I said I don't think you can send a 19.2 MHz clock using a 19.2 MHz OSC source. Have a look at wiringPi's gpio utility. It will use the 19.2 MHz crystal if it allows clock control. Or my pigpio's pig...
by joan
Thu Aug 15, 2019 1:18 pm
Forum: Automation, sensing and robotics
Topic: How to control this motor speed with PWM?
Replies: 7
Views: 233

Re: How to control this motor speed with PWM?

You need a motor driver. You need a motor driver for all types of motor. Servos have them built-in. Other types of motor normally don't. A L298N based board should be fine, perhaps even a L9110S based board although 1 amp stall current might be a problem. You can get those boards for a few GBP from ...
by joan
Thu Aug 15, 2019 12:18 pm
Forum: Beginners
Topic: Oscillator frequency - GP_clk
Replies: 3
Views: 79

Re: Oscillator frequency - GP_clk

The crystal (OSC) frequency is 19.2MHz (54MHz for Pi4B). That suggests a maximum clock of 9.6MHz (27MHz for Pi4B) at the GPIO.

What do you actually want to do?
by joan
Thu Aug 15, 2019 11:28 am
Forum: AIY Projects
Topic: Time to give in and start from square 1 again?
Replies: 3
Views: 184

Re: Time to give in and start from square 1 again?

I think you have the right approach.

Get back to a known good working state. Then add one feature at a time asking here if you can't get it working. Sometimes you have to take an all or nothing approach. When you can it's best to take small steps.
by joan
Wed Aug 14, 2019 4:40 pm
Forum: C/C++
Topic: Use BCM2835 GPIO Event Detect to Interrupt Processor on Pi Zero
Replies: 5
Views: 380

Re: Use BCM2835 GPIO Event Detect to Interrupt Processor on Pi Zero

I can't answer that. I think you might be better off asking in the bare metal section. People there are more likely to understand the ins and outs of interrupts.
by joan
Wed Aug 14, 2019 2:05 pm
Forum: Troubleshooting
Topic: pigpio hardware PWM hangs forever in RPi 4
Replies: 8
Views: 332

Re: pigpio hardware PWM hangs forever in RPi 4

I seem to have introduced a bug into V70 re killing off aborted Python sessions. I doubt it affects many people but might be best if the powers that be delay updating pigpio until V71 (whenever that will be).
by joan
Wed Aug 14, 2019 8:25 am
Forum: C/C++
Topic: Use BCM2835 GPIO Event Detect to Interrupt Processor on Pi Zero
Replies: 5
Views: 380

Re: Use BCM2835 GPIO Event Detect to Interrupt Processor on Pi Zero

C is operating system agnostic. It knows nothing of handling interrupts. E.g. a C program running under Linux will need to ask Linux to be told about an interrupt. A C program running under another operating system will have to liaise with that operating system.
by joan
Wed Aug 14, 2019 8:12 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C traffic understanding
Replies: 2
Views: 167

Re: I2C traffic understanding

I can make a guess at the notation. [C0+01+[C1+5D+45+C0+17+90+00-] [ start condition C0 address + R/W bit (address = 0x60, write) + ACK 01 byte written (probably a register address) + ACK [ (re-)start condition C1 address + R/W bit (address = 0x60, read) + ACK 45 byte read + ACK C0 byte read + ACK 1...
by joan
Tue Aug 13, 2019 9:15 pm
Forum: General discussion
Topic: 'Sniffing' Serial Commands?
Replies: 25
Views: 713

Re: 'Sniffing' Serial Commands?

A returned value of 0 (from SLR) means that no serial data has been seen on the monitored GPIO.
by joan
Tue Aug 13, 2019 9:12 pm
Forum: Gentoo
Topic: Can't connect to pigpio at localhost(8888)
Replies: 10
Views: 344

Re: Can't connect to pigpio at localhost(8888)

It might be worth getting the latest commit from github (a sort of V70+). That had an update for a 64-bit issue.

Possibly simplest just to overwrite your copy of pigpio.c with https://github.com/joan2937/pigpio/blob/master/pigpio.c
by joan
Tue Aug 13, 2019 5:45 pm
Forum: Python
Topic: Sniffing data from busy serial port...
Replies: 8
Views: 327

Re: Sniffing data from busy serial port...

pigpio will let you sniff the data.

Code: Select all

sudo pigpiod

pigs slro 4 9600 8 # start sniffing GPIO 4 at 9600 baud and 8 bits

pigs slr 4 100 # read up to 100 bytes of data
http://abyz.me.uk/rpi/pigpio/pigs.html#SLRO
http://abyz.me.uk/rpi/pigpio/pigs.html#SLR

It should not affect the serial data.
by joan
Mon Aug 12, 2019 1:18 pm
Forum: Automation, sensing and robotics
Topic: GPIO configuration + AM2302 temperature sensor
Replies: 4
Views: 186

Re: GPIO configuration + AM2302 temperature sensor

Surely https://forum.codesys.com/ is the place to ask?

There are many DHTxx software examples on the www.
by joan
Mon Aug 12, 2019 11:05 am
Forum: General discussion
Topic: 'Sniffing' Serial Commands?
Replies: 25
Views: 713

Re: 'Sniffing' Serial Commands?

pigpio should capture those signals. Provided the signal is 3.3V safe tee it off to a GPIO (also connect the grounds). Say the GPIO is Broadcom 4 (pin 7). sudo pigpiod pigs slro 4 19200 8 # start sniffing GPIO 4 pigs -x slr 4 100 # read up to 100 bytes, print as hex http://abyz.me.uk/rpi/pigpio/pigs...
by joan
Sun Aug 11, 2019 5:05 pm
Forum: General discussion
Topic: WiringPi to be deprecated?
Replies: 12
Views: 1031

Re: WiringPi to be deprecated?

That is sad to hear. I'm sure anyone who has posted source code to the web will be able to empathise over the pressure of unreasonable support requests. Gordon should be proud of wiringPi. I believe a lot of the success of the Raspberry Pi in physical computing is down to having wiringPi to manipula...

Go to advanced search