Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I have just got hold of an assembled Gertboard, and I'm thinking of various useful things I can do with it...

I happen to work in a neuroscience lab where we use a lot of equipment that can be controlled with 5V TTL pulses, and I really like the idea of using the Raspberry Pi and Gertboard to automate some of my protocols, perhaps even remotely triggering experiments and logging data over the internet.

However, I realise that the Gertboard's buffered I/O is all 3.3V, although I see that there are 5V pins available the board. I was wondering whether there is some hacky way to trigger a 5V output from the Gertboard without getting an extra logic level converter? I'm not concerned with 5V input at the moment.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

Yep you can, you need to use the 'Open Collector Driver'. These are described in on page 19 in the documentation, here an little excerpt:

The Gertboard uses six ports of a ULN2803a to provide open collector drivers. These are used to turn off and on devices, especially those that need a different voltage or higher current than that available on the Gertboard and are powered by an external power supply. The ULN2803a can withstand up to 50V and drive 500mA on each of its ports

If you use the 5V from your external device as an input for the RPWR pin and use the ground pin situated just above it for the GND of your external device. The pins of the ULN2803a are then able to pull this external supplied signal to 0V, creating a 5V (TTL levels) output signal.

share|improve this answer
    
Yeah, I thought about doing something like that, except using a pin on the J24 header on the Gertboard as my 5V power source, but the open collector driver didn't behave as I was expecting. I'm sure I'm misunderstanding how OCDs work in a basic way, and I wonder if you could set me straight? I tried strapping the J24 5V pin to an RPWR pin, then measuring the voltage across RLY1 and GND pins on J6 and record 0.05V. I expected that when I send 3.3V to the RLY1 pin on J4, I would measure 5V across RLY1 and GND on J6, but instead I measure only 0.59V. –  ali_m Feb 1 '13 at 2:15
    
These pins work in inverse, so put a high level on the input a low level will output (because they can only pull down the used RPWR voltage). What do you measure when you send a logical 0 to the port??? –  ikku Feb 1 '13 at 10:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.