1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Some questions about making my own digital sensor

Discussion specific to the intelligent brick, sensors, motors, and more.

Re: Some questions about making my own digital sensor

Postby gloomyandy » 14 Dec 2010, 21:07

He may not need the level shifter but he may still have a problem. The datasheet for that board shows 4.7K pull up resistors installed on the i2c lines. These are much smaller than the 82K recommended by Lego, so the i2c interface may not work unless you can remove those 4.7k resistors (or cut the track to disconnect them)...

Andy
User avatar
gloomyandy
 
Posts: 320
Joined: 29 Sep 2010, 05:03

Re: Some questions about making my own digital sensor

Postby mattallen37 » 14 Dec 2010, 23:04

aswin0 wrote:...I need the sensor, and some circuit that provides 3.3V. That's all, right?
To get 3.3V I need a LDO voltage regulator and 2 capacitors (i.e. LD-1117 + 100nF + 10muF). That's all, right?
What about pull ups, do I need those?...
Yes (but you probably want different pullups).
On a battery run line, probably no caps would be REQUIRED, but I would still use at least one.
Yes. The board has them, but as Andy said, they are probably way too strong. I would remove them and add normal resistors (not surface mount) for pullups. The NXT sensors use 82k, but I have used 100k, and NXTreme has used 10k, on a 4.nV line, with no problems.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
User avatar
mattallen37
 
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA

Re: Some questions about making my own digital sensor

Postby nxtreme » 15 Dec 2010, 01:02

mattallen37 wrote:On a battery run line, probably no caps would be REQUIRED, but I would still use at least one.
Yes. The board has them, but as Andy said, they are probably way too strong. I would remove them and add normal resistors (not surface mount) for pullups. The NXT sensors use 82k, but I have used 100k, and NXTreme has used 10k, on a 4.nV line, with no problems.

Actually, most if not all LDO regulators are switching regulators which means that they introduce spikes or noise into your power rails. You have to include caps otherwise the operation of your circuit will be spotty at best. You normally only need one or two ceramic, aluminum electrolytic or tantalum capacitors on the output but it isn't a bad idea to also include a ~100uF electrolytic on the input as well if your design/robot has any motors or noisy sensors (Sharp distance sensors come to mind) in it. You can always find the specifics about the required caps in the datasheet.

I personally use the LP2950 LDO regulator* but that's just because it was cheap (~$1 US for the 100 mA through hole version) and it's what Digikey had.

* Cue heated discussion of the ups and downs of certain regulators. I'm sure we all have our favorites.

-EDIT- Darn, maybe I should build the "edit" button into my mouse. Yes, I have had success using 10K pullups but like Matt, I think 4.7K might be a bit much. You don't need any special equipment to remove them, just a soldering iron and some solder. Stick a big blob of solder on the tip of your iron, touch it to the part you intend to remove, let it heat for a while and just swipe it off. Just don't get rid of the caps instead :). You can clean the board a bit with some solder wick and hand cleaner that has alcohol in it.

You can also buy SMT resistors for a couple cents from Digikey or Mouser. Digikey has a shipping option that is only ~$2 US, your whole order would probably come out to less than $5. And yes, you can solder them :).
One King to rule them all, One King to find them,
One King to bring them all and in the darkness bind them
On Earth where Shadows lie.
User avatar
nxtreme
 
Posts: 246
Joined: 29 Sep 2010, 03:53
Location: 192.168.1.2

Re: Some questions about making my own digital sensor

Postby philoo » 15 Dec 2010, 09:02

nxtreme wrote:Actually, most if not all LDO regulators are switching regulators which means that they introduce spikes or noise into your power rails. You have to include caps otherwise the operation of your circuit will be spotty at best.

NO! LDOs are plain, linear, noiseless (compared to switching regulator) devices. Capacitors are nonetheless required (values depending on circuit, see datasheet) to ensure stability. Without appropriate caps they turn into oscillators...
Philo
User avatar
philoo
 
Posts: 76
Joined: 29 Sep 2010, 09:04
Location: Paris, France

Re: Some questions about making my own digital sensor

Postby nxtreme » 15 Dec 2010, 17:18

philoo wrote:NO! LDOs are plain, linear, noiseless (compared to switching regulator) devices. Capacitors are nonetheless required (values depending on circuit, see datasheet) to ensure stability. Without appropriate caps they turn into oscillators...

Ok, well, I'm wrong :P! I got something confused in there somewhere. Thanks for the clarification, Philo. Note to self: Must read Wikipedia entry on subject I'm posting about before opening my big mouth :). That way I'll only get it partially wrong.
One King to rule them all, One King to find them,
One King to bring them all and in the darkness bind them
On Earth where Shadows lie.
User avatar
nxtreme
 
Posts: 246
Joined: 29 Sep 2010, 03:53
Location: 192.168.1.2

Re: Some questions about making my own digital sensor

Postby aswin0 » 15 Dec 2010, 22:50

Hi guys,

Thanks for all the input, it gave me the courage to go on with this sensor. I think that with your help I'll be able to make my first home brew sensor.

I also decided to buy the level shifter as well, because I figured that it shields the NXT from the 4.7k pull ups. If I understand it right it got it's own 10k pull ups. This should be just enough for the NXT I understand. But if this is not enough I can try to modify the pull ups on the 2 dollar level shifter instead of the ones on the 65 dollar sensor.

There is one more reason for me to include the level shifter. The data sheet of the sensor states that vlogic must be less than or equal to VDD at all times. I hope the level shifter helps me to satisfy this condition because Vlow on the level shifter will come from the LDO, just as VDD. Without the level shifter vlogic and VDD would come from different sources and then I can't guarantee that vlogic will be less than VDD.

Does this all make sense or is this complete nonsense? Be frank, I rather got my 2 dollar pride hurt that my 65 dollar sensor ;-)
My blog: nxttime.wordpress.com
User avatar
aswin0
 
Posts: 201
Joined: 29 Sep 2010, 06:58

Previous

Return to Mindstorms Hardware

Who is online

Users browsing this forum: No registered users and 1 guest