Go to advanced search

by joan
Mon Apr 23, 2018 8:34 pm
Forum: General discussion
Topic: Reading PC Fan (3-wire) Tachometer? Never above 0.5v?
Replies: 3
Views: 82

Re: Reading PC Fan (3-wire) Tachometer? Never above 0.5v?

markkuk wrote:
Mon Apr 23, 2018 8:31 pm
The tachometer output on the fan is open collector/open drain type, according to section 2.1.3 of the specification you should add an pull-up to the fan operating voltage (12V).
Don't connect a line pulled-up to 12V to a Pi GPIO.
by joan
Mon Apr 23, 2018 8:33 pm
Forum: General discussion
Topic: Reading PC Fan (3-wire) Tachometer? Never above 0.5v?
Replies: 3
Views: 82

Re: Reading PC Fan (3-wire) Tachometer? Never above 0.5v?

The tachometer output is open collector. I'm fairly sure that is part of a PC fan's specification. That means you need a pull-up on the output line. Either add an external pull-up to 3V3 or switch on the internal pull-up for the GPIO you connect to the output line. The tachometer output line will be...
by joan
Mon Apr 23, 2018 12:02 pm
Forum: Beginners
Topic: spiXfer with pigpio
Replies: 7
Views: 123

Re: spiXfer with pigpio

You need to post the complete code.
by joan
Mon Apr 23, 2018 11:34 am
Forum: Beginners
Topic: spiXfer with pigpio
Replies: 7
Views: 123

Re: spiXfer with pigpio

Are you using &data_to_send?

You probably need to cast the pointer to the type the compiler wants.

Try (char *)(&data_to_send)
by joan
Mon Apr 23, 2018 10:35 am
Forum: Beginners
Topic: spiXfer with pigpio
Replies: 7
Views: 123

Re: spiXfer with pigpio

Are you sending or receiving or both?

uint32_t data_to_send, data_to_receive;

data_to_send = 0xaabbccdd;

spiXfer(handle, &data_to_send, &data_to_receive, 4);
by joan
Sun Apr 22, 2018 11:06 pm
Forum: Beginners
Topic: RaspBerry Pi as an RF repeater?
Replies: 5
Views: 131

Re: RaspBerry Pi as an RF repeater?

May I ask how you plan to stop your repeater from repeating what it repeats?
by joan
Sun Apr 22, 2018 5:59 pm
Forum: C/C++
Topic: very simple serial port example?
Replies: 5
Views: 169

Re: very simple serial port example?

It's slightly unfair to compare C and Python in this way.

Python has no support, it's all handled by the imported serial module. The equivalent in C would be linking something like wiringPi and using its serial wrappers.
by joan
Sun Apr 22, 2018 8:11 am
Forum: Automation, sensing and robotics
Topic: 2 motos turning on it's own
Replies: 15
Views: 293

Re: 2 motos turning on it's own

Since you have that link in place you should remove the wire between the Pi and the L298N module 5V pin.

You do need a ground wire between the Pi and the L298N module.
by joan
Sat Apr 21, 2018 5:35 pm
Forum: Automation, sensing and robotics
Topic: Using ENA or IN1/2 PWM for L289N motor speed control
Replies: 12
Views: 9607

Re: Using ENA or IN1/2 PWM for L289N motor speed control

The raw data is captured in C, but each GPIO level change is sent in batches via a TCP (socket) interface to the Python script. Python must read each change and then call the appropriate callback function. Those 20 to 30 lines of Python logic take much more time to execute than their C equivalent. T...
by joan
Sat Apr 21, 2018 4:54 pm
Forum: Automation, sensing and robotics
Topic: Using ENA or IN1/2 PWM for L289N motor speed control
Replies: 12
Views: 9607

Re: Using ENA or IN1/2 PWM for L289N motor speed control

On the Pi3 probably about 90k edge transitions per second sustained. That would be shared among all GPIO. The peaks could be far higher if the inputs are bursty. The limitation is probably Python itself. If you need more I'd try C.
by joan
Sat Apr 21, 2018 11:16 am
Forum: Raspbian
Topic: df = Segmentation fault
Replies: 1
Views: 96

Re: df = Segmentation fault

The file is corrupt. Is it just that command? Generally if one file is corrupt it's hard to place much trust in the others so I would consider re-imaging your SD card.
by joan
Sat Apr 21, 2018 11:06 am
Forum: Beginners
Topic: How can I tell if I'm powering my motors through the battery or the RPi?
Replies: 8
Views: 191

Re: How can I tell if I'm powering my motors through the battery or the RPi?

Can you add a photo or photos clearly showing the connections between the Pi, motor driver board, and batteries?
by joan
Fri Apr 20, 2018 9:54 am
Forum: Advanced users
Topic: Remote GPIO to control I2C pins
Replies: 1
Views: 55

Re: Remote GPIO to control I2C pins

Depends on what you mean by remote GPIO.

pigpio supports I2C/SMBus commands.

http://abyz.me.uk/rpi/pigpio/python.html

http://abyz.me.uk/rpi/pigpio/python.html#i2c_open
by joan
Thu Apr 19, 2018 8:47 pm
Forum: Troubleshooting
Topic: GPIO Pin problems
Replies: 21
Views: 2176

Re: GPIO Pin problems

Help Please! I am a real Newbie & a old one at that. All my GPIO pins are not working, All it say's as follows: RuntimeError:Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM). This i have done, yet no life. Is this the end of my zero ??? Cheers Paul It is prefer...
by joan
Thu Apr 19, 2018 8:00 pm
Forum: Troubleshooting
Topic: how many dc motor can raspberry pi zero control
Replies: 3
Views: 78

Re: how many dc motor can raspberry pi zero control

You can use any GPIO (and the UART, SPI, I2C etc. are GPIO).
by joan
Thu Apr 19, 2018 6:57 pm
Forum: Troubleshooting
Topic: how many dc motor can raspberry pi zero control
Replies: 3
Views: 78

Re: how many dc motor can raspberry pi zero control

You can use any of the GPIO. A L298N would need either 4 or 6 GPIO depending on how you choose to wire the motor enable lines. So number of spare GPIO/4 or /6.
by joan
Thu Apr 19, 2018 4:38 pm
Forum: Troubleshooting
Topic: Can't operate DC motor with L9110S motor controller
Replies: 2
Views: 44

Re: Can't operate DC motor with L9110S motor controller

I can't see a ground connection between the Pi and the L9110S.
by joan
Thu Apr 19, 2018 11:41 am
Forum: General discussion
Topic: Missing /dev/spidev*
Replies: 1
Views: 65

Re: Missing /dev/spidev*

Which operating system are you using?

What are the results of the following four commands?

uname -a

cat /etc/os-release

cat /proc/cpuinfo

lsmod
by joan
Thu Apr 19, 2018 11:38 am
Forum: Automation, sensing and robotics
Topic: HcSr-04 sensors not working with Raspberry Pi
Replies: 5
Views: 126

Re: HcSr-04 sensors not working with Raspberry Pi

@pcmanbob

That code is another variant with exactly the same bug.
by joan
Thu Apr 19, 2018 11:36 am
Forum: Troubleshooting
Topic: issues with i2c-tools and smbus modules
Replies: 6
Views: 120

Re: issues with i2c-tools and smbus modules

You are pretty much on your own when you use a custom kernel/distribution. There is little we can do to help.
by joan
Thu Apr 19, 2018 10:43 am
Forum: Automation, sensing and robotics
Topic: HcSr-04 sensors not working with Raspberry Pi
Replies: 5
Views: 126

Re: HcSr-04 sensors not working with Raspberry Pi

@SohaibAJ

That code is buggy. Variants of the code with the same bugs are the ones I come across most frequently.

It is useful in the sense that an aspiring programmer should be able to work out what is wrong with the while loops.
by joan
Thu Apr 19, 2018 7:22 am
Forum: Troubleshooting
Topic: issues with i2c-tools and smbus modules
Replies: 6
Views: 120

Re: issues with i2c-tools and smbus modules

Is there an i2c-dev entry in /etc/modules ? You shouldn't need that if I2C is defined in /boot/config.txt (which is easy to do with sudo raspi-config ). Things may have changed since I last looked. i2c-dev was an anomaly for reasons I only vaguely understood. It was not and should not have been loa...
by joan
Wed Apr 18, 2018 5:31 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 3-Wire SPI Interfacing
Replies: 4
Views: 126

Re: 3-Wire SPI Interfacing

Thinking about it you might need to send two segments to the Linux kernel SPI driver. The first with the bytes to write, the second with the bytes to read.

I'm assuming SPI supports a chain of SPI commands in one transaction like the I2C driver does.
by joan
Wed Apr 18, 2018 1:33 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 3-Wire SPI Interfacing
Replies: 4
Views: 126

Re: 3-Wire SPI Interfacing

Is 3-wire operation supported by the Linux kernel SPI driver?

My pigpio userland driver has support for 3-wire operation on the main SPI device (3-wire is not supported by the auxiliary SPI).

Go to advanced search