Drive LED eyes by GPIO instead 3.3V and relay #36

Closed
opened 2018-10-10 19:15:59 +02:00 by mishi · 1 comment
mishi commented 2018-10-10 19:15:59 +02:00 (Migrated from git.mattzz.de)

The weremonkey's eyes are switched via relay which is not a good option for exhibits which do otherwise not need a relay - namely the Eyes-in-the-dark and the demon. Plus, it uses up a relay port which might be used for something else.

It would be good to define another solution for LED lights which is then used for all exhibits that have LED eyes. Which standard GPIO pin should we use?

Note: The GPIO option is not suitable for exhibits that use 12V powered LED lights like the Monster-in-the-box which will always require a relay.

The weremonkey's eyes are switched via relay which is not a good option for exhibits which do otherwise not need a relay - namely the Eyes-in-the-dark and the demon. Plus, it uses up a relay port which might be used for something else. It would be good to define another solution for LED lights which is then used for all exhibits that have LED eyes. Which standard GPIO pin should we use? Note: The GPIO option is not suitable for exhibits that use 12V powered LED lights like the Monster-in-the-box which will always require a relay.
mattzz commented 2018-10-10 20:58:49 +02:00 (Migrated from git.mattzz.de)

Just add a any available GPIO to config.py, e.g. pins 11, 13, 15, 17, 19. As we are not using SPI, I2C etc. you can use all pins, even pin 8 & 10 of the UART (however, I would not do that because the UART can really be a life saver...).

For Halloween conventions I would suggest to stick to 1-4 for the standard relay and ports 5&6 are eyes etc.

We have to watch current consumption.
From the docs:

A maximum of 16mA per pin with the total current from all pins not exceeding 51mA.

and

When the Pi was designed, they used a figure of 3mA per GPIO pins in determining if
the regulator could supply enough current. Hence the simple 3mA limit mentioned before. However, if not all the pins are supplying current then you can divert those pin’s share of the current into the ones you are using. Hence the total recommended current limit of 17 * 3 = 51mA.

So I would stick to 5-10mA for two LEDs each. You have to use two ports for two LEDs because the forward voltage of an LED is ~2V.

Just add a any available GPIO to config.py, e.g. pins 11, 13, 15, 17, 19. As we are not using SPI, I2C etc. you can use all pins, even pin 8 & 10 of the UART (however, I would not do that because the UART can really be a life saver...). For Halloween conventions I would suggest to stick to 1-4 for the standard relay and ports 5&6 are eyes etc. We have to watch current consumption. From the docs: > A maximum of 16mA per pin with the total current from all pins not exceeding 51mA. and > When the Pi was designed, they used a figure of 3mA per GPIO pins in determining if the regulator could supply enough current. Hence the simple 3mA limit mentioned before. However, if not all the pins are supplying current then you can divert those pin’s share of the current into the ones you are using. Hence the total recommended current limit of 17 * 3 = 51mA. So I would stick to 5-10mA for two LEDs each. You have to use two ports for two LEDs because the forward voltage of an LED is ~2V.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mattzz/halloween#36
No description provided.