go_away

Author Topic: OSCAR - user input mod  (Read 2034 times)

0 Members and 1 Guest are viewing this topic.

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
OSCAR - user input mod
« on: June 05, 2009, 05:46:17 AM »
ok, I dropped the idea of a PC to I2C mod, now its a user interface mod. it will have transistors, switches  and pots, if MCUs can read resistance, or if I put 5 volts into it, voltage? also can I temporarily use a robuniuo, aka does a robuniuo have I2C connection spots.

it will work like if pin a becomes high, it sends the bit 3 to mod 12214352. that bit may turn a servo or turn on a led
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: OSCAR - user input mod
« Reply #1 on: June 05, 2009, 06:00:51 AM »
yes, roboduino has i2c.
it will take over analogue inputs 4 and 5 and has optional pup resistors.
Howdy

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
Re: OSCAR - user input mod
« Reply #2 on: June 05, 2009, 11:57:34 AM »
It would be nice to have the user input module on the same board as the lcd. This way you can create nice user interfaces with menus etc.
You can also look at mini joysticks like this : http://www.anglia.com/newsarchive/834.asp?article_id=1647

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: OSCAR - user input mod
« Reply #3 on: June 05, 2009, 03:23:24 PM »
yes, just recently i have been experimenting with things just like that...
i ripped the joysticks out of my ps2 controller...
Howdy

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: OSCAR - user input mod
« Reply #4 on: June 06, 2009, 11:17:39 AM »
here is kind a rough outline of what it will do. there is 4 loggle switches and a pushbutton switch on a spring. w/ the 4 toggles you can make 10+ combinations of the pin is HIGH or LOW. Then when you push the pushbutton, it executes a command based on what combination the toggles are on. then it waits like 2 seconds so when you press the button it doesnt do the command 5 times. In the schematic I left out the I2C connections, ect.
it was just to illustrate my point.
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: OSCAR - user input mod
« Reply #5 on: June 06, 2009, 12:34:05 PM »
Dellagd,

If you want us to see the schematic, please attach it as an jpg or png image. This way it's easy to see imediatelly, without the need of downloading, saving, open it in Eagle.

About the joystick, instead of using 5 pins from the microcontroller, use an analog pin and tie the switches with different resistors in series, so each time a switch is pressed, a different voltage is sampled. I'll attach a schematic latter this evening..
Check out the uBotino robot controller!

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: OSCAR - user input mod
« Reply #6 on: June 06, 2009, 02:14:40 PM »
k thanks, I'm a little confused on those last sentences
also, about thy joystick thing, it only has 5 positions, so thats only 5 different combonations. with the switches you get 10+
if I do joystick, me and airmans mods might work in unicin, like a navigation menu.
unless when you explain it better it appeals to me more, I'm sticken with switches.
« Last Edit: June 06, 2009, 02:46:37 PM by dellagd »
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: OSCAR - user input mod
« Reply #7 on: June 06, 2009, 04:35:08 PM »
when you are doing up a schematic don't forget the necessary this like pup resistors...
in your drawing the switches would be floating which means they would sorta stutter from on to off.
attach pups like in the picture but depending on whether you want to set the pin high for on or low for on.
Howdy

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: OSCAR - user input mod
« Reply #8 on: June 06, 2009, 04:37:12 PM »
sry smash but what is a pup resistor or whatever?
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: OSCAR - user input mod
« Reply #9 on: June 06, 2009, 04:46:19 PM »
Here is a project LCD shield for Arduino/Roboduino. It has push buttons arranged like the arrow keys on the PC keyboard plus a select button. You can find there the code and the schematic.
http://www.nuelectronics.com/estore/index.php?main_page=product_info&cPath=1&products_id=2

Actually, I'll link the schematic for faster reference, to see what I'm talking about using resistors in series and tie all buttons to an analog pin:
http://www.nuelectronics.com/download/projects/LCDshield_v1_1.pdf
« Last Edit: June 06, 2009, 04:47:37 PM by Ro-Bot-X »
Check out the uBotino robot controller!

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: OSCAR - user input mod
« Reply #10 on: June 06, 2009, 04:48:26 PM »
pups are pull up resistors, they stop a floating input from floating.

so when the switch is not engaged instead of being at an unknown state it will either be high or low depending on whether you pull up or pull down the line.
« Last Edit: June 06, 2009, 04:55:56 PM by SmAsH »
Howdy

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: OSCAR - user input mod
« Reply #11 on: June 06, 2009, 05:14:04 PM »
pull up resistors are not required. Even if the line is floating, bit_is_clear() will still return false because it is not grounded.

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: OSCAR - user input mod
« Reply #12 on: June 07, 2009, 04:58:05 PM »
thats what I wan thinking...
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
Re: OSCAR - user input mod
« Reply #13 on: June 07, 2009, 05:27:13 PM »
pull up resistors are not required. Even if the line is floating, bit_is_clear() will still return false because it is not grounded.

 ??? This is the first time I hear the a pull up/down resistor is not needed for an input switch. It depends on the type of device your are connecting your switch to.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: OSCAR - user input mod
« Reply #14 on: June 07, 2009, 05:34:44 PM »
pull up resistors are not required. Even if the line is floating, bit_is_clear() will still return false because it is not grounded.

 ??? This is the first time I hear the a pull up/down resistor is not needed for an input switch. It depends on the type of device your are connecting your switch to.
i always thought they were needed for any type on mechanical switch if you had an I/O pin on the other end?
Howdy

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: OSCAR - user input mod
« Reply #15 on: June 07, 2009, 06:21:59 PM »
ok explain this pup resister thing to me better.
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: OSCAR - user input mod
« Reply #16 on: June 07, 2009, 06:33:28 PM »
My bad, I guess I didn't explain it clear enough. A pull up resistor is required, but you dont need to add it - AVRs have a built it one that can be enabled.

Here is what an external pull up resistor would look like, for microcontrollers that don't have one inside.

AVRs have an internal pullup that can be enabled, like this


To enable the internal pull up, set the port as input and write a digial high to it. For example if you are using arduino it would be

pinMode(1,INPUT);
digitalWrite(1,HIGH);

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: OSCAR - user input mod
« Reply #17 on: June 07, 2009, 06:39:13 PM »
ahh yes, i forgot about the internal pup resistors!
my bad razor, thanks for that.
Howdy

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: OSCAR - user input mod
« Reply #18 on: June 07, 2009, 06:50:58 PM »
and roboduino uses that same code?
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: OSCAR - user input mod
« Reply #19 on: June 07, 2009, 06:52:29 PM »
yes, but it may be different if you are writing in arduino but pretty much the same.
Howdy

 


Get Your Ad Here