JJRobots COMMUNITY
B-Robot on Arduino uno - Printable Version

+- JJRobots COMMUNITY (http://forums.jjrobots.com)
+-- Forum: JJrobots (/forumdisplay.php?fid=1)
+--- Forum: B-Robot (/forumdisplay.php?fid=2)
+--- Thread: B-Robot on Arduino uno (/showthread.php?tid=752)

Pages: 1 2


B-Robot on Arduino uno - MaxMagic1986 - 11-03-2015 07:54 PM

I want to build B-robot using Atmega328 chip. How i need to change motor ports and what about timers configuration? I do not use wifi and ultrasonic sensors. Interesting only balancing algorhytm and motor controls. Can somebody help me?


RE: B-Robot on Arduino uno - JohnQ - 11-05-2015 04:04 PM

Hi Max,
The B-robot code uses the two TIMERS of the Arduino Leonardo at the same time, so you would need the same Atmega processor that the Arduino Leonardo mounts or modify the code


RE: B-Robot on Arduino uno - sasa999 - 11-05-2015 04:44 PM

Timers is no problem. You can use only one timer if you want.


RE: B-Robot on Arduino uno - legin.37 - 11-05-2015 08:59 PM

(11-05-2015 04:44 PM)sasa999 Wrote:  Timers is no problem. You can use only one timer if you want.

Timer1 or Timer2?


RE: B-Robot on Arduino uno - sasa999 - 11-05-2015 10:48 PM

Timer0 and timer2 are 8bit timer, where timer1 is a 16bit timer.
Why do you wany use Uno and change code? Why not ProMicro?


RE: B-Robot on Arduino uno - legin.37 - 11-06-2015 09:13 AM

(11-05-2015 10:48 PM)sasa999 Wrote:  Timer0 and timer2 are 8bit timer, where timer1 is a 16bit timer.
Why do you wany use Uno and change code? Why not ProMicro?

Because UNO is more cheaper and normally we have several in the desk.


RE: B-Robot on Arduino uno - sasa999 - 11-06-2015 09:21 AM

(11-06-2015 09:13 AM)legin.37 Wrote:  Because UNO is more cheaper ...
More cheaper!!!??? Huh
ProMicro is for 4$. That is less than cost petrol for driving to nearest storeSmile
http://www.ebay.com/itm/New-Pro-Micro-ATmega32U4-5V-16MHz-Replace-ATmega328-Arduino-Pro-Mini-/131513277878?hash=item1e9ecd5db6:g:rUAAAOSwPgxVNhve

Any way, it is up to you, use Uno or other board.


RE: B-Robot on Arduino uno - MaxMagic1986 - 11-06-2015 09:47 AM

i am already made the cirquit and pcb using atmega328p. just have a lot of those chips in my house. So only the code part must be modified. Trying to adapt code by my own, but get stacked. My knowledge is not enough.

what ports i can use for stepper control in atmega 328 and what timer?

eX-robot uses only one timer1 in to control both motors and ultrasonic sensor. Timer1 is 16 bit timer. on atmega 328 timer1 also 16 bit. maybe i can use his code and just change ports and pins config?


RE: B-Robot on Arduino uno - legin.37 - 11-06-2015 10:22 AM

(11-06-2015 09:21 AM)sasa999 Wrote:  
(11-06-2015 09:13 AM)legin.37 Wrote:  Because UNO is more cheaper ...
More cheaper!!!??? Huh
ProMicro is for 4$. That is less than cost petrol for driving to nearest storeSmile
http://www.ebay.com/itm/New-Pro-Micro-ATmega32U4-5V-16MHz-Replace-ATmega328-Arduino-Pro-Mini-/131513277878?hash=item1e9ecd5db6:g:rUAAAOSwPgxVNhve

Any way, it is up to you, use Uno or other board.

Sorry, IĀ“did want to say "more cheaper than Leonardo", but the cost its not the reason. Really the reason is that I have two UNO on the desk without use. Big GrinBig Grin


RE: B-Robot on Arduino uno - KomX - 11-06-2015 11:10 AM

(11-06-2015 09:47 AM)MaxMagic1986 Wrote:  i am already made the cirquit and pcb using atmega328p. just have a lot of those chips in my house. So only the code part must be modified. Trying to adapt code by my own, but get stacked. My knowledge is not enough.

what ports i can use for stepper control in atmega 328 and what timer?

eX-robot uses only one timer1 in to control both motors and ultrasonic sensor. Timer1 is 16 bit timer. on atmega 328 timer1 also 16 bit. maybe i can use his code and just change ports and pins config?

Good day, MaxMagic1986.
Please see the differences in the operation of the timer1 for ATmega328P and ATmega32u4.

Arduino UNO (pinout & function pin)
[Image: atmega328_qtfp.jpg]


Arduino Leonardo & Pro Micro (pinout & function pin)
[Image: atmel-atmega32u4-pinout-diagram.png]

I'll try to help you this weekend.