Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Re: Arduino Micro + Keyboard library to auto-login on: August 28, 2014, 10:16:02 am
I discovered this morning that the target Windows machine didn't like the Arduino as a keyboard. Even installing the Arduino IDE (and its included drivers) had no effect. The Micro would show up as an "Arduino Micro" in the Device Manager, but as an Other Device with the Yellow Exclamation-Point Of Fury.

Following the instructions at the getting started page did not work - Windows instantly gave me the generic "driver installation failed" message.

Advice given on the forum here in the main post also didn't work, as I didn't have an Arduino LLC entry in my driver list and using the "Have Disk" option also failed - Windows told me the drivers in the "drivers" folder weren't for my version of Windows and/or my device.

However, three responses down was a suggestion that sort of worked: manually copying the INF and CAT files into C:\Windows\INF, uninstalling the Other Device, and then pulling and re-inserting the Arduino. Windows ran off trying to find updates for the drivers on Windows Update, and I just let it. After a few minutes, it was happy, and then the keyboard commands started reaching Windows as intended.

Unfortunately, this did not survive a reboot. So I had to turn User Account Control Notifications to "never notify me about anything", re-do the procedure above, and then reboot again.

Now the Arduino shows up properly (for a Micro) in the Device Manager: one entry under Ports that reads "Arduino Micro [COM3]", and another under Keyboards that just reads "HID Keyboard Device". Once this survived the reboot, I was able to put UAC back to its default setting (a good safety feature), and the driver installation started surviving the reboot.

Note: this whole thread refers to Windows 7 Professional, Service Pack 1, 64-bit.

If there is interest I will post the full circuit and sketch for informational purposes.
2  Using Arduino / Project Guidance / Re: Arduino Micro + Keyboard library to auto-login on: August 27, 2014, 11:32:44 pm
How about posting a schematic ?
How about posting the code (using the "#" code tags toolbutton)
How are you connecting the arduino to the computer ?

Only the Keyboard portion of the schematic is relevant, since the booting portion works fine.

Schematic:  Arduino----USB----->Computer

I'm only posting the keyboard portion of the code, since the booting portion works fine.

void setup()

bool gDone = false;
void loop()
  if (gDone)

  gDone = true;;

  // Enter through the disclaimer screen;



How are you connecting the arduino to the host computer ?
You can't use the USB port on the arduino for that because the USB port is a SLAVE port, not a HOST port.
You have to use the Tx & Rx pins or SoftSerial.

The Arduino Micro can act natively as a USB Keyboard. See

As I said in the original post, the entire circuit and sketch works like on a champ on another computer.
3  Using Arduino / Project Guidance / [SOLVED] Arduino Micro + Keyboard library to auto-login on: August 27, 2014, 07:02:47 pm
I have an Arduino Micro, a very simple circuit to simulate a soft-power button-push to the computer, and an extremely slow-booting work computer that I can't simply turn Windows "auto-login" on in the registry. I also have a sketch that:

1) briefly (500ms) sends 5V to a transistor that causes a boot-up command to go to the motherboard
2) waits for 8 minutes for the computer to reach the login screen
3) sends Ctrl-Alt-Del, (pause), Enter [company disclaimer screen], (pause), my password, Enter

I've tested this on my personal Windows machine by adding code to send an ESC char in; that way I can run it on the machine that I'm doing development on. It works great, causing the Win 7 Blue Screen to come up (then go away, thanks to the Esc), and then types what I want into my waiting Notepad program.

But when I hook it up to the target machine, the booting works flawlessly but the keyboard commands just never happen. The Arduino thinks it has sent the keyboard commands, and reaches its idle state, but nothing happens on the target machine. The target machine is an HP Z600 workstation, and has another USB keyboard plugged in. Could this be the issue?

Any ideas how to go about chasing this down?
4  Using Arduino / General Electronics / Re: Voltage Dividers on: December 31, 2012, 12:55:48 pm
What makes the voltage fall depending on whether I'm using 270s or 10ks?
The lower the resistance, the higher the current.
The higher the current, the faster the battery drains.

I wasn't clear, sorry...

Unloaded battery voltage: 5.8V
Loaded battery voltage measured with 10k resistors: 5.6V
Loaded battery voltage measured with 270 resistors: 3.5V

10k current, measured: 0.28mA, and calculated: 0.28mA
270 current, measured: 6.48mA, and calculated: 6.48mA

I understand that a higher current will run the battery down faster, meaning that it will eventually deliver 0V at any load, and we'll get there sooner with Rt=540 than with Rt=20k. But what I meant by my question was, why does it deliver lower voltage with a higher load right now?

I feel like I'm missing some important terms to express myself, I hope you can decode what I'm trying to say.
5  Using Arduino / General Electronics / Re: Voltage Dividers on: December 31, 2012, 12:36:46 pm
After switching to 10k resistors, the loaded battery voltage stopped sinking, and held steady at 5.28V. The Vo voltage measured in at 2.63V, which I would call pretty darn close enough. Thanks again!

What makes the voltage fall depending on whether I'm using 270s or 10ks? I went and did some reading on batteries just now, and it seems like the voltage should be more or less the same (this is an alkaline) regardless of load until the battery dies, at which point it decreases quickly. Is it because this particular battery is already down its death-curve quite a ways? In other words, if I use a brand-new 9V, will I see approximately equal loaded voltages regardless of what resistors I'm using?

These replies are really helping me reach an understanding of what's going on, and providing great pointers for further research. Thanks, lefty.

Irregardless, this 9V is toast, and it belongs in the battery recycler.
6  Using Arduino / General Electronics / Re: Voltage Dividers on: December 31, 2012, 11:55:22 am
Yes, the 5.6V is measured with no load.

To measure the loaded battery, I leave the circuit built, but measure across the +/- rails of the breadboard? That measurement is about 3V... and sinking constantly. is that the issue??? I feel dumb. Plugging that back in...

Vo = (Vs*R2)/(R1+R2) = (3*270)/(270+270) = 810/540 = 1.5V.

Measured: 1.3V for Vo, then back to the battery for a re-measure of 2.6V.

Thank you, James! I'll go find a healthy 9V for the remainder of my experiments.   smiley-roll-sweat

EDIT: Thanks, retrolefty, I'll switch them to 10k. How do I determine the right resistors to use for a given power source?
7  Using Arduino / General Electronics / Voltage Dividers on: December 31, 2012, 11:28:29 am
I'm working through Boyson/Kybett's book Complete Electronics Self-Teaching Guide With Projects (, and I'm stuck on voltage dividers.  Here's the circuit:

I built this circuit on a breadboard, using R1=270, R2=270, and Vs=5.6V (approximately - it's a dying 9V battery), because those were the resistors I had at hand. I calculated that my expected Vo would be:

Vo = (Vs*R2)/(R1+R2) = (5.6*270)/(270+270) = 1512/540 = 2.8V.

I then measured the voltage at Vo by placing my red multimeter lead where "Vo" is on the diagram and my black lead at ground. I got 1.8V.

What am I doing wrong? Here's a photo of the breadboard, showing a red + where the multimeter red lead connects, and a black - where the black lead goes. It's a little blurry, sorry.

Did I build this circuit wrong? Did I measure the voltage incorrectly? I'm getting all the questions in the text right, so I think my calculations are OK, but I can't get my calculations to match with my measurements, which is very frustrating.
8  Using Arduino / General Electronics / Re: Noob question about current on: December 30, 2012, 10:47:48 pm
So... based on your responses, sounds like I was shorting the circuit, then. smiley-roll Thanks for the info, I will avoid doing this in the future, and I'll definitely check out those book suggestions.

9  Using Arduino / General Electronics / Noob question about current on: December 29, 2012, 12:38:21 pm
Hello all, this is my first post, although I've searched and lurked the forum for a while. My electronics experience is very rusty and rudimentary, so I'm going to ask some very dumb questions. Please feel free to mock.  smiley

I'm trying to understand current by experimenting with my Arduino Uno and a digital multimeter, and there are a couple of things I don't understand:

1) If I switch my meter to A/mA and connect it to the 5V or 3.3V power pins on the Uno, I get constantly fluctuating numbers - so fast that I couldn't even tell you where the decimal point is. Is this because the multimeter is varying the drawn current to remove its own internal resistance from the equation? If I include a resistor in series, it behaves more like I expect: a 270-ohm resistor causes my meter to show 18.5mA on the 5V pin and 12.2mA on the 3.3V pin. From a straight equation standpoint, I=V/R with no resistor in series would yield I=5/0=undefined. But that can't possibly be true in the real world - can it?

(edit: the spec sheet says the 3.3V pin carries a current of 50mA, which doesn't clear up my mysterious current readings at all)

2) The spec sheet on the Uno says that the digital output pins generate 5V at 40mA. But if I write a simple sketch that sets the pin (I'm using #7, but it shouldn't matter) HIGH, my multimeter reads 5V at like 87mA. What gives? Technically, I'm setting it high for 10 seconds, then setting it low for 10 seconds in a loop. The multimeter readings vary between 87mA and approx 0.15mA.

As you may have guessed, I'm still having trouble wrapping my head around current vs voltage, and how it all works together in a circuit.

Pages: [1]