Controlling air pump and air valve from PiicoDev

Hi,

I’d like to be able to control an air pump and air valve, using a PiicoDev and BME280.

The air pump and air valve I was thinking of using:

I found a great tutorial on using the PiicoDev and BME280.

Which is what convinced to use the PiicoDev.

Based on the readings that the BME280 receive, I’d like to turn on/off the air pump or the air valve.
But I’m not sure how to control the air pump or air valve, or how to connect them to the PiicoDev, or if I connect them to the PiicoDev expansion board.

I was hoping to get some advice on how to connect the air pump and air valve. Preferably without the need for soldering.

Thanks.

James.

3 Likes

Hi James,

Sounds like a cool project, can you confirm for me which microcontroller or device you were using to read the sensor data from the PiicoDev atmospheric sensor? Was it a Raspberry Pi, Pi Pico, or a micro:bit? We have a version of that tutorial for each.

Most microcontrollers can’t switch any external devices with a current load above around 10mA, instead they send a small digital output signal which switches an external relay or transistor and that external devices directs power to the pump/valve/motor etc.

In terms of keeping things solderless it may be possible to do using prototyping wire and a breadboard, but that will make it hard to use the easy cabling that the PiicoDev system is built around.

Once we know what microcontroller you are using and what gear you have we’ll see what options we have for connecting it all that avoid the need for soldering.

2 Likes

Thanks Trent.
I was going to use the Pi Pico.

I’m happy to do some soldering, if required. Was just hoping for plug and play essentially.

Thanks for the explanation around the switching above 10mA.

2 Likes

Hi James,

Here’s the guide specific to the Pi Pico.

There is a soldering free option, you just use a breadboard and either of these two to connect to your PiicoDev sensors

Otherwise if you’re happy to solder it’s easy enough to just solder header pins onto the PiicoDev sensor directly.

The air valve has a JST PH connector, so male prototyping wires should fit into the end of the connector.

The pump and vacuum motor might have to be a job for alligator clips.

2 Likes

Hi James,

Another part to consider would be the Makerverse Motor driver, I couldnt see how many amps the solenoid requires but fingers crossed it isnt more than 1A. there is some soldering required but it brings the cost down a bit.
PS: there’s more exellent documenation from the guys at Core for this one.

You’ll also be able to control both the pump and solenoid from the same board.
Just make sure to include some histeriesis control on the solenoid so you dont burn it out from switching it quickly (and avoid using duty cycles - either full on or off)

3 Likes

Hi Guys
I am a bit of a fan of keeping things simple. What is wrong with a simple N channel Mosfet low side switch, all mounted up with required components like this little board CEO4538 or something similar. Unfortunately as of a couple of minutes ago this item is not in stock at the moment.
Whatever is used don’t forget the diode across the motor or solenoid or any inductive load.

Core also have some high side switches too.
Cheers Bob

2 Likes

Hi Trent
Re this tutorial you linked.

Controlling a Solenoid with Raspberry Pi and a Relay - Tutorial

Just had a look for interest to see how you suggest driving a solenoid. Noted the relay used is quoted at 5V so I looked up the data sheet for it as this is the only documentation that seems to come with that little board.

Your descriptive text says

  • While marked as a 5V supply voltage & input signals, we have found this to work fine at 3.3V

I think this may be a bit misleading. The spec on the data sheet says the relay is guaranteed to operate at 75% of rated voltage. So for 5V this is 3.75V which is a fair bit above 3.3V. Some you have tried may well work at 3.3V but you could not guarantee ALL of them to do so. Especially as if a transistor is used to drive this relay it may drop 100 to 200 mV or so which has to be subtracted from the voltage available for the relay. If a Mosfet is used this will be much less. I can see in the pics there is a 3 terminal device but don’t know if it is Mosfet or transistor. I cannot find a schematic for this board.

This lack of pertinent information I brought up in another post. It sucks.

What I am trying to say here is you may have tested some units at 3.3V and made this statement but there is a possibility that some will not work at this voltage and there is really nothing wrong with the board as it is supposed to be 5V. If some people do not have success at 3.3V they probably think they have a faulty unit when in reality the relay is being asked to operate out of its rated limits.

It is possible you have just copied the information given to you by your supplier in which case I would humbly suggest you have a more stringent checking procedure or give your supplier a good knuckle rap.

I might add that it is this sort of thing that would cause me to lose faith completely with this sort of product (as well as the Chinese writing) and prompt me to look elsewhere for a product that would do my job. I only looked at this out of interest as I would usually arrange my own relay driving so I know and have some control over what happens.
Cheers Bob

2 Likes

Thankyou Trent, Liam and Robert.
Your input has been valuable.
I’ve been reading all the information you all have provided, and I have learnt a lot, and am able to move forward.

3 Likes

I am using this device triggered by a Pi Pico GPIO.
The relay is powered of the supply powering the Pico 5V and the 3.3V GPIO from the Pico is enough to activate the relay. Works nicely. Would also work with a Pi Zero or Microbit.

The relay would connect power to the devices you have listed.

Regards
Jim

4 Likes

Hi James111111 and James46717.
A much better choice all round. Also Pololu supply all the information needed to make informed decisions. Your decision to operate the relay at full 5V is also sensible and the data sheet shows the Mosfet fully on at 2.5V. Well catered for.

One small point though. Although toe Mosfet gate capacitance is small at 27pF it is still a short to ground at the moment of switch on. As I have found and has been pretty well documented that electronic damage can be cumulative, that is a but of repetitive damage now can show up later for no apparent reason. If it were me I would be inserting a low value resistor of about 330Ω in series with the gate. This will limit the short inrush current spike to a safe value for your I/O pin.
Cheers Bob

4 Likes

Good point !!!
Will be easy to incorporate into my design, plenty of space to do that.
Pi Pico is mounted on vero board.
Thanks for the advice @Robert93820

cheers
Jim

3 Likes