Show Posts
Pages: [1] 2 3 ... 7
1  Using Arduino / Project Guidance / Re: I2C sensor erratic readings when not using usb connection - Uno on: February 16, 2014, 09:10:59 am
I unsoldered the DHT22 power supply wires from the K22, leaving it the only sensor and still the same issue - Until I ground the Uno with the USB cable. The errors I get from the DHT22's seem to be very intermittent and without pattern.  Here is a pic of the Arduino side of the setup. As you can see I am using the Uno to gather environmental data and then using serial comm to send it to a Mega which then displays it on the LCD. I have no problems with the Mega and I've tried disconnecting it completely and I still have the same issues from the Uno.

2  Using Arduino / Project Guidance / Re: I2C sensor erratic readings when not using usb connection - Uno on: February 16, 2014, 08:10:14 am
might need to check al the soldering ?

I have looked the soldering over to make sure nothing is shorting out, etc and it all checks out.
3  Using Arduino / Project Guidance / Re: I2C sensor erratic readings when not using usb connection - Uno on: February 16, 2014, 07:48:58 am

  I have measured the voltage and it stays above the K22's minimum of 4.5v. Previously I was having an issue with the sensor timing out on occasion and I traced that to the voltage dropping below 4.5v... I fixed that but now the problem is solely with ground signal from the USB plug. The plug does not need to be inserted in to the Uno port, only touching grounding jacket to the outside of the port. I've used 2 different adapters so far, a 6.5vdc 2a and a 12vdc 5a and experience the same issue. I've attempted tying off grounds in every which direction I can think of and nothing does it but ground signal from USB. Makes me think I am having a "dirty" ground issue and that the ground from USB is clean enough for the sensor read properly.

I'm thinking I will whip out the soldering iron and unsolder the 3 DHT22 supply wires and then see if the K22 keeps acting up. Since I am a newb with electronics I can only rely on trial and error.

The other problem I seem to be having is with high frequency noise. This is a control system for my greenhouse and when the fluorescent lights come on the DHT22 readings begin to bounce all over and become erratic. When the lights go off the sensors return to normal operation - as long as the USB ground is present.

Room Conditions:
* Temp: 67.8   * Humidity: 66.9%
* CO2: 1255ppm   * Errors: 0
* Light:    

     Canopy Conditions
* Temp: 67.5F   * Humidity: 67.4%
* Temp: -2926.1F   * Humidity: 4930.8%

As you can see, sometimes it's only 1 sensor that freaks out, sometimes it's other ones.
4  Using Arduino / Project Guidance / I2C sensor erratic readings when not using usb connection - Uno on: February 15, 2014, 11:52:57 pm
Ok, so I've been pulling my hair out over this issue all day and I cannot for the life of me find the solution.

I am running an Uno which has 4 sensors connected to it, 3 DHT22 temp/humidity sensors and 1 Senseair K22 I2C CO2 sensor. The Uno is being powered off of 12vdc wall adapter and the sensors are powered/grounded off the Uno 5v. I used 1 cat5 cable, about 13' worth to run 3 separate wires for the DHT22 signals, 2 wires for I2C signal and then used a common power and ground wire for all 4 sensors. I ran the two common supply wires to the K22 CO2 sensor, soldered them to the board along with 3 additional supply wires for the DHT22's. So power and ground for DHT22's splits off from the K22 board.

The problem I am running in to is when I have the Uno connected via USB, the K22 gives stable read outs. When I remove the USB connection the K22 begins to give erratic readings. The DHT22's remain unaffected, however. If I simply touch the outside of the USB connector to the outside of the USB port on the Uno the K22 begins to send back stable readings.
This leads me to believe that I have a ground issue.

I'm also running a 4 brick 5v relay board off the Uno and that works no problems... Everything seems to work fine without the USB ground being involved other than the K22. I'm starting to wonder if it doesn't have to do with tying pwr/gnd of all 4 sensors together the way I did?

Please help!
5  Using Arduino / Programming Questions / Re: Greater than but less than statement - PID sketch on: January 26, 2013, 03:58:30 pm
Thanks so much!
6  Using Arduino / Programming Questions / Greater than but less than statement - PID sketch on: January 26, 2013, 03:16:33 pm
Hi guys,

 I'm working with a PID sketch and I want to setup trigger points for different PID settings depending on how far the input is from the setpoint.
The original code for this section looks like this and it works fine...

double gap = abs(Setpoint-Input); //distance away from setpoint
  {  //we're close to setpoint, use conservative tuning parameters
    myPID.SetTunings(consKp, consKi, consKd);
     //we're far from setpoint, use aggressive tuning parameters
     myPID.SetTunings(aggKp, aggKi, aggKd);

However, I want finer control so I came up with this, but it does not work.
Cabinet.cpp: In function 'void loop()':
Cabinet:109: error: expected primary-expression before '<' token
Cabinet:113: error: expected primary-expression before '<' token

if(gap <= .5){
    seedHTxch.SetTunings(UconsKp, UconsKi, UconsKd);
    if(gap > .5 && < 1){
    seedHTxch.SetTunings(consKp, consKi, consKd);
    if(gap >= 1 && < 2)
    seedHTxch.SetTunings(aggKp, aggKi, aggKd);
    if(gap >= 2)
    seedHTxch.SetTunings(UaggKp, UaggKi, UaggKd);

I've tried all I can think of and used the reference guide to try and find the proper commands but nothing I can come up with works.

Please help

7  Using Arduino / Sensors / Re: Interference from motor driver on: January 04, 2013, 10:32:24 am
Ok, will try that. I guess I'm just confused as to why there is this interference when the 5V comes off the Arduino and has no other connection than to the DS18B20's.

Could it be the proximity of the motor driver to other wires, such as signal/power wires?
8  Using Arduino / Sensors / Re: Interference from motor driver on: January 03, 2013, 08:10:59 pm
OK, so I switched the DS1820B's from power mode to parasite mode and now no issues with the motor driver. I was powering the DS1820B's from the 5V on the Arduino and the only other thing sharing that power line is a DHT22 temp/humidity sensor. Any thoughts?
9  Using Arduino / Sensors / Re: Interference from motor driver on: January 03, 2013, 05:38:29 pm
The ground wire for the 2 DS18B20s only connect those sensors and go directly back to the Arduino and connect to nothing else.

I should note that this starts when the motor driver has a pwm input of only 2.5-3 out of 255... So it barely takes any input to start mucking the sensor readings up.
10  Using Arduino / Sensors / Re: Interference from motor driver on: January 03, 2013, 05:27:30 pm
The sensors ground to the arduino, which grounds to the power supply.
11  Using Arduino / Sensors / Interference from motor driver on: January 03, 2013, 05:08:10 pm
Hi guys, I'm using a Pololu motor driver with the VNH2SP30 chip ( to control voltage to a thermoelectric cooler and every time the driver comes on and sends current to the thermoelectric device my DS18B20 sensors start putting out incorrect readings. Notably, they drop by several degrees then fluctuate around. If I leave the driver operating and disconnect one of the leads to the cooler then the sensor readings begin coming back normal. I'm guessing this is some problem with the ultrasonic frequency making its way to the wires carrying the DS18B20 signal, so what can I do?

12  Using Arduino / Project Guidance / Re: Problem with 5V pins... on: December 13, 2012, 07:13:08 pm
No. I'm powering all the devices, etc, (other than the arduino which is on a wall wart) through a PC PSU... I connected the ground pin on Arduino to the ground coming from PC PSU and what ya know, it works now lol.
Last time I powered the Arduino with the PC PSU through a barrel connector which explains why I had no problems! D'oh!

Thank you so much for the help!
13  Using Arduino / Project Guidance / Problem with 5V pins... on: December 13, 2012, 06:13:14 pm
I'm having a problem with the 5V pins on both my Uno and Mega... I'm trying to signal a mosfet and no matter if I use a pin and set it to high or connect to the 5V output it won't work.

So, I tried different power adapters, usb, etc.... If I measure voltage at the pin it's a solid 5V. If I connect a wire to the pin and then measure the voltage at the other end it'll be lower, dropping in relation to the length of the wire. It's like the pins are putting voltage out but no current. I get the same results if I try the 3.3V pin.

Previously I was setting the pin from high to low to shut the mosfet gate, but I added a 10K pull-down because I was having a problem with the mosfet gate remaining open even after 5V was removed. Could this have damaged the board by pulling too much current?

I had no problems with this setup previously, then I packed the arduino's away for a few months and now just seems like the capacitors are dead or something, I don't know.

14  Using Arduino / General Electronics / Re: Arduino Mega, Screw (Terminal) it on: December 08, 2012, 04:33:53 pm
Received my Mega Screw Shield today and it looks solid. A little bigger than I was expecting, but it's no surprise given all the pins. I'd definitely recommend it to anyone needing easy connectivity with their Mega.
15  Using Arduino / Motors, Mechanics, and Power / Re: 12V PC fan voltage control on: December 03, 2012, 05:35:24 pm
I set a PWM circuit up using a FET and any time I try to slow the fans down (4 120mm PC fans, 350mA) at all they start making an unhappy noise. Any idea's? The fans are definitely a brushed motor.

Pages: [1] 2 3 ... 7