Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Re: How to program a CAN-BUS arduino shield to control the car's headlights? on: April 13, 2014, 10:24:31 pm
Read my reply.

You can either use a relay shield to trigger the existing Headlight relay (if equipped with mechanical relays), or if ECU controlled, you have to run wiring from the headlights to the inside of the car (tap into them).

It's easily capable of what you're asking
2  Using Arduino / Project Guidance / Re: Arduino to power breadboard on: April 12, 2014, 10:42:30 am
I bought a Micro for that reason. It's pretty much a Leonardo in a DIP package (the same size as the Nano, PRO, etc), with a newer processor and a few extra goodies in comparison.

The Micro uses the 32u4, which doesn't have a separate USB->serial chip. The main processor does USB communications by itself, and can 'pretend' to be a mouse and keyboard at the same time. Quite a bit of additional functionality over an Uno, in that sense.

Unless I need the Mega or Ruggeduino, I grab the Micro right off the bat.

If you do get a small form factor board (such as the Micro, Nano, Pro), buy a chip socket, a ZIF, or something like that to save wear and tear on the actual header pins of the Arduino. I'd much rather bend a $0.50 cent sockets leg than having the resolder the pin on the main board.

It works better for me that way, and thought I'd share the tip! If you go the cheap socket way, make sure it has long enough male pins, as some sockets have really short pins!
3  Using Arduino / Project Guidance / Re: How to program a CAN-BUS arduino shield to control the car's headlights? on: April 12, 2014, 10:21:21 am
Most devices that can directly write to registers on the ECU through the canbus / obd port are very expensive.

There are cheaper software alternatives that do work over bluetooth obd dongles, but are extremely limited due to the fact it's usually one person doing the programming and ecu's are extremely well engineered items that have many reverse engineering protections built in.

I have a setup that allows me to toggle individual solenoids on the engine and transmission, fuel system solenoids and fuel pump, and I cannot even turn headlights on. I'm sure some of the newer units most likely can to check wiring systems or computer output pins (since they're directly controlled by the ecu on 2010+ (depending on make), but they are most likely $3,000+ handheld systems (Snap On's  hardware, which I know can, costs over $8000 USD).

The cheapest, easiest way to do what you would like to do is NOT REINVENT THE WHEEL AND REVERSE ENGINEER 5,000 engineer's work. Take 12v to a relay shield, and run it to the lowbeam or highbeam of the headlights. If you're worried about ecu protection throw in some beefy diodes to protect the ecu from reverse polarity.

Most car headlamps (not HID) are 55W each, so 100W total (100w/12v = 8.33 A), so even small relays should be rated for that. Most automotive grade relays are rated for 12v 20A or 12v 30A, but their actuation current (and voltage) is too high for the arduino without another step (such as a mosfet driver or another relay).

Almost every company sells a small relay shield, or relay board. The wiring for the car would be extremely easy to run inside the car, and be remarkedly similar to installing a set of fog lights as far as what you have to do (and the wiring would be close).

Then you can simply work on the software, and a simple pin high would actuate the headlights.
4  Topics / Device Hacking / Re: CH F-16 Fighter Stick Hacking on: April 12, 2014, 07:13:56 am
Take a look at any Multiplexing tutorials you can find. 15 buttons and 11 wires, it could be setup in a few different ways.

When you say there's 11 wires, do you mean exiting the actual joystick handle going to the PCB, or in total?

Any chance we can get pictures of how it is currently? It would help tremendously to help figure things out.
5  Community / Exhibition / Gallery / Re: Magnetic levitation on: December 26, 2012, 04:22:26 am
Well, the one in the video looks like a solenoid with the plunger removed.

They're rather easy to find, and if you're mechanically inclined at all you'll know where hundreds are!

In cars alone:
Pretty much every emissions / vacuum / boost solenoid to control air/vacuum/boost
Power door lock actuators (some may be gear driven, but most are simple push-pull solenoids)
Air conditioning solenoids (in cars)

You can probably buy 20 of them at a junkyard for under $10 bucks, since it doesn't matter if the housing or nipples are broken off of them.

Any equipment that has the ability to turn on and off, let's say.. water or fluid as well.

A solenoid is an electromagnet wrapped in a metal can, with a hollow tube in the middle. The plunger is a steel shaft that sits in the tube, partially spaced out with a small spring.

When electricity is added, the plunger shaft gets sucked into the can, pulling the linkage it's connected to in with it.

Pull the plunger out, and put a bolt with a nut on one side, as the OP did (at least it looks like).

You can epoxy the hall effect sensor on the head of the bolt through the electromagnet.
6  Using Arduino / Microcontrollers / Re: Weird issue: Micro won't transmit win8 on: December 20, 2012, 09:58:21 pm
After lots of trial and error, I think I found the problem.

For some reason, my micro does NOT wait for a serial connection to be established before running the code including serial out.

Even sketches with the code to NOT send serial code until the serial connection is open, doesn't wait. If I do it as fast as humanly possible, I can sometimes get the end of it, like a few lines.

If I make the sketch continuously output the serial information (not once) and open the window, I catch it at the end before it repeats.

For some reason, it doesn't wait. I'm not sure exactly what would cause that. I'm running Windows 8 64 bit. I've used the Arduino 1.0.2 as well as the ERW-enhanced IDE. Tried several serial ports as well.

Is there a possibility my micro has a glitched bootloader or something?

I have a Mega 2560 r3 incase I have to do it.

This is really bugging me, I'm trying to finish my girlfriend's Christmas present.

I'm making a MAME/Emulator controller, with a built-in USB hub.

Currently this is how it is:
USB hub with external mounted USB-B connector (figure it would be the strongest: using a trimmed down panel mount usb-B to micro adaptor soldered straight to the USB hub
Micro going to buttons / analog sticks / added a button to switch between gamepad sending keypresses - accelerometer mouse control - analog stick mouse control - usb hub wiring
16gb usb flash disk. For space savings, I'm using a low profile micro-sd to usb adaptor, soldered directly to usb hub. using a class 10 micro-sd. may upgrade to 32gb as I have one laying around.

I'm still playing with different housings. I've completed a SNES controller as well as a PS2 controller. I'm just having issues debugging the code, so I went back to square 1.

Most of the code was done on the Mega, and I bought the Micro since I didn't need that many pins, and needed a small controller to fit within the size constraints.

I just don't know why the Micro won't wait for the serial connection before moving on...

7  Using Arduino / Microcontrollers / Re: Weird issue: Micro won't transmit win8 on: December 17, 2012, 06:35:17 pm
I'm sorry. This is an Arduino Micro r3 from Radio Shack. Running Windows 8 64

I found the problem, I think. In all the sketches that aren't working, it says "wait for serial - needed for Leonardo only" which obviously applies to the Micro as well.

The ASCII table serial output program doesn't work because the serial connection opens AFTER it transmitted. If I remove the end of the program

Code:
  // if printed last visible character '~' or 126, stop:
//  if(thisByte == 126) {     // you could also use if (thisByte == '~') {
    // This loop loops forever and does nothing
//    while(true) {
//      continue;
//    }
//  }
  // go on to the next character
  thisByte++; 
}

I commented it all out, so it constantly repeats itself. (Not print it only once) then open serial monitor, it works great.

So it seems for some reason the "wait for serial connection THEN output serial data" part is not working on the Micro correctly. What's the proper way (I know there is at least several) to make a sketch WAIT for a serial connection before outputting data?
8  Using Arduino / Microcontrollers / Re: Weird issue: Micro won't transmit win8 on: December 17, 2012, 06:22:24 pm
Hi Awol,

I apologize for not posting it in the correct subforum. My apologizes!

No schematic, no code to post.

Using the Arduino IDE 1.0.2 under Communication, the ascii print out program sends no information to my computer. The Tx led never lights up. I can send to it, and the led of "Rx" flashes, but it never sends any information back to my computer.

In the IDE, File -> Examples -> Communication -> ASCII Table

I upload it fine. Then I open serial monitor and nothing gets printed. I've noticed with other sketches, when the sketch is supposed to wait for the Serial Monitor to open before sending, it doesn't. Prime example is the EEPROM read/write/clear. It does NOT wait for serial monitor. If I use the keyboard shortcut to open the serial monitor, I can sometimes get it at around ~10 entries, (I.e. the first line of text I see is 10-12).

I'm not sure exactly what the problem is. Some times I have to load the sketch multiple times to get it to send anything to my computer.
9  Using Arduino / Microcontrollers / Re: Weird issue: Micro won't transmit win8 on: December 17, 2012, 03:40:28 am
Did some more testing. Arduino ERW fails completely. Stock 1.0.2 fails 50%.

None of the examples that send serial data work. I modified Physical Pixel and it DID work. I uploaded the sketch and checked it a few times as well as pressing reset on the board.

When I pressed reset on the board, everything freaked out. I couldn't send sketches to it using either program. I had to physically plug/unplug several times to get it working again.

For some reason, it seems the Micro changes it's com port every time it's connected. Anywhere from 6 to 8, without anything else changing. Weird.
10  Using Arduino / Microcontrollers / Weird issue: Micro won't transmit win8 on: December 17, 2012, 02:39:18 am
Hey guys,

Having a weird problem. I bought this micro about 3 days ago and have been playing around with it. Everything's been great, haven't had an issue. Until that is, today.

I can send information to it using the serial monitor, and it responds (Physical Pixel), however, the Micro won't transmit anything to my computer. I added Serial.println("High Received!"); after setting the led high, and the opposite for low. The light on the micro never flashes for transmit. I tried all the sketches in the Communication directory, to no avail. Any sketch that should send serial data, doesn't. The monitor stays blank. The micro refuses to send any information. If I send information in the serial monitor I see the micro's led flash for Rx, but I can't get the Tx to blink for anything.



What am I doing wrong?
11  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.2 for Windows (installer, drivers, etc) +SRC on: December 08, 2012, 08:22:01 pm
The problem is wiring isn't defined properly. It's not in the list of programmers. So it may have been done to fix a timing error, but introduced a bug with 100% failure rate. The stk500v2 simply works. When programmers.txt gets updated to define wiring, I'm sure it will fix everything. But until then, this is the only way to get it to work.
12  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.2 for Windows (installer, drivers, etc) +SRC on: December 07, 2012, 02:47:06 am
Glad my little fix helped at least a few people out!
13  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.2 for Windows (installer, drivers, etc) +SRC on: December 04, 2012, 08:37:08 pm
Pico,

I ran into the same problem you did today, as I just installed the software. It seems wiring isn't a known protocol for some reason. I changed the configuration file to try arduino as the protocol, but it would fail and not upload. So I changed it to stk500v2 and works like a charm.

In C:\program files (x86)\arduino\arduino erw 1.0.2\hardware\arduino the file is boards.txt

mega2560.upload.protocol=wiring

gets changed to

mega2560.upload.protocol=stk500v2

on line 136.

Works like a charm, I'm sure it will get fixed next revision. I'm not sure if this is the proper way to fix it, but it does _work_ in my limited testing!
Pages: [1]