1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. 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 Now a Download Plan!
  3. 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
  4. 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. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

AVR Boards (BASCOM)

Discussion in 'Miscellaneous' started by jakob, Dec 6, 2009.

  1. jakob

    jakob New Member

    Joined:
    Sep 4, 2009
    Messages:
    83
    Location:
    Frankfurt
    Balance:
    313Coins
    Ratings:
    +4 / 0 / -0
    Hi,

    I'm looking for a new AVR board and found that terrific shop: http://www.sparkfun.com/commerce/categories.php?c=2

    They are pretty cheap and shipping world wide.

    I guess, Ill take this one: http://www.sparkfun.com/commerce/produc ... ts_id=8857 Can't find critical disadvantages.
    And this little thingy, too: http://www.sparkfun.com/commerce/produc ... ts_id=9231 (for DIY boards).

    Anyone here using a DIY board or other boards like ATMEL or Arduino etc?
  2. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    I have been using simple breadboards for prototyping and it has been working for me. If you are OK with soldering your prototypes and having a hot iron always ready to change components, then these boards will be great.

    From my personal experience it is a lot easier to throw all the components together on a solderless breadboard, check them for functionality. It's fast and very easy to change the circuit on the go. If it all works, then I put the project on a perfboard for a second stage prototype for more reliable operation.
  3. jakob

    jakob New Member

    Joined:
    Sep 4, 2009
    Messages:
    83
    Location:
    Frankfurt
    Balance:
    313Coins
    Ratings:
    +4 / 0 / -0
    I think, I'll solder a small PCB with a 28pin socket, restet button, a quartz and break away headers to use with breadboards. Clean and simple like this one:

    Mega8_Tutorial.png

    Maybe I'll make a PCB (toner transfer method) and use SMD components to keep it small.
  4. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    I think it is pointless to make such a simple board, especially for 28pin uC's. It takes about 2mins to throw everything on a breadboard and make it organized too. Every time you hook things up, you learn more and more about the controller as well.
    I have a small component bag that I always use for the essential connections for the controllers such as: 0.1uF and 10uF caps for power, 10uH inductor for AVCC, 18pf caps for Xtals, R/G/Y LEDs with 470ohm(because I have lots of them) resistors for troubleshooting, jumper wires from different lenghts.

    If you want to make a board like this, make sure you check the pin connections on different AVR's or uC's you want to use. You could put a 8pin, 28pin, and 40pin socket on it for more flexibility. I strongly advise not to solder a crystal in the circuit and don't make AVCC and AREF pins permanently connected to anything, but use sockets and jumpers instead.

    Do you want just a regular, all around dev board? Or do you want it for a specific project? Do you have any microcontrolers in mind that you want to use? If you gave me more details about what you want to do I could give you more advice.
  5. jakob

    jakob New Member

    Joined:
    Sep 4, 2009
    Messages:
    83
    Location:
    Frankfurt
    Balance:
    313Coins
    Ratings:
    +4 / 0 / -0
    I'm working on a X-Sim DIY racing wheel controller. The specs will be:

    20kHz PWM (motor torque)
    1MHz PWM (locked-antiphase operation for motor direction)
    some I/O for h-bridge reset (short cut and over temp IRQ), status LEDs, EMO IRQ
    Two encoders (1 for the motor and 1 to adjust Force Feedback setting on the fly)
    Hardest part for me will be the X-Sim plugin...

    And another uC will do the shifting job. A six pattern h-shifter. Its just to route the gearings (reverse, neutral, sequencial, h-pattern) to an input board (like Leo's). It also will drive a LED segment (gear gauge).

    Using jumpers for AVCC/AREF makes sense, but why shouldn'd I solder a crystal to the uC? The internal ATMEL oscillators are not very stable. The frequence fluctuates on temperature changes.
  6. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Ok, so the board will be for one specific project only, and not for a general proto board. In that case you can solder the whole thing together because most of the development will be in firmware. You can get one of those ready made boards you posted with a uC that will do the job. The internal RC oscillators will be accurate enough for most of the stuff, unless you are using USART, RTC or timing sensitive applications.

    I'm working on some similar stuff with encoders, h-bridge, pwm, and all this stuff. 1MHz PWM will be way too high for a useable h-bridge, with decent power MOSFETs on it. 20-30KHz is doable, but you will have to compromise with switching losses.
  7. jakob

    jakob New Member

    Joined:
    Sep 4, 2009
    Messages:
    83
    Location:
    Frankfurt
    Balance:
    313Coins
    Ratings:
    +4 / 0 / -0
    Usually a h-brigde works with one PWM signal (lets call it FET-PWM) for motor speed and one digital signal for motor direction control (low/high).

    What I'll do is feed the h-bridge with two PWM signals. The digital direction control signal will be replaced with a PWM (DIR-PWM). With 50% PWM cycle the motor won't turn. But when I lower the DIR-PWM to 45% the motor will slowly turn left, with 20% DIR-PWM it will turn left faster. With 60% it turns right.
    The PWM that usually is used for motor speed (FET-PWM) will set the motor torque.

    This gives me the ability to drive one single h-bridge with two X-Sim axis. One Axis controls the direction (DIR-PWM Axis) and the another the torque (FET-PWM Axis).

    When I adress the wheel position (Force Profiler Input Setup) to the DIR-PWM axis and invert it, the PWM will be lowered (to move left) when the wheel is turning right. So the motor tries to center the wheel.
    And when the car driving speed is adressed to the FET-PWM axis, the centering force of the wheel will be lowered by higher driving speed.

    With some other inputs in the math setup the result should be a (hopfully) decent working racing wheel.

    The FET-PWM will be around 20kHz and the DIR-PWM around 1MHz. A guy at RSC measured 33MHz on the Logitech G25 motor outputs.

    He wrote (RCS is temporary down): connect your voltmeter on the ground of your logitech power supply and test the tension on the red cable and on the black cable... 12V. In reality it's not 12V, it's 24V-0V loop in 33MHZ frequency = 24*1/2=12V...

    Oscilloscope test red or black cable: http://free0.hiboox.com/images/4609/3ae ... e8b447.jpg



    I really don't know if my h-bridge will switch the direction at such a high frequency, but I'll start testing around 1kHz and raise the DIR-PWM frequency until its getting hot or stops working.

    Maybe on weekend I'll start testing. :)
  8. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    I understand what you are trying to do. It is a different approach than what I would be doing, but never the less, I am interested in how this works out.

    You will have to experiment with the two pwm signals, it will draw a hell of a lot of current switching back and forth the motor direction, and that will be continous just to hold the wheel in place.

    I see that you want to use X-Sim and the speed axis for a simulated feedback and that is great. I would however aim for the real software FFB, but thats a lot of work.

    Keep it posted! I would open a new thread for it tho, as this is no longer about AVR boards :)