1. Post #361
    Gold Member
    aydin690's Avatar
    April 2007
    10,005 Posts
    Through a desktop computer.
    What? No, the android device is going to be on the device that's being controlled by the microcontroller.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Dumb Dumb x 1 (list)

  2. Post #362
    Gold Member

    March 2005
    3,028 Posts
    What? No, the android device is going to be on the device that's being controlled by the microcontroller.
    You asked for the "easiest way of controlling a microcontroller with an android device". Given the lack of information, my assumption was that you wanted to use the Android device as a sort of remote control.
    It's not my fault if you didn't explain the problem clearly.

    Get a bluetooth serial module for the MCU.
    Reply With Quote Edit / Delete Windows 7 Show Events Agree Agree x 4 (list)

  3. Post #363
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    usb to uart adapter or bluetooth
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Agree Agree x 2 (list)

  4. Post #364
    Gold Member
    Chryseus's Avatar
    February 2009
    2,468 Posts
    -snip-
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Informative Informative x 2 (list)

  5. Post #365
    Slaaf van EternalFlamez.Ik wilde heel graag de laatste Indie Bundle, en ik kreeg deze kuttitel er gratis bij.
    Staneh's Avatar
    March 2010
    4,073 Posts
    Okay, so what if I wanted to turn off my lights in my room via a programming? (Preferably C#), What would I need?
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Funny Funny x 2 (list)

  6. Post #366
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    Okay, so what if I wanted to turn off my lights in my room via a programming? (Preferably C#), What would I need?
    There are multiple way you could achieve it. You could use a (solid state-) relay inside the lightswitch or use a servo to actuate the lightswitch.

    Edited:

    Basically do it with servos becauce you'll ever kill yourself or burn down your house if you fiddle with mains.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events

  7. Post #367
    Slaaf van EternalFlamez.Ik wilde heel graag de laatste Indie Bundle, en ik kreeg deze kuttitel er gratis bij.
    Staneh's Avatar
    March 2010
    4,073 Posts
    There are multiple way you could achieve it. You could use a (solid state-) relay inside the lightswitch or use a servo to actuate the lightswitch.

    Edited:

    Basically do it with servos becauce you'll ever kill yourself or burn down your house if you fiddle with mains.
    Do you know how I would actually turn the relay off/on with programming?
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Funny Funny x 1Artistic Artistic x 1Zing Zing x 1 (list)

  8. Post #368
    SubbyV-2's Avatar
    January 2011
    273 Posts
    Do you know how I would actually turn the relay off/on with programming?
    Do you mind cords?
    Reply With Quote Edit / Delete Windows 7 Australia Show Events

  9. Post #369
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    Do you know how I would actually turn the relay off/on with programming?
    The probably easiest way would be via a rs232-interface, as you could directly send information to your arduino or anything else via UART.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events

  10. Post #370
    Slaaf van EternalFlamez.Ik wilde heel graag de laatste Indie Bundle, en ik kreeg deze kuttitel er gratis bij.
    Staneh's Avatar
    March 2010
    4,073 Posts
    Do you mind cords?
    No, I don't mind.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  11. Post #371
    Slaaf van EternalFlamez.Ik wilde heel graag de laatste Indie Bundle, en ik kreeg deze kuttitel er gratis bij.
    Staneh's Avatar
    March 2010
    4,073 Posts
    The probably easiest way would be via a rs232-interface, as you could directly send information to your arduino or anything else via UART.
    I don't really know anything about that, and I don't have an arduino yet. I'm willing to learn though.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  12. Post #372
    Gold Member
    Chryseus's Avatar
    February 2009
    2,468 Posts
    Okay, so what if I wanted to turn off my lights in my room via a programming? (Preferably C#), What would I need?
    - Low voltage power supply, I.E small mains transformer or battery for short term use
    - Voltage regulator
    - A microcontroller (Atmel, Microchip, Texas Instruments, etc)
    - RS-232 interface (or USB) to communicate with controller if desired.
    - Relay rated for mains voltage at 1A
    - Transistor to drive the relay
    - Diode to protect transistor
    - PCB mount screw terminals for mains connection
    - Pad board to put it all on
    - Box to put it in, preferably inside the wall.

    If you want to do something simple like light sensing to switch the light on/off then you can pretty much skip the microcontroller and just use an analog circuit.
    I assume you're quite new to electronics so I would advise against any project using mains until you're more experienced, or at least talk to someone who knows what they're doing before wiring it up.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Friendly Friendly x 2Agree Agree x 1 (list)

  13. Post #373
    Gold Member
    aydin690's Avatar
    April 2007
    10,005 Posts
    usb to uart adapter or bluetooth
    C'mon guys, you can do better than that. That's just the connection. That's like when you call the customer service and he's like "is it plugged in?".

    So, they're connected to each other, now what? Do i have to write an android app? Am i going to need one of those intermediary boards like arduino ADK or IOIO? Let's say i want to use my phone's calender to make a few ports on my MCU high at a specific time and date? How should i go about doing this?
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Dumb Dumb x 1 (list)

  14. Post #374
    Gold Member

    March 2005
    3,028 Posts
    They're connected with which? Because MCU <-- USB --> Android isn't going to work. Android is designed to act as a USB device, not a host.
    Also, you haven't told us which platform you're using. Did you go with the Arduino or the TI?

    Yes, you will need to write code to make them talk to each other. AFAIK, you will not need any sort of dev. kit aside from the usual Android SDK and Arduino (or MSP) toolchain.

    Edited:

    It's generally better to include too much information than too little when posting a question.
    Reply With Quote Edit / Delete Windows 7 Show Events

  15. Post #375
    Gold Member
    aydin690's Avatar
    April 2007
    10,005 Posts
    They're connected with which? Because MCU <-- USB --> Android isn't going to work. Android is designed to act as a USB device, not a host.
    Also, you haven't told us which platform you're using. Did you go with the Arduino or the TI?

    Yes, you will need to write code to make them talk to each other. AFAIK, you will not need any sort of dev. kit aside from the usual Android SDK and Arduino (or MSP) toolchain.

    Edited:

    When you're about to post a question, stop and think "If I didn't know anything about what I was doing, would this be enough to solve the problem?" before you hit the "post" button.
    K, sorry. Yeah, i'm trying to make a super annoying alarm clock for myself. I do have access to multiple TI and arduino boards so i can use either one (leaning towards msp though). I'm familiar with the electronics part but i have no idea how to make the android part work. I've already got my MCU (both msp 430 and arduino uno) get input from my computer through serial port and control two servos and a flash light and shitty speaker but i have no idea how to make my phone send stuff over serial to the mcu and control it.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events

  16. Post #376
    Gold Member

    March 2005
    3,028 Posts
    Ok, so you're communicating through the computer, using bluetooth on the Android's end and USB/Serial on the MCU's side?

    I've never done Bluetooth before, but 'Bluetooth sockets' don't look that different from regular TCP sockets. And for the Windows machine.

    On the Arduino side, you've got a nice serial library. And the Win API.

    If you don't have everything all set up yet, install the Android SDK, Code::Blocks, and the Arduino software.
    I'd suggest you play around, make a few simple applications for each, and get comfortable before you start on the real thing.

    You'll probably want to set it up so that the Windows machine is the 'server' and it just acts as a dumb relay between the two clients.
    Reply With Quote Edit / Delete Windows 7 Show Events

  17. Post #377
    LoneWolf_Recon's Avatar
    May 2011
    1,860 Posts
    Do you know how I would actually turn the relay off/on with programming?
    If you have a parallel port, you could go retro and follow this tut:
    http://logix4u.net/component/content...rt-interfacing
    Reply With Quote Edit / Delete Windows XP United States Show Events

  18. Post #378
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  19. Post #379
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    http://www.ebay.de/itm/390386748903?...84.m1497.l2649

    I bought this project box, let's see if it's any good!
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Optimistic Optimistic x 1 (list)

  20. Post #380
    Gold Member
    Chryseus's Avatar
    February 2009
    2,468 Posts
    I hope it's flame proof!
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 2Optimistic Optimistic x 1Funny Funny x 1 (list)

  21. Post #381
    PLEASE DON'T EAT ME!
    Doritos_Man's Avatar
    June 2009
    2,944 Posts
    Does anyone here recommend the Teensy++ w/pins to start with?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Disagree Disagree x 2 (list)

  22. Post #382
    Gold Member
    Tw34k's Avatar
    January 2012
    697 Posts
    I've been thinking about ordering some lower cost wooden cigar boxes on ebay to start using as project boxes. I was easily finding them for as little as $3 shipped each in packs of 5 or more.

    http://www.ebay.com/itm/Lot-of-5-Emp...ht_3289wt_1374
    Reply With Quote Edit / Delete Windows 7 United States Show Events Informative Informative x 1 (list)

  23. Post #383
    PLEASE DON'T EAT ME!
    Doritos_Man's Avatar
    June 2009
    2,944 Posts
    @Chryseus

    Any reason why you don't recommend the Teensy?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  24. Post #384
    Gold Member
    Chryseus's Avatar
    February 2009
    2,468 Posts
    If you blow it up you'll have a hard time replacing the chip.
    It's also a little overpriced for what you get, the chip itself only costs $11 but if you don't already have an avr programmer it's probably worth the extra price.
    If you're just looking to get into microcontrollers I'd recommend the MSP430 launchpad which is cheap at $4.30 and you get two different microcontrollers with it, Ti also like to give out samples so you can easily get your hands on even better chips for free.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 1 (list)

  25. Post #385
    PLEASE DON'T EAT ME!
    Doritos_Man's Avatar
    June 2009
    2,944 Posts
    If you blow it up you'll have a hard time replacing the chip.
    It's also a little overpriced for what you get, the chip itself only costs $11 but if you don't already have an avr programmer it's probably worth the extra price.
    If you're just looking to get into microcontrollers I'd recommend the MSP430 launchpad which is cheap at $4.30 and you get two different microcontrollers with it, Ti also like to give out samples so you can easily get your hands on even better chips for free.
    Would you mind if I added you on Steam?
    I have some questions about different boards.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  26. Post #386
    Gold Member
    marcin1337's Avatar
    May 2006
    893 Posts
    Anybody knows a good electronic store to buy in bulk from?
    Reply With Quote Edit / Delete United States Show Events

  27. Post #387
    Gold Member

    March 2005
    3,028 Posts
    In the US, there's Mouser and Digi-Key.
    Reply With Quote Edit / Delete Windows 7 Show Events Agree Agree x 1 (list)

  28. Post #388
    Gold Member
    demoguy08's Avatar
    February 2005
    4,068 Posts
    Are there any juicy stuff to salvage from an old CRT tv? The electron gun itself is most likely damaged (might just be some capacitors though) and I've ripped out the speakers.
    Reply With Quote Edit / Delete Windows 7 Show Events

  29. Post #389
    Gold Member
    ddrl46's Avatar
    October 2007
    3,685 Posts
    Are there any juicy stuff to salvage from an old CRT tv? The electron gun itself is most likely damaged (might just be some capacitors though) and I've ripped out the speakers.
    Flyback transformer of course, make some ozone and pretty sparks!
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  30. Post #390
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    Flyback transformer of course, make some ozone and pretty sparks!
    And Nitrous Oxide which is the stuff that really stings
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Disagree Disagree x 1Dumb Dumb x 1 (list)

  31. Post #391
    Gold Member
    Chryseus's Avatar
    February 2009
    2,468 Posts
    And Nitrous Oxide which is the stuff that really stings
    What

    Also any power resistors, transformers, transistors, DIP chips. I.E anything you can get out of it.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  32. Post #392
    Gold Member
    Tw34k's Avatar
    January 2012
    697 Posts
    Are there any juicy stuff to salvage from an old CRT tv? The electron gun itself is most likely damaged (might just be some capacitors though) and I've ripped out the speakers.
    Most of the parts I got from the last CRT I scavenged. They are always guaranteed to have a few good heat-sinks in them.



    Even though they are dirt cheap, for some reason I get excited when I score second hand 5+ watt resistors.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 3 (list)

  33. Post #393
    Gold Member
    demoguy08's Avatar
    February 2005
    4,068 Posts
    Alright, might go a second round with it tomorrow. Retrieved a 2Mbit EPROM IC, have no idea how to read from it though.
    Reply With Quote Edit / Delete Windows 7 Show Events Winner Winner x 1 (list)

  34. Post #394
    LoneWolf_Recon's Avatar
    May 2011
    1,860 Posts
    Alright, might go a second round with it tomorrow. Retrieved a 2Mbit EPROM IC, have no idea how to read from it though.
    What's the chip ID?
    Reply With Quote Edit / Delete Windows XP United States Show Events

  35. Post #395
    Gold Member
    demoguy08's Avatar
    February 2005
    4,068 Posts
    Reply With Quote Edit / Delete Windows 7 Show Events

  36. Post #396
    LoneWolf_Recon's Avatar
    May 2011
    1,860 Posts
    Okay its a parallel EPROM, meaning you sequentially plug in the address you want to read to the Address Pins and apply the voltage to the right pin combination as described on page 8 in the datasheet.

    You could use four 4 bit binary ripple counters(That cascade upon the next) to cycle through the entire address range of the chip and just have a microcontroller read the values on the 8 bit data bus.
    Reply With Quote Edit / Delete Windows XP United States Show Events

  37. Post #397
    Gold Member
    demoguy08's Avatar
    February 2005
    4,068 Posts
    Okay its a parallel EPROM, meaning you sequentially plug in the address you want to read to the Address Pins and apply the voltage to the right pin combination as described on page 8 in the datasheet.

    You could use four 4 bit binary ripple counters(That cascade upon the next) to cycle through the entire address range of the chip and just have a microcontroller read the values on the 8 bit data bus.
    Hmm, that's a fair bit above my knowlegde of IC's (aka nearly nonexistant). With the risk of sounding like a newb, would the method you describe be possible with an Arduino? Say if I were to create a program that outputs the addresses on a digital pin and reads the incoming data on another.
    Reply With Quote Edit / Delete Windows 7 Show Events

  38. Post #398
    Gold Member
    ddrl46's Avatar
    October 2007
    3,685 Posts
    Hmm, that's a fair bit above my knowlegde of IC's (aka nearly nonexistant). With the risk of sounding like a newb, would the method you describe be possible with an Arduino? Say if I were to create a program that outputs the addresses on a digital pin and reads the incoming data on another.
    You have a few data lines, A0 to A16 (You don't have to use all data lines if you ground the rest), you send it a address by setting the appropriate pins (and make sure you pull the enable pin low) and then you get the data for the specific address on the Q0 to Q7 outputs.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Informative Informative x 1Agree Agree x 1 (list)

  39. Post #399
    LoneWolf_Recon's Avatar
    May 2011
    1,860 Posts
    Hmm, that's a fair bit above my knowlegde of IC's (aka nearly nonexistant). With the risk of sounding like a newb, would the method you describe be possible with an Arduino? Say if I were to create a program that outputs the addresses on a digital pin and reads the incoming data on another.
    Sure! As long as you have the pins. To access the entire contents of the chip you need 16 pins allocated for addressing, 3 for control, & 8 for data(Which I believe is above the standard Arduino's capability unless you have like the ADK or Mega model).

    Assuming you are using the standard model with 14 pins, you still need 3 for the control pins & 8 for reading the output data. Leaving you 3 pins to address the chip. :/

    Now you could use a 74HC595:
    http://www.youtube.com/watch?v=h84cDS7_9Pg
    And that will free up some pins allowing you to probably address all the data.
    Reply With Quote Edit / Delete Windows XP United States Show Events Informative Informative x 1 (list)

  40. Post #400
    Gold Member
    demoguy08's Avatar
    February 2005
    4,068 Posts
    Alright, thanks for the advice. Looks like this is gonna turn into a little project of mine, figure it could be a nice way to learn more about ICs and electronics.
    Reply With Quote Edit / Delete Windows 7 Show Events Optimistic Optimistic x 1 (list)