Laptop USB port makes 2V 60Hz sine wave on pwm ports? - usb

When I connect my Arduino Mega or Uno to my laptop (HP Pavilion dv6 Windows 7 64 bit) via usb it creates a 2V 60Hz sine wave in the pwm digital pins I am using (2V sine wave when digitalWrite to Low and 5V very noisy pwm when analogWrite is used), and smaller amp sine waves in all the other pins. If I plug either of the boards into a different computer, its totally fine and all the arduino pins give proper 0V or pwm signals. I did not have this problem 2 weeks ago when I ran it, but ran it again today and discovered this problem. The arduino does not appear to have suffered any permanent damage, as it still runs fine on other computers.
The only potentially notable thing I've done in between those two runs was accidentally try to run a motor off an arduino plugged into the laptop that needed more current than the arduino could source ( :$ ). The motor whined but nothing else happened in the second before I unplugged it. Should that be of interest, I only did it on one usb port, and both usb ports are showing this strange sine wave behavior.
Thoughts on what is going on? Is this something I can fix? Is it still safe to program the arduino with my laptop? (Which I can still do, the pins just behave funny until I move it to another computer). I am not able to install software on the other computer (not mine) so cannot do my arduino programming from there.
Thanks!

I had a similar problem between computers and laptops...
My problem was I was running USB power from my computer and a benchtop power supply to some of the digital inputs.
The solution was to cut the trace to isolate USB power from V-in.
This is explained here for Arduino and here for teensy3.1.
....although I didn't measure the signal, there was an overriding noise that limited the PWM output I could achieve...

Related

How to detect, when a juul started charging? Over ubs (vb.net)

I have a juul, a charger, and a pc. The pc has usb ports. Thats clear.
When i plug a mouse, keyboard or any HID device, the pc can recognise these, but when i plug the charger, nothing happened.
I'm try to watch the connected usb devices, with the "USBDeview" by NirSoft. The software cant list the charger.
How can I detect, when any specified stuff connected via usb? Now the "stuff" is the juul charger.
Thanks for any help, I tried to make it simple.
If it's just a charger, it has nothing to do with the USB bus aside from drawing 5V from its power. I.e. it may only have DC power pins (+, -), without the data pins (D+, D-). In which case, your OS won't notice anything was plugged in.
Image from Wikipedia

Connecting four axis digital readout encoder serial to usb in linux

For a milling machine I need to connect magnetic linear sensors which output a quadrature signal in order to read the position of 4 axes. The professional digital readouts are rather expensive. After some searching I tried to use an Arduino board and Yuri's digital readout Android software. I kept having issues with the bluetooth connection between my tablet and the Arduino failing.
I've since settled on a four axis serial to USB box, sold by a company which is involved the precision measurement industry. Now my issue is that the software supplied by the vendor for the converter box is only offered for Microsoft Windows. I'd like to run a Raspberry Pi 3 as my readout instead of dedicating a laptop.
I'm reading that running x86 on ARM is possible via QEMU or a paid software option. I'd rather not have to run WINE or a full Windows installation. I think it's possible to make this work in Linux on a Pi3 with a little bit of code. Where I think I will have the most trouble is that the Windows software requires some manner of special code to 'authenticate' the USB box.
Internally the box has a PIC18F45K22 8-bit RISC chip and a MC74HC86A XOR chip. I suspect the latter is used to combine the signals of the four axes before output. The USB to serial chip is a common FTDI FT232RL which I can see connects as ttyUSB0. Running 'screen' against that device has produced no output.
The specification of the microcontroller indicates that it is re-programmable with 1024 bytes of EEPROM. Among the other code they've flashed to the chip, would they have programmed in the 'authentication' code mentioned earlier? Short of de-compiling the Windows program, can I interrogate the device across USB without ruining it?
The microcontroller manufacturer site seems to have reasonable documentation and even code samples. Assuming the flashed code isn't obfuscated, could I download the contents of the EEPROM? From there I suspect I could see what commands are required to initialize the box. I could either remove the 'authentication' or re-write the program in its' entirety and flash it.

Is it possible to directly connect Arduino Mini to PC?

I have an Arduino Pro Mini and a USB cable with just wires from one side. Is it possible to connect these wires directly with Arduino? I mean, +Data to Rx, -Data to Tx, +5v to one of the numbered pins and ground to GND.
No, in fact you could damage your Arduino doing this.
The RX and TX pins are for Serial (which run at higher voltages than 5volts)
Your best option would be to buy a USB to Serial convetor and then use a MAX232 chip (it is a chip that converts TTL logic (5volts) to RS232 (3 to -25 volts).
Or you could try using the v-usb library. Google v-usb online.
Hope this helps.
Yes, but not as you think, there is a raw voltage and regulated voltage but why run the risk of wiring incorrectly.
The best is use USB device between FTDI.
Here is a simple pin connection to make programming easier in photos. (quality of photos may not be best but you get the idea from them) I don't show how I add the blue to the pins but that is shrink tubing heated.
This makes easier programming of your Arduino this can be attached to a programmer quickly and effectively.
You can get this from Sparkfun for very cheap FTDI

I2C bus with battery powered beagleboard

I am trying to build a mobile robot (hexapod) using a beagleboard-xm. I have an Arduino nano and two servo drivers connected to the BB-xm over I2C. The Arduino sends the sensor value to the Beagleboard and the servo drivers are used to run the motors. I am trying to get the whole system to run on a single [6V NiMH battery] (http://www.lynxmotion.com/p-426-60-volt-ni-mh-2800mah-battery-pack.aspx).
When I am trying to just read the sensor values to the beagleboard it works fine but as soon as I start running the whole robot (power on the servo motors too), the sensor values provided by the Arduino over I2C becomes erratic (goes to zero). But when I power the board, Arduino and servo driver from a wall power supply everything works fine. So I am pretty confident that the issue is with the current being supplied by the battery to the whole system when the motors are running, but I am not sure why this is happening. The battery can supply a maximum of 28A and the servos together do not use more than 20A (18 servos).
So, I guess my question is whether my understanding is correct or is there is any other reason for this?

Arduino project using infrared sensor and usb communication

I am planning on doing a small arduino project and would like to know if what I'm thinking would work with a regular arduino board. I'm thinking of buying an Arduino Uno for my project, along with an IR LED and an IR sensor. So here's what I want to go with this:
I want to point the LED towards the sensor, so that the sensor is always detecting light. Then', I'll start "cutting" that light (say, with with my hand) several times. I want the arduino program to time the intervals between the times the light is "cut" and send these times to my computer via USB, so I can process this data.
I've seen many people talk about serial communication between an arduino board and a computer, but I'm not sure how that works. Will it use the same usb connector I use to upload programs to the board, or do I have to buy anything else?
EDIT: tl;dr: I guess my question, in the end, is twofold:
1) Am I able to "talk" to my computer using the built-in USB connector on the board, or is that used solely for uploading programs and I need to buy another one? and
2) Is this project feasible with an Arduino Uno board?
Thanks for the help!
Yes, your project is very feasible.
You use the built in USB connector to both program the device and communicate with it. Check out some examples on the Serial Reference Page
For reading the sensor, you'll want to use either a digital or analog input. For a digital input, you'll likely have to external components to control the light threshold, but it will provide a simple yes or no if something is in front of it. With an analog input, you can use a threshold in code to determine when your hand passes.
Timing can either be done on device with the Millis() function or on the connected computer.