• Electronics and Embedded Programming V3
    1,545 replies, posted
  • [QUOTE=ROBO_DONUT;35144902]Through a desktop computer.[/QUOTE] What? No, the android device is going to be on the device that's being controlled by the microcontroller.
  • [QUOTE=aydin690;35145044]What? No, the android device is going to be on the device that's being controlled by the microcontroller.[/QUOTE] 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.
  • Okay, so what if I wanted to turn off my lights in my room via a programming? (Preferably C#), What would I need?
  • [QUOTE=Staneh;35151868]Okay, so what if I wanted to turn off my lights in my room via a programming? (Preferably C#), What would I need?[/QUOTE] 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. [editline]15th March 2012[/editline] Basically do it with servos becauce you'll ever kill yourself or burn down your house if you fiddle with mains.
  • [QUOTE=DrLuke;35151907]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. [editline]15th March 2012[/editline] Basically do it with servos becauce you'll ever kill yourself or burn down your house if you fiddle with mains.[/QUOTE] Do you know how I would actually turn the relay off/on with programming?
  • [QUOTE=Staneh;35151942]Do you know how I would actually turn the relay off/on with programming?[/QUOTE] Do you mind cords?
  • [QUOTE=Staneh;35151942]Do you know how I would actually turn the relay off/on with programming?[/QUOTE] The probably easiest way would be via a rs232-interface, as you could directly send information to your arduino or anything else via UART.
  • [QUOTE=SubbyV-2;35152325]Do you mind cords?[/QUOTE] No, I don't mind.
  • [QUOTE=DrLuke;35152354]The probably easiest way would be via a rs232-interface, as you could directly send information to your arduino or anything else via UART.[/QUOTE] I don't really know anything about that, and I don't have an arduino yet. I'm willing to learn though.
  • [QUOTE=Staneh;35151868]Okay, so what if I wanted to turn off my lights in my room via a programming? (Preferably C#), What would I need?[/QUOTE] - 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.
  • [QUOTE=DrLuke;35147062]usb to uart adapter or bluetooth[/QUOTE] 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?
  • 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. [editline]16th March 2012[/editline] It's generally better to include too much information than too little when posting a question.
  • [QUOTE=ROBO_DONUT;35165230]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. [editline]16th March 2012[/editline] 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.[/QUOTE] 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.
  • 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' [url=http://developer.android.com/reference/android/bluetooth/BluetoothSocket.html]don't look that different[/url] from regular TCP sockets. And for the [url=http://msdn.microsoft.com/en-us/library/windows/desktop/aa362928(v=vs.85).aspx]Windows machine[/url]. On the Arduino side, you've got a nice [url=http://arduino.cc/en/Reference/serial]serial library[/url]. And the [url=http://msdn.microsoft.com/en-us/library/ms810467.aspx]Win API[/url]. If you don't have everything all set up yet, [url=http://developer.android.com/sdk/installing.html]install the Android SDK[/url], [url=http://www.codeblocks.org/]Code::Blocks[/url], and the [url=http://arduino.cc/en/Main/Software]Arduino software[/url]. 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.
  • [QUOTE=Staneh;35151942]Do you know how I would actually turn the relay off/on with programming?[/QUOTE] If you have a parallel port, you could go retro and follow this tut: [URL="http://logix4u.net/component/content/article/14-parallel-port/15-a-tutorial-on-parallel-port-interfacing"]http://logix4u.net/component/content/article/14-parallel-port/15-a-tutorial-on-parallel-port-interfacing[/URL]
  • [t]http://i.imgur.com/0dSz6.jpg[/t] Nice cheap DIY rosin flux. [url]http://www.dealextreme.com/p/just-works-colophony-soldering-paste-4697[/url] [url]http://www.dealextreme.com/p/booster-flux-bottle-with-funnel-and-needle-5068[/url]
  • [url]http://www.ebay.de/itm/390386748903?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649[/url] I bought this project box, let's see if it's any good!
  • 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. [url]http://www.ebay.com/itm/Lot-of-5-Empty-Wood-Cigar-Boxes-/251020264667?pt=LH_DefaultDomain_0&hash=item3a71f944db#ht_3289wt_1374[/url]
  • 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.
  • [QUOTE=Chryseus;35192217]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.[/QUOTE] Would you mind if I added you on Steam? I have some questions about different boards.
  • 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.
  • [QUOTE=demoguy08;35203730]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.[/QUOTE] Flyback transformer of course, make some ozone and pretty sparks!
  • [QUOTE=ddrl46;35204079]Flyback transformer of course, make some ozone and pretty sparks![/QUOTE] And Nitrous Oxide which is the stuff that really stings