Baby Orangutan - Pinout Applied Correctly?

Hello. I’m trying to determine the suitability of the Baby Orangutan for my application.
Do the following pins suit the functions I’m attempting to accomplish?

PB0 - “OUTPUT” Signal (On/Off Voltage)
PB1 - PWM Fan Control Signal
M1A - DC Motor 1 - Power
M1B - DC Motor 1 - Power
PC4 - DC Motor Encoder - Hall Sensor A
PC5 - DC Motor Encoder - Hall Sensor B
PB3 - “OUTPUT” Signal (On/Off Voltage)
PB4 - “OUTPUT” Signal (On/Off Voltage)
PB5 - “OUTPUT” Signal (On/Off Voltage)
ADC6 - “INPUT” Signal (0-12V Variable Voltage)
PD2 - “INPUT” Signal (0-Vcc Variable Voltage)
PD3 - “INPUT” Signal (0-Vcc Variable Voltage)
PC0 - Force-Sensing Resistor… set_digital_input(IO_C0, PULL_UP_ENABLED);
PC1 - Force-Sensing Resistor… set_digital_input(IO_C1, PULL_UP_ENABLED);
PC2 - Force-Sensing Resistor… set_digital_input(IO_C2, PULL_UP_ENABLED);
PC3 - Force-Sensing Resistor… set_digital_input(IO_C3, PULL_UP_ENABLED);

(the other lead on each Force-Sensing Resistor would connect to GND)

As you are probably aware, ADC6 will not tolerate input voltages > 5 volts, so a resistive voltage divider is required. I’m fairly certain that the internal pullups cannot be enabled when PORTC pins are in analog mode. Check the data sheet on alternative pin functions for the complete details. In any case, the pullup resistor values are poorly determined.

I was not aware ADC6 will not tolerate input voltages > 5 volts, and thank you for the recommendation for a resistive voltage divider.

Thanks also for recommending that I look into the issue with internal pullups and PORTC pins. I will dig into that.

What do you mean by “the pullup resistor values are poorly determined”?

The actual resistances of the pullups can be anywhere between about 20 and 50 K ohms.

Ok, so hence the need for voltage dividers. Thank you!

I may have misread your first post. Do you really want digital inputs on PORTC to measure the force-sensitive resistors? I would use the port in analog input mode, with an external resistance as the upper part of the resistive divider.

Hello.

I see that Jim has given you some pointers. Please note, PB3 and PD3 are not broken out on the Baby Orangutan, so you will probably want to use the other available pins. You might consider moving the “INPUT” signals to PC4 and PC5, as those pins can be used as analog inputs. The encoders could then move to PD2 and PD4.

- Jeremy

Revised from the last two posts:

PB0 - “OUTPUT” Signal (On/Off Voltage)
PB1 - PWM Fan Control Signal
M1A - DC Motor 1 - Power
M1B - DC Motor 1 - Power
PD2 - DC Motor Encoder - Hall Sensor A
PD4 - DC Motor Encoder - Hall Sensor B
PB4 - “OUTPUT” Signal (On/Off Voltage)
PB5 - “OUTPUT” Signal (On/Off Voltage)
ADC6 - “INPUT” Signal (0-5V Variable Voltage)
PC0 - Force-Sensing Resistor (Analog Input Mode)
PC1 - Force-Sensing Resistor (Analog Input Mode)
PC2 - Force-Sensing Resistor (Analog Input Mode)
PC3 - Force-Sensing Resistor (Analog Input Mode)
PC4 - “OUTPUT” Signal (On/Off Voltage)
PC5 - “INPUT” Signal (0-Vcc Variable Voltage)
PD7 - “INPUT” Signal (0-Vcc Variable Voltage)

My concern is which pins can be used to output a voltage signal to other components… currently assigned PB0, PB4, PB5, and PC4.

Hello.

These pins are used to program the Baby Orangutan, so you’ll need to make sure that whatever you have connected to them will not interfere with programming and will not get put into a bad state by the programming signals.

- Ben

Thank you. The device those pins are connected to can be off during programming, disconnected if necessary. Thanks everyone for the help. Very much appreciated.

For use with a TTL display, would PD1 output the TTL signal? (5V TTL serial 9600 baud, 8 bit, no parity, 1 stop bit)

Your new proposed pinout uses PD7 to read one of your inputs. If you want to read that input as an analog voltage, you might want to swap that pin with PC4. PD1 is the UART output pin of the ATmega328 and can be used to transmit TTL serial (PD0 would be used to receive TTL serial).

- Jeremy

Thanks Jeremy. To confirm, the assignments are now…

PB0 - “OUTPUT” Signal (On/Off Voltage)
PB1 - PWM Fan Control Signal
M1A - DC Motor 1 - Power
M1B - DC Motor 1 - Power
PD2 - DC Motor Encoder - Hall Sensor A
PD4 - DC Motor Encoder - Hall Sensor B
PB4 - “OUTPUT” Signal (On/Off Voltage)
PB5 - “OUTPUT” Signal (On/Off Voltage)
ADC6 - “INPUT” Signal (0-5V Variable Voltage)
ADC7 - “INPUT” Signal - w/10k potentiometer
(Or use PC4 instead of ADC7 if the potentiometer is not to be used)
PC0 - Force-Sensing Resistor (Analog Input Mode)
PC1 - Force-Sensing Resistor (Analog Input Mode)
PC2 - Force-Sensing Resistor (Analog Input Mode)
PC3 - Force-Sensing Resistor (Analog Input Mode)
PD7 - “OUTPUT” Signal (On/Off Voltage)
PC5 - “INPUT” Signal (0-Vcc Variable Voltage)
PD1 - TTL TX
PD0 - TTL RX

Those connections seem fine. Please note, ADC7 is connected to the user trimmer potentiometer on the board and might interfere with your input signal (if it does, moving that connection to PC4 like you mention should work).

- Jeremy