BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Fri Jul 20, 2018 11:24 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Looking for Switch to Control LED Headlight for rover
PostPosted: Thu Jan 13, 2011 2:28 am 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
Is there a product that will allow me to turn on/off an 12 VDC LED headlight by sending commands via an AtromPro28 (on BotBoard II)? Motor control is RoboClaw 2x10a.

I am not sure, but maybe a relay (switch?) controlled by a connection to one of the AtomPro28 I/O headers?? When it is triggered by command, it would allow 12 VDC to flow via a separate power source since the microcontroller uses 9VDC.


Top
 Profile  
 
 Post subject: Re: Looking for Switch to Control LED Headlight for rover
PostPosted: Thu Jan 13, 2011 2:43 am 
Offline
Master

Joined: Tue Jun 22, 2010 9:15 pm
Posts: 228
Basic Micro has some switches, and the R/C guys use them as well.

Bit Switch Radio Controlled Switch

http://www.basicmicro.com/Robotics_c_102.html

Alan KM6VV

_________________
Visit:
http://groups.yahoo.com/group/SherlineCNC/
http://tech.groups.yahoo.com/group/HexapodRobotIK/


Top
 Profile  
 
 Post subject: Re: Looking for Switch to Control LED Headlight for rover
PostPosted: Thu Jan 13, 2011 4:36 am 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
The bit switch order is placed. UPS Ground....do your thing. Thank you for the recommendation.


Top
 Profile  
 
 Post subject: Re: Looking for Switch to Control LED Headlight for rover
PostPosted: Thu Jan 13, 2011 5:00 am 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
I have a habit now of ordering too quick. I ordered one bit switch, but now wonder if I needed to order more. I guess I could control the camera power and LED headlight with the same switch, but what about the microcontroller?

Can the RoboClaw be reset with commands or is a bit switch needed?

Same question for Microcontroller (AtomPro28).?.?

Mike


Top
 Profile  
 
 Post subject: Re: Looking for Switch to Control LED Headlight for rover
PostPosted: Thu Jan 13, 2011 5:29 am 
Offline
Master

Joined: Tue Jun 22, 2010 9:15 pm
Posts: 228
the RoboClaw can't be reset by a command (I wish it could). I'd have to check the schematic of the RoboClaw and a data sheet for the uP, but you might be able to drive the reset line low (check) with a BB II line. Or possibly with the addition if a driver chip. I still have a pair of wires hanging out of my RoboClaw board to allow me to reset. But now I use a delay at start-up, and it seems to come up fine all the time.

Alan KM6VV

_________________
Visit:
http://groups.yahoo.com/group/SherlineCNC/
http://tech.groups.yahoo.com/group/HexapodRobotIK/


Top
 Profile  
 
 Post subject: Re: Looking for Switch to Control LED Headlight for rover
PostPosted: Thu Jan 13, 2011 7:07 am 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
The on/off function for the motor controller and microcontroller was more hypothetical. They both work fairly consistently when I have decent code running. I may come back to the remote reset capability later.

I am more concerned with the functioning of the IP Camera which is using the same Cat5e being used to send commands to the AtomPro28. I noticed that when I shut down the virtual com port the IP Camera's image changed. I reconnected and rebooted the camera manually. I haven't repeated this enough to confirm the behavior. The IP camera and LED headlight both use 12VDC so I may connect them both to the Bit Switch so I can cycle the power and reset the camera.

Mike


Top
 Profile  
 
 Post subject: Re: Looking for Switch to Control LED Headlight for rover
PostPosted: Thu Jan 13, 2011 7:03 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
Just confirming, there is no command to reset the RoboClaws. If you need to reset it you are probably in a state it couldn't receive commands anyway. You can stop the motors with commands of course which puts the controller in the same state as when you first power it on.

The RoboClaw has a reset header you can wire to a micro (like the AtomPro) to manually reset it. It is a 5v input. Pull low to reset. Set high (5v) or allow it to float to run.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: Looking for Switch to Control LED Headlight for rover
PostPosted: Wed Jan 26, 2011 6:36 am 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
Use this code to control Basic Micro Bit Switch using Terminal by Br@y++ macro command (0 or 1). The 0 and the 1 will combine with the #A. I used it to turn on and off an LED strip.

"#A1" = ON
"#A0" = OFF


Attachments:
test_bit_switch.bas [176 Bytes]
Downloaded 701 times
Top
 Profile  
 
 Post subject: Re: Looking for Switch to Control LED Headlight for rover
PostPosted: Wed Jan 26, 2011 7:24 pm 
Offline
Master

Joined: Tue Jun 22, 2010 9:15 pm
Posts: 228
Sounds good. Have you tried anything else for the reset line?

Alan KM6VV

_________________
Visit:
http://groups.yahoo.com/group/SherlineCNC/
http://tech.groups.yahoo.com/group/HexapodRobotIK/


Top
 Profile  
 
 Post subject: Re: Looking for Switch to Control LED Headlight for rover
PostPosted: Wed Jan 26, 2011 9:56 pm 
Offline
Guru

Joined: Sat Oct 23, 2010 5:12 am
Posts: 60
I haven't tried anything else. I figured I could just cycle the 12VDC supply on my end if necessary to restart everything (microcontroller, motor controller, 7-sgement display, and IP camera). The switch is allowing me to turn on/off just the LED headlight or also the IP camera, which is fine for me.

After my previous post, I was able to integrate the switch control into the keypad control code. Now I can turn on/off the light AND control the rover with key presses within the same code.

After I added the switch code to the key pad control (serin.....[dec2 command, dec2 speed, LED), the rover errors (motors turn even after key is lifted). I can recover control by pressing a key a few times. I assume it is tied to the timing which continues to be tricky. I continue to tweak the timing and structure of the code to minimize any errors when switching between key presses or holding down on key for a long period of timing (i.e. sends string of commands for serin variables).

Interestingly enough, I see the same hiccup I get when I press and hold a key to turn the motors using the Terminal Program (macros). I suspected the hiccup was due to the 'key repeat delay', but I am now sure it is the 'key repeat delay' setting and not the timing of the code. The LED light has the same hiccup rythym as the motors when I press and hold a key to turn on light or turn motors (Brief ON....Brief OFF...ON.....). Also, when I check the box in the terminal program which streams the macro command, there is no hiccup; motors and LED turn on immediately. I tried to change the Windows registry so there is no delay (0), but that didn't seem to work or have any noticeable affect. Any suggestions to configure Windows, the terminal program, or other setting to eliminate this hiccup?

Mike


Top
 Profile  
 
 Post subject: Re: Looking for Switch to Control LED Headlight for rover
PostPosted: Thu Jan 27, 2011 12:18 am 
Offline
Master

Joined: Tue Jun 22, 2010 9:15 pm
Posts: 228
No suggestions for the terminal side, but if you haven't already, I'd add code to save the "last state" of the switches (PB), and then not detect another press until they've been released first. Common thing to do in the Phoenix and powerpod programs for commands from the PS2. De-bounce is usually needed on directly scanned PBs as well.

Alan KM6VV

_________________
Visit:
http://groups.yahoo.com/group/SherlineCNC/
http://tech.groups.yahoo.com/group/HexapodRobotIK/


Top
 Profile  
 
 Post subject: Re: Looking for Switch to Control LED Headlight for rover
PostPosted: Thu Apr 16, 2015 12:16 pm 
Offline
New User

Joined: Thu Apr 16, 2015 12:00 pm
Posts: 1
I am more concerned with the functioning of the IP Camera which is using the same Cat5e being used to send commands to the AtomPro28. I noticed that when I shut down the virtual com port the IP Camera's i


_________________________________
asad


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO