• We recently switched our forum platform. If you experience any issues please email support@crystalfontz.com

Quick question about GPIO

per

New member
There is a convenient easy-access header that can be used, but I cannot for the life of me figure out which gpio "pins" map to the actual physical pins on the board.

Is there any information available?

Also, is it possible to configure the pins in a open-drain/open-collector configuration? I am considering using them to directly control PWM fans, but the closest I can figure out would be to switch between input and output/low states.

Would that be quick enough (the fans need >22kHz unless you want audiable clicking)?

Also, is the image that you received on the SD-card available somewhere for download? I managed to remove an /etc/init.d script I would like to check out now.

Thanks for a great little linux computer, anyway. :)
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

CF Tech

Administrator
Thanks for the inquiry. I know we have that information here, but I might have to dig for it. If you have the pin number of the header and the corresponding port number, is that all you need?

How many fans are you trying to do? I think there are some hardware PWM channels available, but not too many.

If you want a bunch, we could probably do it with the FIQ, but that will be a bit involved . . . not impossible though.
 

CF Tech

Administrator
We will have to make sure this table gets into the next version of the data sheet.

I have attached the part of the schematic that covers that connector (high res PDF below, PNG inline). Notation: A03 is the ball (pin) number on the i.MX283 / i.MX287 BGA package. The P2.16 means port 2, bit 16. Six of the pins can be configured by jumper.

Pin_Table_CFA_920_Expansion.png
 

Attachments

per

New member
Thanks for the inquiry. I know we have that information here, but I might have to dig for it. If you have the pin number of the header and the corresponding port number, is that all you need?
Well, probably. Does that mean that they are not mapped to /sys/class/gpio/? :)

How many fans are you trying to do? I think there are some hardware PWM channels available, but not too many.
Six, but they should all have the same PWM signal, so it is most likely enough with one channel (at least if it can sink 6x10mA at 3.3V).
 

CF Tech

Administrator
They should all be mapped.

. . . if it can sink 6x10mA at 3.3V . . .
No processor port pin I know of will do that.

If you used a FET like this you would be good:
http://www.digikey.com/product-detail/en/ZVN4206AVSTZ/ZVN4206AVSTB-ND/991767

  • Connect the GPIO pin to the FET's gate through a 500 ohm resistor.
  • Connect a 50K resistor from the FET's gate to GND (off) to make sure the FET is off if the port is in input mode (HiZ).
  • Connect the FET's source to ground.
  • Connect the FET's drain to the fan's negative terminal (typically black wire).
  • Connect the fan's positive terminal to 12v.
Drive the GPIO pin high to turn the fan on.
Drive the GPIO pin low to turn the fan off.
 

per

New member
Well, the fans in question actually already contain something very close to that. :)

They have a controller inside that does the stepping (I am fairly sure they are actually stepper motors), and a 0-5V dedicated PWM input specified to operate between 22 and 26khz, although they are rather forgiving in reality (it's pulled up inside the fan, but I have seen many designs that supply voltage to it anyway, the important thing is to connect it to ground during the 'downtime' of the pulse, really).

They also have a RPM detection pin, with two pulses per rotation, but that is easier to handle.

(these are 4-pin standard computer fans)

The manufacturer warns about using PWM directly on the power that is supplied to the fans, it can damage the electronics and engine. How likely that is I have no idea, but they do warn about it.
 

CF Tech

Administrator
If you have the 4-pin fans, then you are correct, the pwm input to them should be just a control signal, not something that needs to switch the power.

However, if those 4-pin inputs really draw 10mA each and you have 6 of those, you will need a some device to boost the current drive capability.
 
Top