Info onsensors that i can use with the pitop4

hello everyone,
Im using the pi-top 4 to control 2 drivers currently.
for each motor im using 3 GPIO pins to switch the voltage from 0-3.3v. and one gpio pin for the pwm to vary the speed.
so thats a total of 8 gpio pins in use so far.
I still need to connect 6 ultrasonic sensors and an LED strip light(for aesthetic) and was wondering if there is some current limit that ill need to be careful abt.
i thought i could use the 6 ultrasonic sensors with the extension board in the foundation kit.
Will that cause any issues??
pls revert back asap and this is an urgent project :slight_smile:
thank u!

Hi @phillivan

It would help if you showed a circuit diagram, even a rough sketch would be ok. I’ll try to help as best I can without that.

  • For current limits on Raspberry Pi GPIO, I believe it’s 16mA per pin but I’m not entirely sure if that’s changed with recent models
  • Don’t try to power anything from GPIO, you should always power them the 3V3 or 5V power rails - if something is high power but requires 3.3V you’d be better with an external regulator that draws from 5V and converts it to 3V3
  • Ultrasonic sensors won’t use too much power, 6 should be ok as long as you have the GPIO pins spare
  • note that there are 2 GPIO pins on each Foundation Plate port, but only one of them gets used for the Ultrasonic Sensor (and most other sensors) - if you connect an ultrasonic sensor to the Foundation Plate, you can still make use of the spare GPIO pin by using it on the 40P header

Why do you need 4 GPIO pins per motor? I would have assumed 2 GPIO maximum - which motor driver are you using?

i am using the bldc300b motor driver and since they have 3 pins-enable,forward/reverse and brake pins that need to be ground in order to switch, so im using the gpio pins as input that will ground these pins via a transistor.and one pin im using for the pwm so 4 pins.i tried running both my motors and no issue so far. im only suspicious of adding the 6 ultrasonic sensors to it as well. if u think i shd not then is there any alternative board or arduino i can use with it or something like that.

@duwudi
pls check the above text pls

@phillivan Ah I see, you’re using BLDC motors - that makes sense now. I think you should be fine with 6 ultrasonics!