Pages: [1]   Go Down
Author Topic: emulate open-collector with Due  (Read 642 times)
0 Members and 1 Guest are viewing this topic.
Gothenburg
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My project is emulating a retro floppy device that speaks over a serial bus which is an 5v open-collector bus.
This works just fine with the 5V arduino's, the Uno, the Nano and the Dumilanove.
With the Due which is 3.3V based however, I have problems.
I thought that it would be enough to add a bidirectional level shifter between the two systems, but that didn't seem to help. I have also tried configuring the IO's with INPUT_PULLUP, but maybe that doesn't work for all digitals on the Due...or?
I actually don't have a Due myself (yet), but I have assisted a guy over a different forum related to my project and I thought it was best taking the questions on the Arduino forums instead.

What happens is that on the Due side it is able to see the signals shifting high or low if I alternate them, but viceverse, on the "retro computer" side the signals are just indicating high (or a least the bits read are high).

The question is then, does anyone here have a clue what else needs to be added for this to work. A pull-up or pull-down resistor on either (or both) sides of the level shifter?

I have seen similar questions about open-collector here:
http://forum.arduino.cc/index.php?topic=94899.0

And also some questions related to I2C and the Due somewhere here, but I can't really relate that to this setup.

Does anyone have some advice what I should do to get it working?

Logged

New England
Offline Offline
Sr. Member
****
Karma: 7
Posts: 295
Natural Semiinductor
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Use an LM339 comparator chip. It has open collectors. Signals from the Due will be 0 to 3.3 v. So send that signal to the LM339 + input while applying 1.6 volts DC to the - input. The LM339 output goes to the 5v bus which already has a pullup R elsewhere.

The signal from the outside system has a 5v to 0v signal . Connect it to the LM339 + input and set the - input  to 2.5v DC. Add a pullup R to the LM339 output and a 3.3v voltage supply. Now that signal goes to the Due and it ranges from 0v to 3.3v.
Logged

I am going to get going.

Gothenburg
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the response! Will try this when I get the chance!
Logged

Offline Offline
Edison Member
*
Karma: 29
Posts: 2379
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just designed this circuit to give you a 5v high from as little as a volt.

Just pnp and npn standard transistors


* Screenshot_2014-04-29-01-45-35.png (65.53 KB, 720x1280 - viewed 31 times.)
Logged

Pages: [1]   Go Up
Jump to: