|
Post by Marathonman on Sept 26, 2020 18:58:59 GMT -6
"Sorry for the inconvenience."
Oh that's ok i needed to raise my blood pressure and have a stroke. ha, ha, ha !
i am glad i can be of assistance. for the people who use a slower Arduino you can use direct port manipulation on pin 10 like Cheors used earlier on his sketch. it is much faster then pin or digital wright, the only problem there is it is chip specific. if you have a very fast Arduino then no worries there.
Regards, Marathonman
|
|
|
Post by Marathonman on Oct 3, 2020 13:49:13 GMT -6
Ordered the breakout boards and parts today to aide in my quest for electronic switching. since i already have the Tensy 4.0 and have a 3.6 on a Tall Dog breakout board i am good in the MCU area. i have designed the timing board with the shift registers with the 4.0 as it is much smaller and i can attach it quite easily to the board. as you see in the previous posts, the pic of the B.O.'s they have one shift register and a decoupling cap. the other has 8 low power white LED's and 8 resistors all surface mount. at PCBWay www.pcbway.com/ i can get 10 boards for 5 bucks if they are < then 100mm. i have had problems arise in the mechanical but i have overcome them and am making forward progress. will be using a 500 va regular C core for the electronic version to test on. Regards, Marathonman
|
|
|
Post by Marathonman on Oct 5, 2020 19:06:49 GMT -6
Oh and thanks cheors, i know you were trying to look out for the best. some things especially in code can quite easily be overlooked. and yes i like your schematic. BO boards will be here next week. AC motor the end of this week.
Regards, Marathonman
|
|
|
Post by Marathonman on Oct 16, 2020 19:37:48 GMT -6
Took a few minutes to solder my led's and resistors on breakout board today. didn't have much time but managed to get one done. tested on Tinsy 3.6 and 4.0 with an led array of 8 on one b.o. and everything worked just fine. will get time to work on device this weekend and hopefully post some pics Sunday.
Regards, Marathonman
|
|
|
Post by Marathonman on Oct 19, 2020 18:47:05 GMT -6
Breakout boards proved to be to small or rather pads to close together so i redesigned them to accommodate larger pads, shift registers, LED's and the resistors on one board. much better in the long run as the wires in the original were to close together. i also did a larger LED, resistor board to accommodate the coding not using shift registers.
Boards are on their way as are 3.3v breakout board @ 5 amp to accommodate (7) 3.3v outputs. overkill i know. also have 10 pin ribbon cable coming to help ease the wiring that can quickly get out of hand.
PS. the LED's are 5 ma @ 3 volt @ 180 mcd's and 120 degree viewing angle so they work great with the low voltage Tensy 4.0 @ 3.3 volts. fairly bright for such a small 805 package. since this is a test package they do not need to be glaringly bright lighting up the walls. a good visualization to make sure the program is functioning properly is all i need.
Regards, Marathonman
|
|
|
Post by Marathonman on Oct 26, 2020 19:34:17 GMT -6
Boards are in the U.S. and will be here in a few days.
I will solder boards and will post either pic or video of working boards. sorry so very busy with the ranch and construction.
Regards,
Marathonman
|
|
|
Post by Marathonman on Nov 1, 2020 22:38:06 GMT -6
Finally finished the breakout boards but fried a Tinsy 3.6 with a Faulty 3.3v LDO. since the first 13 pins on the Tall dog 3.6 breakout board is the same as the 4.0 i mounted my 4.0 to the breakout board and loaded the SPI shift register program i posted here on this thread. i then changed millis to micro and let that mother fly. program worked absolutely wonderful running like a scalded dog through the neighborhood. since LED's are at 5 milliamp i was able to run them with the shift registers off the Tinsy directly with ease. it is so late so i will post a youtube vid showing the system working tomorrow. all i have to do now is mount the system on a PCB to drive high side FAN 73611MX drivers instead of led's connecting them to my IGBT's and i am home free. a completely motionless part G for which i am catching hell trying to balance my rotor right now. I posted the code before but i will post again tomorrow with the changes along with video. Here is a teaser pic, power, ground and three SPI wires is all to Arduino Tensy 4.0 shifting 48 Led's night rider style. Regards, Marathonman
|
|
|
Post by Marathonman on Nov 2, 2020 17:24:39 GMT -6
I hope you all enjoy this video of SPI shift registers in a 64 bit shift left and right at ANY speed you want like in the megahertz.
Again here is the code that can run with ANY Arduino that has SPI preferably a good one. i am using a Teensy 4.0.[/span]
// This sketch controls multiple 74HC595 shift registers in cascade to electronically control Figuera's active inductor
// controller by switching on taps located on part G connected to transistors in a "Make Before Break" scenario. by changing
// tap locations continuously changes inductance which controls current flow of the primaries.
// this sketch utilizes timing overlap to eliminate back Bemf or Cemf that would occur with single on off tap. it mimics
// the brush rotation of a mechanical rotating brush thus creates a continuous increase/decrease current through the primaries.
// this sketch is distributed freely but if you use this program then post build on line give credit where credit is
// due and not claim as your own design.
// to adapt to your build change pin numbers, delay time.
// developed for the electronic Figuera community by (DL)aka Marathonman with all technical help and coding of PaulRB on Arduiono.cc // Forum.
// Mosi to DS in pin 14 on 74HC595
// SCK to Seial Clock SHCk Shift Clock pin 11 on 74HC595
// SS, CS or any latch pin declared output to STCK latch pin 12 on 74HC595
#include <SPI.h>
unsigned long long int registerBuffer = 0b11;
byte shiftPos = 0;
bool shiftingLeft = true;
unsigned long long int lastUpdate;
const unsigned long long updatePeriod = 100000ULL; // change this microseconds figure to what you need for speed.
const byte latchPin = 10; // this can be changed to what ever latch pin you want.
void setup() { Serial.begin(115200); // use you SPI pins found on all Arduino's. coding will automatically take care of the rest if SPI0 pins // used.Mosi0,SCk0 Ect...
SPI.begin();
SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));
pinMode(latchPin, OUTPUT); // pinMode can be changed to direct port manipulation (Faster)if port is known then that of digital // read/wright.
}
void loop() {
if (micros() - lastUpdate > updatePeriod) { //Is it time to update the registers?
lastUpdate = micros();
//Shift the register left or right
if (shiftingLeft) {
registerBuffer <<= 1; //Shift 1 place to left
if (++shiftPos == 46 // < add how ever many pins or taps on part G you have up to unsigned long long of 64 buffer minus 1. //remember 0 to 47 is 48 pins.0 to 63 = 64 pins bytes.
) shiftingLeft = false; //Time to switch direction?
}
else {
registerBuffer >>= 1; //Shift 1 place to right
if (--shiftPos == 0) shiftingLeft = true; //Time to switch direction?
}
unsigned long long int temp = registerBuffer; //Take a copy of the buffer
SPI.transfer(&temp, 6); //Send the buffer to the registers // This must match your Shift Register count 1 through 8
digitalWrite(latchPin, HIGH); //Latch the updated values into the register's output pins
delayMicroseconds(1);
digitalWrite(latchPin, LOW);
}
}
This code works great and i am uploading a working video as i speak so i will upload to here when finished. UPLOADED
as you can see at the end the camera can not keep up with the switching time movement which exceeds the speed of the camera ic chip and LED's. EDIT; the LED's and the Camera can NOT keep up with the movement of the Switching but keep in mind the IGBT's, Mosfets and or High side drivers can. the movie was made with a phone that does not have fast acting IC's. the only thing that can is a high speed movie camera in which i do not own. Regards, Marathonman
|
|
peter
New Member
Posts: 24
|
Post by peter on Nov 3, 2020 11:47:39 GMT -6
Very very very coool.. downloading now. Thank you for sharing this. Kind regards.
Peter
|
|
|
Post by Marathonman on Nov 3, 2020 14:21:57 GMT -6
Thank you Peter for the kind words. it is just human helping humans which is the way it is suppose to be. i figured out this very statement a while back and i will share my experiences always.
the most wonderful thing is even the basic Arduino can use this code and as long as you are using a high side driver or logic level transistors any Arduino with this code can switch them using simple built in SPI hardware.
of course if one was to get picky they can use direct port manipulation on the CS/SS Slave Select pin and code for microsecond delay that matches the update period for that pin. the sky is the limit people and this is the trail for a completely motionless inductor controller.
PS; Cheors is on the right trail also yet chip specific.
PSPS; when building this circuit please keep in mind that the first shift register connected to the Arduino is on your right then the rest of them are connected going to your left for Most significant bit and shift of this program.
PSPSPS; the good thing about this program is it uses the SPI hardware which is basically separate from the main MCU and functions which allows you to use the rest of the pins and hardware or software for other things like current/voltage sensors, a display or even an ethernet connection to alert you of any such problems or to just display the sensor readings. VERY COOL !
Regards, Marathonman
|
|
|
Post by Marathonman on Nov 3, 2020 15:32:46 GMT -6
Just a word of advice, when the mechanical version is spinning with direct brush contact as the original, the ends are on for three to four times longer then the ones in the middle are. the reason for this is inherent in the spinning mechanical version that will have the last contact on longer that causes an inductive roll off of the secondary that causes a nice sine wave. in order to mimic this in the electronic version the ends still have to be on for the same amount of time to get the inductive roll off of the secondary.
what i will be doing is connecting multiple lines to one tap through a SOT23 double Shotsky diode connected to either a logic level transistor or a logic level high side driver. what this will do is have the taps on either end on for three times longer then that of the ones in the middle which will give me that needed inductive roll off in the secondary.
without taking some needed precautions the secondary with plain switching will be saw tooth AC and this is not what i want.
this is just a word of advice as to what i will be doing through my observations of part G's rotation. you are of course on your own path of replication.
Regards, Marathonman
|
|
|
Post by Marathonman on Nov 7, 2020 9:53:14 GMT -6
The above set up runs just fine even with the long wire interconnects. it will even be better when i have the PCB's made with much, much shorter traces with short ribbon cable connecting to the transistor driver boards. with my design i will have only the needed SPI pins connected to the board with the remaining pins available for current, voltage sensors connected to an LED display for monitoring purposes. i can even have it alert me when there is a problem. the sky is the limit with a Tinsy 4.0 or 4.1 for that matter.
EDIT; of course the RC time constant of my circuit with the long wires in between each breakout board play a role in the LED on off speed. when on a production PCB it should be of no consequence what so ever as the traces are very short.
breakout boards worked just wonderful as you can see.
Regards, Marathonman
|
|
|
Post by Marathonman on Nov 12, 2020 9:56:55 GMT -6
I have deigned my timing board obviously with short traces and the ability to mount the Teensy directly to the board being able to change it. while the Teensy 4.0 works wonderful i am forward thinking that maybe i need a Teensy 4.1 for the added connectivity for other things for monitoring purposes. it will of course require a larger board in which the below board design is only 3" x 1.6" with the 4.0 even though the redesigned board will still be very small at ruffly 3" x 2.7" it is still very cheap to have made. Regards, Marathonman
|
|
|
Post by Marathonman on Nov 13, 2020 0:19:09 GMT -6
Even if you use a newer Arduino or a Teensy being the pins are 3.3 volts the FAN73611 single high side driver is 3.3 and 5 volt logic compatible. one must make sure the driver is compatible or it will not work with low voltage Arduino's.
Looking at the spec sheet of the FAN73611 driver it shows it is high at 2.5 volts and low at .8 volts so even if you attached two shift register lines to one transistor with a low voltage drop out diodes of say .4 volts, it will still switch the high side driver on. i am doing this to extend the on time of the end taps to mimic the brush rotation as the ends are on for longer period. as it is switched to and fro the end transistor will be on three times longer then the ones in the middle to help aide in the secondary inductive roll off. the switching time in my case is still very low time at ruffly 500 microseconds range being switched three times.
Regards, Marathonman
|
|
|
Post by Marathonman on Nov 14, 2020 20:23:08 GMT -6
Seems these and other pricks are blocking me from posting here and on postimage. "We couldn't find the page you are trying to access." here and on post image. bull shit is getting worse as my connection to many sites are being blocked repeatedly. my entire post i just got finished writing was erased with a flash just like what happened on EF. Here again; I had to redesign my board to accommodate the Teensy 4.1 making it slightly wider. below is a pic of the new redesign. if you look close you will see that not all the pins are showing because they do not get connected to the board and will be facing up for connection to current, voltage and display monitoring. the only pins connected are power, ground and signal pins. the two pins on the right end of the Teensy are just for support not connected to anything and will get a double pin facing up for usage. Board is 3" x 2.1" 4 layer- two signal, power and ground planes. shift registers i am using are 2-6 volt type M74HC595YRM13TR Mfr: STMicroelectronics. the code i posted will also get direct pin manipulation for pin 10 taking out pin mode and digital write. since the owner of the ranch i am on is an expert in coding the code will have additional code added for monitoring purposes while the loop is running. so the end code will have multiple things at once and will be reposted here for everyone to download along with a video showcasing the changes and monitoring capabilities. In the mean time the previous code i posted will get you electronic switchers everywhere on your way then can be replace with the new code at a later date. Regards, Marathonman
|
|