1. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Download Package Now!
  2. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  3. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant here. Do not following these rules will lead to permanent exclusion from this website: Read the forum rules.

DIY high power Bass Shaker

Discussion in 'DIY peripherals' started by Alexey, Jul 6, 2015.

  1. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    451
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    7,858Coins
    Ratings:
    +601 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Hi Guys,

    This is still in it's infancy but the results have been far better than expected. I've been playing around with some old speakers trying to make a decent bass shaker but they end up being disappointing to say the least. To get decent results you need a high power speaker which can end up being costly and take up too much room. The best way to go about making a speaker based shaker is to get one of those logitech 2.1 systems and use the sub as the shaker core. The problem still remains, these shakers take up too much room!
    I'd searched around the interweb and looked up how an actual bass shaker works which led me to find an interesting way on how to construct a bass shaker with easy to find parts.

    Behold!

    This thing is on minimum power too. If you connected a speaker to the amp you wouldn't even hear anything.


    [​IMG]

    The construction is quite simple but can be a pain in the arse. First you must find an amplifier that you are going to use to power the transducer and then find a suitably sized transformer. These two things work hand in hand as the transformer will need to be able to dissipate the power being put through it. So you can't use a 50W transformer and a 200W amplifier as the transformer will cook very quickly. The other aspect to consider is the required ohms that the amplifier will drive.

    [​IMG]

    Once a suitable transformer has been found it must be stripped down to be converted into a bass shaker.
    I ratted out a simple power transformer from an old power supply, it's quite small but it'll do for now. I then stripped the transformer to it's core and winding case. Most transformers are built the same and consist of 3 parts: the core, the housing for the winding's and the winding's themselves. The core is the first part to be taken apart and consists of thin, two piece, overlapping plates making up the thick core. Usually the plates are stuck together with a lacquer which can be taken apart by using a scalpel blade and jamming it between the layers and slowly prying them apart. Each plate is shaped like an E with the center spoke having the windings around it and and end cap shaped like an I to complete the figure 8 shape of the core. The I piece is the first to be pried out which frees up the E piece to be pried off next. To do this insert the scalpel blade between the plates and wiggle it around until the blade breaks through. Then slide the blade along the seam until one layer is free from the other plates. The first plate is by far the hardest to get out as it has the pressure of all the plates behind it as well as the bonding lacquer keeping it in place. Using some flat nosed pliers try to wiggle and pull the plate out of the housing. I mangled the first piece on mine but being that they are made of iron they are quite soft and will hammer back into shape quite easily.

    [​IMG]

    Once all the plates are out the I shapes can be discarded and the windings must now come off. The winding housing must be retained and care must be taken not to damage it as it will be re used.

    The core must then be re wound with suitable wire that will match the required impedance of the amplifier.
    Wire gauges and number of turns vary greatly depending on your overall system. For instance a 200W system will require much thicker wire and a large transformer, whereas a smaller 50W system can get away with smaller wire and transformer. The amount of windings will depend on the resistance of your wire, use the thickest possible wire to take up all of the housings space. It's ideal to go for 2 ohm systems as this means less windings on the transformer and thicker wire. I can't give exact details as I am still experimenting myself. Solid wire is a must, stranded wire will have too much resistance for the same given space.

    Then the core must be re inserted. Face all of the E shapes so that they all face the same direction and slot them through the housing. Done!

    [​IMG]
    [​IMG]
    It's just a baby!
    [​IMG]
    [​IMG]

    The way this transformer vibrates is when an electric current is applied to the windings it creates a magnetic field and turns the iron core into a magnet with the north pole being one side of the E shape and the south pole being the other side of the E shape. This makes the transformer want to lean to one side. Think of it like a horse shoe magnet. By alternating that current with audio you effectively switch the poles and cause the transformer to lean the other way.

    To actually get this thing vibrating a ferrous plate must be placed on the side of the transformer with the three spokes. This is the plate that the transformer will be attracted to and lean towards during operation.
    There has to be an air gap between the plate and transformer. I Used a hand wound spring out of TCW to space out the two. This mounting is still in testing phase and far from being ideal to transmit the vibration.

    Currently as shown in that video the vibration coming off such a small unit is awesome! The power level on the amp is on minimum as well meaning that a transformer that can handle 250W will shake the damn room.

    At the moment I am stripping down a transformer that is twice the size of this one and I plan on going a touch bigger after testing is done with it.
    • Creative Creative x 7
    • Like Like x 6
    • Informative Informative x 1
  2. Ads Master

    Ads Master

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  3. noorbeast

    noorbeast VR - The Next Generation Staff Member Moderator

    Joined:
    Jul 13, 2014
    Messages:
    13,482
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    101,790Coins
    Ratings:
    +8,478 / 41 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    An awesome bit of creative work there @Alexey, compact and powerful!
  4. momoclic

    momoclic Active Member

    Joined:
    Sep 23, 2014
    Messages:
    214
    Occupation:
    Retraité
    Location:
    Nantes - France
    Balance:
    2,636Coins
    Ratings:
    +111 / 1 / -0
    My Motion Simulator:
    DC motor, Arduino
    Travail intéressant.
    Nous avons ici la réalisation d'un simple éléctro-aimant me semble-t-il.
    Les resultats sont-il comparable à ce que l'on peut obtenir avec un HP (Voice-call) ?
    Si oui je suis agréablement surpris ;)
    La réalisatin en étant passablement plus simple.
    Merci.


    Interesting work.
    Here we have the realization of a simple electro-magnet am I seems.
    Are the results comparable to what can be achieved with an HP (Voice Call)?
    If so I am pleasantly surprised;)
    The réalisatin being somewhat simpler.
    Thank you.
  5. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,486
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    18,828Coins
    Ratings:
    +3,169 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    That's cool as !! Makes my transducers look pretty poor tbh

    I'm gonna make one soon as I'm in a position to :D

    Could possibly do with more pics on the construction if you can matey
    • Agree Agree x 2
  6. momoclic

    momoclic Active Member

    Joined:
    Sep 23, 2014
    Messages:
    214
    Occupation:
    Retraité
    Location:
    Nantes - France
    Balance:
    2,636Coins
    Ratings:
    +111 / 1 / -0
    My Motion Simulator:
    DC motor, Arduino
  7. Daguru

    Daguru Rally drivers do it in the mud

    Joined:
    Sep 4, 2013
    Messages:
    526
    Occupation:
    window cleaner
    Location:
    Wales uk
    Balance:
    450Coins
    Ratings:
    +499 / 0 / -0
    My Motion Simulator:
    2DOF
  8. momoclic

    momoclic Active Member

    Joined:
    Sep 23, 2014
    Messages:
    214
    Occupation:
    Retraité
    Location:
    Nantes - France
    Balance:
    2,636Coins
    Ratings:
    +111 / 1 / -0
    My Motion Simulator:
    DC motor, Arduino
    Merci, je n'en doutais pas ;)

    Thank you, I do not doubt your honesty;)
  9. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    451
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    7,858Coins
    Ratings:
    +601 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    I can't directly compare to a High power voice coil as I haven't built any. The biggest speaker I built was a 25cm 80W speaker. It wasn't a sub woofer so I never expected great results from it. If your willing to buy a high power speaker you might as well just buy a butt kicker as the cost would be comparable.

    This is a good option for me as I have a collection of old power supplies with transformers in various sizes. I also have plenty of different size wire to re wind the coils.

    If I can get access to a cheap sub woofer I'll make one and do a direct comparison. In terms of power I believe that the transformer is going to win in how much vibration it can produce versus the size that it takes up.

    Here is the only video I have found to use this type of transducer. The size is quite small yet the results speak for themselves.

    Pay attention at the 1:08 mark
    • Like Like x 1
    • Winner Winner x 1
  10. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    451
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    7,858Coins
    Ratings:
    +601 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Here is a quick video on how to strip the core out.


    Here is the transformer as you would find it (I've already taken a few plates out)
    [​IMG]

    This is how the plate arrangement looks like. I piece on the bottom going across. E piece facing downwards.
    The plates are stacked in an overlapping way so for instance the first E piece faces up and then the next plate faces down.
    [​IMG]

    Using the tip of the knife, jam it between the plates. Wiggle it around the perimeter of the transformer, loosening one layer at a time. Some transformers haven't got much lacquer on them so they pop straight out like in the video. Other times every layer will be a total pain.
    [​IMG]

    Arrangement of the core plate.
    [​IMG]

    Sometimes you will need to loosen the inner part of the plate (middle spoke of the E) as lacquer could have gotten down there and jammed it up.
    [​IMG]

    Pliers always help (potato cam quality image here)
    [​IMG]

    Once all the plates have been taken out you are left with the coil housing. stripping out the wires can take just as long as taking out the cores and can get quite messy as the dried lacquer crumbles. Also there will be multiple windings all separated with some type of plastic or cardboard. Keep the larger wire as this can be re used to wind the new coil.
    [​IMG]

    Done! Next will come the construction phase. The coil housing shown here is probably from the 70's as it is just some cardboard dipped in rosin to stiffen it up. More modern coil housings will be made of plastic and have end stoppers to make sure the coils don't slip off the sides.
    [​IMG]

    You basically have to guess the size of wire you will need to fill up the coil housing but have enough resistance to match your amplifier. The thicker the wire the less resistance per meter but inversely more power handling capability.
    • Like Like x 3
    • Informative Informative x 2
  11. Aris

    Aris New Member

    Joined:
    May 5, 2015
    Messages:
    8
    Location:
    Athens - Greece
    Balance:
    124Coins
    Ratings:
    +5 / 0 / -0
    Thank you, very interesting project!:thumbs
  12. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    451
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    7,858Coins
    Ratings:
    +601 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Introducing: Mk2!

    Using a low frequency test tone


    This is the vibration power:

    The annoying noise is coming from the bottom mount springs which are bottoming out during the vibrations. Once I get the springs sized properly there should be no noise coming from the shaker itself but from everything else that is vibrating.

    The best vibration seems to come not from what the bass shaker is directly attached to but from all other items that are touching the table, hence the video of the table leg with the brick (had to raise the table height a tad while I construct my monitor stand). SO a really thin strip of rubber inbetween the shaker and the sim frame might be an ideal attachment method. Need to do more testing to confirm this.

    After more testing I have found that the coils ideal frequency is 30Hz with an upper frequency of 60Hz (everything after that causes barely any vibration). The unit can actually handle 1Hz for a period of time before it starts to overheat. I am hoping that with a square wave function generator I could potentially halve the amount of time that it draws current but still have good vibration.


    Here is a video showing a range of different frequencies:


    At the moment the biggest problem with MK2 is the coil heating up over time. It gets quite hot so I need to see if the square wave will reduce the heat otherwise I'll need to use a higher voltage source.
    • Like Like x 4
  13. noorbeast

    noorbeast VR - The Next Generation Staff Member Moderator

    Joined:
    Jul 13, 2014
    Messages:
    13,482
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    101,790Coins
    Ratings:
    +8,478 / 41 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Impressive!
  14. h106frp

    h106frp New Member

    Joined:
    Jul 18, 2015
    Messages:
    17
    Location:
    UK
    Balance:
    117Coins
    Ratings:
    +41 / 0 / -0
    My Motion Simulator:
    2DOF
    Hello, new here but i think your heating problem is due to the lamination thickness, mains power transformers are only designed for low frequency (50/60 possibly up to 120 Hz) and the individual lamination's are quite thick, at higher frequencies eddy currents can flow in the individual lamination's (wavelength of frequency) and this generates heat. An audio output transformer from a valve amplifier might be better as it is designed to work over a larger frequency range and has much thinner plates.

    To get better bandwidth you also need to start with a coil that has very low impedance (low inductance, low number of turns, heavy wire and big currents at low frequency) as frequency rises the impedance (effective resistance) will rise rapidly and you will struggle to get meaningful current flow in the coil.

    The best sort of amp for this is a simple mosfet switching bridge (motor driver) as it will not suffer from the poor load matching you will get using an audio amplifier that is expecting to see around a 4 ohms load.
    PWM can then be used to limit the current at lower frequencies by using a low duty cycle square wave (triangular at load). You must also ensure that you switch polarity each cycle when using 'square' waves to avoid a build up of DC field on the core so you need a true mosfet bridge which can reverse polarity each cycle. You will need diodes or a snubber to protect the output stage from back emf.

    If an audio type amp is getting hot this is a sign of poor load matching.

    Built these up to 1kW+ for work, serious magnetic pull

    Neat project.
    • Informative Informative x 4
    • Agree Agree x 2
    • Like Like x 1
  15. bberger

    bberger Member

    Joined:
    Aug 21, 2010
    Messages:
    60
    Balance:
    124Coins
    Ratings:
    +29 / 0 / -0
    This is just awesome work oO
  16. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    451
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    7,858Coins
    Ratings:
    +601 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Currently it's a hurry up and wait situation, still awaiting the arrival of my arduino to build my function generator.
    From further testing going above 70Hz the vibration seems to really drop off. It's no bad but any sustain above 60Hz really builds heat. I was actually thinking of going motor driver for the power handling capability but at this stage I am unsure of how to properly implement it. If you haven't seen my other thread http://www.xsimulator.net/community/threads/using-rpm-to-drive-bass-shakers.7102/#post-82513
    I am planning on using the RPM data to drive a function generator that will output a wave to control the coil.
  17. TOPMO3

    TOPMO3 Active Member

    Joined:
    May 12, 2015
    Messages:
    133
    Location:
    Russia
    Balance:
    766Coins
    Ratings:
    +195 / 0 / -0
    Very creative project, @Alexey :thumbs

    Do you plan to use only RPM to drive your shakers? I think using suspension telemetry (ie springs compression etc from road bumps and kerbs) will give also more interesting effects?:think

    PS if you will need help for capturing RPM or other data from GameDash, just PM me!
  18. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    1,928
    Location:
    Marseille - FRANCE
    Balance:
    18,225Coins
    Ratings:
    +1,851 / 16 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thansk for sharing these useful information @h106frp
    Could you show us some pictures of your work, please?
  19. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    451
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    7,858Coins
    Ratings:
    +601 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Thank you TOPMO3,
    For the moment I will be only using engine RPM but that's not saying that you can't use other data to drive the shakers. Currently the RPM data is being used which drives a 1 - 170Hz (not a chosen frequency, set by the code) function generator. Low rpm = low frequency. Ideally I would like to divide the frequency by 2 so that it only goes to 85Hz.

    Maybe for suspension you could look at the rate of change? I'm very new to coding so my ideas will be very basic. I am however rather decent at stealing other code and implementing it for my purpose (getting other people to do the work for me :) ).

    Here is the code as it stands and a thanks to tombo:

    Code:
    /*
    Simple Waveform generator with Arduino Due
    
    * connect two push buttons to the digital pins 2 and 3
       with a 10 kilohm pulldown resistor to choose the waveform
       to send to the DAC0 and DAC1 channels
    * connect a 10 kilohm potentiometer to A0 to control the
       signal frequency, this part has been modified to receive serial data rather than look at a pot.
    
    */
    
    #include "Waveforms.h"
    
    #define oneHzSample 1000000/maxSamplesNum  // sample for the 1Hz signal expressed in microseconds
    
    const int button0 = 2, button1 = 3;
    volatile int wave0 = 0, wave1 = 0;
    
    int Rpm=0;
    char kind_of_data;
    
    int i = 0;
    int sample;
    
    void setup() {
    Serial.begin(115200);
    
    analogWriteResolution(12);  // set the analog output resolution to 12 bit (4096 levels)
    analogReadResolution(12);   // set the analog input resolution to 12 bit
    
    attachInterrupt(button0, wave0Select, RISING);  // Interrupt attached to the button connected to pin 2
    attachInterrupt(button1, wave1Select, RISING);  // Interrupt attached to the button connected to pin 3
    }
    
    void loop() {
    
    while (Serial.available() > 2)  {
      kind_of_data = Serial.read();
      if (kind_of_data == 'R' ) Rpm = Serial.read();
      }
    
    
    // Read the the potentiometer and map the value  between the maximum and the minimum sample available
    // 1 Hz is the minimum freq for the complete wave
    // 170 Hz is the maximum freq for the complete wave. Measured considering the loop and the analogRead() time
    sample = map(Rpm, 0, 4095, 0, oneHzSample);
    sample = constrain(t_sample, 0, oneHzSample);
    
    analogWrite(DAC0, waveformsTable[wave0]);  // write the selected waveform on DAC0
    analogWrite(DAC1, waveformsTable[wave1]);  // write the selected waveform on DAC1
    
    i++;
    if(i == maxSamplesNum)  // Reset the counter to repeat the wave
       i = 0;
    
    delayMicroseconds(sample);  // Hold the sample value for the sample time
    }
    
    // function hooked to the interrupt on digital pin 2
    void wave0Select() {
    wave0++;
    if(wave0 == 4)
       wave0 = 0;
    }
    
    // function hooked to the interrupt on digital pin 3
    void wave1Select() {
    wave1++;
    if(wave1 == 4)
       wave1 = 0;
    }
    [Get Code]
    Waveforms.h
    
    #ifndef _Waveforms_h_
    #define _Waveforms_h_
    
    #define maxWaveform 4
    #define maxSamplesNum 120
    
    static int waveformsTable[maxWaveform][maxSamplesNum] = {
    // Sin wave
    {
       0x7ff, 0x86a, 0x8d5, 0x93f, 0x9a9, 0xa11, 0xa78, 0xadd, 0xb40, 0xba1,
       0xbff, 0xc5a, 0xcb2, 0xd08, 0xd59, 0xda7, 0xdf1, 0xe36, 0xe77, 0xeb4,
       0xeec, 0xf1f, 0xf4d, 0xf77, 0xf9a, 0xfb9, 0xfd2, 0xfe5, 0xff3, 0xffc,
       0xfff, 0xffc, 0xff3, 0xfe5, 0xfd2, 0xfb9, 0xf9a, 0xf77, 0xf4d, 0xf1f,
       0xeec, 0xeb4, 0xe77, 0xe36, 0xdf1, 0xda7, 0xd59, 0xd08, 0xcb2, 0xc5a,
       0xbff, 0xba1, 0xb40, 0xadd, 0xa78, 0xa11, 0x9a9, 0x93f, 0x8d5, 0x86a,
       0x7ff, 0x794, 0x729, 0x6bf, 0x655, 0x5ed, 0x586, 0x521, 0x4be, 0x45d,
       0x3ff, 0x3a4, 0x34c, 0x2f6, 0x2a5, 0x257, 0x20d, 0x1c8, 0x187, 0x14a,
       0x112, 0xdf, 0xb1, 0x87, 0x64, 0x45, 0x2c, 0x19, 0xb, 0x2,
       0x0, 0x2, 0xb, 0x19, 0x2c, 0x45, 0x64, 0x87, 0xb1, 0xdf,
       0x112, 0x14a, 0x187, 0x1c8, 0x20d, 0x257, 0x2a5, 0x2f6, 0x34c, 0x3a4,
       0x3ff, 0x45d, 0x4be, 0x521, 0x586, 0x5ed, 0x655, 0x6bf, 0x729, 0x794
    }
    ,
    
    // Triangular wave
    {
       0x44, 0x88, 0xcc, 0x110, 0x154, 0x198, 0x1dc, 0x220, 0x264, 0x2a8,
       0x2ec, 0x330, 0x374, 0x3b8, 0x3fc, 0x440, 0x484, 0x4c8, 0x50c, 0x550,
       0x594, 0x5d8, 0x61c, 0x660, 0x6a4, 0x6e8, 0x72c, 0x770, 0x7b4, 0x7f8,
       0x83c, 0x880, 0x8c4, 0x908, 0x94c, 0x990, 0x9d4, 0xa18, 0xa5c, 0xaa0,
       0xae4, 0xb28, 0xb6c, 0xbb0, 0xbf4, 0xc38, 0xc7c, 0xcc0, 0xd04, 0xd48,
       0xd8c, 0xdd0, 0xe14, 0xe58, 0xe9c, 0xee0, 0xf24, 0xf68, 0xfac, 0xff0,
       0xfac, 0xf68, 0xf24, 0xee0, 0xe9c, 0xe58, 0xe14, 0xdd0, 0xd8c, 0xd48,
       0xd04, 0xcc0, 0xc7c, 0xc38, 0xbf4, 0xbb0, 0xb6c, 0xb28, 0xae4, 0xaa0,
       0xa5c, 0xa18, 0x9d4, 0x990, 0x94c, 0x908, 0x8c4, 0x880, 0x83c, 0x7f8,
       0x7b4, 0x770, 0x72c, 0x6e8, 0x6a4, 0x660, 0x61c, 0x5d8, 0x594, 0x550,
       0x50c, 0x4c8, 0x484, 0x440, 0x3fc, 0x3b8, 0x374, 0x330, 0x2ec, 0x2a8,
       0x264, 0x220, 0x1dc, 0x198, 0x154, 0x110, 0xcc, 0x88, 0x44, 0x0
    }
    ,
    
    // Sawtooth wave
    {
       0x22, 0x44, 0x66, 0x88, 0xaa, 0xcc, 0xee, 0x110, 0x132, 0x154,
       0x176, 0x198, 0x1ba, 0x1dc, 0x1fe, 0x220, 0x242, 0x264, 0x286, 0x2a8,
       0x2ca, 0x2ec, 0x30e, 0x330, 0x352, 0x374, 0x396, 0x3b8, 0x3da, 0x3fc,
       0x41e, 0x440, 0x462, 0x484, 0x4a6, 0x4c8, 0x4ea, 0x50c, 0x52e, 0x550,
       0x572, 0x594, 0x5b6, 0x5d8, 0x5fa, 0x61c, 0x63e, 0x660, 0x682, 0x6a4,
       0x6c6, 0x6e8, 0x70a, 0x72c, 0x74e, 0x770, 0x792, 0x7b4, 0x7d6, 0x7f8,
       0x81a, 0x83c, 0x85e, 0x880, 0x8a2, 0x8c4, 0x8e6, 0x908, 0x92a, 0x94c,
       0x96e, 0x990, 0x9b2, 0x9d4, 0x9f6, 0xa18, 0xa3a, 0xa5c, 0xa7e, 0xaa0,
       0xac2, 0xae4, 0xb06, 0xb28, 0xb4a, 0xb6c, 0xb8e, 0xbb0, 0xbd2, 0xbf4,
       0xc16, 0xc38, 0xc5a, 0xc7c, 0xc9e, 0xcc0, 0xce2, 0xd04, 0xd26, 0xd48,
       0xd6a, 0xd8c, 0xdae, 0xdd0, 0xdf2, 0xe14, 0xe36, 0xe58, 0xe7a, 0xe9c,
       0xebe, 0xee0, 0xf02, 0xf24, 0xf46, 0xf68, 0xf8a, 0xfac, 0xfce, 0xff0
    }
    ,
    
    // Square wave
    {
       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
       0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
       0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
       0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
       0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
       0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
       0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
    }
    
    };
    
    #endif

    Question: If I was to double the analogue read/write resolution (24 bit instead of 12) would that halve the frequency response? Or would I change the OneHzSample to 2000000? Still waiting for the arduino to arrive so I can't test it yet.
  20. TOPMO3

    TOPMO3 Active Member

    Joined:
    May 12, 2015
    Messages:
    133
    Location:
    Russia
    Balance:
    766Coins
    Ratings:
    +195 / 0 / -0
    Code:
    while (Serial.available() > 2) {
    kind_of_data = Serial.read();
    if (kind_of_data == 'R' ) Rpm = Serial.read();
    }
    I could be wrong, but it seems this code read only 1 byte after 'R' and its not enough to store rpm data.

    If you configure corresponding dash to output 2 bytes of hex values:
    TOHEX
    PAD 4 0

    then your code should looks like this:

    Code:
    if (Serial.available() > 4)  {    
             for (int i=0; i<5; i++) {       
              bufferArray[i] = Serial.read();
              }
     }
    
    if (bufferArray[0] == 'R') {
        for (int i=1; i<5; i++) {
              if (bufferArray[i]>47 && bufferArray[i]<58 ) {   
                bufferArray[i]=bufferArray[i]-48;
              }                      
              if (bufferArray[i]>64 && bufferArray[i]<71 ) { 
                bufferArray[i]=bufferArray[i]-55;              
              }
              Rpm = (Rpm*16) + bufferArray[i];
    }
    
  21. h106frp

    h106frp New Member

    Joined:
    Jul 18, 2015
    Messages:
    17
    Location:
    UK
    Balance:
    117Coins
    Ratings:
    +41 / 0 / -0
    My Motion Simulator:
    2DOF

    Can do, but i think i need more posts before i can link any content.

    When you apply the square (or sine) wave signal to the coil the current waveform will be of a triangular form and the applied voltage square(ish), this is due to how fast (wave form slope) the current can flow into the coil which is (crudely) a function of it inductance. Current flow in the winding is what will supply our magnetic field so we want high inrush currents, so low resistance/inductance n the coil.

    This is why the field will be stronger with the square wave, the full voltage is applied immediately to the load allowing longer for the current to rise for any give duty cycle period, from this you will realize that at very low frequencies (periods) you may need to limit the duty cycle to avoid blowing the amplifier outputs.

    Remember coils can also be used as filters (chokes) to reject AC signals and we do not want this! AC electromagnets are much more difficult than DC electromagnets to construct with good performance and you must protect your amplifier from the back EMF as the coil field collapses.

    You really need to keep the number of turns in the coil low and increase the current (ampere*turns=magnetism) this will improve bandwidth and current and reduce losses in the winding a lamination's (heat) and limit voltages, it will also make it easier to cool. You really need to design the magnet around your amplifier output capabilities (big power FETs).

    If you wanted to go really mad how about using wrapped thin wall copper tubing (brake pipe) for a low turn coil and pass air or water through the tube - very big currents but low voltages. - maybe not practical for a domestic project though.;)

    You have to be careful you do not build an induction heater rather than a magnet.
    • Informative Informative x 1
    Last edited: Aug 5, 2015