Go Down

Topic: DIYino - an Arduino compatible board for prop electronics (Read 33318 times) previous topic - next topic

dannyc09

Good to hear!

Thank you for keeping us up to date!  :)

Protonerd

This week all 10 DIYino boards went out to the guys who ordered them, I feel quite happy and now it's time to get some rest before turning my attention again to new projects.

I certainly plan further runs of the DIYino, but only after I get enough feedbacks from the saber builders who already got (or are goingto get soon) a board and check what can be improved.

The DIYino boards from the 1st run all have a special feature: I slightly modified the MPU calibration sketch (found as a link in the LSOS GitHub page) to write the offsets into the EEPROM from the memory location of 96. I chose this address in a way not to collide with neskweeks other variables stored in EEPROM from LSOS. I also added code to LSOS to read back the values in the setup, I will ask neskweek to add this code to the official one.

All boards went through a tight quality check incuding:
- burning the bootloader to the Atmega328, configuring the DIYino board as an Arduino Nano
- powering up via USB and check that the board can communicate with the host PC
- uploading code
- calibrating the MPU6050 and storing the calibrated offset values in EEPROM
- uploading a dedicated DIYino test bench which checks that
   - the low-side drivers (mosfets) work by switching on/off and PWM controlling LEDs
   - the sound engine by playing sound founds from SD card while adjusting the volume
   - reading out the MPU acceleration and gyro values to check that it's alive and reacts not only
     to calibration but to real movement as well

Enjoy the saber building and tell me what you think!

pert

- burning the bootloader to the Atmega328, configuring the DIYino board as an Arduino Nano
Why not configure it as an Uno? That way it will have the 500 byte Optiboot bootloader instead of the 2 KB ATmegaBOOT_168_atmega328.hex. That extra 1.5 KB of space could come in handy with LSOS getting so close to the limit. The other benefit of using the Uno bootloader is the Nano one has a bug that can cause infinite reset loops if you set a short watchdog timeout in your sketch.

zendium3ki

Hello guys,
arrived today DIYino the right time and it is fantastic.

Thanks Protonerd.

Now I have a long process of testing to do!!

But obviously what I miss is the free time!!!

iwuk78

Mine arrived today. Looks good.

Thanks Protonerd! 

Maybe when you get back from your vacation you could send your test code? :)


dannyc09

Got mine too!  Thanks Protonerd!   Now need to test.

I think all the lightsaber os code can be found on the github site

Protonerd

Why not configure it as an Uno? That way it will have the 500 byte Optiboot bootloader instead of the 2 KB ATmegaBOOT_168_atmega328.hex. That extra 1.5 KB of space could come in handy with LSOS getting so close to the limit. The other benefit of using the Uno bootloader is the Nano one has a bug that can cause infinite reset loops if you set a short watchdog timeout in your sketch.
You are a bottomless source of great knowledge. I was not aware that was possible, nor that the nano has a buggy bootloader. Does this bug affect all boards or only certain "technology corners"? I ask this because one out of the 20 boards fromthe first run exhibits exactly this problem, but some simpler sketched run on it.
Another question: does the uno also have an Atmega328P? Because I once tried to bootload a non-P as nano instead of mini and it failed...

Protonerd

Why not configure it as an Uno? That way it will have the 500 byte Optiboot bootloader instead of the 2 KB ATmegaBOOT_168_atmega328.hex. That extra 1.5 KB of space could come in handy with LSOS getting so close to the limit. The other benefit of using the Uno bootloader is the Nano one has a bug that can cause infinite reset loops if you set a short watchdog timeout in your sketch.
You are a bottomless source of great knowledge. I was not aware that was possible, nor that the nano has a buggy bootloader. Does this bug affect all boards or only certain "technology corners"? I ask this because one out of the 20 boards fromthe first run exhibits exactly this problem, but some simpler sketched run on it.
Another question: does the uno also have an Atmega328P? Because I once tried to bootload a non-P as nano instead of mini and it failed...

pert

Does this bug affect all boards or only certain "technology corners"?
It affects any board that uses the ATmegaBOOT_168_atmega328.hex bootloader, Duemilanove, Diecimila, Nano, Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328 and possibly some of the other boards that don't use optiboot and don't have WATCHDOG_MODS defined in the makefile, I haven't looked into the bootloader source for those. The issue: https://github.com/arduino/Arduino/issues/4492 is that the watchdog is not disabled by the bootloader so if it was enabled in the sketch and times out during the bootloader then it can go into an endless reset loop.

You should be able to just select the Uno from Tools > Board menu before you burn the bootloader and then the users of the DIYino will need to remember to use it as an Uno.

I use a lot of the Pro Minis which come with the ATmegaBOOT_168_atmega328.hex bootloader. I always burn the Uno bootloader on them right away and use them as an Uno instead of Pro Mini.

does the uno also have an Atmega328P? Because I once tried to bootload a non-P as nano instead of mini and it failed...
Yes, Uno is ATmega328P

Sethski

This is exciting! I've put together a few lightsabers but new to Arduino and something that I'd like to put time into learning. Please do consider me interested if (hopefully when) you make more available.

Looking forward to seeing how the owners of the first batch put them to use.

Protonerd

I added a draft documentation to the first post. It is still very rudimentary but I included much needed and requested wiring pics for your reference. Enjoy and give me feedback. I will of course continuously improve this document to give more flesh to the bone!

zendium3ki


Hi Protonerd, in italian they say: giĆ¹ il cappello!!


Great job!!

Protonerd


User Manual has been updated (see in first post), new topics:
- some restructuring of existing Chapters
- include wiring for an in-hilt recharge port
- include full circuit schematics
- explanation about the LS1...LS6 pins, this in particular became a FAQ by many and is important to properly wire the LEDs (whatever setup you use)
- along with the LSx wiring a 3.7V supplied RGB(W) High-Power LED setup is shown (still most popular setup for lightsaber lighting)


I will work on the document, next items to be added in the coming days:
- basic neopixel wiring and basics of operation
- advanced neopixel wiring with power saving option

dannyc09


Protonerd

Because of some guys working now on neopixel sabers, there was a bit of a pressure to include those chapters as well, so I updated the User Manual with the chapters describing basic and advanced wiring for neopixel striped.

I also added text to some of the other chapters as well. Phrasing is still very rough and needs a lot of polishing, but my intention was to quick-start people using the board.

@dannyc09: care to elaborate? The DIYino Prime board has all mosfets needed, except if you want to do something extreme.

Go Up