deathracer99
Posts: 11
Joined: Sun Jan 31, 2016 10:55 am

Sending TTL pulse from Arduino to Raspberry Pi

Fri Jun 16, 2017 4:46 pm

I am trying to send TTL pulse from arduino to 8 raspberry pi simultaneously. I wanted to ask whether circuit to good enough to send TTL pulse to pi and works under currently and voltage limitations. Can someone point out questions if there are any?

Here is the image for the circuit https://ibb.co/fpJMYQ

User avatar
Burngate
Posts: 5044
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
Contact: Website

Re: Sending TTL pulse from Arduino to Raspberry Pi

Sat Jun 17, 2017 8:59 am

Yes, it should work, but I would put a resistor between the emitter and ground to pull down the Pi's inputs.

The Pi's inputs are all high impedance, so almost no current will be taken by them.
That means you can put many in parallel with no problem, in terms of DC performance.
However, they will each have capacitance, as will your wiring, and that will slow down any transitions, particularly negative going ones - you could end up with them reading high long after the input has gone low.
Putting a 2.2KΩ resistor to ground will discharge that capacitance, ensuring a low registers as a low.
It will also reduce the effect of any interference pick-up on your wiring.

I had to look up the MB102 on your diagram. For anyone else reading this, it's a power supply that takes in 5v or more and regulates it to 3v3.
http://www.petervis.com/Raspberry_PI/Br ... upply.html

It's not obvious what happens if, as in your diagram, a mA or so is fed into the supply's output. That could happen because, with the signal from the Arduino high, and no load on the emitter, current into the base can only go out through the collector.
This is another good reason to provide a load on the emitter.

deathracer99
Posts: 11
Joined: Sun Jan 31, 2016 10:55 am

Re: Sending TTL pulse from Arduino to Raspberry Pi

Sat Jun 17, 2017 9:04 am

Thanks for the help. Yep, I was initially planning to put a 1k resistor between emitter and ground.

Also, I am sorry for MB102, had planned on describing it but forgot while writing.

deathracer99
Posts: 11
Joined: Sun Jan 31, 2016 10:55 am

Re: Sending TTL pulse from Arduino to Raspberry Pi

Sat Jun 17, 2017 3:58 pm

@burngate I made the changes i.e. added a 2.2kohm resistor and tested the circuit.

I was getting a voltage of 0.67V across Pi's whereas it should be 3.3V. Is there anything that might be the cause of this problem? What is possibly the cause of this?

Thanks again

StuartF
Posts: 23
Joined: Sun Feb 02, 2014 5:41 pm

Re: Sending TTL pulse from Arduino to Raspberry Pi

Sun Jun 18, 2017 2:57 pm

Depending on which i/o you are using as an input, it could be an internal pull-up is active.
This would act as a voltage divider.
Try to get it working with just one Pi first, then add the others once debugged.

User avatar
Burngate
Posts: 5044
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
Contact: Website

Re: Sending TTL pulse from Arduino to Raspberry Pi

Mon Jun 19, 2017 8:45 am

There are several things that could be wrong.
0.67v is suspiciously close to a diode-forward-voltage, but I can't see where it could be coming from.
We could be completely wrong in our analysis of the circuit and how it works, but I doubt this.
If you're using either of GPIOs 2 or 3 (pins 3 or 5) the pull-ups would be enough to make a low-level 1.7v instead of 0v, but a high-level would still be 3v3
Ard-Pi-4.png
Ard-Pi-4.png (11.08 KiB) Viewed 394 times
So here's a partial list of what I've done wrong in the past.
Mis-setting my meter - it's surprising how often I've tried to read volts with it set to current or resistance.
Mis-reading resistor colour codes - if the paint is poor, 220M can look like 2k2!
Putting the transistor in back-to-front - though a 2N3904 is at least vaguely symetrical, some have the base at one end, which cocks things up royally.
On the Pi's GPIO header, counting from the wrong end, mixing up the even pins with the odd ones, mis-counting pins, ...
On a breadboard, I've put a jumper one row displaced from where it should be, or just plain not put it in. I could have sworn I'd put it in, but it's not there now. It must be the mice ...

MarkR
Posts: 112
Joined: Fri Jan 25, 2013 1:55 pm

Re: Sending TTL pulse from Arduino to Raspberry Pi

Mon Jun 19, 2017 10:00 am

The Pi's inputs are not 5v tolerant, so you need at least a potential divider to stop them from going too high.

But if the Arduino offers open-collector output, you could just put a resistor to pull it up to 3v3, then break it out to the raspberry Pis.

Return to “Interfacing (DSI, CSI, I2C, etc.)”

Who is online

Users browsing this forum: McLion and 25 guests