I think some mention of what needs to be done to make a 3204 and the 3202 work, would be even better stuff.
Also, using a variable resistor in combo with the LDR is much more fun than just the LDR..(more knobs to twiddle)
I realize simplicity is important, It's just that I feel like I am "doing something" with that kind of interaction,
Plus it kind of ties into moving a servo around with a potentiometer..
As a thick headed newbie, I beleive I am qualified to make these newbie comments...
Anyway thanks for the good work, and look forward to the finished tutorial..
On the one hand you admit your ignorance, but on the other you flout it. That's amazing.
The thing is -- there's no priesthood of EEs out to keep you down, stifle your progress, or dampen your spirit, man. To proceed, sometimes a guy has to go with his schema , but when he finds that it's not in keeping with the facts then he must amend it.
Have a good day.
I'll bite.. The ADC Tutorial will be "amended" with the excellent feedback I've received in this thread, including yours. The advantage that I might have is that I have a layman's view of the Propeller which is helpful in explaining the material to other layman. If I'm find to be in error somewhere, I don't have any problem with admitting it and making corrections. My initial post asked for the kind of positive feedback I've received.
One of the areas where the "other" microprocessors have had opportunity to pull ahead of the Propeller is in their perceived accessibility to artists, tinkerers, and other non-engineering types. My material and approach is designed to be inviting to those users. Combined with the knowledge pool which is accessible to this forum, I believe that the final product with be a positive addition. There is room in the Propeller world for both engineer and tinkerer alike. Regardless of their experience.
Also, using a variable resistor in combo with the LDR is much more fun than just the LDR..(more knobs to twiddle)
I realize simplicity is important, It's just that I feel like I am "doing something" with that kind of interaction,
Plus it kind of ties into moving a servo around with a potentiometer..
As a thick headed newbie, I beleive I am qualified to make these newbie comments...
Anyway thanks for the good work, and look forward to the finished tutorial..
You know it really never hit me to grab a variable resistor when I jumped over to the servo. Excellent (and DUH obvious) suggestion. I look at adding to to the revision.
As JonnyMac pointed out, it's a good idea to have a resistor (I think 2k would be enough) between DOUT and DIN.
If you use a 5V 3208 you'd want the DOUT going through the resistor be reaching the Prop.
I don't think you need the 220 ohm resistors. Did you see those in the Boe-Bot book? I'm pretty sure you don't need to worry about limiting current to the 3208. As long as the voltage isn't more than Vdd (which I just noticed you have incorrectly labeled Vss (Vss is ground)).
I'm by no means an expert on this stuff by I do use the MCP3208 chip a lot.
I'm using GoogleDocs to create this schematic, so any suggestions for a better light-weight schematic tool that runs on my Mac is appreciated!
Have you ever checked out OmniGraffle? If you just need a drawing program and not something to convert from a schematic to a PCB it would work great. I've always been tempted but have never had enough need to justify the cost.
And then there's DipTrace, but it runs under WINE so I haven't been very attracted by it.
Have you ever checked out OmniGraffle? If you just need a drawing program and not something to convert from a schematic to a PCB it would work great. I've always been tempted but have never had enough need to justify the cost.
And then there's DipTrace, but it runs under WINE so I haven't been very attracted by it.
D'OH! I have OmniGraffle and hadn't even though of looking for schematic symbols!
If I'm reading from a potentiometer, is this an acceptable circuit?
You should move the resistor between the DOUT and DIN pins, then connect the Propeller to the DIN pin (which is an input). Change the resistor size to 3.3K or higher; this will work with 3.3 or 5v circuits. I've written objects and demo code for all three models that you can find here:
If you're running the '3208 at 5v then you should use a 2.8K or higher resistor -- 3.3K is the next size up that is standard. 4.7K is fine, too.
The math:
(5v - (3.3v + 0.3v)) / 0.0005A = 2800
The 0.3v is the drop across the pin protection diode, the 0.0005A is the maximum current through that diode.
I apologize for contradicting your earlier advice.
Thank you very much for clarifying why you chose the resistor value you did.
I realized now I don't understand the Propeller as well as I thought I did.
I found the reference to 500 uA in the datasheet (page 26):
Max. DC current into an input pin with internal protection diode forward biased: +/- 500 uA
Immediately below this characteristic is:
Max. allowable current per I/O pins: 40 mA
I had thought this was the current one needed to worry about. Now I see this value only applies to the pin in the output state(right?). Thanks for setting me straight.
The ones that used to come with the Boe-Bot were 50k in total darkness and about 1k in "full light exposure."
The voltage out VO of a voltage divider is:
VO = Vdd * (R1 / (R1 + R2))
R1 is the resistor connected to Vdd and R2 is the resistor connected to ground.
I'd think you'd want resistor values that give a wide range VO.
With the resistor values you have and assuming a similar photoresistor as the Boe-Bot ones, I get 2.06V in complete darkness and 2.97V in the light.
If you eliminate the 10k resistor and change the 100k to 10k, VO varies from 0.55V to 3.00V. I think you'd want a relative large difference in voltage between dark and light.
The resistor values should be based on what the value of your photoresistor.
Think I'll dump out my drawer of Photocells and check to see what the typical ranges are. I couldn't pass up on them when the local rat shack dumped them from inventory. Heck the packages were so yellow that they were probably on the shelf for the last 10-20 years.
I'm probably not going to worry as much about precision with the photocell experiment. Folks who have a photocell or two might not have consistent values. The variable resistor experiment is providing a nice 3-4000 range with 2000 right around dead center.
I'm pleased to have been the catalyst to the creation of more beginner information for this ADC chip.
High praise to all who assisted in finding the errors in the document. There is now good information all the way around.
(ADC update to be posted soon.)
I picked up a copy too. On Amazon there are a few commenters who have found errors. McGraw Hill doesn't have an errata but I found one from an instructor who used the book in an Applied Electronics course: http://www.eg.bucknell.edu/physics/ph235/errata.pdf
@SSteve: My copy hasn't gotten here yet, but thank you! I'll print it out and stick a copy in the back.
@Tony: I use a combination of tools to create graphics for my articles. The ADC article uses a combination of PEBBLE, Diptrace, Fritzing, and MSPAINT. Those who have followed my work from earlier documents know that I've been pretty fond of MSPAINT for a long time, but I'm slowly making the transition to more professional tools.
Jeff
Thank's for the info on how you do your excellent drawings. Somewhere I saw, maybe it was one of your posts, an MSPAINT templete for drawing circuits using cut and paste.
I tried it and had no success, I will stick with the cadd programs.
I tried PEBBLE and it comes up but if I try and select another board it populates the pop up window with text and after I click on LOAD it just lays there until I dump the window.
Maybe it needs an older version of IE, I am using IE 8.
Comments
I think some mention of what needs to be done to make a 3204 and the 3202 work, would be even better stuff.
Also, using a variable resistor in combo with the LDR is much more fun than just the LDR..(more knobs to twiddle)
I realize simplicity is important, It's just that I feel like I am "doing something" with that kind of interaction,
Plus it kind of ties into moving a servo around with a potentiometer..
As a thick headed newbie, I beleive I am qualified to make these newbie comments...
Anyway thanks for the good work, and look forward to the finished tutorial..
I'll bite.. The ADC Tutorial will be "amended" with the excellent feedback I've received in this thread, including yours. The advantage that I might have is that I have a layman's view of the Propeller which is helpful in explaining the material to other layman. If I'm find to be in error somewhere, I don't have any problem with admitting it and making corrections. My initial post asked for the kind of positive feedback I've received.
One of the areas where the "other" microprocessors have had opportunity to pull ahead of the Propeller is in their perceived accessibility to artists, tinkerers, and other non-engineering types. My material and approach is designed to be inviting to those users. Combined with the knowledge pool which is accessible to this forum, I believe that the final product with be a positive addition. There is room in the Propeller world for both engineer and tinkerer alike. Regardless of their experience.
I'm having a great day, Thank you!
OBC
You know it really never hit me to grab a variable resistor when I jumped over to the servo. Excellent (and DUH obvious) suggestion. I look at adding to to the revision.
Thanks
OBC
If I'm reading from a potentiometer, is this an acceptable circuit?
As JonnyMac pointed out, it's a good idea to have a resistor (I think 2k would be enough) between DOUT and DIN.
If you use a 5V 3208 you'd want the DOUT going through the resistor be reaching the Prop.
I don't think you need the 220 ohm resistors. Did you see those in the Boe-Bot book? I'm pretty sure you don't need to worry about limiting current to the 3208. As long as the voltage isn't more than Vdd (which I just noticed you have incorrectly labeled Vss (Vss is ground)).
I'm by no means an expert on this stuff by I do use the MCP3208 chip a lot.
Duane
I'm using GoogleDocs to create this schematic, so any suggestions for a better light-weight schematic tool that runs on my Mac is appreciated!
Regards,
-joe
Have you ever checked out OmniGraffle? If you just need a drawing program and not something to convert from a schematic to a PCB it would work great. I've always been tempted but have never had enough need to justify the cost.
And then there's DipTrace, but it runs under WINE so I haven't been very attracted by it.
D'OH! I have OmniGraffle and hadn't even though of looking for schematic symbols!
There are schematic symbols at www.graffletopia.com. If you have OmniGraffle 5 the stencil search feature automatically searches Graffletopia.
If you're running the '3208 at 5v then you should use a 2.8K or higher resistor -- 3.3K is the next size up that is standard. 4.7K is fine, too.
The math:
(5v - (3.3v + 0.3v)) / 0.0005A = 2800
The 0.3v is the drop across the pin protection diode, the 0.0005A is the maximum current through that diode.
You should move the resistor between the DOUT and DIN pins, then connect the Propeller to the DIN pin (which is an input). Change the resistor size to 3.3K or higher; this will work with 3.3 or 5v circuits. I've written objects and demo code for all three models that you can find here:
http://obex.parallax.com/objects/625/
All in Spin; very easy to use and understand.
Here are a few graphics which are undergoing transformation for the review of the "experts" here.
A quick and dirty correct schematic for the photocell circuit:
A revised breadboard layout for the photocell circuit:
A new breadboard layout for connecting a 10k variable resistor:
Comments, revision suggestions, and barbs all welcome.
Thanks!
OBC
I apologize for contradicting your earlier advice.
Thank you very much for clarifying why you chose the resistor value you did.
I realized now I don't understand the Propeller as well as I thought I did.
I found the reference to 500 uA in the datasheet (page 26):
Immediately below this characteristic is:
I had thought this was the current one needed to worry about. Now I see this value only applies to the pin in the output state(right?). Thanks for setting me straight.
Duane
What's the range of the photoresistor?
The ones that used to come with the Boe-Bot were 50k in total darkness and about 1k in "full light exposure."
The voltage out VO of a voltage divider is:
VO = Vdd * (R1 / (R1 + R2))
R1 is the resistor connected to Vdd and R2 is the resistor connected to ground.
I'd think you'd want resistor values that give a wide range VO.
With the resistor values you have and assuming a similar photoresistor as the Boe-Bot ones, I get 2.06V in complete darkness and 2.97V in the light.
If you eliminate the 10k resistor and change the 100k to 10k, VO varies from 0.55V to 3.00V. I think you'd want a relative large difference in voltage between dark and light.
The resistor values should be based on what the value of your photoresistor.
Duane
Think I'll dump out my drawer of Photocells and check to see what the typical ranges are. I couldn't pass up on them when the local rat shack dumped them from inventory. Heck the packages were so yellow that they were probably on the shelf for the last 10-20 years.
I'm probably not going to worry as much about precision with the photocell experiment. Folks who have a photocell or two might not have consistent values. The variable resistor experiment is providing a nice 3-4000 range with 2000 right around dead center.
OBC
Thanks for getting this thread started OBC! I've had fun messing with this one... many thanks to the "reviewers" too!
High praise to all who assisted in finding the errors in the document. There is now good information all the way around.
(ADC update to be posted soon.)
More on the way.
OBC
http://www.gadgetgangster.com/tutorials/397
OBC
I picked up a copy too. On Amazon there are a few commenters who have found errors. McGraw Hill doesn't have an errata but I found one from an instructor who used the book in an Applied Electronics course: http://www.eg.bucknell.edu/physics/ph235/errata.pdf
I was wondering how you created the excellent breadboard graphics?
@Tony: I use a combination of tools to create graphics for my articles. The ADC article uses a combination of PEBBLE, Diptrace, Fritzing, and MSPAINT. Those who have followed my work from earlier documents know that I've been pretty fond of MSPAINT for a long time, but I'm slowly making the transition to more professional tools.
OBC
Thank's for the info on how you do your excellent drawings. Somewhere I saw, maybe it was one of your posts, an MSPAINT templete for drawing circuits using cut and paste.
I tried it and had no success, I will stick with the cadd programs.
I tried PEBBLE and it comes up but if I try and select another board it populates the pop up window with text and after I click on LOAD it just lays there until I dump the window.
Maybe it needs an older version of IE, I am using IE 8.
Tom