What are some good level shifters for use with an Arduino <-> Propeller?
cbmeeks
Posts: 634
in Propeller 1
I've read how many people just use resistors but I think I would rather use level shifters for my next project.
I've used these in the past with success:https://www.sparkfun.com/products/12009
But those little guys are pricey and I'd like to make an Arduiono shield (with a prop on board).
The shield will mostly receive commands (via SPI) from the Arduino. In fact, I plan on making the shield just another SPI slave device.
I want to support the Arduino UNO which means 5v will be common.
Any suggestions on what to use?
Thanks!
I've used these in the past with success:https://www.sparkfun.com/products/12009
But those little guys are pricey and I'd like to make an Arduiono shield (with a prop on board).
The shield will mostly receive commands (via SPI) from the Arduino. In fact, I plan on making the shield just another SPI slave device.
I want to support the Arduino UNO which means 5v will be common.
Any suggestions on what to use?
Thanks!
Comments
I will try the resistor route for now. Just to make things easier.
I've read a lot of info on here and it seems to have major dispute. So, what is the latest recommendation for resistor values? Since the propeller will be a SPI slave, it will be an input whereas the Arduino will be output.
So, do you think something like this would work?:
Arduino PIN OUTPUT
> 4k resistor
> Propeller PIN INPUT
Would it just be in-series like that? Or would the resistor be tied to ground? Sorry I'm such a n00b. :-)
Thanks
Including more detailed specs on the input to be driven and the data rate, setup & hold times, etc might get closer to an ideal value. But, for a quick an dirty value, anything between 2k and 20k should be fine.
But, I would like for the propeller to be a shield of the Arduino so that I could use almost my existing code. But instead of going to a real AY chip, it would go to a prop emulated one.
Anyway, I was thinking to keep the design simple, I would setup the prop to just be another SPI slave device.
So the Arduino would send it a command via SPI and the propeller would intercept this command and do things like load from SD card, send command to AYCog, etc.
The Arduino would then have 5-6 cogs devoted to AY/SN/SID-cog tunes with only 4 pins. :-) Heck, could even extend it out to video. Basically a miniature arcade on a shield for Arduino. Would smoke the Uzebox. LOL
Shoot, my million dollar idea is out...dang...lol
Sounds like you want to do "better" than many people but why use a level shifter when a resistor will work the same????? I'm really confused by your thinking here but set straight please although I myself use resistors in commercial products for 5V (and 24V) to 3.3V and 74HCT86 running from 5V to invert or buffer to 5V signals that are not TTL compatible.
Well, I really don't know if level shifters are better or not. I just assumed they were for this kind of stuff. But I really don't know.
I'm good with resistors. But, I guess I just need to learn more how it works. I guess what was confusing me was that it seemed most people couldn't agree on what values to use, etc. I've used level shifters and it was "dead easy" for me. So that's why I assumed I would go with them.
I'm good with resistors. But, I guess I just need to learn more how it works. I guess what was confusing me was that it seemed most people couldn't agree on what values to use, etc. I've used level shifters and it was "dead easy" for me. So that's why I assumed I would go with them. I can understand how all this kerfuffle has driven you to consider just using level shifters but the resistors work well and it is a pity that the "minimum recommended value" is taken way out of context. As I have explained and reasoned on this matter in many threads there is no advantage to run at this minimum value unless there is a very good reason, usually with very high frequency signals but also taking into account the number of inputs that may be driven at 5V too.
However once you design in a resistor then it is a very simple matter to change it's value, isn't it? So, design in the resistor then.
How it works is as simple as you can get, up until the the maximum input voltage the inputs are very high resistance but after that the "input diodes" start conducting and the resistor will limit the current that flows into the 3.3V supply. Since this voltage isn't clamped to ground like many assume but the current flows into Vdd then it can raise the supply voltage on the Prop to it's breakdown voltage, especially with many low value resistors being driven from 5V. The breakdown voltage of around 4V itself probably won't damage the Prop but there are side effects and one I have observed is boot failure in that you get a "Propeller not found". The problem during reset is that the Prop itself draws very little current so that excess diode current from the 5V signals pushes the supply up beyond the operating limits of the chip.
You might think that the regulators would hold the supply to 3.3V but they are more like a cruise control, they only apply gas, not brakes, so they cannot pull the supply back down if it is being pushed up externally.
So keep it simple and just use resistors (I would use 10k or more normally).
So, those resistors would be in-series right? And NOT to ground? Like so:
Arduino PIN OUTPUT
> 10k resistor
> Propeller PIN INPUT
And, should I put in a diode to protect the propeller if the Arduino is accidentally set as output?
Propeller PIN OUTPUT
> DIODE
> Arduino PIN INPUT