Introduction: Lady Buggy, WiFi Edition

Picture of Lady Buggy, WiFi Edition

"Lady Buggy" is a lady bug styled "buggy" I designed for our grandkids ranging in age from 2 years to, well, I'll just leave it at 2 years +.

As shown in the video, Lady Buggy is a wifi enabled remote control vehicle that features both slow movement and ease of control. Lady Buggy uses a touch based iOS device locked in portrait mode (I have only tested with iOS devices, see Software section below) and simply requires dragging the red "button" around the display for forward, reverse and turning movement; easy enough for our 2 year old grandson to operate, with minor adult supervision of course.

I've included the source code in the form of an Arduino sketch for the Adafruit Feather Huzzah ESP8266 if you wish to modify it for use with a different devices.

Also, you will need soldering skills and soldering equipment, wire, and all parts listed in the first step, plus an Arduino IDE with appropriate libraries installed in order to complete Lady Buggy.

As is usual, I probably forgot a file or two or who knows what else, so if you have any questions, please do not hesitate to ask as I do make mistakes in plenty.

Designed using Autodesk Fusion 360, sliced using Cura 3.0.4 and printed in PLA on an Ultimaker 2+ Extended and an Ultimaker 3 Extended.

Step 1: Parts.

I've attached a PDF file containing two tables. The first table contains the 3D printed parts list with the settings and colors I used. The second table contains the purchased parts list.

Note the body (either "Body.3mf" or "Body.stl") must be printed with supports due to the 4 mounting towers inside of the shell being 2mm higher than the shell. Note also that Cura 3.0.4 would not place "Body.3mf" on the build plate, thus I had to disable the "Automatically drop models to the build plate" setting then manually lower the body until it made contact with the build plate (using Cura and looking at the build plate from beneath the model, I lowered the body until I could see the faint red outline of the body shell contact the build plate).

Prior to assembly, test fit and trim, file, sand, etc. all parts as necessary for smooth movement of moving surfaces, and tight fit for non moving surfaces. Depending on the colors you chose and your printer settings, more or less trimming, filing and/or sanding may be required. Carefully file all edges that contacted the build plate to make absolutely sure that all build plate "ooze" is removed and that all edges are smooth. I used small jewelers files and plenty of patience to perform this step.

This design uses threaded assembly, so a 6mm by 1 tap and die may be needed to clean the threads.

Step 2: Electronics.

Picture of Electronics.

Carefully cut the positive (red) wire on the battery in the middle, then strip and tin the leads as shown.

Solder the portion of the red wire coming from the battery to the center two terminals of the switch as shown

Solder a red wire between the outer pairs of the switch terminals as shown.

Solder the portion of the red wire coming from the connector to either of the outer two switch terminals as shown.

To power the servos, both servo positive (red) wires are soldered to the "BAT" pin on the Feather Huzzah and both servo negative (brown) wires are soldered to the "GND" pin on the Feather Huzzah.

To control the servos, the left servo signal (orange) wire is soldered to the "12/MISO" pin on the Feather Huzzah, and the servo right signal wire (orange) is attached to the "13/MOSI" pin on the Feather Huzzah.

Step 3: Software.

Picture of Software.

Lady Buggy uses an html "canvas" element for the graphics, and the canvas events "touchstart", "touchmove" and "touchend" for control (see https://www.w3schools.com/graphics/canvas_intro.asp). I'm of the belief the software should work on touch enabled devices other than iOS, but have not been able to confirm that it will.

I designed the Lady Buggy software to operate in both ap (access point) and station (wifi router) wireless modes.

If you choose to operate Lady Buggy in ap mode, a wireless router is not required as your iOS device communicates directly with Lady Buggy. To operate in this mode, you will go to the wifi settings on your iOS device and select the "LadyBuggy" network. Once connected, open the web browser on your iOS device and enter the ip address of "192.128.20.20" in the url field.

If you choose to operate Lady Buggy in station mode, you will communicate with Lady Buggy via a wireless router and thus need to change the Lady Buggy software such that "sSsid =" is set to your wireless router ssid and "sPassword = " is set to your wireless router password. You will need to change these settings using the Arduino IDE editor before compiling and downloading it to your Lady Buggy. Note that when using station mode, I've also included MDNS support that allows you to communicate with Lady Buggy at the ip address "ladybug.local" so the physical ip address is not required. However if you wish to use the physical ip address assigned by your wireless router, you will need to be connected to the Arduino serial monitor when you turn on Lady Buggy (make sure "#define USE_SERIAL 1" is at the top of the source code file before compiling and sending the code to the Lady Buggy) in order to view the ip addressed assigned to Lady Buggy by your wireless router.

After you've decided which mode you will be operating your Lady Buggy in and have made any necessary changes to the software, attach a suitable cable between your computer USB and the micro usb extension cable on the Lady Buggy, use the slide switch to power on Lady Buggy, then compile and download the software into the Lady Buggy.

Step 4: Assembly.

Picture of Assembly.

Attach two each of the o-rings to each of "Gear Wheel.stl" as shown.

Attach one gear wheel assembly ("Gear Wheel.stl" plus two O-Rings) to "Chassis.stl" using one "Axle Gear Wheel.stl" as shown. Repeat the process with the remaining gear wheel assembly and axle.

Attach one "Gear Servo.stl" to one of the servos using the screw supplied with the servo. This assembly must remain tight so apply your favorite glue if necessary. Repeat the process with the remaining gear servo and servo.

Insert the left servo into the left servo slot in the chassis as shown.

Insert the right servo into the right servo slot in the chassis as shown.

Place the battery in the chassis battery compartment as shown. Secure the slide switch to the chassis using either small screws or glue.

Place "Battery Cover.stl" over the battery as shown.

Wrap the wire bundle between the servos and Feather Huzzah with electrical tape, then place the Feather Huzzah into the battery compartment cover as shown.

Place the ball bearing into the chassis and secure in place with "Ball Bearing Cap.stl" as shown. Do not over tighten as the ball bearing must easily rotate in the chassis.

Attach the micro usb cable extender mail plug into the Huzzah ESP8266 as shown. Secure the female end to the chassis with the supplied screws as shown.

Using the four "Bolt.stl", attach your Lady Buggy body to the chassis assembly as shown.

Step 5: Operation.

Turn on the Lady Buggy using the slide switch. The switch I used is a center off switch, so sliding it to either outside position turns on Lady Buggy.

Connect to the Lady Buggy using your iOS device and the method you selected as described in the Software step.

On the iOS display, slide the red button towards the top of the display for forward movement, towards the bottom of the display for reverse movement, and left or right for left or right movement.

See the video for a short demonstration of controlling Lady Buggy.

Hope you like it!

Comments

Peder (author)2017-12-06

Hi

Fun thing, only I get the following error when trying to compile ladybuggy.ino:

Arduino: 1.8.5 (Windows 10), Board: "Adafruit HUZZAH ESP8266, 80 MHz, 115200, 4M (3M SPIFFS)"

C:\Users\pkb04\Downloads\Lady_Buggy\Lady_Buggy.ino: In function 'void setup()':

Lady_Buggy:471: error: invalid conversion from 'void (*)(unsigned char, WStype_t, unsigned char*, int)' to 'WebSocketsServer::WebSocketServerEvent {aka void (*)(unsigned char, WStype_t, unsigned char*, unsigned int)}' [-fpermissive]

webSocket.onEvent(LadyBuggySocketEvent);

^

In file included from C:\Users\pkb04\Downloads\Lady_Buggy\Lady_Buggy.ino:18:0:

C:\Users\pkb04\Documents\Arduino\libraries\firmware/WebSocketsServer.h:58:14: error: initializing argument 1 of 'void WebSocketsServer::onEvent(WebSocketsServer::WebSocketServerEvent)' [-fpermissive]

void onEvent(WebSocketServerEvent cbEvent);

^

exit status 1

invalid conversion from 'void (*)(unsigned char, WStype_t, unsigned char*, int)' to 'WebSocketsServer::WebSocketServerEvent {aka void (*)(unsigned char, WStype_t, unsigned char*, unsigned int)}' [-fpermissive]

Please help.

regards

Peder

gzumwalt (author)Peder2017-12-06

Peder, I'm truly sorry for the problems you're experiencing with this model. I use a Mac and do not have the Arduino IDE available on a pc. Try the following:

Change:


void LadyBuggySocketEvent(unsigned char ClientNumber, WStype_t EventType, unsigned char * Message, int MessageLength)


to:


void LadyBuggySocketEvent(unsigned char ClientNumber, WStype_t EventType, unsigned char * Message, unsigned int MessageLength)


(change "int MessageLength" to "unsigned int MessageLength")


See if that helps and please keep me informed.  I will attempt to get the code on a PC Arduino IDE as soon as possible.

Again, I am truly sorry for the problems.

Greg.

alexwhittemore (author)2017-11-30

Great design!

gzumwalt (author)alexwhittemore2017-11-30

Thank you very much, I'm glad you enjoyed it!

Greg

wdreumel (author)2017-11-30

Hi Greg,

She moves like a car. Make her walk like an insect, see the movie in

https://www.thingiverse.com/thing:2645758

By the way, your work is inspiring. You incorporated motion into static 3D prints.

Regards, Willem

gzumwalt (author)wdreumel2017-11-30

Thanks for the link Willem, that's cute, very nice!

And thanks for your comment, I do try various things to inspire others to do the same, and am always rewarded by comments such as yours.

Thanks again,

Greg

dsegel (author)2017-11-30

Also, consider incorporating

https://github.com/esp8266/Arduino/tree/master/lib...

into your sketch. It lets you do updates over the air instead of having to plug in each time. The ESP8266 board appears in your Port list as a network port.

gzumwalt (author)dsegel2017-11-30

Thank you very much!

I'm new at this Arduino / ESP8266 / ESP32 / HTML / Javascript and am grateful for any help I can get!

Many thanks again.

Greg

dsegel (author)2017-11-30

Great project! How did you do the multi-color print? Do you have the stl files in separate pieces?

gzumwalt (author)dsegel2017-11-30

Thanks, I'm glad you like it!

I printed the multi-color body using a dual extrusion Ultimaker 3 Extended. I did include a single extrusion body for those (including some of my grandkids) that wish to paint in their own style.

I do have the stl files in separate pieces, and can also upload the Autodesk Fusion 360 cad file if you're Fusion 360 user.

Thanks again!

Greg

Donald Bell (author)2017-11-27

Outstanding project, Greg! From the title and the photo I was surprised to find it was was a Wi-Fi controlled RC toy and not strictly a 3D printed object. You may get some more interest by putting "RC" or "Phone Controlled" in the title. And since the project features Adafruit products, send a tip over to their blog and you'll probably get a nice boost. https://learn.adafruit.com/how-to-send-a-blogtip-to-adafruit/how-to-send-in-a-tip

gzumwalt (author)Donald Bell2017-11-27

Thank you very much Donald, I'm truly glad that you enjoyed it!

I did alter the title in response to your suggestion (and an upcoming new version...).

Thanks again!

Greg

About This Instructable

3,822views

64favorites

License:

Bio: Formerly the owner of a company that designed software for avionics (EFIS, FMS, etc.) and video games (Tetris, Robocop, Predator, Michael Jordan in Flight, and ... More »
More by gzumwalt:Santa Sleigh, Wifi EditionMotorized WiFi Controlled ChassisModel Aircraft Styled Air Engine, Experimental
Add instructable to: