The greatest part of the project is to actually drive the bot and just play with it.. video speaks for itself :]
Tag: Artica
NightRider – update e
The programming.
To capture the RC data I am using a simple Arduino function called pulseIn(). You can see all the reference on the Arduino site. I discovered this function while googling “radio control joystick to arduino” and found this great example from Sparkfun.
All the code is at github.
There is a folder called “RC_reader” with a program that captures all the 6 RC channels and prints RAW values to the console. This code it is just for debug purposes and it is not being used for anything else:
int ch1_pin = 6; // right_horizontal int ch3_pin = 5; // right_vertical int ch2_pin = 4; // left_vertical int ch4_pin = 3; // left_horizontal int ch5_pin = 7; // c_stick int ch6_pin = 8; // right_knob int ch1_val; int ch2_val; int ch3_val; int ch4_val; int ch5_val; int ch6_val; void setup() { Serial.begin(9600); // RC pins pinMode(ch1_pin, INPUT); pinMode(ch2_pin, INPUT); pinMode(ch3_pin, INPUT); pinMode(ch4_pin, INPUT); pinMode(ch5_pin, INPUT); pinMode(ch6_pin, INPUT); } void loop() { ch1_val = pulseIn(ch1_pin, HIGH, 25000); // Read the pulse width of ch2_val = pulseIn(ch2_pin, HIGH, 25000); // each channel ch3_val = pulseIn(ch3_pin, HIGH, 25000); // Read the pulse width of ch4_val = pulseIn(ch4_pin, HIGH, 25000); ch5_val = pulseIn(ch5_pin, HIGH, 25000); // Read the pulse width of ch6_val = pulseIn(ch6_pin, HIGH, 25000); Serial.print("ch1: "); Serial.print(ch1_val); Serial.print(" ch2: "); Serial.print(ch2_val); Serial.print(" ch3: "); Serial.print(ch3_val); Serial.print(" ch4: "); Serial.print(ch4_val); Serial.print(" ch5: "); Serial.print(ch5_val); Serial.print(" ch6: "); Serial.println(ch6_val); }
Using this code, I am reading raw data from the RC, now we just need to map this data to an usable format (0 – 1023) or (0 – 255) or (0 – 180).
//The actual code have three important functions: // map RC RAW values to usable values rc_mapper(); // map usable values to PWM values motionMapper(); // controls motion with IR sensor and RC control motionControl();
rc_mapper() – maps the joystick to a differential drive, and once again google made my day, otherwise I would still be struggling with this component. This function will give two values ‘left_vertical’ and ‘right_horizontal’ that will be used later to assign speed to the motors.
motionMapper() – all the source for this function can be seen here. I had to hack this bit of code to use with the Motoruino2, because the motors are on a Slave uC, I am using a function to set PWM for both motors.
motionControl() – just uses the values that comes from the motionMapper() and sends them through the function setPWM(leftMotor, rightMotor).
I am also using the right knob on the remote controller to set maximum velocity.
There is also a Sharp Distance Sensor that is being used to avoid collisions. On the motion control I am testing the distance, and if it is below 100 the bot runs normally, if it is beyond 100 and below 200 it moves slowly, and if it is beyond 200 stops. It can always move backward, there is still some tweak I want to do here, for instance, I want to be able to enable or disable this feature in runtime.
For the light I am using one of the sticks with 3 positions. Each position gives a value, each value will correspond to a light state.
Not to much to say about the servo control. I just need to verify the course limits to avoid collisions with other components on the bot.
NightRider – update c
Motoruino2 is a great board, has a built-in IMU, motor encoder connections and an L298 for more power demanding motors, there is a dedicated low-level Arduino (uno) to handle all the raw data from this sensores and actuators. Then, there is a high-level Arduino (Leonardo) that is totally available to whatever we want to do. Both microcontrollers communicate via I2C. There is also a speaker and a microphone that I intend to use later on this project. Also an xbee socket, 1S lipo charger and a mosfet output capable of driving about 2 amps.
Enough said, its a great board and I hope Artica manage a way to put it into the market. Just see for yourself :)
This is how the bot is looking..
I want to have some lights and I found this little 12v LED lights on the hardware store, this little things in full power completely blind you! To drive the LEDs I am using the mosfet output on the board.
And the shell of course, I changed the pan and tilt system, this is a much robust solution and I removed the pan, if I want to pan I just move the bot side to side.
Et voilá… :D
NightRider – update d
About the controller, I want it to have something we see in the drone industry, a controller with the screen, all-in-one. There is always the option to connect the receiver to the TV, but I really want it to be standalone, independent of power wallets, just something that I can carry anywhere I go.
First step was to find a way to hold the screen to the remote, so I added zip ties to the back of the screen.
I also added a compartment to hold the receiver, battery and wires (collecting acrylic stuff is a good habit I guess)
Not bad..
The back side is still messy, but I will live with it for now.
and it just works..
NightRider – update b
I felt with courage to start the modifications to the bot, first I moved the battery to the lowest possible place, this makes the center of gravity lower.
With the electronics board all looks good..
I added a power switch and a Sharp Infra Red sensor, this sensor will act as a fail safe to avoid collisions.
I also wanted to create some kind of a shell, so went to 3D to design the plates and this is the result.
The plates will be cutted in laser or CNC, but meanwhile I will just print them and manually cut PVC sheets.
using graphite pencil to transfer the plate drawings to the PVC sheets.
All the plates are transfered and ready to be cutted.
The plates are cutted, now I will just sand a bit to give a final touch
All plates are looking good for now
Time to start with the supports for the plates, I will go to these small L shape things
All the supports are fitted, when we have loads of screws an electric screwdriver is handy, this one is the cheapest I could find
Now to fit the plates I will use this selftap screws, they come together with the servos motors, and I always harvest them because they are hard to find in hardware stores.
You can also see a hinge, this will actually make a door to swap batteries.
And this is how the plates are securelly fitted.
A look on the inside
This is how I managed to hold the power button in place, it is just PVC pieces fitted to the chassis, and then hold the power button with selftap screws.
There’s the hinge.
Testing everything, all look good.
I was doing another quick test when suddently smoke started to come out, it was the L293D that got smoked.. well, I couldn’t expect worse since I was pushing 12V to 4 motors and the L293D only handles 600 mAh per channel.
I will swap the board to the new Motoruino2 from Artica, wich is still a prototype but nothing better that this bot to test it.
NightRider
Back to the Origins
Has been a long time since my last robot project.
Recently everything related to FPV, Drones, and Robots in general have been occupying my mind. I wanted to create an FPV Terrestrial Drone experience to anyone without the need of having (in portugal we say “kit the unhas”, “nails kit”) skills to pilot an aerial drone.
This little project reminds me those times when I have time and patience, to build small robotic creatures just because the fun of it, I guess I’m getting very nostalgic with this one.
The Turnigy controller works just fine, and to get the sticks values I am using the very well documented code from Sparkfun Nick Poole
https://www.sparkfun.com/tutorials/348
.
And this is the controller with the screen. There is still missing the video receiver and the battery.
More to come ;]
ArticaCC Showreel 2013
2013 was a challenging year, but also filled with great achievements! There were many projects related to robotics, interactive installations and educational stuff!
This video is something I must share with you, hope you enjoy ;)
Valentine’s Interactive Hancky
Casa do Conhecimento, Vila Verde – Interactive Robotics Exhibition
Interactive Exhibition of Creative Robotics was how this event was entitled! Interactive because visitors could interact with the objects, and creative because all the objects (robots in this case) exposed were created without any pre-conceptions of what a robot should be, or look like.
Vila Verde is a sweet place in the north of Portugal, something like 400 klm away from Lisbon, it was a long ride but totally worth the effort! Our host was Casa do Conhecimento, they invited us to deliver a showroom of Artica’s robotics products and installations. We brought with us ICU, the brand new Driving Farrusco entitled “Explorer”, Magabot, Sapobot, Farrusco, and a painter robot by IDMind, we also brought an Auduino just to show how simple it is to mess with Arduino and electronics.
More than 500 students came to visit and interact with the installations during two days.
After two days of speaking and explaining the same stuff all over, we were completly exausted but with a great feeling of joy! Kids were very enthusiastic and left their opinions about what they saw, we leave here a list of improvements we intend to do on the next showroom:
– ICU could play sounds, and have some kind of manual control
– Farrusco with different and customizable shells
– The Explorer should be on another room, or inside a maze
– Painterbot should be interactive, respond to light sources, claps or sounds, this ways people will participate on the painting
– Magabot should respond to voice commands
Magabot following the blue color on the kids jacket.
Interactive robotics can be an ice breaker when it comes to social and digital inclusion. The class of special-needs students was a totally new experience! They embraced our robots, one could see how curious and happy they were!
Student of a special-needs class controlling the Explorer bot.
What a great experience! We will definitely continue our research on human-robot interaction paradigms in order to deliver better user experiences! Thank you Casa do Conhecimento for this awesome opportunity! We hope to see you soon! The following fotos speak for themselves!
Showing the electronics side of an Auduino.
Sapobot proved once again to be a robotic star! Kids just loved it!!
Kids wondering if this is art or not?! What do you think?
Magabot following the green color, during the visit of the special-needs students class.
Visit of the Mayor António Vilela.
ICU is a tireless robot, always seeking to interact and play!!
Please take a visit to the flickr set of photos here.
Audience Pong
This installation was commisioned by GCI, in order to boost the Projecto_80 event that took place at Escola Secundária Eça de Queiroz in Lisbon!
Audience Pong is a community game inspired by emergence patterns. No instruction is given to the audience, only a red / blue card. The audience must figure out how to move the game pads in order to hit the ball. Once the audience understands how to play, visual feedback is disabled. Pure fun :D
Definitely the best moment of the day!
Don’t forget to check Artica’s Blog for more cool news!!