Project

General

Profile

On going: Issues with Programming a Jeenode Micro

Added by henry over 5 years ago

Hi,
I have a big problem with program a Jeenode Micro v3. I prepared all like discribed here:[[[http://jeelabs.org/2013/03/21/programming-the-jn%C2%B5-at-last/]]]. I use the Arduino IDE 1.5.4 on Windows and a Jeelabs Flashboard.
But the step ‘burning bootloader’ doesn’t work. The Arduino IDE shows this error: Error while burning bootloader: missig ‘erase.params.verbose’ configuration parameter.
Can anybody help me?
Many thanks and kind regards
Henry from Germany


Replies (72)

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by plutonomore over 5 years ago

@wolfpackman2, would I be correct in assuming that U1 on that purple SC70 Work Board is a flavour of the LTC-3525?
Wow, whatever it is, that little 6 pin SC70 package, looks like it has taken some real punishment. I used them on a
JeeNode Micro V3 clone I cobbled together a while back and IMHO these guys are so small they should be made illegal
Must admit as far as the ATTINY84 is concerned, cant see me using it much, if at all, in the future.

cheers,

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by wolfpackmars2 over 5 years ago

plutonomore that is indeed the 5v version of the LTC-3525. It looks worse than it is - because I haven’t cleaned up the flux in the photo. I took that photo to use the macro capabilities of my digital camera to see if all the pins were soldered down and there was no bridging. And yes, terrible terrible trying to get that thing on. The first one, I used too much paste which bridged all the pins. I spent more time on it with the iron than I was comfortable with, so I moved on to my second copy. I got that one down, so I thought, until I snapped a picture of it and noticed two of the pins were not soldered down. After messing with it a bit more, that one too, I felt, had spent too much time under the iron, so I swapped it out with the third and final LTC3525 I had. It was a learning experience to be sure :P

@BobCochran13

The dev board is one that I designed to act as a breakout board. I knew I was going to need to design some sort of pcb, and I wasn’t sure what connections I would need to make, so I designed it with breakouts to the IO for the components and the Jeenode. It adds a 5v power supply with support components, the Freescale pressure sensor (the component with the rubber tube coming out of it - the tube is used to direct the sensor to detect differential pressure), a place to mount the Jeenode Micro, an SPI flash memory chip to play with OTA updates, a One-Wire port-because that’s my next project, and headers to cross-connect everything. Eventually, I could end up designing a single board with all the components, once I figure out how they will tie together. In other words, I designed this one board to kill many birds :) SC70 is the package configuration of the chip. If you find the small component on your Jeenode Micro with 6 leads on it, that’s an SC70 component (in fact, I use a different version of the same chip used on the Jeenode Micro). Of course, if you don’t have the “Boost Power” version of the Jeenode micro, you won’t have this chip…

There does seem to be a lot of confusion around programming the JNMicro. I think whatever guide is put together will be of great benefit to people.

In a side note, I believe this will be my first and last ATTiny84 design. Looking on Mouser, the chips are not any cheaper than the ATMega328P, which has many many advantages over the ATTiny84, not the least of which is a broader online knowledge base. The ATTiny84 MAY offer lower power usage, but I’m not entirely certain of that, and the difference may be negligible.

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by wolfpackmars2 over 5 years ago

henry You don’t actually need to burn the bootloader, as 1) The bootloader is not needed and 2) The Jeenode Micro should have arrived with the proper fuses already set. Burning bootloader is only for setting fuses on the Micro.

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by jcw over 5 years ago

Ok, so here’s a setup you can use for programming a JeeNode over ISP, along with instructions for the latest version of JeeLib:

On the left, a JeeNode USB with Flash Board, on the right a JeeNode SMD (should work similarly with other boards running at 3.3V, e.g. a JeeNode Micro).

To program the board on the left (over USB serial) - select the `isp_flash.ino` example sketch from JeeLib, and “Upload” from the File menu (i.e. CMD+U on Mac).

To program the board on the right (over ISP, including fuses) - pick the appropriate sketch in the IDE and use “Upload Using Programmer” from the File menu (i.e. CMD+SHIFT+U on Mac).

It’s as easy as it gets, and you end up with the ability to program the rightmost unit over ISP - even if the boot loader is missing, or has been damaged somehow.

PS. The explanation for this, is that the leftmost unit emulates an ISP programmer when spoken to at 19200 baud, but OptiBoot still kicks in when spoken to at 115200 baud.

PPS. You don’t strictly need the Flash Board, you can also wire things up yourself, as documented on the JeeLabs weblog in various posts. Note that the leftmost unit also powers the rightmost unit in this setup.

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

wolfpackmars2, would you be willing to share the pcb design for your dev board? Or the schematic?

@JohnO, can you take a picture of your JeeNode Micro connected to your favorite programmer and share that with me?

jcw Thanks for joining the discussion. Thank you for updating the JeeLib library. I will be sure to update my local repository with your fixes.

You probably saw my earlier posts which state I forked your jcw/ide-hardware code. I’m in the process of updating that now, I am particularly interested writing a guide to programming the JeeNode Micro that comes complete with photos. This is why I’m asking JohnO, wolfpackmars2, and other interested parties to share their photos and thoughts with me. If you like I will be happy to add your post just above to the web page documentation I’m starting to think about.

Eventually — I will send you a pull request for jcw/ide-hardware which you may find helpful.

Guys, it is getting close to the “Thanksgiving” holiday here in the USA, and I’ll be slow to work with this thread. But I’m monitoring it closely. Every post here goes straight to my cell phone.

Thanks

Bob
Maryland, USA

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by plutonomore over 5 years ago

@Bob,

Since you seem to be gathering a comprehensive coverage of the JeeNode Micro v3 you might me interested in a little cloned
version of it that was posted on this forum … for some reason just did a search and can’t find it … probably me. Attaching
a picture of it (the number in the top left hand corner from this collection) ), so it’s obviously been posted, maybe not
me … who knows?

If you are interested in further details let me know, otherwise I echo Martynj’s sentiments, although I’m
wondering if there is a possible pun in there somewhere?

cheers,

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

plutonomore, yes I am interested in the clone. I remember reading about it — I think either JohnO or wolfpackmars2 posted the actual photo but I am not sure.

I too am wondering if martynj is punning a bit. It definitely brings a big smile to me! This Thanksgiving, I am both serving a fish pie (using a recipe published by BBC, no less) and I am fishing for JeeNode Micro knowledge.

Cheers,

Bob

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

plutonomore, I’m confused by the clone now. The photo you posted is lovely — is this your clone? Who built that clone, do you know?

@JohnO, you made this comment earlier in this thread:

> I no longer like the USTinyISPv2 because of the provisions required to avoid 5v hitting the RFM12B.

I have a standalone RFM12B board that I’ve connected to an older “Really Bare Bones Board” (RBBB) which I purchased long ago from either Wulfden or directly from Modern Device. Your comment made me go back to that RBBB device and look more closely at the connections to the RFM12B. The +5v and ground from the RBBB is connected to the RFM12B…(Bob winces.) The absolute maximum voltage for the RFM12B is 7v, so maybe I haven’t wrecked it yet.

I am planning to order some new Really Bare Bones Boards from Modern Device as Christmas presents for my team members at my day job, and I guess I will need to add one more 3.3v device to the order.

Cheers,

Bob

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by martynj over 5 years ago

@Bob,

The RFM12B spec sheet has Absolute Maximum Ratings (non-operating) Vdd at 6.0V, Recommended Operating Range 2.2-3.8V.
They do appear to tolerate 5V, but Absolute Max ratings come with the usual dire warning of potential limited life etc.

BTW, the RBBB is available in a 3.3V version (same board, different LDO output).

> Any association between the Turkey and the Tiny is purely accidental ;-)

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

martynj, I stand corrected about the Absolute Maximum Rating for Vdd. Indeed it is 6.0v. Yes, the RBBB is available in a 3.3v version. I better start using one for the RFM12B hookup.

Your comment about the Turkey and the Tiny gave me a really good laugh which I appreciate!

Cheers

Bob

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by martynj over 5 years ago

@Bob,

> I better start using (a 3.3V version RBBB) for the RFM12B hookup.

or just swap to the 3.3V LDO

Saves a few dollars to fund the festivities ;-)

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by plutonomore over 5 years ago

Bob, Yes, the photo is of my clone!
The ATTINY84V fuses were set as follows: lfuse 0xc2 hfuse 0xde efuse 0xff using USBasp v2 ISP programmer.
This was done by first removing the JP4 bridge and bridging JP3 pins 2 and 3 on the ATTINY84 pcb, then connecting
the USBasp programmer six pin socket to the six pin ICSP header on the ATTINY84 pcb.
Use avrdude syntax, avrdude -v -p t84 -c usbasp -U lfuse:w:0xc2:m -U hfuse:w:0xde:m -U efuse:w:0xff:m to burn
the ATTINY 84V fuses.
To burn a sketch into the ATTINY84V, using the Arduino IDE proceed as follows:
Open the Arduino IDE, select in Tools, for BOARD, select ATTINY
8MHz(internal oscillator, BOD disabled), select
appropriate SERIAL PORT eg COM7, select PROGRAMMER eg USBasp. Compile your sketch. The compiled sketch can be
found in my case at C:as a build xxx. Open the build and you will find the sketch
you just compiled eg Matts_DHT22_e1.cpp as a HEX file. Now just copy this to C:and use the following avrdude
syntax to burn the hex file to the ATTINY84V, avrdude -v -p t84 -c usbasp -U flash:w:Matts_DHT22e1.cpp.hex.
Now rebridge JP4 and bridge pins 2 and 1 of JP3. Connect battery, photovoltaic cell and sensors as per schematic
provided. Am attaching two sketches which I have tested with this unit succesfully, Matts_DHT22e1 and Matts_DS18B20a.
The first sketch reports battery voltage, DHT22 temperature and humidity plus the output from an LDR. the second
sketch reports battery level and DS18B20 temperature. Also attaching Eagle board and schematic plus several photos
of the setup. Good luck!

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by JohnO over 5 years ago

That is one monster of an AA battery 3000mAh.

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by JohnO over 5 years ago

@Bob here are your photographs, I hope the file-names provide a sufficient explanation. It took me a while to learn not to solder on headers on these small circuits until the final installation was clear(ish).

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

plutonomore and JohnO,

Wow! I am so pleased! I’m going to put all these photos in my GitHub fork. I’m really focused on adventures with fish pie today and tomorrow, and need to prepare for visitors…so I will get to this on Friday.

My plan is still to build a web page that showcases your photos and your comments. I think it will be a great help to others.

@plotonomore, your board is beautiful. I hope to achieve the same level of skill in devising a circuit some day.

Happy Thanksgiving to those of you in the USA…

Bob

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by garethcoleman over 5 years ago

Thanks to this thread I’ve managed to set fuses and program my JeeNode Micro!

Firstly kudos to jcw and the team for the whole JeeLabs project, amazing stuff!

And thanks to Henry, JohnO, Bob, wolfpackmars2, plutonomore and all the others for this thread.

In case it helps the documentation effort (nice one Bob) I’ll condense three days of joyous hacking pain into a painfully few commands

On Xubuntu 13.10 32 bit Linux, I got the latest arduino and the jeelabs extensions installed by:

wget http://downloads.arduino.cc/arduino-1.5.4-linux32.tgz
tar xzf arduino-1.5.4-linux32.tgz && rm arduino-1.5.4-linux32.tgz
wget https://github.com/jcw/ide-hardware/archive/master.zip
unzip master.zip && rm master.zip
mv ide-hardware-master arduino-1.5.4/hardware/jeelabs

Firstly I used an Arduino Uno r3 to try to program with, I was only able to upload a bootloader and thereby set fuses with it, I couldn’t get uploading sketches to work, despite using the boards and platforms for henry files that worked for others. I also messed around with the capacitor into the reset line, added a resistor to +5v from reset as well, then put some resistors in in case the 5v logic levels were the problem. None of which seemed to work, and after fiddling round with various permutations I was just left confused as to what I was doing.

So eventually I decided to give up on trying to do the programming with the Arduino and dug out an old USBasp that I had been given a couple of years ago. After creating a udev rule for it and updating the firmware on it I was able to move over to using this as a programmer with eventual success.

I’ve rigged up a custom cable to link the programmer’s ten pin isp header with the Jeenode, photo attached. The ugly part is the voltage supply where I took the 5v from the USBasp and put that into the arduino’s Vin. Then I took 3.3v from the arduino and used that to power the JeeNode. That way I’m using the arduino purely as a voltage regulator (as it’s convenient and low current I seem to have got away with it). If I had a better quality USBasp device it would provide an onboard voltage converter for both the power and the logic levels. I did worry about the logic voltage level as the device seems to be at 5v and the JeeNode uses 3.3v but it seemed to work! I suppose the JeeNode is quite tolerant of over voltage?

Although I didn’t really need to worry about the fuses, I really wanted to be able to set them for completeness and in case anything got corrupted later on. Thanks to plutonomore I tried using avrdude directly from the command line and it gives useful info about the state of the fuses before and after programming. Looking at the boards.txt from ide-hardware the fuses should be low_fuses=0xC2, high_fuses=0xD7 and extended_fuses=0xFF, so we run:

avrdude -v -p t84 -c usbasp -U lfuse:w:0xc2:m -U hfuse:w:0xd7:m -U efuse:w:0xff:m

And avrdude responds with loads of useful info confirming it worked. Which means I can move on to programming with the USBasp.

When I set the arduino IDE to use the USBasp as a programmer and the JeeNode Micro as the target board, I can upload sketches by using the ‘Upload Using Programmer’ option. And now I’ve written it out I can’t believe it took me so long, because I’ve double checked my steps just now using my laptop as a fresh start, it really was that straightforward!

Cheers

Gareth

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

Hi Gareth,

This is a great post and I would like to include it in my eventual “manual” for working with the JeeNode Micro. The photo is really clear, it should show a beginner how to set this up. Setting up the IDC header must have been a bit challenging. I always seem to rip the wires apart and/or get them in the connector wrong.

You got it working!

JeeLabs publishes a reference sheet for the JeeNode Micro ( http://jeelabs.org/wp-content/uploads/2013/03/qrc-jm-v3-part2.png ) which lists the PWR pins as being 0.9 - 5.0v compliant. The Atmel datasheet for the ATTINY84 says voltages up to 5.5v are okay. I did not check the “Absolute Naximum Values”. Page 153 of Atmel datasheet starts a long section on programming the chip in various ways, which I have not yet read but need to.

Does the Arduino Uno r3 have the latest Optiboot bootloader on it? Or at least, a version of the bootloader that the Arduino IDE understands?

Can you provide the exact UDEV rule that you used? Also, what version of the USBAsp do you have?

This is a great post! I’m glad you are having progress with your JeeNodeMicro.

Cheers,

Bob

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by wolfpackmars2 over 5 years ago

I’ve posted information about my project (including schematics and BOM) here: http://jeelabs.net/boards/6/topics/3276

I spent most of yesterday translating the Adafruit ADS1X15 library to be compatible with the Jeelib i2c implementation. Hopefully it will serve as an example to anyone who wants to imlement i2c using the JM Micro.

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by garethcoleman over 5 years ago

BobCochran13 wrote:
> Hi Gareth,
>
> This is a great post and I would like to include it in my eventual “manual” for working with the JeeNode Micro. The photo is really clear, it should show a beginner how to set this up. Setting up the IDC header must have been a bit challenging. I always seem to rip the wires apart and/or get them in the connector wrong.

Yes, in my experience IDE headers only work well with the correct pitch ribbon cable - single fly wires can give problems. In my case I had a ‘stub’ of ribbon cable and a header plug that came with the unit. Photos attached to make it clear which wires go where (note polarising notch visible on top of the connector).

> JeeLabs publishes a reference sheet for the JeeNode Micro ( http://jeelabs.org/wp-content/uploads/2013/03/qrc-jm-v3-part2.png ) which lists the PWR pins as being 0.9 - 5.0v compliant. The Atmel datasheet for the ATTINY84 says voltages up to 5.5v are okay. I did not check the “Absolute Naximum Values”. Page 153 of Atmel datasheet starts a long section on programming the chip in various ways, which I have not yet read but need to.

I should have been clear that I’ve got the version without boost converter as I’m intending it to be powered by a pair of AA batteries. So I understood that the voltage accepted was 2.2-3.8v.

> Does the Arduino Uno r3 have the latest Optiboot bootloader on it? Or at least, a version of the bootloader that the Arduino IDE understands?

Yes the Arduino seems to work fine, the programmer sketch flashed the lights in a plausible fashion and it runs other sketches. I don’t know what bootloader is on it, - or at least I didn’t until I googled it and found the perfect answer in a post from JeeLabs forum jeelabs.org/2012/03/07/which-boot-loader-do-i-have ! When I run this sketch on the Arduino, it reports:

Boot loader: OptiBoot 4.4

> Can you provide the exact UDEV rule that you used? Also, what version of the USBAsp do you have?
I created (as root) a rule called 45-USBasp.rules in /etc/udev/rules.d/ (all one line)
@
SUBSYSTEMS"usb", ATTRS{idVendor}“16c0”, ATTRS{idProduct}==“05dc”, MODE=“0666”, GROUP=“plugdev”‎
@

The USBasp isn’t branded but seems to be a fairly faithful clone of Thomas Fischl’s classic design, you can see from the photo all the info I have. I assumed it to have the standard 10 pin ISP pinout, and it’s worked so far.

> This is a great post! I’m glad you are having progress with your JeeNodeMicro.

Thanks Bob, looking forward to you gathering it together with the others. Now I need to get it talking to the raspberry pi….

Connection to JeeNode Micro.jpg (991 KB) Connection to JeeNode Micro.jpg Connection to JeeNode Micro
Connection to USBasp.jpg (610 KB) Connection to USBasp.jpg Connection to USBasp
USBasb front.jpg (907 KB) USBasb front.jpg USBasb front
USBasb back.jpg (992 KB) USBasb back.jpg USBasb back
1653
1654
1655
1656

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by garethcoleman over 5 years ago

wolfpackmars2 wrote:
> I’ve posted information about my project (including schematics and BOM) here: http://jeelabs.net/boards/6/topics/3276
>
> I spent most of yesterday translating the Adafruit ADS1X15 library to be compatible with the Jeelib i2c implementation. Hopefully it will serve as an example to anyone who wants to imlement i2c using the JM Micro.

That’s really interesting as it is very close to what I want to do - interface the adafruit TSL2561 i2c light level sensor to a jeenode micro and see how long it can run on a pair of AA’s.

Have you got any idea of the power consumption? Are you employing any tricks around sleeping between measurements, turning the radio off etc?

Many thanks

Gareth

RE: Resolved: Problem to program a Jeenode Micro (please help) - Added by wolfpackmars2 over 5 years ago

garethcoleman wrote:
> That’s really interesting as it is very close to what I want to do - interface the adafruit TSL2561 i2c light level sensor to a jeenode micro and see how long it can run on a pair of AA’s.
>
> Have you got any idea of the power consumption? Are you employing any tricks around sleeping between measurements, turning the radio off etc?

I’ve responded here: http://jeelabs.net/boards/6/topics/3276?r=3281\#message-3281 to reduce some clutter in this already busy topic :)

(51-72/72)