Working or not?

Hi,

I am a complete novice to Arduino. Have finished soldering my first EmonTx and am looking for help to know whether I have done it right. Is there anything I can do to understand if I have any of the multitude of parameters right or even cooked something in construction?

I seem to have no response from the PC when I plug it in to the USB (although a pen drive in the same USB IS detected). Should it be detected on its own? I have tried a variety of COM port settings (1, 2, 4), but seem to be getting nowhere.

I have downloaded the drivers for the cable.

Rather than bog down you guys in answering this noddy question I am happy to dig further if you can point me to some simple diagnostic tricks....

Glad of any steer & thanks for your time.

Neil

 

PaulOckenden's picture

Re: Working or not?

Did you buy a programmer? The USB port on the emonTX is for power only. 

P.

Neil-K's picture

Re: Working or not?

Ah! That might explain it! No I didn't.

I obviously missed that bit somewhere along the way. Any pointers?

Neil

 

Paul Reed's picture

Re: Working or not?

I bought one of these from the openenergymonitor shop.

Works great & easy to use!

Paul

Neil-K's picture

Re: Working or not?

Thanks Paul. I ordered one and it arrived yesterday. I am feeling my way in. Wish me luck!

Neil

Neil-K's picture

Re: Working or not?

Paul (and others),

I am still concerned to know whether I have soldered this emonTx board up properly. I have tried running the 'Blink' sketch, but nothing happens. The Arduino window takes its time to compile, but eventually comes back saying 'Done Uploading' (so I am assuming I have the right COM port selected), but the onboard green LED stays off.

I am slightly confused on the issue of the jumper. There are 3 solderable pads below one of the jack sockets. I believe these to be jumpers, but have not done anything with them yet, so all three are still clean. Do I need to solder from the middle to one (or other) of them? (5V or 3.3V)

Is there anything I can do to find out if any of it is working or I have cocked something up?

Sorry to be such a noddy on this, but my engineering usually involves big yellow machines belching diesel smoke... this little stuff is much more scary!

Glad of any help,

Neil

Paul Reed's picture

Re: Working or not?

You need to load up the proper sketch for the board for this to function. The blink sketch assumes that the onboard LED is on the same output pin as the Arduino (it's not!).

Once you load up the libraries and sketch, you will see the onboard LED blink every 20 secs or so, to indicate  that its sending data. You will not know if everything is working until the inputs are connected but the fact that the sketch has loaded OK is a good start.

The jumper links are to provide either 5V or 3.3V to the 2 input jacks - temperature & pulse.
You will probable find that the 'Temperature' jumper is already  connected to 5V by a sliver of copper left by mistake across the jumper during manufacture, but that's OK, you will need 5V for a DS18B20 temperature module anyway. Just leave the pulse link unsoldered until you decide if you are adding a pulse counter.

 

Paul

Neil-K's picture

Re: Working or not?

Paul,

Thanks for to bit about the jumper. I am planning on using the onewire temperature sensors, so I'm going to leave alone on that for the moment.

Thanks too for clarifying about the blinking LED.

In terms uploading a proper sketch: I have downloaded one from the GIT site and have also put the OneWire and the Dallas Temperature libraries in the arduino library folder. (Screen shot attached.) Upon attempting to load it runs though the routine and comes back saying 'done uploading', but in the dialogue box it says:

Binary sketch size: 5,200 bytes (of a 32,256 byte maximum)
avrdude: usbdev_open(): did not find any USB device "usb"

Using 'Find' I see that  'usb' does not seem to appear in any of the sketches. Does this mean I have a wrong USB driver?

In terms of the thermometer sensor: I have  soldered that up, but it is not clear what should happen to the screening cable. The photo on the site shows the white, red and black wires, but not the screen. I have left if out for the moment, but happy to change that.

Any steers gratefully received,

Neil

 

Paul Reed's picture

Re: Working or not?

Have you installed the correct driver for the programmer?
If not, the link is listed in the OEM shop. (you may have to reboot your PC after installing the driver - I did!)

Theres no need to use the screen if you don't wish to, the white, red & black wires should be OK. 

Paul

Neil-K's picture

Re: Working or not?

Paul,

I have downloaded the VCP drivers from 

http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx

 extracted them and sought to update them by right clicking in Device Manager. I have then pointed the search at the extracted driver location CP-210x_VCP_Windows ( but it eventually comes back saying 'Cannot install this hardware')

I have done this with and without re-booting.......

Any ideas?

 

 

Robert Wall's picture

Re: Working or not?

You did use the SI Labs installer, didn't you?

Neil-K's picture

Re: Working or not?

Robert, Paul and anybody else who can help.

After a long break (pesky work getting in the way) I am back trying to see if I have cocked up the board in my soldering.

Progress:

  • I have downloaded the cable drivers. When looking at COM3 in Control Panel/System/Device Manager (which refers to SL CP210XC USB to UART bridge) I have attempted to update the driver, but it comes back saying it is already up to date.
  • I believe I have downloaded the sketches from GITHUB and after saving them to the library as separate folders I have re-named the folders by removing the '-master' section of each's folder name. So they now read 'EmonLib', emonTxfirmware', 'jeelib'.
  • I HAVE selected COM 3 and the device IS the UNO.

The bit I am confused about is whether I need to load all the sketches at the same time (one after another) or whether there is one that calls for the other files now sitting in the libraries. Irrespective of what I do I only get the blue LED lit on the USB programmer, but never a blink of life out of the onboard green LED.

There is a line in the instructions which says ''You will need to compile the emonTx firmware that makes use of them'..... is this suggesting the amalgamation of sketches? Glad of a steer on this.

To be honest what I would really like is to post the soldered board to someone who could plug it in and run it themselves, so at least prove it is not my soldering. When I get it back (or end up buying another one to try again if I HAVE cooked it) I can then keep grappling with the mysteries of programming knowing at least the physical bit works.... at the moment I have no idea if it does.

Any volunteers/ideas? Please?

Neil

Robert Wall's picture

Re: Working or not?

When I use the word "sketch", I mean the bit of software that actually does the task you want, e.g. measuring power. So from here (for example) https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTx_C... I would call this one emonTx_CT123.ino the sketch and this one emontx_lib.ino is a library. When we bundle two files like that together, they both need to go in the same directory and the Arduino IDE insists that it too is called "emonTx_CT123". That directory wants to be in your work area (I'm on Windows XP and mine is "....My Documents\OpenEnergy\Software".

Also under Software is a directory "Libraries" which has in it the common-to-almost-all library directories JeeLib and EmonLib that are mentioned as being required at the top of the sketch file.

When you open the Arduino IDE, if you do File > Preferences, you can set Sketchbook location. Mine is that Software directory I mentioned.

Having done that, if you do File > Sketchbook, you should see emonTx_CT123 listed and if you click it, it will load into the IDE. That will be on the first tab, and the other file emontx_lib.ino will be on the second tab. From there, you click the right arrow ("Upload") to load into your emonTx. You should see "Compiling Sketch" and a progress bar, then "Uploading" and it reports the file size, and finally "Done uploading".

If you get there, your sketch should be loaded and running. Then you can click Tools > Serial Monitor and a window will open that shows the output from the sketch. (You'll need to set the baud rate (bottom right) to 9600 - the same as the line

Serial.begin(9600);

in the sketch. If you get there, you're almost home and dry. Sorry to run through it all again, but I did that in case something has been overlooked.

If you're really desperate and want to post it to me (with return postage!), PM me.

 

[Edit: Neil-K reports it's now working.]

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.