Mark's Antweight build

All things antweight

Moderators: BeligerAnt, petec, administrator

Post Reply
User avatar
MarkR
Posts: 375
Joined: Mon Dec 18, 2017 12:46 pm
Location: Reading Hackspace
Contact:

Mark's Antweight build

Post by MarkR »

Hi,

My robot will probably be called "Unmitigated Disaster".

It is a semi-intelligent microprocessor driven 4wd flipper. It will use a total of 6 N20 gear motors - 4 for the drive and 2 for flipper.

It uses a Raspberry Pi Zero W as the main processor and radio receiver; a DasMikro ESC for the drive motors and voltage regulator, another (as yet unspecified) driver chip for the weapon motors, and a mpu6050 IMU (intertial measurement unit - sensor).

Some parts are 3d printed, others are cut out of various types of plastic.

Although the design has many problems, it's progressing, and still fits within the 4" cube and should meet the weight limit with some armour. I have most of the parts but I'm still trying to get it to fit together. Here are some (already out of date) design pictures and a wiring diagram :)
Attachments
unmitigated3.png
unmitigated3.png (18.09 KiB) Viewed 17294 times
unmitigated2.png
unmitigated2.png (27.32 KiB) Viewed 17294 times
unmitigated4.PNG
unmitigated4.PNG (24.37 KiB) Viewed 17294 times
Robots: Betsie - RaspberryPi controlled flipper bot with gyro stablisation - too clever for her own good?
Stacie - tidy flipper; 4wd driven by hair bands
User avatar
MarkR
Posts: 375
Joined: Mon Dec 18, 2017 12:46 pm
Location: Reading Hackspace
Contact:

Re: Mark's Antweight build

Post by MarkR »

Wiring diagram
Attachments
disaster_wiring.PNG
disaster_wiring.PNG (216.27 KiB) Viewed 17291 times
Robots: Betsie - RaspberryPi controlled flipper bot with gyro stablisation - too clever for her own good?
Stacie - tidy flipper; 4wd driven by hair bands
Paulmchurd
Posts: 227
Joined: Sun Dec 10, 2017 4:39 pm

Re: Mark's Antweight build

Post by Paulmchurd »

Looks awesome, will you be lacking armour with all the weight with chips and motors? Or are the microprocessor,h-bridge and esc not actually that heavy?
User avatar
MarkR
Posts: 375
Joined: Mon Dec 18, 2017 12:46 pm
Location: Reading Hackspace
Contact:

Re: Mark's Antweight build

Post by MarkR »

There is not much weight in the electronics, but there is a little more than in a typical rx / esc combination. The Raspberry Pi Zero weighs 9g with sd card. I haven't quite worked it out yet, I expect there to be a lot of weight in "other" category (fastenings, tyres, wires, ) - also 6x motors - they are 10g each.

I am planning to bolt on some angled plastic (maybe aluminium in places if there is enough weight spare) in the sides and back for armour.

Also, did you know that B&Q sell robot armour? https://www.diy.com/departments/white-p ... 019_BQ.prd
Robots: Betsie - RaspberryPi controlled flipper bot with gyro stablisation - too clever for her own good?
Stacie - tidy flipper; 4wd driven by hair bands
Paulmchurd
Posts: 227
Joined: Sun Dec 10, 2017 4:39 pm

Re: Mark's Antweight build

Post by Paulmchurd »

If you go for a Arduino pro mini. They are slightly smaller and lighter I think. Can pick them up for £5 with the usb module.

That’s cheap for B&Q!

I bought these.

https://www.ebay.co.uk/itm/JMT-10Ppcs-L ... 2749.l2649

Only took a month to arrive 🙈😂😂
User avatar
MarkR
Posts: 375
Joined: Mon Dec 18, 2017 12:46 pm
Location: Reading Hackspace
Contact:

Re: Mark's Antweight build

Post by MarkR »

Arduino pro mini does not have a built in radio or wifi, it's going to be a pain to do what I want. I think the Pi is a good choice if I can make it work mechanically; it's perhaps a bit delicate, especially the sd card (I'm investigating whether it can run without the sd card).

Mark
Robots: Betsie - RaspberryPi controlled flipper bot with gyro stablisation - too clever for her own good?
Stacie - tidy flipper; 4wd driven by hair bands
User avatar
MarkR
Posts: 375
Joined: Mon Dec 18, 2017 12:46 pm
Location: Reading Hackspace
Contact:

Re: Mark's Antweight build

Post by MarkR »

Update:

I wired up the battery, Raspberry Pi and DasMikro ESC, with a single motor (to test).

It powers the Pi just fine.

But I couldn't work out why it wasn't driving the motor. I did some investigation with an oscilloscope, but everything looked hunky-dory...

I tried various pulse widths on the outputs, but the motor didn't turn. I tried both channels (L and R?)

*BUT* then I realised the problem - the DasMikro has "tank mixing" built-in, so to drive the motor I need to set one channel (call it "steering") to the middle, then the other channel controls the speed. It won't drive the motor unless it receives pulses on both channels.

I did order the DasMikro without tank-mixing - because I want to do my own tank-mixing in the software - but this now doesn't seem to be an option. At least I have a way forward... now I need to work out how to make this gubbins fit in the robot.
Robots: Betsie - RaspberryPi controlled flipper bot with gyro stablisation - too clever for her own good?
Stacie - tidy flipper; 4wd driven by hair bands
Paulmchurd
Posts: 227
Joined: Sun Dec 10, 2017 4:39 pm

Re: Mark's Antweight build

Post by Paulmchurd »

Did you get it working?

Some of the modules for the Arduino. You need to import a library to make the modules work.
User avatar
MarkR
Posts: 375
Joined: Mon Dec 18, 2017 12:46 pm
Location: Reading Hackspace
Contact:

Re: Mark's Antweight build

Post by MarkR »

Hi,

I'm not using the Arduino environment, but yes, it's working so far, the DasMikro powers the Pi and drives a motor without making any smoke, no lipo-related incidents so far.

On the Raspberry Pi it's possible to program in any language - my code will be partially reused from a previous (non-combat) robot, reading the IMU data regularly and making steering adjustments using a PID control loop, and reading the controller data (via Bluetooth) and sending data to the motors accordingly.

On the Raspberry Pi there is a program called "pigpiod" which is a special daemon which can be programmed to generate PWM pulses, etc, either "servo pulses" or "duty cycle" pulses, depending on what kind of output we use. The DasMikro is intended to be driven from a RC receiver so it understands servo pulses. If I use a different controller, that will need "duty cycle" pulses.

Honestly I think the DasMikro is a bit too clever, I should have used the https://thepihut.com/products/motozero motozero instead, it looks quite hackable (can save a lot of weight by not using the screw terminals and IC socket, save space by using very low profile pin headers) but it doesn't include a voltage regulator, so I'd need a separate one.

One advantage of servo pulses is that you can drive both directions with variable speed using only one pin / wire, whereas a h-bridge circuit usually needs 3.
Robots: Betsie - RaspberryPi controlled flipper bot with gyro stablisation - too clever for her own good?
Stacie - tidy flipper; 4wd driven by hair bands
Paulmchurd
Posts: 227
Joined: Sun Dec 10, 2017 4:39 pm

Re: Mark's Antweight build

Post by Paulmchurd »

Sorry I use an Arduino so I was just comparing how it could work. Never used a raspberry pi.

I’ve been using this for motors.

https://www.ebay.co.uk/itm/L9110S-H-bri ... 2749.l2649

Not sure of the amp draw of 2 dc motors in parallel. Might not actually be able to handle it.
Post Reply