Show Posts
Pages: [1] 2 3 ... 18
1  Using Arduino / Project Guidance / Re: Can Arduino output 20kHz PWM with varying duty cycle? on: September 08, 2013, 05:06:39 am
The issue is not really 8 bit uC or 32 bit uC when driving 3PH transformer or motor.

Take arduino mega, it is 8 bit uC but it does have few 16 bits timer being similar as independent uC specialized unit or virtual uC. So once you low level or assembly program one of these timers, you have 16 bits precision. In my own projects, got very good results using them on 2 phases power transformer and motor, I mean with few KVARs and KWs at frequency beyond 20 KHz.

The HUGE problem with 3 phase drivers and arduino mega: the 16 bits register command of the mega 2560 are not meant for this but they're really good for 2 phases.

I do have an arduino due, still not tried to look at its timers possibilities and see if I can go after 3 phase power electronic project.

Albert

2  Using Arduino / Project Guidance / Re: Can Arduino output 20kHz PWM with varying duty cycle? on: September 07, 2013, 03:35:22 am
If you need to have a 3-phases or 3 full H-bridge with 6 igbt's at such speed (20 KHz) along with digital PLL (Phase Locked Loop), I think not possible even with arduino mega.

I've been using mega to generate isolated TTL signals controlling full H-bridge, loose coupled flyback ringing at peaks of 800V and 10A at 20 KHz and more thanks to the 16-bit timers but it only works on 2 phases or 2 legs full H-bridge (4 igbt's), requires as suggested by dancombine to directly program the timer registers otherwise forget it.

Even if you forget about the control loop, PLL, it seems the arduino mega timer are not meant to generate 3 phases full H-bridge, maybe arduino due could do it !
3  General Category / General Discussion / Re: graphical interface help on: September 07, 2013, 03:26:13 am
How do you plan to communicate with your GUI and the arduino: USB ?
There are Java solution if you're interested.
Albert
4  Using Arduino / Programming Questions / Re: Java Application with Arduino on: September 07, 2013, 03:14:51 am
You might  want to try this open source GUI
http://forum.arduino.cc/index.php?topic=182442
https://github.com/selfonlypath/Arduino-ElectroShaman

The true power of this GUI:
- there is a part which runs on Windows or Mac - this part is called the GUI
- there is part which runs on the Arduino (Mega, DUE, ...) - and is part of the sketch
- between the GUI and the sketch, there is USB communication (the standard one used by Arduino), and a proper protocol for exchanging data

In the Arduino sketch, you define what parameters you would like to use in teh GUI:
   - there are 12 sliders on which you can set the min, max and default values
   - in addition there are 8 checkbox controls
   - lastly there is a console text section
Once you start your GUI, you get a default screen.
Upon establishing the connection the Arduino (is just selecting the right serial port), the setup parameters are exchanged.
From then onwards, you can adjust all your desired Arduino parameters LIVE from your GUI!

As an example, you can life-update the PWM frequency, or duty-cycle of any timer (you just program in the sketch what you want to get).
Same with the 8 checkbox. This acts like an on/off switch, where you can command just anything to your Arduino.
The console section, is to receive text messages from your Arduino, as you have programmed it in your sketch.
Suppose you have a system programmed with a PLL, you could send a message to the GUI telling the "PLL is locked".
Use your imagination!!

It's a very flexible thing, instead of juggling around with adjusting the parameters in your sketch, reprogram and reload, you just do it live from the GUI.

Albert
5  Using Arduino / Programming Questions / Re: Arduino GUI on: September 07, 2013, 03:09:33 am
You might  want to try this open source GUI
http://forum.arduino.cc/index.php?topic=182442
https://github.com/selfonlypath/Arduino-ElectroShaman

The true power of this GUI:
- there is a part which runs on Windows or Mac - this part is called the GUI
- there is part which runs on the Arduino (Mega, DUE, ...) - and is part of the sketch
- between the GUI and the sketch, there is USB communication (the standard one used by Arduino), and a proper protocol for exchanging data

In the Arduino sketch, you define what parameters you would like to use in teh GUI:
   - there are 12 sliders on which you can set the min, max and default values
   - in addition there are 8 checkbox controls
   - lastly there is a console text section
Once you start your GUI, you get a default screen.
Upon establishing the connection the Arduino (is just selecting the right serial port), the setup parameters are exchanged.
From then onwards, you can adjust all your desired Arduino parameters LIVE from your GUI!

As an example, you can life-update the PWM frequency, or duty-cycle of any timer (you just program in the sketch what you want to get).
Same with the 8 checkbox. This acts like an on/off switch, where you can command just anything to your Arduino.
The console section, is to receive text messages from your Arduino, as you have programmed it in your sketch.
Suppose you have a system programmed with a PLL, you could send a message to the GUI telling the "PLL is locked".
Use your imagination!!

It's a very flexible thing, instead of juggling around with adjusting the parameters in your sketch, reprogram and reload, you just do it live from the GUI.

Albert
6  Products / Arduino Due / Full H-bridge (mega = > due) controlled by ElectroShaman Java GUI on: September 05, 2013, 05:35:50 am
Please find detailed video instructions on how to modify the arduino sketch to Java control a full H-bridge driver




Runs on Arduino MEGA, requires ElectroShaman v2.0.5 on Win/MAC to manage operational parameters

Almost fully compatible on Arduino DUE requiring only to change timer4 initialization and ISR4 (Interrupt routine).

If somebody would be willing to migrate these three parts of the code from MEGA to DUE where 99% of the code is already due compatible and USB java.

Thanks in advance, Albert

Code:
// select output pins & initialize timer4
  pinMode(outputPinH1H2, OUTPUT);
  pinMode(outputPinH3H4, OUTPUT);
  TCCR4A = B00111001; // Phase and Frequency correct at OCR5A
  TCCR4B = B10001;    // prescaling by 1 the system clock
  TIMSK4 = B1; // ISR management to detect OverFlow
  TIFR4 = B1;

Code:
// always use TCNT different than ZERO because of multiple TCNT's AVR bug not updating correctly if TCNT=0
  cli();
  TCNT4=1;
  OCR4A=LocalFreqPWM;
  OCR4B=LocalHbridge12;
  OCR4C=LocalHbridge34;
  sei();

Code:
ISR(TIMER4_OVF_vect)
{
  if(token == 1){
    OCR4A=LocalFreqPWM;
    OCR4B=LocalHbridge12;
    OCR4C=LocalHbridge34;
    token++;
  }
}
7  Products / Arduino Due / Java GUI compatible with arduino MEGA and arduino DUE on: August 12, 2013, 10:54:02 pm
Please find a new release of the sketch and javas as requested 6 months ago in this github thread https://github.com/arduino/Arduino/pull/1267 where now the java GUI offers much more sliders, checkboxes as well as LOG console directly communicating with arduino MEGA or DUE being the client
8  Using Arduino / Project Guidance / Re: Arduino reset upon serial Java connection on: August 02, 2013, 02:59:47 am
Hello moderators,

I suggest this topic be moved to improvments arduino http://forum.arduino.cc/index.php?board=21.0 because it has nothing to do with personal project !

This issue seems strong tabou for lot of people worldwide wether arduino or not arduino, the real issue being of RXTX java not being maintained, still open sourced and the DTR effect has been solved so far always using Quick & Very Dirty tricks which will create more and more confusion through time.

One suggestion would be that arduino community rewrite a specific RXTX where it will be parametered (DTR rise or not) so arduino IDE or whatever other Java GUI would software program the behaviour of DTR.

Just my 2 cents, Albert
9  Products / Arduino Due / Re: Garbage using serial functions in Arduino Due on: February 24, 2013, 06:47:02 am
All right, working much better now with new USB firmware https://github.com/arduino/Arduino/pull/1267#issuecomment-14058478
10  Products / Arduino Due / Re: Updating 16u2 USB firmware on: February 24, 2013, 06:46:09 am
All right, working much better now with new USB firmware https://github.com/arduino/Arduino/pull/1267#issuecomment-14058478
11  Products / Arduino Due / Re: IDE 1.5.2 released! on: February 18, 2013, 01:21:49 am
hm looks like I can't upload to mega 2560, is it just me?

I've tested both my mega 2560 rev 2 and rev 3, uploading works.

Now as posted before, mega 1280 does not upload because IDE can't find its USB port !
12  Products / Arduino Due / Re: Updating 16u2 USB firmware on: February 12, 2013, 10:48:24 pm
I just want make sure no blue smoking or destruction of my DUE... with the issue of 5V versus 3.3V !

Please confirm that I just build a 6 wires ribbon to connect directly my MEGA's 6 pins ICSP connector to my DUE's 6 pins ICSP connector.

Via that ribbon, only +5V, GND, SCK, Slave, MOSI and MISO related to SPI protocol.

Of course, I'll power my MEGA via USB connection of my Macintosh but how about my DUE, should it be powered or just receiving energy via its ICSP ?

P.S. I've been able to download Crosspack http://www.obdev.at/products/crosspack/index.html running OK on my Macintosh, still not clear on my side how to properly sequence different actions of MEGA ICSP sketch, learning curve here since i'm more software guy than hardware. For example, i don't understand how via ICSP sketch one can download the HEX file firmware provided by cmaglie !
13  Products / Arduino Due / Re: IDE 1.5.2 released! on: February 12, 2013, 11:37:08 am
I don't know if this normal but my arduino mega 1280 serial port ID cannot be seen from IDE's Tools/SerialPort so impossible to download any sketch.
14  Products / Arduino Due / Re: Garbage using serial functions in Arduino Due on: February 12, 2013, 10:04:05 am
I only have a Mac and i'm stuck, it seems no DFU-programmer exist for Mac, see http://arduino.cc/forum/index.php/topic,147639.0.html

A friend of mine told me of this site that reports a DFU for the atmega16u2, maybe it works for you on PC http://dfu-programmer.sourceforge.net

Otherwise cmaglie wrote me this private mail

The 16u2 doesn't have DFU firmware inside, you must program it with an AVR-ISP (or equivalent programmer) from the ISP connector (the 6-pin header near the power jack).
If you don't have an ISP programmer you can emulate one using an Arduino Uno or Mega loaded with the ArduinoISP sketch.

http://arduino.cc/en/Tutorial/ArduinoISP
http://playground.arduino.cc/Code/MegaISP


So I'm confused, Albert
15  Products / Arduino Due / Re: Updating 16u2 USB firmware on: February 12, 2013, 05:23:32 am
If I recall you could select an equivalent at90usb162.

Unfortunately, just tried per your suggestion but DFU-programmer says no device present
Pages: [1] 2 3 ... 18